From: pix <pi...@te...> - 2007-03-02 08:51:16
|
On Fri, Mar 02, 2007 at 06:57:48AM +0100, pix wrote: > i've just been working on a python script to upload forth source files > to amforth. it watches the character echo to do a kind of software > flow control, and waits for a prompt after each line. to test it with > different inputs, i've been using the files in blocks, and when i hit > blocks/interrupts.frt i ran into what i think is a parser bug in > amforth. i took hans' suggestion and made it strip out comments before uploading. it uses a regular expression, so there is the possibility that it will strip out comment-shaped things inside a ." " group, but apart from that it seems to work. the script is here: http://libarynth.fo.am/cgi-bin/view/Libarynth/AmForth#better%20uploading%20with%20python you probably need linux or at least osx to run this. it might also work under windows if it is possible to specify a serial port as a filename (like COM1:). i also have a note on the page about adding backup/restore rules to the makefile, because matthias said this was tricky in an earlier post. pix. |