-
Notifications
You must be signed in to change notification settings - Fork 702
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
Add BOOT_SERIAL_WAIT_FOR_DFU_ALWAYS Zephyr Kconfig option. #1903
base: main
Are you sure you want to change the base?
Add BOOT_SERIAL_WAIT_FOR_DFU_ALWAYS Zephyr Kconfig option. #1903
Conversation
If y, MCUboot always enters serial recovery mode upon startup for the | ||
duration of BOOT_SERIAL_WAIT_FOR_DFU_TIMEOUT. Otherwise, MCUboot only | ||
enters serial recovery mode if the board was physically reset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment doesn't really make sense, what does resetting have to do with staying in serial recovery mode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment does not really make sense, and there already is a mode of entering serial recovery when physical reset button is used CONFIG_BOOT_SERIAL_PIN_RESET
Sorry, the Kconfig description is inaccurate. The following description is accurate:
The use case is that I want the board to boot up as quickly as possible under normal circumstances, but I also want to be able to manually trigger the bootloader even if the application firmware is broken. It's also worth mentioning that my device is battery-powered without a dedicated on/off switch, but it has a RESET button, so the timeout allows restarting the application firmware in case of a dead loop without getting stuck in the bootloader. CONFIG_BOOT_SERIAL_PIN_RESET doesn't fulfill the above use case because:
|
This pull request 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 pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
Please remove the stale label. This commit has merit, and I'm using this Kconfig option. |
This PR adds the
BOOT_SERIAL_WAIT_FOR_DFU_ALWAYS
Kconfig option. When set ton
, under normal circumstances, the bootloader doesn't enter serial recovery mode, allowing the firmware to start up as quickly as possible. However, when physically resetting the device, the bootloader enters serial recovery mode, which comes in very handy when the firmware is broken.This patch was actually created by Vidar Berg at https://devzone.nordicsemi.com/f/nordic-q-a/108213/mcuboot-should-only-timeout-after-hardware-reset/469112 who allowed me to submit it here as a PR.