-
Notifications
You must be signed in to change notification settings - Fork 484
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
SWV cannot use system level TPIU #1368
Comments
Hi @diggit. This is caused by the Can you please try out the branch where I'm implementing support for CMSIS-Pack debug sequences? You can install it directly with:
In my testing, this resolves the discovery issues completely. (The STM32 packs have sequences for configuring |
I've finally tested with branch you linked and still no success.
stlink v2-1
|
TPIU is found, so that's fixed, but issue is also somewhere else. |
Thanks for the update. It's probably because the TPIU is accessed through APB-AP#2, and is declared on that AP's ROM table (instead of the same ROM table as the CM7). That configuration likely won't work in pyocd right now. Sorry! The AttributeError fix should be straightforward. (Actually, I thought I had already fixed an error if it didn't find the TPIU! 😖) I'll look into adding support for a system-level TPIU. |
yeah, only APB-AP#0: DWT, FPB, ITM are available in
Does fixing this mean a lot of work?
in itm = self._session.target.get_first_child_of_type(ITM)
if not itm:
LOG.warning("SWV not initalized: Target does not have ITM component")
return False
itm = self._session.target.get_first_child_of_type(TPIU)
# ^^ should be tpiu
if not tpiu:
LOG.warning("SWV not initalized: Target does not have TPIU component")
return False |
Not really sure! The main thing is to ensure the TPIU gets attached to the target node.
Uh, embarrassing! 🙃 |
What branch/commit are you looking at? It's correct on all of |
shoot, I tried to undo my changes and failed 🤦 Should have been... itm = self._session.target.get_first_child_of_type(ITM)
if not itm:
LOG.warning("SWV not initalized: Target does not have ITM component")
return False
tpiu = self._session.target.get_first_child_of_type(TPIU)
if not itm:
# ^^ should be tpiu
LOG.warning("SWV not initalized: Target does not have TPIU component")
return False |
Ugh, and I totally missed the error on the next line below… 😅 |
oh, first issue could be the fact, that stlink v2-1 does not offer access to any other AP than 0 |
Actually, the STLink V2J28 and above, including all v3, does allow access of any AP (except the version 2 APs used in ADIv6, required for Cortex-M55 and M85). That's how pyocd can read the ROM table from AP#2. |
When connecting to STM32H730VB, there is problem with coresight rom table readout.
In fact, even records which are found do not seem to match ref. manual (65.5.1 page 3140).
Debugging and breakpoints work.
As TPIU is not found, SVW does not work and requesting to do so, crashes pyOCD (last log).
Verbose logs follow.
pyOCD version: 0.33.1
stlink v2-1
jlink
If I try to enable SVW (
-O enable_swv=true -O swv_system_clock=500000000 -O swv_clock=1000000
), pyOCD terminates with exception:Which is not surprising when TPIU was not found.
The text was updated successfully, but these errors were encountered: