-
Notifications
You must be signed in to change notification settings - Fork 244
debug.superh.aud: Add SuperH AUD-II read support #985
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
Open
pd0wm
wants to merge
15
commits into
GlasgowEmbedded:main
Choose a base branch
from
pd0wm:superh-aud
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
11aedfc
debug.superh.aud: Add SuperH AUD-II read support
pd0wm 98fe23e
debug.superh.aud: add assertBuilds test case
pd0wm 4a614dc
debug.superh.aud: split arguments into build/run
pd0wm 068426d
debug.superh.aud: cleanup code around I/O Buffers
pd0wm 73189e1
debug.superh.aud: use Switch/Case for command handling
pd0wm 56b515b
debug.superh.aud: use argparse.FileType for output filename
pd0wm fac408f
debug.superh.aud: proper names for addr/size parse functions, check a…
pd0wm 6d8e849
debug.superh.aud: add read subcommand, match memory-24x arguments
pd0wm 78dd0fe
debug.superh.aud: use AUDError instead of RuntimeError
pd0wm 77f8132
debug.superh.aud: add _AUDMonitorSize and _AUDMonitorCommand enums
pd0wm c58f97d
debug.superh.aud: add tracing to command/response stream
pd0wm 7050913
debug.superh.aud: use ClockDivisor
pd0wm 8af773f
debug.superh.aud: refactor into AUDComponent and AUDBus
pd0wm 2aafb1e
debug.superh.aud: command to read N nibbles
pd0wm ce90eb5
debug.superh.aud: queue up all reads before waiting for them
pd0wm 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 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,3 +9,4 @@ MCU debugging | |
| :maxdepth: 3 | ||
|
|
||
| arm7 | ||
| superh | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| ``debug-superh-aud`` | ||
| ==================== | ||
|
|
||
| CLI reference | ||
| ------------- | ||
|
|
||
| .. _applet.debug.superh.aud: | ||
|
|
||
| .. autoprogram:: glasgow.applet.debug.superh.aud:AUDApplet._get_argparser_for_sphinx("debug-superh-aud") | ||
| :prog: glasgow run debug-superh-aud |
Empty file.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
I think the appropriate taxon is program even though it is technically using an interface with "Debug" in its name:
I tried to figure out how you would make a debugger using AUD-II and it's not clear to me that you can. The built-in modes are tracing and arbitrary read/write. You have a breakpoint module (UBC) that seems programmable via monitoring mode which could support single-stepping and breakpoints. There is however no way to get an arbitrary CPU register via AUD-II (or execute an arbitrary instruction, or even just get the value of R15), so you'd need help from the firmware: an ISR that dumps the CPU context into some predefined RAM area that is used for communicating with the debugger. Even then, UBC has no way to tell which breakpoint has fired on any particular cycle, so even though it supports data breakpoints you can't use it for watchpoints: you wouldn't know whether a breakpoint or a watchpoint has fired, which breaks single-stepping. You could work around that by adding an SH-2A emulator and an architecture model and evaluating every configured breakpoint/watchpoint against the post-breakpoint architectural state, if you wanted to create an abomination and had a vast excess of free time on your hands.
I think it's safe to say nobody will ever contribute a debugger for this chip.
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.
Some chips don't have physical JTAG pins, and only rely on the AUD interface for flashing and debugging. They probably have some very cursed way of doing this, but I'm not spending €1800 to find out.
So indeed safe to say this won't be added anytime soon, at least not before H-UDI support.
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 you happen to know a part number for one of those chips/ I'm curious.