Closed rpls closed 1 year ago
@rpls This behavior may be caused by calling a soft reset. You can try building the develop branch with the lines commented out:
https://github.com/stlink-org/stlink/blob/e5719080558ba3660b7251ae41f4eb44117fcd40/src/common.c#L1779-L1781
In this case, run st-flush
with the --reset
argument is likely to succeed.
Fixed in #1154.
In order to allow developers to isolate and target your respective issue, please take some time to select the check boxes below and fill out each of the following items appropriate to your specific problem.
st-flash
&st-util
Further we kindly ask you to describe the detected problem as detailed as possible and to add debug output if available, by using the following template:
Commandline output:
Command line output does not appear to be relevant.
Expected/description:
The board and/or chip appears to exhibit a different reset behavior. When using either
st-flash
when simply flashing binaries, or when using a gdb-server withst-util
and performing a GDBload
, the board/chip will end up in a weird hanging state after flashing. Flashing itself is successful, but the PC ends up at something like0x1fff5240
. Either a manual reset with a reset button, or flashing again will put the chip into the correct state again (i.e., PC at0x8000000
). Using--connect-under-reset
or--reset
does not change this behavior. I investigated the problem a bit, and noticed that OpenOCD has the same problem, but mentions that it detected an "external reset". With OpenOCD I can change the configuration as to how the chip is reset. Here I can add a setting likereset_config trst_only
(default, i think, issrst_only
?), which will completely fix this problem.Note: I don't think it's related to #1138.