Skip to content

Pic32cz flash#5

Merged
AlexLanzano merged 4 commits intowolfSSL:mainfrom
AlexLanzano:pic32cz-flash
Feb 15, 2026
Merged

Pic32cz flash#5
AlexLanzano merged 4 commits intowolfSSL:mainfrom
AlexLanzano:pic32cz-flash

Conversation

@AlexLanzano
Copy link
Member

No description provided.

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

Adds PIC32CZ flash support to wolfHAL and adjusts several existing driver vtable symbols to be immutable (const) so they can live in ROM and match the const whal_*Driver* pointers in device structs.

Changes:

  • Make multiple global driver vtable instances (whal_*_Driver) const in headers and definitions.
  • Add a new PIC32CZ FCW-based flash driver (pic32cz_flash) and wire it into the PIC32CZ platform device macros.
  • Extend the PIC32CZ example to instantiate/init flash and perform an erase/write/read demo; update build sources accordingly.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
wolfHAL/uart/stm32wb_uart.h Expose STM32WB UART/LPUART driver vtables as const.
wolfHAL/uart/pic32cz_uart.h Expose PIC32CZ UART driver vtable as const.
wolfHAL/timer/systick.h Expose SysTick timer driver vtable as const.
wolfHAL/supply/pic32cz_supc.h Expose PIC32CZ SUPC driver vtable as const.
wolfHAL/spi/stm32wb_spi.h Expose STM32WB SPI driver vtable as const.
wolfHAL/platform/microchip/pic32cz.h Include PIC32CZ flash header and add a flash device macro.
wolfHAL/flash/stm32wb_flash.h Expose STM32WB flash driver vtable as const.
wolfHAL/flash/pic32cz_flash.h New PIC32CZ flash driver public API/config header.
wolfHAL/clock/pic32cz_clock.h Expose PIC32CZ PLL clock driver vtable as const.
src/uart/stm32wb_uart.c Define STM32WB UART/LPUART driver vtables as const.
src/uart/pic32cz_uart.c Define PIC32CZ UART driver vtable as const.
src/timer/systick.c Define SysTick timer driver vtable as const.
src/supply/pic32cz_supc.c Define PIC32CZ SUPC driver vtable as const.
src/spi/stm32wb_spi.c Define STM32WB SPI driver vtable as const.
src/flash/stm32wb_flash.c Define STM32WB flash driver vtable as const.
src/flash/pic32cz_flash.c New PIC32CZ FCW flash driver implementation (read/write/erase + mutex/busy handling).
src/clock/pic32cz_clock.c Define PIC32CZ PLL clock driver vtable as const.
examples/pic32cz/pic32cz_curiosity_ultra.h Add exported g_whalFlash device instance.
examples/pic32cz/pic32cz_curiosity_ultra.c Instantiate PIC32CZ flash device using new platform macro.
examples/pic32cz/main.c Add flash init + erase/write/read demo and UART print of readback.
examples/pic32cz/ivt.c Add inline asm to set stack pointer in Reset_Handler.
examples/pic32cz/Makefile Add flash sources to the PIC32CZ example build.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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 30 out of 30 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AlexLanzano AlexLanzano merged commit 3342331 into wolfSSL:main Feb 15, 2026
2 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.

1 participant