@@ -9,8 +9,8 @@ platforms.
99
1010| Platform | Board | Drivers |
1111| ----------| -------| ---------|
12- | STM32WB55 | Nucleo | RCC (PLL + MSI), GPIO, UART, LPUART, SPI, Flash, SysTick |
13- | PIC32CZ | Curiosity Ultra | Clock (dual PLL), GPIO, UART, Supply (SUPC), SysTick |
12+ | STM32WB55 | Nucleo | RCC (PLL + MSI), GPIO, UART, LPUART, SPI, Flash, RNG, SysTick |
13+ | PIC32CZ | Curiosity Ultra | Clock (dual PLL), GPIO, UART, Flash, Supply (SUPC), SysTick |
1414
1515## Architecture
1616
@@ -48,6 +48,7 @@ whal_Gpio g_whalGpio = {
4848| Flash | ` wolfHAL/flash/flash.h ` | Init, Deinit, Lock, Unlock, Read, Write, Erase |
4949| SPI | ` wolfHAL/spi/spi.h ` | Init, Deinit, SendRecv, Send, Recv |
5050| Timer | ` wolfHAL/timer/timer.h ` | Init, Deinit, Start, Stop, Reset |
51+ | RNG | ` wolfHAL/rng/rng.h ` | Init, Deinit, Generate |
5152| Supply | ` wolfHAL/supply/supply.h ` | Init, Deinit, Enable, Disable |
5253
5354Utilities: ` wolfHAL/regmap.h ` (masked register access), ` wolfHAL/bitops.h `
@@ -61,13 +62,15 @@ wolfHAL/ Public headers (API surface)
6162 platform/st/ STM32WB55 device macros
6263 platform/microchip/ PIC32CZ device macros
6364src/ Driver implementations (generic + platform)
65+ boards/
66+ stm32wb55xx_nucleo/ STM32WB55 Nucleo board support
67+ pic32cz_curiosity_ultra/ PIC32CZ Curiosity Ultra board support
6468examples/
65- stm32wb/ STM32WB55 Nucleo board bring-up and UART echo
66- pic32cz/ PIC32CZ Curiosity Ultra board bring-up
69+ blinky/ LED blink + UART echo (multi-board)
6770tests/
6871 test.h Minimal test framework (no libc dependency)
69- sim/ Host-compiled tests (bitops, dispatch validation)
70- hw/stm32wb/ On-target tests (clock, GPIO, flash, timer)
72+ core/ Host-compiled tests (bitops, dispatch validation)
73+ clock/ gpio/ flash/ ... On-target per-module tests
7174```
7275
7376## Getting started
@@ -82,7 +85,7 @@ src/reg.c
8285# Generic dispatch (include all, or just the modules you use)
8386src/clock/clock.c src/gpio/gpio.c src/uart/uart.c
8487src/flash/flash.c src/spi/spi.c src/timer/timer.c
85- src/supply/supply.c
88+ src/supply/supply.c src/rng/rng.c
8689
8790# Platform drivers (pick your target)
8891src/clock/stm32wb_rcc.c src/gpio/stm32wb_gpio.c ...
@@ -91,43 +94,50 @@ src/timer/systick.c
9194```
9295
9396Create a board config file that instantiates devices with your pin assignments,
94- clock settings, and peripheral configs. See ` examples/stm32wb/ stm32wb55xx_nucleo.c`
95- or ` examples/pic32cz/ pic32cz_curiosity_ultra.c` for reference.
97+ clock settings, and peripheral configs. See ` boards/ stm32wb55xx_nucleo/board .c`
98+ or ` boards/ pic32cz_curiosity_ultra/board .c` for reference.
9699
97100To write a driver for a new platform, implement the functions in the relevant
98101` *Driver ` vtable and provide device macros in a platform header.
99102
100103## Building the examples
101104
102- Both examples use ` arm-none-eabi-gcc ` and produce a ` .bin ` suitable for flashing:
105+ Examples use ` arm-none-eabi-gcc ` and produce a ` .bin ` suitable for flashing.
106+ Select a board with ` BOARD= ` :
103107
104108``` sh
105- cd examples/stm32wb && make # -> boot.bin (Cortex-M4)
106- cd examples/pic32cz && make # -> boot.bin (Cortex-M33)
109+ cd examples/blinky
110+ make BOARD=stm32wb55xx_nucleo # -> build/stm32wb55xx_nucleo/blinky.bin
111+ make BOARD=pic32cz_curiosity_ultra # -> build/pic32cz_curiosity_ultra/blinky.bin
107112```
108113
109114## Tests
110115
111- ** Simulation tests** run on the host and validate the abstraction layer without
112- any hardware:
116+ ** Core tests** run on the host and validate the abstraction layer without any
117+ hardware:
113118
114119``` sh
115- cd tests/sim && make run
120+ cd tests/core && make run
116121```
117122
118- ** Hardware tests** cross-compile and run on an STM32WB55 Nucleo . They boot the
119- board, report results over UART, and signal pass/fail via LED:
123+ ** Hardware tests** cross-compile for a target board . They boot the board, report
124+ results over UART, and signal pass/fail via LED:
120125
121126``` sh
122- cd tests/stm32wb && make # -> test_hw.bin
127+ cd tests
128+ make BOARD=stm32wb55xx_nucleo # -> build/stm32wb55xx_nucleo/test_hw.bin
129+ make BOARD=pic32cz_curiosity_ultra # -> build/pic32cz_curiosity_ultra/test_hw.bin
123130```
124131
132+ Each board's ` Makefile.inc ` defines a default ` TESTS ` list (e.g. `clock gpio
133+ flash timer rng`). Override it on the command line to run a subset.
134+
125135## CI
126136
127137GitHub Actions runs on every push and PR to ` main ` :
128- - ** sim -tests** -- builds and runs the host test suite
138+ - ** core -tests** -- builds and runs the host test suite
129139- ** cross-compile** -- verifies all examples and hardware tests compile cleanly
130- with ` arm-none-eabi-gcc `
140+ with ` arm-none-eabi-gcc ` for every supported board
131141
132142## Documentation
133143
0 commit comments