2022-04-10 01:00 AM
I am currently working on a HIL Setup. I want to flash my Target Software on a STM F3 via SWD.
Only the SWD Pins pins are free, all other Pins are already used and can't be used for flashing the device.
I have a STM H7 on the simulator of the HIL. I want my STM H7 to behave like a ST-Link for the STM F3 while flashing the Software on the STM F3.
My question is if there is a easy way to implement the ST-Link software on a STM H7.
Has anyone found the source code of ST-Link? Are there any useful UML diagrams for this,
if there is no open software?
Thank you in advance
2022-04-10 01:27 AM
For open source code:
https://github.com/bl*ckmagic-debug/bl*ckmagic
(replace '*' by 'a')
The binary for STLINK-V2 flows around, but sources???
For docs:
"ARM Debug Interface Architecture Specification ADIv5.0 to ADIv5.2",
search for "ARM IHI 0031D"
2022-04-10 03:39 AM
Other methods include using the Boot ROM, and the System Loader to push the update with the Serial port. See AN 2606 and 3155
2022-04-10 11:51 AM
Thank you for your answers, really helpful.
The easy way with flashing the device via interal ROM bootloader is unfortunately not working. All pins are in use, the important pins are not directly connected to the H7. So flashing via UART is probably not working.
Have to verify, if I can use a Y-cable to flash the F3.
Also flashing via USB is not working.
I will have a deeper look into black-magic. Sounds really interesting. Also very happy to see, that the github repo is still actively maintained. Hope I can copy parts of the code and run it on the H7.
Thank you