Skip to content

Framework: Target w/ ALIAS for unlinked words, better \res support

Compare
Choose a tag to compare
@TG9541 TG9541 released this 04 Nov 12:44
· 572 commits to master since this release
41f87f6

This is mainly framework feature increment:

Folder target used for board specific output

e4thcom source search path includes the folder target (and so does codeload.py). Because STM8 eForth supports many targets, code for projects using a binary release is auto-generated into out/<BOARD>/target folders.

Auto-generated ALIAS for all unlinked words

For all unlinked words of a "board" the Makefile now generates a folder out/<BOARD>/target that contains files with an ALIAS definition each for all unlinked words.

Note that Windows systems may have trouble reading or even generating files with certain characters in the file name (e.g. NAME>). Different solutions are currently being considered. In Linux the same problem exists to a lower extend (with words containing the character /).

It is now recommended for STM8 eForth projects that use a binary release to set a symlink target in the base folder to the folder out/<BOARD>/target.

Auto-generated file FORTH.efr for STM8 eForth core RAM locations

The RAM addresses of internal core variables like 'PROMPT are now exported automatically to the file out/<BOARD>/FORTH.efr.
FORTH.efr contains lines like the following:

0068 equ 'PROMPT \  "'PROMPT" point to prompt word (default .OK)

In e4thcom compatible code this data can be used with the \res meta-statement:

\res MCU: FORTH
\res export 'PROMPT

It is now a recommended for STM8 eForth projects that use a binary release to set a symlink in the base folder to out/<BOARD>/FORTH.efr.

Emulation of e4thcom \res improved

The emulation \res in codeload.py now tests if a word already exists in the dictionary before defining a CONSTANT. The behavior is now as robust as that of #require.

tools folder part of the binary release

The tools folder is now part of the binary release file. An STM8 eForth project that uses the binary release can simply use tools (e.g. codeload.py) from the upstream project.

Note: TG9541/W1209 contains an example implementation.