Skip to content

Wolfhal uart flash - #998

Open
AlexLanzano wants to merge 2 commits into
wolfSSL:masterfrom
AlexLanzano:wolfhal-uart-flash
Open

AlexLanzano wants to merge 2 commits into
wolfSSL:masterfrom
AlexLanzano:wolfhal-uart-flash

Conversation

@AlexLanzano

Copy link
Copy Markdown
Member

No description provided.

Implement uart_init/tx/rx in hal/wolfhal.c and rely on the board's
wolfHAL UART timeout in uart_flash.c. Enable it on stm32wb_nucleo,
with docs and a CI build.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The board-path default in arch.mk duplicates WOLFBOOT_ROOT during normalization, causing standalone test-app builds to fail the board.mk existence check for an in-tree board.

1 open issue
What changed in this PR

This PR adds UART-backed remote flash support to wolfBoot’s wolfHAL integration and allows board files to live outside the repository.

Changes:

  • Add wolfHAL UART adapters and STM32WB timeout configuration for remote flash operations.
  • Use configurable BOARD_DIR paths in bootloader and test-application builds.
  • Document the setup and add build coverage for encrypted UART flash.
File Description
test-app/​Makefile Use BOARD_DIR and omit the legacy UART driver with wolfHAL.
src/​uart_flash.c Use wolfHAL’s receive timeout for protocol waits.
options.mk Exclude the legacy UART driver from wolfHAL builds.
Makefile Load and compile board files from BOARD_DIR.
hal/​wolfhal.c Provide UART flash functions through wolfHAL APIs.
hal/​boards/​stm32wb_nucleo/​wolfHAL_board.h Define the UART flash device and timeout configuration.
hal/​boards/​stm32wb_nucleo/​wolfHAL_board.c Add poll-based timeouts and UART flash initialization.
hal/​boards/​stm32wb_nucleo/​board.mk Enable timeouts and required drivers for UART flash.
docs/​wolfHAL.md Document external boards and UART flash setup.
arch.mk Define WOLFHAL and resolve board-directory paths.
.github/​workflows/​test-configs.yml Add an encrypted UART flash build configuration for wolfHAL.

Review effort: Balanced

Comment thread arch.mk Resolved

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #998

Scan targets checked: wolfboot-src, wolfboot-bugs
Not reviewed (no scan target covers them): .github/workflows/test-configs.yml, Makefile, arch.mk, docs/wolfHAL.md, hal/boards/stm32wb_nucleo/board.mk, hal/boards/stm32wb_nucleo/wolfHAL_board.h, options.mk, test-app/Makefile
Coverage: 3 of 3 in-scope changed file(s) opened by the reviewer

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Max

Let wolfHAL builds read board files from BOARD_DIR, defaulting to
hal/boards/$(BOARD). Relative paths resolve against the wolfBoot root.
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.

3 participants