Mecrisp is an implementation of a standalone native code Forth for MSP430 microcontrollers. Many chips and all current MSP430 based Launchpads are supported. It fits into 11 kb of flash or fram and runs with at least 512 bytes of ram. You can choose to compile to flash or to ram, and it generates native code with folding, inlining of short words and it opcodes common instructions. Note that it doesn't need to save any pointers, so it compiles directly into flash memory without the need for erase cycles. It is completely interrupt-save and you can hook your Forth definitions to interrupt vectors. Of course, you should not hook create to a timer interrupt, unless you want all your memory to be filled with random creatures :-) Although it is in spirit of ANS, there are a few differences: Be careful !
It is running on the following chips out of the box:
I am looking forward to find out how Mecrisp can serve you best. Examples are going to come, implementations for other chips of the MSP430 family shouldn't be too far away. Do you have a particular one in mind ? Do you have great code snipplets that show the abilities of Mecrisp well ? Write an E-Mail and you will be in touch !
You can get Mecrisp on its download page.
Mecrisp-Stellaris is the younger sister of Mecrisp and runs on various ARM Cortex M chips. This is a big family of microcontrollers with a common processor architecture and very different peripheral capabilities. Despite the name, not only Stellaris chips are supported: It runs on a wide variety of chips of the three core flavours M0, M3 and M4. Mecrisp-Stellaris fits into 16 kb of flash and runs with at least 1 kb of ram. If you wish your favourite chip to be in this list, just get in contact, and maybe there will be another port soon.
Ready-to-fly builds are included for:
|TI Stellaris/Tiva Launchpad||LM4F120H5QR / TM4C123GH6PM|
|TI Tiva Connected Launchpad||TM4C1294NCPDT|
|TI MSP432 Launchpad||MSP432P401R|
|STM L053 Discovery||STM32L053C8T6|
|STM Nucleo L152RE||STM32L152RE|
|STM Nucleo 401RE||STM32F401RE|
|STM Nucleo 411RE||STM32F411RET6|
|STM F0 Discovery||STM32F051R8|
|STM VL Discovery||STM32F100RB|
|Shenzhen LC Technology board||STM32F103C8T6|
|STM F3 Discovery||STM32F303VCT6|
|STM F4 Discovery||STM32F407VGT6|
|STM F429 Discovery||STM32F429ZIT6|
|Freescale Freedom FRDM-KL25Z||KL25Z128VLK4|
|Breadboard friendly, DIP packaged||LPC1114FN28|
|Very small TSSOP20 packaged||STM32F030F4|
|nRFgo Starter Kit||nRF51822|
Mecrisp-Ice is an enhanced version of Swapforth and the J1a stack processor by James Bowman, featuring three MSP430 style IO ports, a tick counter, constant folding, inlining and tail-call optimisations. As Mecrisp traditionally has been friendly to flash memory, you can save your Forth programs into the SPI flash on the Icestick, you can even make it run automatically on boot. Ready-to-fly bitstream for your Icestick is included !
James Bowman, well known for his elegant J1 Forth CPU design, bundled his efforts with the first completely open source FPGA toolchain of the Icestorm project to create a J1 microcontroller on a Lattice iCE40HX1K FPGA !