Hi, love the FlashForth, just what I needed for the Atmega328p.
However, struggling to get code onto this device as the python ff-shell3.py will not work and the preferred ff-shell.tcl hangs when trying to connect to the port. (If I put in a non existant port, at least I can get into the tcl application, but soon as I try to enter a valid port, it hangs and I have to kill the process ..
I tried with sudo, but it won't run at all. Should not need it, as my user can access the port with screen fine ..
The port for me is /dev/tty.usbmodem144301.
I can interract with the board with the 'screen' program just fine.
Appreciate some help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't think the baudrate is the problem. The TCL shell waits for 100 ms for each line.
You can fix it by editing the sendLine procedure.
diff --git a/shell/ff-shell.tcl b/shell/ff-shell.tclindex 8937504..04ea7be 100755--- a/shell/ff-shell.tcl+++ b/shell/ff-shell.tcl@@ -365,11 +365,11 @@ namespace eval smartSend { resetFlags
return -code error "sendLine failed on entry: Timeout waiting for CR."
}
- set retries 20+ set retries 2000 while {$waitingForCR && ($retries > 0)} {
# puts "sendLine waiting for CR, retries remaining: $retries"
update
- after 100+ after 1 incr retries -1
}
if {$waitingForCR} {
@@ -380,7 +380,7 @@ namespace eval smartSend { # Send all characters with pauses between and a CR at end.
foreach character [split $line {}] {
serialPort::send $character
- after $pauseBetweenChar; # pause after each character+ #after $pauseBetweenChar; # pause after each character }
serialPort::send "\r"
set waitingForCR true
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, love the FlashForth, just what I needed for the Atmega328p.
However, struggling to get code onto this device as the python ff-shell3.py will not work and the preferred ff-shell.tcl hangs when trying to connect to the port. (If I put in a non existant port, at least I can get into the tcl application, but soon as I try to enter a valid port, it hangs and I have to kill the process ..
I tried with sudo, but it won't run at all. Should not need it, as my user can access the port with screen fine ..
The port for me is /dev/tty.usbmodem144301.
I can interract with the board with the 'screen' program just fine.
Appreciate some help
Never mind, found it worked if I connect to /dev/cu.usbmodem144301, not sure what the difference is between the two versions of the same port..
Works really slow at loading code though even with 1ms delay.
Is there any chance of operating at higher baud rates? Or is it just not faster enough to interpret ..
Last edit: Bernard Mentink 2023-10-04
I don't think the baudrate is the problem. The TCL shell waits for 100 ms for each line.
You can fix it by editing the sendLine procedure.
Thanks Mikael, that was perfect, much faster ..
Now all I need is a way to send all files in a folder/directory, and maybe
skip comments .... :)
Last edit: Bernard Mentink 2023-10-05
The pyserial library exists also for OSX. Why does the ff-shell3.py not work on OSX ? What are the error messages ?
I installed pyserial with pip, but still get this: