march 2024
noForth
is an interactive stand-alone forth
Authors:
Albert Nijhof & Willem Ouwerkerk
(
Mail us)
Put the noForth image on a processor board
and then program the chip using any serial terminal.
noForth m is for MSP430, runs in ROM, 1 cell is 16 bits.
noForth r is for RISC-V, runs in ROM, 1 cell is 32 bits.
noForth t is for RP2040, runs in RAM, 1 cell is 32 bits.
When we use the word ROM it may be FROM, FRAM, Flash ROM or Flash RAM.
Until now we have the following noForth variants:
m mv mc mcv r rv rc rcv t tv
m = for MSP430
r = for RISC-V
t = for RP2040 (thumb2)
c = compact
v = with vocabularies
"Low Power" noForths for MSP430 are marked with a dash:
m- mv- mc- mcv-
The priorities for noForth are:
1. robust and comfortable, 2. fast, 3. compact.
For the compact variants:
1. robust and comfortable, 2. compact, 3. fast.
Downloads
How to get noForth in ...
Hardware documentation
Egel project (MSP430)
noForth t hardware examples (RP2040)
Four answered questions about noForth
Before you start
Documentation and program files
How to make a turnkey system
Downloads
In the list below you find the noForth images (binaries).
It may be necessary to adapt the CONFIG list (settings for Baud rate, Clock speed, etc.). Follow the instructions in the README file.
Advice: always use the latest versions.
The image contains only the noForth kernel without the tools, assembler or disassembler.
Once noForth is in the chip you have to include the file
<noforth r tools.f>
or <noforth m tools.f> for .S WORDS MANY DMP and SEE.
noForth binary files for RP2040 PICO (240101 yymmdd)
RP2040 PICO noforths-t.zip
RP2040 PICO noforths-t-duo.zip
DUO means: a noForth in both processors at the same time.
noForth binary files for RISC-V (240101 yymmdd)
RISC-V GD32VF noforths gd32vf103.zip
noForth Intel-hex files for MSP430 (240101)
MSP430FR2433 noforths 2433.zip
MSP430FR2x55 noforths 2x55.zip
MSP430FR5739 noforths 5739.zip
MSP430FR5969 noforths 59x9.zip
MSP430FR5994 noforths 5994.zip
MSP430F149 noforths 149.zip
MSP430G2553 noforths 2553.zip
MSP430G2955 noforths 2955.zip
How to get noForth in ..
How to get noForth in the RP2040 PICO
howto rp2040 pico.pdf
How to get noForth in the RISC-V
howto seeed studio gd32vf.pdf
howto sipeed longan nano.pdf
How to get noForth in the MSP430
Put the noForth image in the MSP430 with the 'UniFlash' program (by Texas Instruments).
See
howto use uniflash
Uniflash will not function with the MSP430F149.
See
howto 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
Hardware documentation
RP2040 boards
pico rp2040 dev board.pdf
RISC-V boards
seeed studio gd32vf dev board.pdf \ 128kB FROM, 32kB RAM
sipeed longan nano board.pdf \ 128kB FROM, 32kB RAM
MSP430 boards
msp430f149 minim core board.pdf \ 61kB FROM, 9600 Baud rate
msp430f149 dupont board.pdf \ 61kB FROM, 9600
msp430f149 mini-v3 board.pdf \ 61kB FROM, 9600
msp-exp430g2.pdf \ 16kB FROM, 9600
msp-exp430g2et.pdf \ 16kB FROM, 9600
msp-exp430fr2433.pdf \ 16kB FRAM, 115k2
msp-exp430fr5739.pdf \ 16kB FRAM, 9600
msp-exp430fr2355.pdf \ 32kB FRAM, 115k2
msp-exp430fr5969.pdf \ 64kB FRAM, 115k2
msp-exp430fr5994.pdf \ 256kB FRAM, 115k2
msp430g2553 on egel kit.pdf \ 16kB FROM, 38k4
msp430g2955 on cosey robot.pdf \ 56kB FROM, 9600
Egel project (MSP430)
|
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
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, ... )
Will compiled code stay in flashrom after a power off/on?
No, unless you have sent the command FREEZE
.
Is it possible to erase 'frozen' code?
Yes. Executing a MARKER or a SHIELD erases the code that is compiled after it.
Is it possible to change clock speed, Baud rate,
serial port, port and pin for the APP button from within noForth?
Yes, see the documentation in:
configs msp430.zip
configs gd32vf.html (for RISC-V)
configs-rp2040-noforth-t.zip
Before you start
-
When noForth compiles in FlashROM (MSP430 and RISC-V),
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.
See readme-1 and readme-2 below.
This concerns the words:
HERE ALLOT ! C! +! MOVE
(only RAM)
, C,
(only ROM)
CREATE
-
noForth skips characters greater than hex 7E in the input stream.
-
WORD
does not exist in noForth.
Use BL-WORD
instead of BL WORD
.
Conflicting names
-
NEXT
is state-smart
Compiling: the NEXT of FOR-NEXT.
Executing: the assembler-NEXT of the inner interpreter.
-
Only for MSP430 without vocabularies: #
is state-smart
Compiling: the forth-# for number printing.
Executing: the assembler-# that denotes a literal.
-
MSP430 only: AND
and XOR
(forth vs. assembly)
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
.
Documentation and program files
General
Readme-1 \ RAM and ROM
Readme-2 \ FREEZE and FORGET
session1.pdf \ BASE and the prompt
input stream.pdf \ About the input stream
⎷ noforth documentation.pdf
how noforth is made.pdf
For noForth t (RP2040)
noforth-t-tools.f
noforth-t-das.f \ noForth t disassembler
noforth-t-more-words.f \ Code for more standard words
noforth-t-asm.f \ noForth t assembler
noforth-t-asm-ext.f \ Some rarely-used instructions
thumb2 asm notation.pdf \ Thumb2 asm notation in noForth
pio.zip \ About the RP2040 PIO
commacode for noforth t.pdf
For noForth r (RISC-V)
noforth r tools.f
noforth r das.f \ noForth r disassembler)
noforth r more words.f \ Code for more standard words
noforth r asm.f \ noForth r assembler
risc-v asm notation.pdf \ RISC-V asm notation in noForth
commacode for risc-v.pdf \ How to use it
For noForth m (MSP430)
noforth m tools.f
noforth m das.f \ noForth m disassembler
noforth m more words.f \ Code for more standard words
noforth m asm.f \ noForth m assembler
msp430 asm notation.pdf \ MSP430 asm notation in noForth
commacode for msp430.pdf
Beethoven430 \ Music on the launchpad
noforth m metacompiler.zip \ 200202
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'
- Floored division
- With decompiler
CATCH
and THROW
- With meta compiler
- Fast
FIND
(eight threads)
KEY KEY?
and EMIT
are vectored
- Adjustable prompt, for extra information
VALUE
with prefixes TO +TO
and INCR
- Missing core words are available as source
- Assembler and disassembler available as source
- Forget-functions (
MARKER
and SHIELD
) do not spill Flash memory
- When an error occurs while loading a file, noForth will ignore the rest of the file
- ...