Anton

Results 65 comments of Anton

@simplerobot Viewing the SWO output while debugging would be a nice touch. Currently only the semihosting is supported: https://github.com/stlink-org/stlink/blob/01418b5666c72ce802ea5af88b62dc9aa06c8c3e/src/st-util/gdb-server.c#L1423-L1481

@kwarek Can you check 1.7.0 with these fixes? The rest of the changes seem superfluous to me... [0001-enable-stm32g030.patch.txt](https://github.com/stlink-org/stlink/files/6374803/0001-enable-stm32g030.patch.txt)

@kwarek Have you tried using `--connect-under-reset`? It is also possible to override the size of the flash memory (`--flash=32k`), but this does not solve the main problem.

@kwarek In this case, I still have no idea why this is happening. I will try to repeat the problem in the evening. I have board with stm32g0 and I...

@kwarek This is unlikely. On stlink v2 +, both commands work using the same DHCSR register. Most likely, the controller does not fully start up after a reset. Perhaps after...

@kwarek Judging by the log, there is a possibility that the soft reset function does not wait for the end of the reboot (fortunate garbage is read from the registers...

@kwarek You can also try rewriting the reset function. Change this part of function https://github.com/stlink-org/stlink/blob/eeaef981a5dcf6bec6d9b6cada398abcf34b8737/src/common.c#L1725-L1745 to ```c // waiting for a reset within 500ms // DDI0337E, p. 10-4, Debug Halting...

@kwarek Hmm... Perhaps, while waiting for a reset via the NRST pin, the target is startuped and switch the SWD pins to the gpio. We can try to replace https://github.com/stlink-org/stlink/blob/eeaef981a5dcf6bec6d9b6cada398abcf34b8737/src/common.c#L4747...

@kwarek It seems we have found the cause of the problem. You can try changing the delay from 1000 to 500. I do not still see any other possible reasons...