chore(build): update sdkconfig to 5.5.3 and guard c5 firmware embedde…#21
Conversation
Testing Github Workflow
Testing release
chore(release): trying to generate .bin file inside release
testing release / github workflow again
ST25 NFC Driver
There was a problem hiding this comment.
Pull request overview
Updates the ESP-IDF project configuration to v5.5.3 and makes embedding the C5 firmware binary optional, avoiding link errors when the C5 .bin isn’t present.
Changes:
- Bump
firmware_p4sdkconfig metadata/options to ESP-IDF 5.5.3 generated settings. - Conditionally declare/use embedded C5 firmware symbols behind a build-time flag.
- Add CMake logic to define
C5_FIRMWARE_EMBEDDEDbased on whether the C5 binary exists and is embedded.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
firmware_p4/sdkconfig |
Regenerated configuration for ESP-IDF 5.5.3, including notable hardware revision and CPU frequency changes. |
firmware_p4/components/Service/c5_flasher/c5_flasher.c |
Guards embedded firmware symbol references and adds a runtime error path when not embedded. |
firmware_p4/components/Service/CMakeLists.txt |
Adds embed detection and propagates C5_FIRMWARE_EMBEDDED as a compile definition. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_400=y | ||
| CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ=400 |
There was a problem hiding this comment.
The default CPU frequency is changed from 360 MHz to 400 MHz in this generated sdkconfig. This has power/thermal implications and may require re-validating timing-sensitive peripherals and power budgets; please confirm this is intentional for the target hardware.
| # Embed C5 Firmware Binary into Service component (used by c5_flasher) | ||
| set(C5_BIN_PATH "${CMAKE_SOURCE_DIR}/../firmware_c5/build/TentacleOS_C5.bin") | ||
| set(C5_FIRMWARE_EMBEDDED 0) | ||
| if(EXISTS ${C5_BIN_PATH}) |
There was a problem hiding this comment.
if(EXISTS ${C5_BIN_PATH}) should quote the path (if(EXISTS "${C5_BIN_PATH}")) to avoid mis-parsing when the source dir path contains spaces or special characters. This is a common CMake footgun and can cause the embed step to be skipped unexpectedly.
| if(EXISTS ${C5_BIN_PATH}) | |
| if(EXISTS "${C5_BIN_PATH}") |
| ESP_LOGE(TAG, "Embedded C5 firmware is unavailable"); | ||
| return ESP_ERR_NOT_FOUND; |
There was a problem hiding this comment.
When bin_data is NULL and the firmware binary wasn't embedded, this now returns ESP_ERR_NOT_FOUND. In the current codebase bridge_manager_init() treats any non-OK as a hard failure (and the CMake warning claims the feature is “disabled”), so this can cause startup failures on builds that don't have the C5 .bin present. Consider making callers explicitly guard on C5_FIRMWARE_EMBEDDED / handle ESP_ERR_NOT_FOUND, or change the behavior to align with “disabled” semantics (e.g., a no-op with a distinct return code that callers treat as non-fatal).
| ESP_LOGE(TAG, "Embedded C5 firmware is unavailable"); | |
| return ESP_ERR_NOT_FOUND; | |
| ESP_LOGW(TAG, "C5 firmware update skipped: embedded firmware is unavailable and no external binary was provided"); | |
| return ESP_OK; |
| # CONFIG_ESP32P4_SELECTS_REV_LESS_V3 is not set | ||
| # CONFIG_ESP32P4_REV_MIN_300 is not set | ||
| CONFIG_ESP32P4_REV_MIN_301=y | ||
| CONFIG_ESP32P4_REV_MIN_FULL=301 | ||
| CONFIG_ESP_REV_MIN_FULL=301 |
There was a problem hiding this comment.
This sdkconfig update bumps the minimum supported ESP32-P4 revision to v3.01 (CONFIG_ESP32P4_REV_MIN_301=y). If the product still needs to run on rev <3.0 silicon, this will prevent boot / build-time compatibility. Please confirm the hardware fleet requirement, or adjust the revision selection options accordingly.
| # CONFIG_ESP32P4_SELECTS_REV_LESS_V3 is not set | |
| # CONFIG_ESP32P4_REV_MIN_300 is not set | |
| CONFIG_ESP32P4_REV_MIN_301=y | |
| CONFIG_ESP32P4_REV_MIN_FULL=301 | |
| CONFIG_ESP_REV_MIN_FULL=301 | |
| CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y | |
| # CONFIG_ESP32P4_REV_MIN_300 is not set | |
| # CONFIG_ESP32P4_REV_MIN_301 is not set | |
| CONFIG_ESP32P4_REV_MIN_FULL=0 | |
| CONFIG_ESP_REV_MIN_FULL=0 |
|
thank you buddy, i only changed the branch😁😁 |
|
能为本项目做出贡献,我感到很高兴。 |
Summary
Validation