AmForth¶
AmForth is an easily extendible command interpreter for the Atmel AVR8 Atmega micro controller family and some variants of the TI MSP430. The RISC-V CPU (32bit) is currently beeing worked on. It has a turnkey feature for embedded use too.
AmForth is published under the GNU Public License v3 (GPL). A commercial use is possible but for traditional commercial uses there are commercial Forths — amForth just is not one of them.
AmForth runs completely on the controller. It does not need additional hardware. It makes no restrictions for hardware extensions that can be connected to the controller. The default command prompt is in a serial terminal.
The command language is Forth. AmForth implements an almost compatible Forth 2012 indirect threading 16bit Forth.
AmForth for the AVR8 needs 8 to 12 KB Flash memory, 80 bytes EEPROM, and 200 bytes RAM for the core system. A similar code for the MSP430 fits into 8KB flash. The MSP430 info flash is used for similar purposes as the EEPROM for the AVR8 platform.
The 32-bit variants for ARM and RISC-V are experimental. They share most of the high-level code with the 16-bit variants.
Work In Progress¶
Here you’ll find things that are not yet released but will be part of the next release. See the code section at Sourceforge to get the most recent sources
- Early release of a new test subdirectory. Only one targetboard so far. See test/Howto.txt
- small documentation patch provided by Carsten Strotmann. Also a few “delete-trailing-whitespace” changes.
18.10.2020: release 6.9¶
- tools/amforth-shell.py fixed python3 error (in –no-error-on-output option path), fix provided by Tristan Williams.
- tools/amforth-shell.py fixed indentation error in line 1146, fix provided by Tristan Williams.
- tools/amforth-upload.py fixed logic error in search_and_open_file
- tools/amforth-shell.py ported to python3, patch contributed by Tristan Williams, thank you!
- Added refcard manually generated from 5.5 with a warning! This is outdated!
- Commented Projects/ClockWorks: added version from 2018-12-15; they were apparently lost or never published on the website. This version features a clock reading the DCF77 time radio signal.
- core(AVR8): restored avr8/words/no-jtag.asm from release 5.5; removed not functional avr8/devices/*/words/no-jtag.asm files
- added one-line patch to amforth-shell.py, provided by Tristan Williams. Will now report filenames which occur more than once.
- added Fixing D0> to Opinion.
- added a new section Opinion for blog type pieces of text.
- core(AVR8): fixed d>0, reported by Martin Nicholas.
- April 2020: friendly takeover of new maintainer (see this email message)
7.1.2019: release 6.8¶
- core(ARM32): new target ARM with 32bit word size using the Cortex M4 board LM4F120XL TI Stellaris Launchpad and as a Linux-ARM program.
- core(ARM32+RV32): compile to RAM, introducing the RAM Wordlist as target.
- core(AVR8): small fixes for bigger Atmegas. Thanks to Martin.
- core(RV32): numerous small improvements.
24.7.2018: release 6.7¶
3.10.2017: release 6.6¶
- core(ALL): Update to Recognizer v4 keyword set.
- doc(ALL): Using Gerald Wodni’s module for LCD HD44780.
- core(ALL): new deferred prompt word .input. Prompts
- core(AVR8): More work in interrupt reliability.
- core(ALL): factor (create-in) (addr len wid – ) to make a new wordlist entry in a given wordlist without XT and data area.
30.4.2017: release 6.5¶
- core(AVR8): redesigned interrupt handling to improve reliability. Thanks to Erich.
- core(MSP430): highly experimental support for interrupt service routines in Forth for MSP430 2553. Manually enable it if your’re brave the same way the AVR’s work. Interrupts on the MSP430 and Interrupt Service Routines.
31.3.2017: release 6.4¶
- lib(ALL): (( for multiline comments. Comments end with )).
Uses recognizers for that from
rec-double-paren.frt
. - lib(AVR8): Implement I2C Slave. Renamed i2c.>n to i2c.n@ and i2c.n> to i2c.n!. I2C Generic
- lib(ALL): Recognizer for the Forth 2012
'c'
Syntax to replacechar c
and[char] c
. Just load therec-char.frt
file. - core(AVR8): add >rx-buf (c -- ) that appends a character to the ring buffer that uses the usart receive interrupt.
More To Read¶
- User’s Manual
- FAQ
- Where do I find more information?
- How do I start with amforth?
- How do I use amforth interactively?
- What means
??
- There are no hexfiles in the distribution archive!
- I get no serial prompt!
- What do all the words do?
- I miss a word!
- Can I embed amforth into other programs?
- Can I use code written in C (or any other language) with/in amforth?
- What means the GPL for my programs?
- Why should I send you my code?
- Does amforth run on hardware xy?
- What about the fuses?
- What about boot loaders?
- What do I need for linux?
- How do I use Atmel’s assembler with linux?
- What resources are available in my own assembly words?
- What is the release policy?
- How do I send forth code to the system?
- I found a bug
- Technical Guide
- Commented Projects
- Cookbook
- Opinion
- Recognizers
- Reference Card (outdated! from release 5.5)
- History
- 24.8.2016: release 6.3
- 4.7.2016: release 6.2
- 17.10.2015: release 6.1
- 6.9.2015: release 6.0
- 9.7.2015: release 5.9
- 25.3.2015: release 5.8
- 1.2.2015: release 5.7
- 22.12.2014: release 5.6
- 6.10.2014: release 5.5
- 16.8.2014: release 5.4
- 7.5.2013: release 5.3
- 23.12.2013: release 5.2
- 5.4.2013: release 5.1
- 27.12.2012: release 5.0
- 27.7.2012: release 4.9
- 26.3.2012: release 4.8
- 4.2.2012: release 4.7
- 6.10.2011: release 4.6
- 29.6.2011: release 4.5
- 24.5.2011: release 4.4
- 1.5.2011: release 4.3
- 19.9.2010: release 4.2
- 2.9.2010: release 4.1
- 1.7.2010: release 4.0
- 25.5.2010: release 3.9
- 25.4.2010: release 3.8
- 24.1.2010: release 3.7
- 1.10.2009: release 3.6
- 1.9.2009: release 3.5
- 11.4.2009: release 3.4
- 22.2.2009: release 3.3
- 10.1.2009: release 3.2
- 10.11.2008: release 3.1
- 17.10.2008: release 3.0
- 1.8.2008: release 2.9
- 27.6.2008: release 2.8
- 5.4.2007: release 2.7
- 27.1.2008: release 2.6
- 6.12.2007: release 2.5
- 11.10.2007: release 2.4
- 29.7.2007: release 2.3
- 17.6.2007: release 2.2
- 22.5.2007 release 2.1
- 2.5.2007 release 2.0
- 25.4.2007 release 1.9
- 10.4.2007 release 1.8
- 3.4.2007 release 1.7
- 25.3.2007 release 1.6
- 14.3.2007 release 1.5
- 5.3.2007 release 1.4
- 24.2.2007 release 1.3
- 3.2.2007 release 1.2
- 20.1.2007 release 1.1
- 4.1.2007 release 1.0
- 17.12.2006 release 0.9
- 7.12.2006 release 0.8
- 24.11.2006 release 0.7
- 20.11.2006 release 0.6
- 13.11.2006 release 0.5
- 5.11.2006 release 0.4
- 31.10.2006 release 0.3
- 27.10.2006 release 0.2
- 16.10.2006 release 0.1