Skip to content

STM8 eForth FAQ

Thomas edited this page Aug 18, 2018 · 11 revisions

Frequently Asked Questions

Why a Forth for the STM8?

Thanks for asking :-) The answer is here.

Isn't a µC with 1K RAM and 8K Flash too small for interactive development?

It depends on your definition of "development system". You won't get an IDE but can certainly use it as an interactive system and get something done. If your embedded application needs some "interactive" properties (e.g. scripting, parameters, in-field adaptations) you'll be surprised.

Why do my NVM definitions disappear after a reset?

After defining words in NVM mode you need to conclude with RAM. Otherwise the core variables CONTEXT and LAST won't be saved to Flash memory, and after the next reset the new dictionary entries will be lost (see issue #153 for detail).

Why doesn't my STM8 eForth binary contain some of the eForth words I expect?

In order to save memory space only a subset of the original STM8EF words is linked. The unlinked words can be accessed with the definitions in out/<BOARD>/target, which is very easy to do when you use e4thcom or codeload.py (just type #require myword). Please refer to the details in Using Alias Words.

It's also possible to build targets with a different selection of words linked to the dictionary (see here for a complete list of words, and here for an example configuration). Please refer to issue #152 for a detailed discussion.

Can I run code from the EEPROM?

No, that's not possible, and attempting to do that will cause a reset (unless you copy it to the Flash or RAM).

However, the STM8 eForth ALIAS feature allows storing dictionary entries in the EEPROM, which will free up Flash memory for storing code. Please refer to lib/EEALIAS, example STM8 eForth EECORE configuration, and explanation on HaD.

How do I Propose a New Entry for the FAQ?

That's simple: just raise an issue and ask your question.

Clone this wiki locally