Close

Examples, examples (and code)!

A project log for eForth for cheap STM8S gadgets

Turn cheap modules from AliExpress into interactive development kits!

thomasThomas 12/03/2016 at 18:440 Comments

Good progress in the code should go along with some progress in the docs.

I updated the STM8S eForth Programming section in the Wiki to describe how to use the words ADC! and ADC@ for controlling the STM8 ADC, OUT and OUT! for controlling board outputs (like relays and LEDs), TIM for reading the background ticker, and BSR for setting and resetting bits in a byte.

After adding DOES> as a new feature, I also spent some time on reducing the binary size because there is no point in new features if no space left for the payload. The diet is almost through, and MINDEV is now at 5332 bytes (including the features board I/O, background task, compile to Flash, and DOES>). CORE is just about 4500 bytes (down from 4700). A binary configured as a minimal self-contained development environment (i.e. with compile to Flash and background task) fits in 5000 bytes, and this leaves enough space for about 5 to 8 screens of Forth!

Discussions