feat: Add auto-detect ESP chip via security info and improve test coverage#12
Open
gandarez wants to merge 1 commit intotinygo-org:mainfrom
Open
feat: Add auto-detect ESP chip via security info and improve test coverage#12gandarez wants to merge 1 commit intotinygo-org:mainfrom
gandarez wants to merge 1 commit intotinygo-org:mainfrom
Conversation
…erage Refactor chip detection from magic-register-only approach to use GET_SECURITY_INFO command with ChipID fallback via readReg. Add security_info.go for parsing security info responses (12/20 byte variants) and security flag decoding. Expand protocol layer with securityInfo command support and improve test coverage across flasher, protocol, and security_info packages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
soypat
reviewed
Mar 14, 2026
| cmdSync byte = 0x08 // Sync with bootloader | ||
| cmdWriteReg byte = 0x09 // Write 32-bit memory-mapped register | ||
| cmdReadReg byte = 0x0A // Read 32-bit memory-mapped register | ||
| cmdSecurityInfoReg byte = 0x14 // Read security info (chip ID, flash encryption, etc.) |
There was a problem hiding this comment.
there does not seem to be much change here, it would make reviewer's life easier if the added line was separated by a empty line so as to not change the formatting of the entire declaration group.
Author
There was a problem hiding this comment.
humm that's the identation caused by go fmt. Adding an extra space and getting it merged will make it look very strange.
soypat
reviewed
Mar 14, 2026
Comment on lines
+24
to
+25
| cmdSPISetParams byte = 0x0B // Configure SPI flash parameters | ||
| cmdSPIAttach byte = 0x0D // Attach SPI flash |
Author
There was a problem hiding this comment.
this is not changed, only cmdSecurityInfoReg was added
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.
magic-register-onlyapproach to useGET_SECURITY_INFOcommand with ChipID fallback viareadReg.security_info.gofor parsing security info responses (12/20 byte variants) and security flag decoding.This PR is essential to get
esp32c6support in this PR