[Renesas RX72N CCRX] Move flash functions to RAM for flash operation#689
[Renesas RX72N CCRX] Move flash functions to RAM for flash operation#689dgarske merged 3 commits intowolfSSL:masterfrom
Conversation
kojiws
left a comment
There was a problem hiding this comment.
Every part is good for me.
I have just one confirmation below.
There was a problem hiding this comment.
Pull request overview
This pull request implements support for executing flash write/erase operations from RAM on the Renesas RX72N platform using the CCRX compiler. The changes enable proper flash programming by moving critical flash operation functions to RAM execution, aligning flash writes to 128-byte boundaries as required by the hardware, and reducing dependency on standard library functions.
Changes:
- Added CCRX pragma directives to place flash-related functions in RAM (FRAM section) with automatic ROM-to-RAM copying at initialization
- Modified
hal_flash_write()to handle 128-byte aligned block writes with read-modify-write logic for partial blocks - Added flash error checking with new
flash_err_tenum andflash_check_error()function - Removed standard library dependencies for CCRX builds where possible
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/update_flash.c | Added CCRX pragma section directives to place update functions in FRAM section |
| src/string.c | Removed CCRX exclusions and added FRAM pragma for memcpy function (with missing closing directive) |
| src/libwolfboot.c | Added FRAM section pragma directives for partition/trailer management functions |
| src/boot_renesas.c | Added debug verify_flash_write function (unused) and debug printf |
| hal/renesas-rx.h | Added flash_err_t enum for flash error codes |
| hal/renesas-rx.c | Implemented copyfuncs() for ROM-to-RAM copy, flash_check_error(), and rewrote hal_flash_write() for 128-byte alignment; removed unused variables |
| IDE configuration files | Updated linker configuration to map PFRAM to RPFRAM sections, added compiler options, and configured standard library usage |
| app_RenesasRX01 files | Added debug functions, updated partition display logic, and linked string.c |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
IDE/Renesas/e2studio/RX72N/app_RenesasRX01/src/app_RenesasRX01.c
Outdated
Show resolved
Hide resolved
0968710 to
2b67fc2
Compare
|
Resolve conflicts and fix issues caused by rebase |
|
This is ready for review. |
IDE/Renesas/e2studio/RX72N/app_RenesasRX01/src/app_RenesasRX01.c
Outdated
Show resolved
Hide resolved
- Remove standard library as much as possible - Do not use memcpy before it is relocated to RAM. - Prefer library functions over RX intrinsics.( Compiler option change)
2b67fc2 to
21c4207
Compare
Move flash functions to RAM for flash operation
Changed
hal_flash_write()to align address to 128-byte boundaryRemove standard library use as much as possible