february 2020
noforth logo

noForth


is an interactive 16-bit stand-alone forth for MSP430.
Authors: Albert Nijhof & Willem Ouwerkerk (Mail us)

Last update 02feb2020

You can put the noForth image on a Launchpad and then program the chip using any serial terminal.


noForth C and V

noForth comes in two variants: However, noForth C can be used in the larger flash memories and noForth V in the smaller ones. To get an idea of the differences between C and V, see noforth words.pdf


Low Power noForths

The "Low Power" noForths are marked with a dash: noForth C-, V-, CC- and VV-.

"Double" noForth

noForth CC and noForth VV are faster but less compact than noForth C and noForth V.
The priorities for noForth C and V: 1. robust and comfortable, 2. compact, 3. fast
The priorities for noForth CC and VV: 1. robust and comfortable, 2. fast, 3. compact

New in noForth 200202

Loops

Added: FOR NEXT
u for .. next
FOR-NEXT is faster than DO-LOOP. It uses only 1 cell on the return stack and loops u times. The index is on the reurn stack and counts down from u-1 to zero. On u = 0 the code between for and next is skipped .
i ( -- index ) can be used with FOR-NEXT:
: 4x ( -- ) 4 for i . next ;
4x [enter]  3 2 1 0  ok
leave and unloop do not function with FOR-NEXT. You may use rdrop or r> to leave FOR-NEXT conditionally because i equals r@ :
: name .. for .. key? if r> exit then .. next -1 ;
Revised: DO ?DO LOOP +LOOP
DO-LOOP now uses 2 cells on the return stack (was 3 cells). It no longer uses the processor register DOX. This means that DOX is now a free register, together with XX, YY and ZZ.
The behaviour of DO-LOOP has not changed.


The noForth solutions for conflicting names

NEXT is state-smart
compiling: the NEXT of FOR-NEXT.
executing: the assembler-NEXT of the inner interpreter.
# is state-smart
compiling: the forth-# for number printing.
executing: the assembler-# that denotes a literal.
AND and XOR (forth vs. msp430)
In noForth assembler the msp430-AND is BIA .
In noForth assembler the msp430-XOR is BIX .
This is in harmony with the existing msp430 commands BIC and BIS.


Some details to remember



Downloads

The noForth binaries contain only the noForth kernel without the tools. After noForth is programmed on the chip you have to send the file noforth tools.f to noForth for .S WORDS MANY DMP and SEE.
In the list below you find the general noForth Intel-hex files for the MSP430 processors. It may be necessary to adapt the CONFIG list (settings for Baud rate, Clock speed, etc.) in the noForth Intel-hex files. Follow the instructions in the README file.

noForth versions 200202
MSP430F149 noforths 149.zip

MSP430G2553 noforths 2553.zip
MSP430G2955 noforths 2955.zip

MSP430FR2433 noforths 2433.zip
MSP430FR2x55 noforths 2x55.zip
MSP430FR5739 noforths 5739.zip
MSP430FR5969 noforths 59x9.zip
MSP430FR5994 noforths 5994.zip

How to get noForth in the MSP430?
Put the noForth image in the MSP430 with the 'UniFlash' program (by Texas Instruments).
See how to use uniflash
Uniflash will not function with the MSP430F149.
See how to f149
With the FET-interface on the MSP-EXPFR2355 all MSP430 chips (with the exception of the 100-series) can be programmed.
See msp-exp430fr2355 as programmer

Documentation about boards
MSP430F149 Minim Core board.pdf 61kB FROM, Baud rate 9600
MSP430F149 Dupont board.pdf 61kB FROM, Baud rate 9600
MSP430F149 Mini-V3 board.pdf 61kB FROM, Baud rate 9600

MSP-EXP430G2.pdf 16kB FROM, Baud rate 9600
MSP-EXP430G2et.pdf 16kB FROM, Baud rate 9600

MSP-EXP430FR2433.pdf 16kB FRAM, Baud rate 115k2
MSP-EXP430FR5739.pdf 16kB FRAM, Baud rate 9600
MSP-EXP430FR2355.pdf 32kB FRAM, Baud rate 115k2
MSP-EXP430FR5969.pdf 64kB FRAM, Baud rate 115k2
MSP-EXP430FR5994.pdf 256kB FRAM, Baud rate 115k2

MSP430G2553 on Egel kit.pdf 16kB FROM, Baud rate 38k4
MSP430G2955 on Cosey robot.pdf 56kB FROM, Baud rate 9600


Egel project

egeltje The Egel project consists of about 50 elementary examples of hardware control with noForth on the MSP430. In each example you find a file with forth code, documentation and links to more information on the internet.



Four answered questions about noForth

  1. What do I need to get my program compiled in noForth?

    noForth receives the text, translates it into code and compiles that in flashrom. You need a simple communication program which is able to send text to noForth on the chip. (Teraterm for Windows, CoolTerm for OS X, e4thcom for Linux, ... )
      Baud rate 9600 - data 8 bit - parity none - stop 1 bit - flow control none -
      transmit delay: 0 ms/char, 100 ms/line
  2. Will compiled code stay in flashrom after a power off/on?

    No, unless you have sent the command FREEZE.
  3. Is it possible to erase 'frozen' code?

    Yes. Executing a MARKER or a SHIELD erases the code that is compiled after it.
  4. Re-configuration: is it possible to change clock speed, Baud rate, serial port, pin and port for the APP button from within noForth?

    Yes, see the documentation in noforth re-config files.zip.



Before you start:

Since noForth compiles in FlashROM, it is unavoidable that some words don't behave exactly as the standard prescribes. We tried, without restricting the programming freedom, to minimize the aberrations from the standard. This concerns:
HERE ALLOT ! C! +! MOVE (only RAM)
, C, (only ROM)
CREATE




Files

Programs (.f) and documentation
 This noForth software
 is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 This software is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 


How to make a turnkey system

' <my-application>   TO APP   FREEZE
(Put the application token in the value APP and type FREEZE)
The execution of the APP vector can be bypassed with a switch.



noForth is written 'from scratch'

pwm
home