Anyone here tried mercrisp FORTH for programming ARM Cortex M? i.e. "Blue Pill", nRF5, STM32, etc.?
-
http://mecrisp.sourceforge.net/
It runs very close to the bare metal because, despite being REPL interpretive, it includes an optimising compiler that seamlessly generates native code AND runs on the target itself, AND the whole thing runs on as little as 16K flash and 2K RAM. Amazing!
It also happens to be what the founder of Jeelabs has switched to using instead of C, and we all know that he's a very capable C programmer. I already knew that but had been dismissive about it (after all, FORTH has been around a long time) until I saw this interesting short overview video where a regular guy demonstrates how easily it programs a "blue pill":
Mecrisp Forth on STM32 Microcontroller (blue pill) – 30:54
— jephthaiSo, sure, FORTH itself is nothing new, but it's the inclusion of a native code generating optimizing compiler in such small space on the target that suddenly makes this all so attractive. I mean, for instance, you could wirelessly connect to any node you want and debug it and/or modify it in real time if you wanted to.
-
I have since installed it on a BBC microbit. Installation is a snap: literally one drag and drop.
-
I'd be interested to hear what you think compared to uLisp. The notion of uLisp seems a little strange to me. But then, I never got past thinking of lisp as just fun to play with.
-
@nagelc I'm working to get the nRF52840 supported by mecrisp-stellaris. If that happens, then it will be faster than uLisp, because then FORTH will automatically compile seamlessly into native machine code rather than running on a VM. Allegedly the performance would then be very close to that of compiled C code. To me that would be like having my cake (interactivity of a REPL) and eating it too (fast execution speed).
Suggested Topics
-
Update RF24 library to latest version
Bug Reports • 23 Mar 2014, 23:37 • andriej 24 Mar 2014, 22:52 -
Code Garage to the rescue.
General Discussion • 11 Jan 2025, 11:25 • skywatch 21 days ago -
Human presence sensors....
General Discussion • 31 Jan 2025, 10:54 • skywatch 9 Feb 2025, 19:36 -
Meet in Malmö, Summer 2016?
General Discussion • 1 Feb 2016, 15:34 • bjacobse 13 days ago -
ESP-NOW
General Discussion • 22 Apr 2018, 05:58 • NeverDie 27 days ago -
Anybody got one / a few spare minimalist rfm69hw shields for wemos d1 mini?
General Discussion • 20 Sept 2024, 08:45 • kiesel 11 Oct 2024, 15:32