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":
https://www.youtube.com/watch?v=dvTI3KmcZ7I&t=1152s
So, 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).
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login