ARM semihosting #7694
Replies: 2 comments
-
Espruino does support RTT (serial over SWD) which I feel is very similar (minus the filesystem) - you just add Once done you get this new console device: https://www.espruino.com/Reference#l__global_SWDCON Full details at https://github.com/espruino/Espruino/blob/master/libs/swdcon/README.md |
Beta Was this translation helpful? Give feedback.
-
the SWDCON is just the espruino console redirection and was tested by me only on nrf52. Should work on stm32 too but if you have serial port available it may be easier to use that. SWDCON is useful when you don't have any other connection than SWD (no spare pins for serial or serial already used for something else or not part of the build at all). As for semihosting, well, redirected file i/o is nice in theory but I never had use case where it would help. BTW there is also a LINUX board build producing native linux executable so that may be used in some situations where otherwise semihosting would be useful. |
Beta Was this translation helpful? Give feedback.
-
https://interrupt.memfault.com/blog/arm-semihosting
Has Espruino some rudimentary support for using ARM semihosting for sharing console & filesystem with a host?
The disadvantage is it looks like hw debugger required such as STLink, but some boards already has it off the shelf, or has a price about few bucks and SWD pins usage.
In anvantage, semihosted Espruino runs with OpenOCD + VSCode can natively use host file system, console i/o, and maybe some debug facilities (I'm not shure about debug, maybe .js file name and line can be reported on errors, or reporting internal JS engine variables).
Beta Was this translation helpful? Give feedback.
All reactions