-
-
Notifications
You must be signed in to change notification settings - Fork 784
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 ESP32-P4 support #2063
Closed
Closed
Add ESP32-P4 support #2063
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
43014c9
jtag_scan: add workaround for ESP32-P4 which has two ir_value
orsolic 8944f4e
ESP32-P4: Add JTAG IDs
orsolic e526508
riscv_debug: Turn on DM before trying to read version
orsolic aca7c43
Fix FreeBSD build
orsolic c4a41ed
Merge branch 'main' into esp32p4
orsolic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
Do please note that this will only work for a single scan - the next run through will break. This is because
previous_idx
isstatic
and so only initialised once on program start and is unable to be reset to0
.It might be better to make the previous index used a return parameter to this function stored as a local in the calling context, this way it can be properly reinitialised on each new scan.
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.
It works for multiple scans - first scan:
jtag_device_get_quirks() returning idx: 40
jtag_device_get_quirks() returning idx: 41
Second scan:
jtag_device_get_quirks() returning idx: 40
jtag_device_get_quirks() returning idx: 41
If it isn't static it will fail on the 1st scan:
jtag_device_get_quirks() returning idx: 40
jtag_device_get_quirks() returning idx: 40
jtag_scan: IR does not match the expected value, bailing out
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.
We are not convinced, in part because consider: what happens if a scan fails having found the first TAP but before it can find the second, and then a user tries re-scanning? Please lift the previous index value out into the calling function as a local, and pass a pointer to it to this function. This hidden global is way too brittle.