Conversation
There was a problem hiding this comment.
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)constin 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.
1f16cf0 to
00c7c6e
Compare
There was a problem hiding this comment.
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.
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.