Repository navigation
Zephyr port: open the serial port at 1200 baud to enter the bootloader - #11570
Merged
Merged
Conversation
The README said the touch worked, but nothing handled it: the TinyUSB handler is not built for this port. Watch line coding and DTR on the first CDC. At 1200 baud with DTR low, recheck 100 ms later, detach USB and call reset_to_bootloader(), which now asks for UF2 mode so the Adafruit nRF52 bootloader shows its drive. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
On the RP2 boards the touch and on_next_reset(UF2) only rebooted into CircuitPython, so every reflash needed BOOTSEL. Add Zephyr's boot-mode retention region to the five RP2 overlays and enable the retained-memory chain. Zephyr's rom_bootloader.c then enters the ROM bootloader. A "CP" prefix and CRC8 keep cold-boot SRAM from being read as a request. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
Checked on a Feather nRF52840: |
tannewt
requested changes
Oct 13, 2026
tannewt
left a comment
Member
There was a problem hiding this comment.
Thanks for fixing this. I think some of it should be moved to adaboot.
tannewt
pushed a commit
to adafruit/adaboot
that referenced
this pull request
Oct 15, 2026
RP2 boards have no MCUboot, so adaboot_request_update_mode() had nothing to signal on them. Wire Zephyr's boot-mode retention into the five RP2 layout dtsis (4-byte region with an "AB" prefix and CRC8, so cold-boot SRAM is not read as a request) and add a module Kconfig that enables RETAINED_MEM, RETENTION and RETENTION_BOOT_MODE on RP2 when the region is chosen. Zephyr's RPI_PICO_ROM_BOOTLOADER then follows and enters the ROM UF2 bootloader on the next boot. This moves the settings out of CircuitPython (adafruit/circuitpython#11570) so any application using adaboot gets the same behavior. Signed-off-by: Mikey Sklar <mikeysklar@gmail.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The RP2 boot-mode retention region and its Kconfig defaults now live in adaboot, next to the RP2 flash layouts, so Zephyr Arduino can share them. Drop the CP copies and bump adaboot. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Drop the 100 ms recheck. The TinyUSB ports reset as soon as DTR drops at 1200 baud, and this now does the same. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Opening the USB serial port at 1200 baud now resets the board into its bootloader.
Why
The README said this worked, but the Zephyr port never handled it.
Raspberry Pi boards no longer need BOOTSEL to reflash.
The RP2 settings live in adaboot (adafruit/adaboot#9), so Zephyr Arduino can share them.
on_next_reset(UF2 / BOOTLOADER), then UF2 copyNot tested: nRF54L15 DK (UART console). Pico, Pico 2 and Feather RP2040 are build-tested only.
Written with Claude. The "after move" tests were run on the farm by Claude; I reviewed them.
🤖 Generated with Claude Code