Closed dragonmux closed 2 years ago
DX-MON, can you please check or report if this really is an error/bug? Does erase not happen? Is the device locked-up afterwards? For me it seems, addresses (are /need to be?) probed wildly and access to some of these adresses fail, but in the end the device is (hopefully) detected right? Jtag reporting of access problems/errors probably happens in some other way, perhaps not yet evaluated right or not yet reported. Access errors are the price we have to pay that BMP autodetects devices. Perhaps a better classification is needed/helpfull.
The erase does not happen, this is a bug and we carefully checked what we found before posting and classifying it. It is classified correctly as these issues do not happen when using BMP native itself from GDB - this is a bug in hosted.
Additionally, the addresses selected are definitely not random (they are wrong, but not random). We will be getting @esden hardware to test this more fully as part of the CI setup and looking into it once we've finished another feature that we're in process of writing.
Can you bisect?
Maybe this does not fix the erase problem. But a bad access can upset the core.
Setting a breakpoint to the emitted warnings shows:
#3 0x000000000041d36e in lpc546xx_probe (t=t@entry=0x6130000003c0) at target/lpc546xx.c:105
#4 0x0000000000411da1 in cortexm_probe (ap=ap@entry=0x604000003a10) at target/cortexm.c:458
#5 0x00000000004053f9 in adiv5_component_probe (ap=ap@entry=0x604000003a10, addr=addr@entry=3758153728, recursion=recursion@entry=1,
So while probing for LPCxx, the TMC gets upset. We can get around the "remote_ap_mem_read" warnings by probing before LPC, but then LPC get upset. I just tested. That's a catch22. How to resolve? Should we give scan a hint like "mon swd lmi"?
DX-MON can you test the erase with https://github.com/UweBonnes/blackmagic/tree/lmi?
Using the latest source for BMP, we get the following errors with a native BMP over SWD when trying to erase blocks on a target (TM4C123GH6PM) but not over JTAG:
Additionally, if this is immediately followed by an info dump over SWD the following additional errors are generated:
Except for "RESET_SEQ failed", the JTAG version of this cleanly runs and succeeds.