Matthias Koch


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:

  • MSP430F2274 (9600 Baud, 8 MHz, TX on P3.4, RX on P3.5)
  • MSP430G2553 (9600 Baud, 8 MHz, TX on P1.2, RX on P1.1)
  • MSP430G2955 (9600 Baud, 8 MHz, TX on P3.4, RX on P3.5)
  • MSP430G2855 (9600 Baud, 8 MHz, TX on P3.4, RX on P3.5)
  • MSP430G2755 (9600 Baud, 8 MHz, TX on P3.4, RX on P3.5)
  • MSP430F5529 (115200 Baud, 8 MHz, TX on P4.4, RX on P4.5)
  • MSP430FR4133 (115200 Baud, 8 MHz, TX on P1.0, RX on P1.1)
  • MSP430FR5969 (115200 Baud, 8 MHz, TX on P2.0, RX on P2.1)
  • MSP430FR6989 (115200 Baud, 8 MHz, TX on P3.4, RX on P3.5)
  • Special Mecrisp for MSP430F1612 with initialisations for Launchpad hardware is included to conquer your Launchpad completely.

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
Teensy 3.1 MK20DX256VLH7
Chinese QF-LM4F232 LM4F232H5QC
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 !

Great things elsewhere:

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 !