Open JanneKiiskila opened 4 years ago
@flit @MarceloSalazar
The "STLink error (5): No device connected" errors are interesting. There is an odd sequence of events going on here. pyocd has succeeded in communicating with the DP, and seems to have read the AP[0-2] IDRs once each, as it has detected those IDRs. But on the second read of the IDRs, it fails with this error.
@schstm Would you have any special insight about what the above error indicates?
Hello, is it possible that pyocd connects initially while the target is running and then goes in sleep mode ? Is it possible to try a connect sequence with target reset (and halt) before flashing ? A more detailed sequence of commands at ST-Link level done by "pyocd flash" could help me understanding the failure
Agreed, please try testing again with -Oconnect_mode=under-reset
on the command line (or set that option in pyocd.yaml
config file).
You can get a low-level trace of the STLink USB traffic by adding these lines to pyocd.yaml
:
logging:
loggers:
pyocd.probe.stlink.usb.trace:
level: DEBUG
Fails with under-reset connect mode as well.
$ pyocd --version
0.25.0
$ pyocd flash -vvv -Oconnect_mode=under-reset -u 003700213137511239383538 -t stm32h743zitx --pack Keil.STM32H7xx_DFP.2.3.1.pack mbed_cliapp_NUCLEO_H743ZI2.bin
NUCLEO_H743ZI2 cannot be flashed, despite manually updating the CMSIS index/packs.
pip list
So, latest pyocd is used (0.24.1)
Manual updates of packs do not help either,
So, despite getting the right pack - it still doesn't work?
Internal ref; IOTPART-9002.
STLINKv3 is being used, firmware has been updated to latest one I'm aware of.
details.txt
says;Publicly more known version is
V3J5M2
for STLINK-V3 boards (available via the STSW-007).