zeptoforth is a portable subroutine-threaded / native code inlining Forth for Cortex-M0+/M4/M7 microcontrollers which includes a preemptively multitasking RTOS designed to be able to compile to and run from both flash and RAM (the kernel of course exists in flash).
The library of code coming with zeptoforth includes support for the following:
- Lambda expressions
- Double-cell and fixed-point arithmetic, including the usual mathematical functions
- SysTick
- Interrupt-driven serial IO drivers
- A simple GPIO abstraction layer that is maximally uniform across supported platforms
- GPIO and, where applicable, EXTI drivers
- Arbitrary UART support, beyond the console alone
- ADC support
- SPI support
- Preemptive multitasking
- Action scheduling including synchronous messaging between actions on single tasks
- A disassembler
- Moving the exception vector table into RAM so it can be arbitrarily set
- Task notifications
- Semaphores
- Locks
- Message-oriented channels
- Message-oriented rendezvous channels (aka "fchannels")
- Message-oriented synchronous bidirectional reply channels (aka "rchannels")
- Message-oriented ISR-friendly channels (aka "schannels")
- Byte-oriented streams
- Object-orientation
- Maps, including counted string and integer-keyed maps
- Temporary buffers
- An allocator
- Memory pools
- Task pools
- Action pools (for the single-task event scheduler)
- A line editor
- LED drivers
- Random number generator drivers (except on STM32F411 "Black Pill" boards)
- Pseudorandom number generation support (using the TinyMT32 PRNG)
- swdcom support for non-UART-based terminal support
On the Raspberry Pi Pico (and other compatible RP2040 boards) it also supports the following:
- Programmable input/output (PIO)
- Multicore execution; note that this can be combined with multitasking on each core and multitasking constructs can be shared by both cores
Note that the random number generator is not supported on the RP2040.
On the STM32F746 DISCOVERY board and the Raspberry Pi Pico (and other compatible RP2040 boards) it also supports the following:
- Quad SPI Flash memory
- A block interface
- A block editor
please add password for loging (meybe OTP)
password and hardware switch for replace firmware