TG9541/stm8ef

Test and document usage of Edzelf/escom for STM8 eForth

TG9541 opened this issue · 4 comments

TG9541 commented

By accident I noticed that for Windows there is now an alternative to e4thcom:

escom is a terminal program that runs under Windows. It can be used for communicating with an embedded Forth system, like "stm8ef" for the STM8 family or the "mecrisp" for the STM32 family. The connection between the Windows computer and the target Forth system is through a USB to Serial converter.

Task: get a PC with Win10 or Win11 and test escom

TG9541 commented

This appears to be working. @Edzelf made stm8ef the default target.

In a test with the STM8S001J3 I copied escom.exe to the STM8 eForth folder and used the following command line:

escom.exe -p COM3 -p .;./mcu;./lib;./out/STM8S001J3/target

Some observations:

  • downloading and running the unsigned escom.exe binary on a PC with Win10 and the default policy feels like cutting red tape
  • loading single words #include and #require appear to be working
  • library words with "Posix standard characters" in Windows is a mess (e.g., >REL). This will require a special STM8 eForth Windows deliverable with a lot of escaping.
TG9541 commented

According to this source the following characters would need to be escaped:

  " - double quote
  * - asterisk
  . - (trailing) dot
  / - slash
  : - colon
  < - less than
  > - greater than
  ? - question mark
  \ - backslash
  | - vertical bar

&amp; style escaping might be feasible, especially since this would only apply to a zipped deliverable.

TG9541 commented

I'm testing a variant where the chars above (maybe safe ".") and "&" need to be escaped.

#ls might benefit from transparent unescaping so that the user sees, e.g., ." while it's in the file system as .&21.