feat: add public GetSecurityInfo and FlashMD5 API methods#21
Merged
deadprogram merged 2 commits intotinygo-org:mainfrom Apr 11, 2026
Merged
feat: add public GetSecurityInfo and FlashMD5 API methods#21deadprogram merged 2 commits intotinygo-org:mainfrom
deadprogram merged 2 commits intotinygo-org:mainfrom
Conversation
65806df to
1d8ef29
Compare
deadprogram
reviewed
Apr 11, 2026
GET_SECURITY_INFO (0x14) is ROM-only; stub returns 0xC0. Cache the response during detectChip() and return it from readSecurityInfo(). When stub is loaded and no cached info is available, return UnsupportedCommandError with guidance to use ChipAuto. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1d8ef29 to
fbf9ec1
Compare
Member
|
Thanks for adding this and making my requested changes! 😸 now squash/merging. |
Member
|
Also note I removed this since tools do not get credit, only the humans who use them: |
Contributor
Author
|
no worries - i just like to clarify it's not actually me making these changes. i'm smart but not that smart. 🙃 |
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.
Summary
GetSecurityInfo()for querying device security/fuse statusFlashMD5(offset, size)for verifying flash region contents by hashEraseRegion(previously would fail with a confusing error when called without stub)Use case
These public methods enable tools built on espflasher to verify flash contents and query device security state without reimplementing the protocol layer.
Test plan
go test -v ./pkg/espflasher/...— all tests passTestFlashMD5RequiresStubverifies stub guardTestGetSecurityInfoverifies response parsinggolangci-lint run ./pkg/espflasher/...— no new issues