zeptoforth is a portable subroutine-threaded / native code inlining Forth for Cortex-M0+/M4/M7/M33 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
- VALUEs, 2VALUEs, and lexically-scoped local variables compatible with DO LOOPs
- Implicit compilation, where conditional/looping constructs are temporarily compiled during intepretation mode, executed, and then forgotten
- Closures
- Dynamically-scoped, task-local variables
- Double-cell and S31.32 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
- SDHC/SDXC card support
- FAT32 filesystem and MBR partition table on SDHC/SDXC cards support
- Support for loading code from files in FAT32 filesystems
- Rebooting via Control-C at the console, or Reboot in zeptocom.js
- Attention key commands via Control-T at the console, or Attention in zeptocom.js; currently the only attention key commands are 'z', which sends an exception to the main task, and 't', which, when the task monitor is active, displays information on all running task
- An optional task monitor (note that starting creates a task dedicated to it)
- 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
- Signalling exceptions on other tasks
- 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
- Software alarms
- Console redirection
- 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)
- Best-effort fault recovery
- swdcom support for non-UART-based terminal support
On the Raspberry Pi Pico (and other compatible RP2040-based boards) and Raspberry Pi Pico 2 and Pimoroni Pico Plus 2 (and other compatible RP2350-based boards) it also supports the following:
- An optional USB CDC console
- Programmable input/output (PIO)
- Hardware watchdog
- I2C, in both master and slave modes
- PWM, including both input and output
- Hardware timers
- Realtime clocks (note that on RP2350-based boards this is emulated using the Always-On Timer)
- Multicore execution; note that this can be combined with multitasking on each core and multitasking constructs can be shared by both cores
On the Raspberry Pi Pico W it also supports the following:
- An optional IPv4 stack for the Raspberry Pi Pico W, aka 'zeptoIP'.
- An optional SNTP (Simple Network Time Protocol) implementation for use with zeptoIP
On The Raspberry Pi Pico 2 and Pimoroni Pico Plus 2 (and other compatible RP2350-based boards) it also supports the following:
- The Always-On Timer, which counts time and may wake up the MCU as long as a small amount of power is applied
On the Pimoroni Pico Plus 2 (and other compatible RP2350-based boards with PSRAM) it also supports:
- Up to 8 MiB of PSRAM
On the STM32F746 DISCOVERY board, the Raspberry Pi Pico and Raspberry Pi Pico W (and other compatible RP2040-based boards), and the Raspberry Pi Pico 2 and Pimoroni Pico Plus 2 (and other compatible RP2350-based boards) it also supports the following:
- Quad SPI flash memory
- A block interface
- A block editor
- FAT32 filesystems in block storage in Quad SPI flash
There is also optional support for
- Single-cell...
I have just submitted my project 4TH Calculator https://hackaday.io/project/196655-4th-calculator to the Hackaday Business Card Contest.
That's when I saw your Zeptoforth. Really cool. You did many things the same way I did for Mecrisp-Cube. I am still hooked on Mecrisp but I will try your Zeptoforth.