Skip to content

feat: expose BootloaderFlashOffset on Flasher#39

Merged
deadprogram merged 1 commit intotinygo-org:mainfrom
jgangemi:jae/bootloader-offset
Apr 24, 2026
Merged

feat: expose BootloaderFlashOffset on Flasher#39
deadprogram merged 1 commit intotinygo-org:mainfrom
jgangemi:jae/bootloader-offset

Conversation

@jgangemi
Copy link
Copy Markdown
Contributor

The chip Definition struct already tracks BootloaderFlashOffset per
target (0x0 for ESP32-S3/C3/C6/H2/C2, 0x1000 for ESP32/S2, 0x2000 for
ESP32-C5/P4-Rev1). Expose it through a public accessor so library
callers can validate image offsets without duplicating the chip→offset
mapping.

Returns (0, false) when the chip has not been detected yet, matching
the sentinel pattern used by ChipType() (returns ChipAuto) and
ChipName() (returns "Unknown").

The chip Definition struct already tracks BootloaderFlashOffset per
target (0x0 for ESP32-S3/C3/C6/H2/C2, 0x1000 for ESP32/S2, 0x2000 for
ESP32-C5/P4-Rev1). Expose it through a public accessor so library
callers can validate image offsets without duplicating the chip→offset
mapping.

Returns (0, false) when the chip has not been detected yet, matching
the sentinel pattern used by ChipType() (returns ChipAuto) and
ChipName() (returns "Unknown").
@deadprogram
Copy link
Copy Markdown
Member

Thank you for the feature @jgangemi now merging!

@deadprogram deadprogram merged commit a4bc93d into tinygo-org:main Apr 24, 2026
3 checks passed
@jgangemi jgangemi deleted the jae/bootloader-offset branch April 25, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants