A question recently received from a new FlashForth user:
> The (theoretically) simple thing I'm struggling with is: How do I > transmit a file for compilation. I google the !/&§" out of it, but > can't find a solution. > Working with a linux system, I've tried putty, moserial, minicom and > more, but none allows me to tranfer a file w/o errors. > Just working through the terminal works great, jut uploading words is > not possible. Handshake is on (hard- and soft). > How do you do that?
As best as I can figure it, it seems that for some reason FlashForth cannot receive characters while it is processing the previous line of input from the terminal, so some characters are lost if you simply paste a file to the terminal. However, the shell that comes with FlashForth is evidently designed to work around this limitation, waiting for the correct time to send each line. In the FlashForth files there is a directory called
shell which contains a python script called
ff-shell.py. After you start it, you can use the
#send <filename> command to send a file. There are a number of other handy commands in that shell for interacting with FlashForth.
A few caveats about the FlashForth shell:
(1) The script is a python2 script, and you must have the pyserial python library install (the python2 version of it).
#send will try to add the extension “.txt” to whatever filename you give it, which is annoying. I fixed this by commenting out lines 175-176 in the source code.
if len(args) > 3: stopString = args # if pathfile.endswith(".txt") == False: # pathfile = pathfile + ".txt" line = ""