|
%DASHBOARD{ section="banner"
image="/twiki/pub/Cosmac/ForthSTM32WB/nucleo-header.jpg" |
| |
|
< < | Forth is an interactive and extensible language, with built-in lexical analysis (tokenizer, parser) and interpreter/compiler, needs less than 20 KiB Flash and 4 KiB RAM, unbelievable for a self-contained (self-hosted) system. For more Forth details see Mecrisp-Cube. |
> > | Forth is an interactive and extensible language, with built-in lexical analysis (tokenizer, parser) and interpreter/compiler, needs less than 20 KiB Flash and 4 KiB RAM, unbelievable for a self-contained (self-hosted) system.
Mecrisp-Cube Instant real-time programming with Forth. |
|
STM32WB Series has two CPUs. An ARM Cortex M4 for the application (CPU1) and a Cortex M0+ (CPU2) for the BLE protocol stack. This Forth system runs on the CPU1. Developed with the same technology as the ultra-low power STM32L4 microcontrollers, the STM32WB MCU series provides the same digital and analog peripherals suitable for applications requiring an extended battery life and complex functionalities. If you do not need wireless connectivity, thanks to CubeMX you can easily adapt MecrispCubeWB for STM32L4, STM32L5, and STM32U5. |
| |
|
< < | |
> > | |
| |
|
< < | Already done
- Integrated in STM32 Cube ecosystem. Create C code from CubeMX for internal peripherals and use it in Forth.
- Forth as CMSIS-RTOS thread. CMSIS-RTOS API to use FreeRTOS from Forth.
- Buffered terminal I/O (5 KiB buffer for UART Rx). Interrupt driven and RTOS aware,
key and emit block the calling thread.
- USB-CDC for serial communication via USB. Redirect console I/O like
cdc-emit , cdc-key
- microSD and internal Flash mass storage for blocks and FAT filesystem.
- Calling C Functions from Forth and vice versa
- vi Editor origin in BusyBox tiny vi. Workflow development:
begin Edit EVALUATE while SaveFile repeat
- Board Support Package BSP (for other boards see STM32WB5MM Discovery Kit, and STM32WB Feather development board)
- LEDs: LED1 (blue), LED2 (green), LED3 (red)
- Switches: SW1, SW2, SW3 (dongle: SW1)
- Digital port pins: D0 to D15 (Dongle: D0, D1, D6, D10 to D15)
- Analog port pins: A0 to A5 (Dongle: A2, A3)
- PWM: D3, D6, D9 (Dongle: D6)
- Input capture: A2
- Output compare: D0, D1, D5 (Dongle: D0, D1)
- SPI: D11 MOSI, D12 MISO, D13 SCK (e.g. for display, memory)
- I2C: D14 SDA, D15 SCL (external peripherals e.g. pressure)
- BLE 5.0 GAP Peripheral Role
- DIS Device Information Service
- HRS Heart Rate Service (heart rate depends on A0 for Nucleo and A2 for Dongle)
- CRS Cable Replacement Server service (proprietary service from STM, similar to Classic Bluetooth SPP). Redirect console I/O like
crs-emit , crs-key .
- Real Time Clock (32 bit UNIX time stamp, valid times are from 1.1.2000 to 31.12.2099 because of the STM32WB RTC peripheral)
time! , time@ , and .time (YYYY-MM-DDTHH:MM:SS ISO 8601).
- Watchdog
- Assertation and Logging
Planned
|
> > | The standard Mecrisp-Cube features like RTOS, Filesystem, USB, etc. |
| |
|
< < | |
> > |
- 63 KiB RAM dictionary
- 128 KiB Flash dictionary
- Internal Flash drive 0:, 384 KiB (for Nucleo, depends on board)
- microSD drive 1:
- BSPs
|
|
|
|
< < | machine (STM32 Nucleo board) for development and testing purposes. |
> > | machine (STM32WB55 Nucleo board) for development and testing purposes. |
|
Prerequisites |