Jump to content
43oh

Forth on the MSP430


Recommended Posts

I have been intrigued with Forth since I was at school in the early 80s.

 

There has been a renewed interest in Forth as a lightweight language with lightweight development tools - especially in these days of open source , where there is a backlash against the huge IDE tool chains needed to develop and debug code - even on the smallest of microcontrollers.

 

As part of my recent investigation of MSP430 I have found a number of free, open source Forth implementations - which may be worth a look.

 

1. Fast Forth by Jean Michel Thoorens   https://gitlab.com/Jean-Michel/FastForthForMSP430fr5xxx

 

This is coded in MSP430 assembly language, is aimed at the newer MSP430 devices with FRAM and has the unique ability to mix Forth and asm in the source code.

 

As a result of clever coding in asm - it really is fast, and has some nice features.

 

It comes with an integral symbolic assembler, and support for accessing a SD card.

It needs a minimum of 8K to 11K of FRAM - depending on the build options selected.

 

It communicates with the PC using TeraTerm (or similar) at an astounding 921600 baud. It can load and compile Forth source code faster with a $2 USB- serial adaptor, faster than a FET can load a hex file.

 

2.  Mecrisp - By Matthias Koch  http://mecrisp.sourceforge.net/

 

Another Forth written in native MSP assembly language.  (ARM Cortex version also available).  Out of the box versions available for the following G and FR processors - plus a special for the MSP430F1612 on the G2 Launchpad

 

  • 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.

 

Matthias is working on a version for the new ChipStick MSP430FR2433 device - see news in post below.

 

3.  4E4th by Dirk Bruehl & Michael Kalus   http://www.4e4th.com/

 

An educational package aimed at high-school/university students or makers/hobbyists. Runs on G2 LaunchPad.

Comes with a simple GUI to allow saving and loading of source code.  Versions for FRAM based MSP430 devices available on request.

 

Dirk Bruehl describes the package in his 2012 EuroForth conference paper

 

http://www.complang.tuwien.ac.at/anton/euroforth/ef12/papers/bruehl.pdf

 

4. Camel Forth by Brad Rodriguez      http://www.camelforth.com/download.php?view.32

 

Brad has written extensively about the mechanics of writing Forth interpreters over the years, and was probably one of the first to port Forth to the MSP430.   It uses Mike Kohn's "Naken" lightweight cross assembler.

 

 

There are other MSP430 Forth implementations available AmForth,  eForth and MPE VFX Forth - with a cross platform GUI for Win, Linux  and  Mac OS X

 

 

Ken

Link to post
Share on other sites
  • 2 weeks later...

Over the last  couple of days  Matthias Koch  has ported his Mecrisp MSP430 Forth 2.03 across to my MSP430FR2433 ChipStick design.

 

I am now happy to report that the first testing happened earlier this evening - so now we have a good native assembly language Forth running on the ChipStick.

 

There will be an update to my GitHub - in the next couple of days.

 

 

 

Ken

post-48241-0-22331700-1459985885_thumb.jpg

Link to post
Share on other sites
  • 3 months later...
  • 3 weeks later...
  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...