[boards, tests, examples] Create example boards directory. Move board cfg there#12
Merged
AlexLanzano merged 1 commit intowolfSSL:mainfrom Mar 3, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR centralizes board support packages (BSPs) into a top-level boards/ directory and updates the tests/examples build system to consume those shared board definitions, while also adding a new IPC test suite and loosening the UART send/recv buffer types.
Changes:
- Move board linker/startup/config sources from
tests/boards/*andexamples/blinky/boards/*intoboards/*, and update Makefiles accordingly. - Add an IPC test suite and wiring in
tests/main.c(behindWHAL_TEST_ENABLE_IPC). - Change UART send/recv APIs from
uint8_t*tovoid*to reduce casting at call sites.
Reviewed changes
Copilot reviewed 29 out of 37 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| wolfHAL/uart/uart.h | Changes UART vtable + public API buffer pointer types to void*. |
| wolfHAL/uart/stm32wb_uart.h | Updates STM32WB UART driver prototypes to match new UART API types. |
| wolfHAL/uart/pic32cz_uart.h | Updates PIC32CZ UART driver prototypes to match new UART API types. |
| src/uart/uart.c | Updates UART dispatch wrappers to the new pointer types. |
| src/uart/stm32wb_uart.c | Updates STM32WB UART send/recv implementations to accept void*. |
| src/uart/pic32cz_uart.c | Updates PIC32CZ UART send/recv implementations to accept void*. |
| tests/main.c | Adds IPC test hooks and removes UART string casts in output helper. |
| tests/ipc/test_ipc.c | Adds IPC test suite (init/deinit/null-arg coverage). |
| tests/Makefile | Switches tests to use shared $(WHAL_DIR)/boards/$(BOARD) and board-provided linker script. |
| examples/blinky/main.c | Removes UART string casts due to new UART API types. |
| examples/blinky/Makefile | Switches example to shared $(WHAL_DIR)/boards/$(BOARD) and board-provided linker script. |
| boards/stm32wb55xx_nucleo/linker.ld | New shared STM32WB55 Nucleo linker script (moved from tests). |
| boards/stm32wb55xx_nucleo/ivt.c | New shared STM32WB55 Nucleo startup/IVT (moved from tests). |
| boards/stm32wb55xx_nucleo/board.h | New shared STM32WB55 Nucleo board API + globals (superset for tests). |
| boards/stm32wb55xx_nucleo/board.c | New shared STM32WB55 Nucleo board device instantiation + init/deinit. |
| boards/stm32wb55xx_nucleo/Makefile.inc | Uses _BOARD_DIR self-reference pattern; sets defaults for stm32wb tests and sources. |
| boards/pic32cz_curiosity_ultra/linker.ld | New shared PIC32CZ linker script (moved from tests). |
| boards/pic32cz_curiosity_ultra/jlink/target.xml | New shared JLink target description (moved from tests). |
| boards/pic32cz_curiosity_ultra/ivt.c | New shared PIC32CZ startup/IVT (moved from tests). |
| boards/pic32cz_curiosity_ultra/board.h | New shared PIC32CZ board API + globals (superset for tests). |
| boards/pic32cz_curiosity_ultra/board.c | New shared PIC32CZ board device instantiation + init/deinit. |
| boards/pic32cz_curiosity_ultra/Makefile.inc | Uses _BOARD_DIR self-reference pattern; sets defaults for pic32cz tests and sources. |
| boards/README.md | Documents boards/ purpose and the _BOARD_DIR include convention. |
| README.md | Updates repo layout/build instructions to reference boards/ and consolidated example/test flows. |
| .gitignore | Renames ignored host test binary from tests/sim/test_sim to tests/core/test_core. |
| tests/boards/stm32wb55xx_nucleo/linker.ld | Removed (moved to boards/stm32wb55xx_nucleo/linker.ld). |
| tests/boards/stm32wb55xx_nucleo/ivt.c | Removed (moved to boards/stm32wb55xx_nucleo/ivt.c). |
| tests/boards/stm32wb55xx_nucleo/Makefile.inc | Removed (replaced by boards/stm32wb55xx_nucleo/Makefile.inc). |
| tests/boards/pic32cz_curiosity_ultra/linker.ld | Removed (moved to boards/pic32cz_curiosity_ultra/linker.ld). |
| tests/boards/pic32cz_curiosity_ultra/jlink/target.xml | Removed (moved to boards/pic32cz_curiosity_ultra/jlink/target.xml). |
| tests/boards/pic32cz_curiosity_ultra/ivt.c | Removed (moved to boards/pic32cz_curiosity_ultra/ivt.c). |
| examples/blinky/boards/stm32wb55xx_nucleo/board.h | Removed (board definition moved to boards/stm32wb55xx_nucleo/board.h). |
| examples/blinky/boards/stm32wb55xx_nucleo/board.c | Removed (board definition moved to boards/stm32wb55xx_nucleo/board.c). |
| examples/blinky/boards/stm32wb55xx_nucleo/Makefile.inc | Removed (replaced by boards/stm32wb55xx_nucleo/Makefile.inc). |
| examples/blinky/boards/pic32cz_curiosity_ultra/board.h | Removed (board definition moved to boards/pic32cz_curiosity_ultra/board.h). |
| examples/blinky/boards/pic32cz_curiosity_ultra/board.c | Removed (board definition moved to boards/pic32cz_curiosity_ultra/board.c). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 29 out of 37 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (5)
wolfHAL/uart/uart.h:1
- Changing the public UART API (and driver vtable) from
uint8_t*tovoid*is a breaking change for downstream users and removes useful type-safety (these calls are byte-oriented and the platform drivers immediately cast back touint8_t*). Consider keeping the existinguint8_t*signatures and instead adding convenience wrappers/macros for string literals (e.g., awhal_Uart_SendStr(uart, \"...\")) or adding new*_Bytes/*_Rawfunctions while keeping the original API for compatibility.
wolfHAL/uart/uart.h:1 - Changing the public UART API (and driver vtable) from
uint8_t*tovoid*is a breaking change for downstream users and removes useful type-safety (these calls are byte-oriented and the platform drivers immediately cast back touint8_t*). Consider keeping the existinguint8_t*signatures and instead adding convenience wrappers/macros for string literals (e.g., awhal_Uart_SendStr(uart, \"...\")) or adding new*_Bytes/*_Rawfunctions while keeping the original API for compatibility.
wolfHAL/uart/uart.h:1 - Changing the public UART API (and driver vtable) from
uint8_t*tovoid*is a breaking change for downstream users and removes useful type-safety (these calls are byte-oriented and the platform drivers immediately cast back touint8_t*). Consider keeping the existinguint8_t*signatures and instead adding convenience wrappers/macros for string literals (e.g., awhal_Uart_SendStr(uart, \"...\")) or adding new*_Bytes/*_Rawfunctions while keeping the original API for compatibility.
tests/ipc/test_ipc.c:1 - This test leaves
g_whalIpcinitialized at the end (finalwhal_Ipc_Initis not paired with awhal_Ipc_Deinit). That can leak resources or affect later tests in the same binary. Add a final deinit (or restructure the test to ensure it ends in the original state).
boards/README.md:18 - The markdown table uses double leading pipes (
|| ...), which renders as an extra empty column in many markdown renderers. Use a single leading pipe per row (e.g.,| Board | Platform | ... |).
| Board | Platform | CPU | Directory |
|-------|----------|-----|-----------|
| Microchip PIC32CZ CA Curiosity Ultra | PIC32CZ | Cortex-M7 | `pic32cz_curiosity_ultra/` |
| ST STM32WB55 Nucleo | STM32WB | Cortex-M4 | `stm32wb55xx_nucleo/` |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.