pforth icon indicating copy to clipboard operation
pforth copied to clipboard

Guide for building on an embedded platform

Open znmeb opened this issue 3 years ago • 2 comments

I'm interested in building pForth for an ARM Cortex-M micro-controller. I've looked at the existing Makefiles in platforms but I can't figure out from that how to create one for, say, an Electro-Smith Daisy, a Raspberry Pi Pico or a Teensy. The Daisy and Pico have full C/C++ SDKs that run on Linux (and MacOS and Windows). I think there's an SDK for Teensy as well but I've only used the Arduino IDE with it.

How would I go about doing such a port? I am probably only going to need the CORE and BLOCK word sets in the final build, but I will eventually want to write a Forth-style assembler.

znmeb avatar Jul 05 '22 23:07 znmeb

Have you tried the cross compiling docs here? http://www.softsynth.com/pforth/pf_ref.php#Compiling-Embedded

Please let me know if they do not work or you have questions. Also how is the memory fit?

philburk avatar Jul 06 '22 14:07 philburk

Also how is the memory fit?

The base Pico has 264K bytes of RAM and at least 2 MB of flash - some variants go as high as 16 MB of flash. The Arduino IDE lets you configure some of the flash as a filesystem.

The Teensy (4.1) has 1 MB of RAM and 8 MB of flash. The Daisy Seed has 64 MB of RAM and 8 MB of flash.

znmeb avatar Jul 06 '22 16:07 znmeb