**430eForth Workbench** [[projects:430eforth-workbench:start|de]]|[[en:projects:430eforth-workbench:start|en]] ====== 430eForth Workbench Project ====== == Making Dr. Chen Hanson Tings 430eForth available for the MSP430 MCU Family. == === 430eForth with Tools and VIS ( VOCabularies, ITEMs and STICKY Words) === !!! This Wiki Page is still under construction ;-) 220725 The 430eForth already has a long history. Dr. Chen Hanson Ting published it in 2014 1), Michael Kalus ported it to the naken_ASM in 2018 3) and Manfred Mahlow added some Tools in 2018 2) and a modern variant of vocabularies and context switching in 2019 4). 430eForth was created for the MSP430G2553 MCU with 16K of Flash and 0.5K of RAM and is still a nice and capable small Forth System. In 2022 we ( MK, MM ) were interested in using the 430eForth with the FR5739 and FR5969 MCU and we were looking for an easy way to port the G2553 image and the related tools. The idea was, to create a kind of template with the code for the G2553 as reference and basis and the code for a second MCU as an option to be activated with an assembler constant called MCU. That made porting very easy and it became obvious, that there was not much to change. Any of the here presented 430eForth archives supports two targets, the G2553 and the other one, that gave the archive the name. Any of this archives can serve as a template for another one. Idenitifying the code portions that need to be changed for the other target is easy by looking for the assembler constant MCU. The listing for the FR5739 {{:en:projects:430eforth-workbench:430eforth-x-43n7vis.asm.pdf |}} is a very good example. There the FR5969 listing was used as template. This Wiki Page is an invitation to **use 430eForth**, to **contribute ports** and to **contribute source code** for words, libs and tools. Please send your contribution to ''mik.kalus@gmail.com'' or ''manfred.mahlow@forth-ev.de'' . We will make it a part of this project. ===== 430eForth Archives (Ports) ====== {{:en:projects:430eforth-workbench:430eforth-g2553-43n_vis.tar.gz | 430eforth-g2553-43n7vis.tar.gz }} {{:en:projects:430eforth-workbench:430eforth-fr5969-43n_vis.tar.gz | 430eforth-fr5969-43n7vis.tar.gz }} (minor docu bug fix MM-220724) {{:en:projects:430eforth-workbench:430eforth-fr5739-43n_vis.tar.gz | 430eforth-fr5739-43n7vis.tar.gz }} (minor docu bug fix MM-220724) ===== 430eForth Environments ===== No IDE is required. Only a serial Terminal, a File Manager and an Editor are needed. Any ( i.e. your prefered ) editor and file manager may be used but the terminal should be a bit specific. It should not only support interactive communication with the embedded Forth System but should also support fast uploading of source code from files and error handling. ==== Linux OS ==== [[https://wiki.forth-ev.de/doku.php/en:projects:e4thcom|e4thcom]] is a Forth Terminal for Linux that support 430eForth and many other embedded Forth Systems. For 430eForth please start e4thcom with the options -t 430eforth-xas -p xas:target:lib . ==== Windows OS ==== [[https://github.com/Edzelf/escom|escom]] 0.1 is a Forth Terminal for Win10 that is based on e4thcom. The first release only supports STM8 eForth and Mecrisp Stellaris but it should be easy to also add support for 430eForth. ===== Libs, Modules, Tools ===== Forth source code, published here, may use e4thcom specific terminal directives like **#require** , **#include** , **#ifdef** , **#ifndef** , ... **Filenames are in lowercase.** Files with a single word name should be loaded with #r[equire], others should be loaded with #i[nclude]. ==== 430eForth Core Extension ==== (MM-220627) {{ en:projects:430eforth-workbench:430eforth-x-43n_vis-libs.tar.gz | 430eforth-x-43n7vis-libs.tar.gz }} ls ./ int ls ./lib 2constant b. current +field '>name' wordlist 2over cells @cvoc immed nip 2swap '[char]' data-vocs items previous 2variable compo data-vocs_2204.fs lshift -rot also context dump mask rshift ls ./utils tester.fs ls ./xas code code-begin flip lshift ms nip -rot rshift us ==== 8 Bit Register access ==== (MM-220531) {{ en:projects:430eforth-workbench:reg8.tar.gz | reg8.tar.gz }} ls ./reg8* reg8 reg8_2203.xas used: code mask data-vocs provided: reg8 words: ! @ bi@ bix bic bis u/i ==== 16 Bit Register access ==== (MM-220627) {{ en:projects:430eforth-workbench:reg16.tar.gz }} ls ./reg16* reg16 reg16-2205.xas used: code mask data-vocs provided: reg16 words: ! @ bi@ bix bic bis u/i ==== GPIO Module access ==== (MM-220703) {{ en:projects:430eforth-workbench:gpio-g2553.tar.gz | gpio-g2553.tar.gz }} ls ./gpio* gpio gpio-2207.fs gpio-tester required: reg8.tar.gz used: reg8 2CONSTANT provided: forth words: P1 P2 \ The GPIO Ports that give access to the GPIO Registers. gpio words: SEL2 REN SEL DIR OUT IN \ The GPIO Port Registers (reg8) pin: \ Port Pin defining word (MM-220705) {{ en:projects:430eforth-workbench:gpio-fr5969.tar.gz | gpio-fr5969.tar.gz }} (nn-yymmdd) {{ en:projects:430eforth-workbench:gpio-fr5739.tar.gz | gpio-fr5739.tar.gz }} ==== LEDs at GPIO pins ==== (MM-220529) {{ en:projects:430eforth-workbench:gpio-leds.tar.gz | gpio-leds-g2553.tar.gz }} ls ./gpio-leds* gpio-leds gpio-leds-2204.fs required: reg8.tar.gz gpio-x-tar.gz used: reg8 gpio provided: gpio led words: pin: on off init **Example: MSP-EXP430G2 LEDs** {{ en:projects:430eforth-workbench:msp-exp430g2-leds.tar.gz}} \ 430eforth-g2553-43n7vis : msp-exp430g2-leds.fs MM-220526 \ ------------------------------------------------------------------------------ -g2553- \ 430eforth-g2553 only #include gpio #include gpio-leds 0 mask P1 led pin: LED1 6 mask P1 led pin: LED2 \ LEDx init|on|off (MM-220705) {{ en:projects:430eforth-workbench:gpio-leds-fr5969.tar.gz }} {{ en:projects:430eforth-workbench:msp-exp430fr5969-leds.tar.gz}} (nn-yymmdd) {{ en:projects:430eforth-workbench:gpio-leds-fr5739.tar.gz }} {{ en:projects:430eforth-workbench:msp-exp430fr5739-leds.tar.gz}} ==== Data Structures ==== (MM-220529) {{ en:projects:430eforth-workbench:struct.tar.gz }} ls ./struct* struct struct_2204.fs used: data-vocs provided: struct struct end struct begin applied: struct begin ( -- sys 0 ) 1 cells +field name1 ( sys 0 -- sys u1 ) \ untyped data item int field: name2 ( sys u1 -- sys u2 ) \ int type data item struct end ( sys u2 -- ) \ checks sys and creates a constant u/i=u2 ===== License ===== The {{ en:projects:430eforth-workbench:license.pdf | MIT License }} is applied to the software and documentation of this 430eForth Workbench Project, unless otherwise is stated explicitly. ===== Links ===== 1)[[http://forth.org/OffeteStore/2166_430eForth_v43.zip|Chen-Hanson Ting, Zen of LaunchPad, MSP430eForth Version 4.3, 2014]] 2)[[https://forth-ev.de/wiki/res/lib/exe/fetch.php/events:430eforth-tips_tools_tests2017.pdf|Manfred Mahlow, 430eForth: Tips, Tools and Tests, Forth Tagung 2017]] 3)[[https://github.com/mikalus/eForth43-msp430g2553-naken|Michael Kalus, MSP430eForth43n1, GitHub 2018]] 4)[[https://forth-ev.de/wiki/res/lib/exe/fetch.php/vd-archiv:4d2019-04.pdf|Manfred Mahlow, Namespaces and Context Switching for a Tiny Forth, VD 4/2019]] 5)[[https://forth-ev.de/wiki/res/lib/exe/fetch.php/events:ft2019:vocs_items_und_sticky_words.pdf|Manfred Mahlow, VOCs ITEMS und STICKY Words, Forth Tagung 2019]] 6)[[https://forth-ev.de/wiki/res/lib/exe/fetch.php/events:ft2019:voc_statt_vocabulary.pdf|Manfred Mahlow, VOC statt VOCABULARY, Forth Tagung 2019]]