Conversation
👋 Hello erhankur, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
There was a problem hiding this comment.
Pull request overview
This pull request refactors the flash erase API to ensure all public functions support large flash mode (>16MB) using 4-byte addressing. The PR removes stub_lib_flash_erase_sector and stub_lib_flash_erase_block from the public API because they didn't support large flash mode, and reimplements stub_lib_flash_erase_area to use the existing stub_lib_flash_start_next_erase helper which properly handles both regular and large flash modes. Additionally, the PR reduces logging verbosity by converting TRACE-level logs to VERBOSE-level and removing some redundant log statements.
Changes:
- Removed
stub_lib_flash_erase_sectorandstub_lib_flash_erase_blockfrom public and internal APIs - Reimplemented
stub_lib_flash_erase_areato support large flash mode usingstub_lib_flash_start_next_erase - Reduced log verbosity across all target implementations by converting STUB_LOG_TRACEF to STUB_LOGV and removing redundant logs
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| include/esp-stub-lib/flash.h | Removed public API declarations for stub_lib_flash_erase_sector and stub_lib_flash_erase_block |
| src/flash.c | Reimplemented stub_lib_flash_erase_area with large flash support, reduced log verbosity, removed old erase functions, increased severity of unknown flash ID warning |
| src/target/base/include/target/flash.h | Removed internal API declarations for sector/block/area erase functions |
| src/target/common/src/flash.c | Removed common implementations of sector/block/area erase functions and redundant trace logs |
| src/target/esp8266/src/flash.c | Converted STUB_LOG_TRACEF to STUB_LOGV for erase operations, removed redundant write result log |
| src/target/esp32/src/flash.c | Converted STUB_LOG_TRACEF to STUB_LOGV for erase operations |
| src/target/esp32s2/src/flash.c | Converted STUB_LOG_TRACEF to STUB_LOGV for erase operations |
| src/target/esp32s3/src/flash.c | Converted STUB_LOG_TRACEF to STUB_LOGV for erase operations, increased octal mode log from debug to info |
| src/target/esp32c2/src/flash.c | Converted STUB_LOG_TRACEF to STUB_LOGV for erase operations |
| src/target/esp32c3/src/flash.c | Converted STUB_LOG_TRACEF to STUB_LOGV for erase operations |
| src/target/esp32c5/src/flash.c | Converted STUB_LOG_TRACEF to STUB_LOGV for erase operations |
| src/target/esp32c6/src/flash.c | Converted STUB_LOG_TRACEF to STUB_LOGV for erase operations |
| src/target/esp32c61/src/flash.c | Converted STUB_LOG_TRACEF to STUB_LOGV for erase operations |
| src/target/esp32h2/src/flash.c | Converted STUB_LOG_TRACEF to STUB_LOGV for erase operations |
| src/target/esp32h4/src/flash.c | Converted STUB_LOG_TRACEF to STUB_LOGV for erase operations |
| src/target/esp32h21/src/flash.c | Converted STUB_LOG_TRACEF to STUB_LOGV for erase operations |
| src/target/esp32p4/src/flash.c | Converted STUB_LOG_TRACEF to STUB_LOGV for erase operations |
| example/stub_main.c | Updated example to remove usage of deprecated erase_sector and erase_block functions |
181c4c8 to
e3aaade
Compare
|
LGTM, thanks, nice update. |
e3aaade to
a3f6246
Compare
a3f6246 to
50c8f44
Compare
|
Feel free to merge this, esp8266 issue is in recently merged commits. |
stub_lib_flash_erase_sectorandstub_lib_flash_erase_blockdid not support large mode, so I removed them.stub_lib_flash_erase_areais now implemented using functions that support large flash mode.