Skip to content

[boards, tests, examples] Create example boards directory. Move board cfg there#12

Merged
AlexLanzano merged 1 commit intowolfSSL:mainfrom
AlexLanzano:boards
Mar 3, 2026
Merged

[boards, tests, examples] Create example boards directory. Move board cfg there#12
AlexLanzano merged 1 commit intowolfSSL:mainfrom
AlexLanzano:boards

Conversation

@AlexLanzano
Copy link
Member

No description provided.

@AlexLanzano AlexLanzano self-assigned this Mar 3, 2026
Copilot AI review requested due to automatic review settings March 3, 2026 21:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/* and examples/blinky/boards/* into boards/*, and update Makefiles accordingly.
  • Add an IPC test suite and wiring in tests/main.c (behind WHAL_TEST_ENABLE_IPC).
  • Change UART send/recv APIs from uint8_t* to void* 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.

@AlexLanzano AlexLanzano requested a review from Copilot March 3, 2026 21:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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* to void* is a breaking change for downstream users and removes useful type-safety (these calls are byte-oriented and the platform drivers immediately cast back to uint8_t*). Consider keeping the existing uint8_t* signatures and instead adding convenience wrappers/macros for string literals (e.g., a whal_Uart_SendStr(uart, \"...\")) or adding new *_Bytes / *_Raw functions while keeping the original API for compatibility.
    wolfHAL/uart/uart.h:1
  • Changing the public UART API (and driver vtable) from uint8_t* to void* is a breaking change for downstream users and removes useful type-safety (these calls are byte-oriented and the platform drivers immediately cast back to uint8_t*). Consider keeping the existing uint8_t* signatures and instead adding convenience wrappers/macros for string literals (e.g., a whal_Uart_SendStr(uart, \"...\")) or adding new *_Bytes / *_Raw functions while keeping the original API for compatibility.
    wolfHAL/uart/uart.h:1
  • Changing the public UART API (and driver vtable) from uint8_t* to void* is a breaking change for downstream users and removes useful type-safety (these calls are byte-oriented and the platform drivers immediately cast back to uint8_t*). Consider keeping the existing uint8_t* signatures and instead adding convenience wrappers/macros for string literals (e.g., a whal_Uart_SendStr(uart, \"...\")) or adding new *_Bytes / *_Raw functions while keeping the original API for compatibility.
    tests/ipc/test_ipc.c:1
  • This test leaves g_whalIpc initialized at the end (final whal_Ipc_Init is not paired with a whal_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.

@AlexLanzano AlexLanzano merged commit 3aecb63 into wolfSSL:main Mar 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants