Open flit opened 4 years ago
@danielRep
We're using B1 pretty regularly for some development work, using eFlash. Odd that we're not seeing this error.
Without the code to enable RESET_MASK.SYSRESETREQ0
, a software reset via AIRCR.SYSRESETREQ
is a no-op. Thus it "succeeds" by not causing any change in the device. You also cannot use a hardware reset because that resets debug logic, killing the connection.
The exception shown in your log is caused by a failure to read core registers. It occurs at two points before pyocd bombs out, when it reads xPSR after a reset and halt. First is when gdb sends the "reset halt" monitor command. Second is as the flash algo is initialized. Each case will cause an error to be reported to gdb, which eventually gives up and detaches.
So the question is, why does a reset and halt cause a failure to read registers in your case but not for us?
Are you attempting to run code from QSPI or eFlash? Do you have any code in the other memory?
Oops, didn't mean to close…
First, thank you @flit for opening a proper issue for this, should have done it since the beginning. Since I reported that issue, I have been using pyocd and GNU MCU Eclipse altogether to develop to Musca-B1. I don't use either QSPI or eFlash for now. Even though that I required to run my solution from SRAM memories, I feel that I have a more stable development environment if I don't use flash memories.
So as of now, this is my setup:
Without the code to enable RESET_MASK.SYSRESETREQ0, a software reset via AIRCR.SYSRESETREQ is a no-op. Thus it "succeeds" by not causing any change in the device. You also cannot use a hardware reset because that resets debug logic, killing the connection.
I understand that, and every time that initiate a new debug session, I press the reset button of the board and start the session. I never use the software reset, for that the reason that you mention and since I am still using version 0.25.0
Are you attempting to run code from QSPI or eFlash? Do you have any code in the other memory?
As I mentioned previously I am running my software from the SRAM memories, so I use neither one of the flash memories.
Maybe the details that I provided won't help that much. I can try to upgrade pyocd to the last version and see if I still have any type of issues. I still didn't do that since I am having a more or less stable development setup.
Thanks for the info. The major difference between your setup and ours is that you are running out of SRAM.
Do you know if there is any code in eFlash or QSPI? You can check by using pyocd commander
and running rw 0x1000_0000 32
(check QSPI) and rw 0x1A00_0000 32
(check eFlash).
I'll see if I can set up a GME project to reproduce. It may take a few days to fit it in.
Hi @flit ,
I am sorry for the late reply, but I only had the opportunity to check your tip today. The output that I got was:
rw 0x1000_0000 32 10000000: 30000500 00000000 00000000 00000000 0............... 10000010: 100009b0 10000981 100009b1 100009b1 ................
rw 0x1A00_0000 32 1a000000: 30000548 1a000d5d 1a000ced 1a000cb1 0..H...]........ 1a000010: 1a000cb1 1a000cb1 1a000cb1 1a000cb1 ................
Which means that the processor is jumping to those reset handler addresses probably right? I don't know at which point on time, but I suppose that there is something related to it.
PS: in another subject, do you have Musca-A1 ou B1 DAPLink last firmware binaries that you could attach?
(Issue reported by @danielRep.)
Hi,
I am experience a similar issue with a Musca B1 board. I detect three different behaviours which probably can be related with the same issue that @djj198 reported. One, the gdbserver is initiated and pyocd is connect but the flashing operation doesn't start (it seems stuck), with the DAP LED blinking indefinetly. Second, the debug process passes all stages (w/o any outputted error) but the core seems to be in a wrong state. Third, the pyocd effectively outputs the following error,
which is quite similar to @djj198 post.My pyocd version is 0.24.1-dev15.
EDIT: I would mention that the DAPLink firmware is version 0242. EDIT2: FYI @flit, the board seems to work properly with older version 0.21.0 EDIT3: @flit after some investigation I can confirm that the commit with id b49611b, which supposedly enables the software reset feature has broken the use of pyocd with the MUSCA B1 board. At least is what I experienced. I just jumped to the release v0.24.0 and removed that code segment, and everything went well again (on v0.24.1 that workaround didn't work).