-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32C3: boot_request_upgrade() does not work when flash encryption is enabled #1866
Comments
Hi @abdulayubzoi, I'm investigating what may be the root cause. |
Hi @abdulhayub, sorry for the delay. Also when working with Flash Encryption enabled, this must be added to DTS as an overlay:
However, I couldn't fully test it (currently I can't risk bricking boards as the Virtual eFuses still are not supported on Zephyr level), so be very careful if trying this without Virtual eFuses enabled. |
Hi @almir-okato, So if I understood it correctly, I just need to add the DTS overlay and experiment with virtual eFuse disabled, right? I will do some testing and get back to you then. Thank you! |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
I have built the Espressif port of MCUboot
v2.0.0
(with secure boot and flash encryption) using this guide. I'm using MCUboot with my Zephyr-based (v3.5.0
) application to perform OTA updates and so on.After transferring the update image to
slot1
, I mark it astest
usingboot_request_upgrade(BOOT_UPGRADE_TEST)
from the zephyr-based application. However, after doing a reset, the module still boots into the old image and no swapping is started. It seems likeboot_request_upgrade()
does not work as intended when using MCUboot with flash encryption enabled, and it doesn't return any error code either.The build of MCUboot without flash encryption enabled works as intended, i.e. the update image can be marked as
test
and on the next reboot the swapping starts as expected.For reference, I sign the update image as:
imgtool.py sign -k <SIGNING_KEY.pem> --align 32 --max-align 32 -v 0 -H 32 --pad-header -S <SLOT_SIZE> <BIN_IN> <BIN_OUT>
To Reproduce:
v2.0.0
with secure boot and encryption enabled foresp32c3
slot0
and secondary update applicaiton inslot1
boot_request_upgrade(BOOT_UPGRADE_TEST)
Expected behavior:
MCUboot swaps primary and secondary applications as expected.
Impact:
Since I'm unable to mark update candidate image for update, I have to transfer images that are already marked as
test/permanent
. More importantly, I'm unable to revert/downgrade to previous image (swapped and stored inslot1
).Logs:
Below is the log from the boot where I expect swapping to begin:
Environment:
v2.0.0
- Espressif port foresp32c3
using default boot/espressif/port/esp32c3/bootloader.confzephyr-v3.5.0
esp32c3
(DevkitM-1)The text was updated successfully, but these errors were encountered: