2020-09-12 02:18 PM
Hi
I'm trying to use my STM32F407-DISC1 board's onboard ST-LINK to program a STM32 black pill (STM32F103C8), but can't get it working for the life of me.
I've connected the two boards as follows:
I've updated the Discovery's ST-Link to the newest firmware.
Using the st-info utility, I'm able to detect the ST-Link on the Discovery board correctly, but st-info --descr either returns nothing or "unknown board".
When I set the black pill's jumpers to pull BOOT0 high, I can see the correct output from st-info --descr, but when I use Atollic TrueSTUDIO to upload the program to the black pill while BOOT0 is high, it uploads successfully but immediately loses the debug connection.
When BOOT0 is low, I can't upload at all.
What could I be doing wrong?
Regards
Gerrie
Solved! Go to Solution.
2020-09-13 01:34 PM
I finally figured out what the problem was, so I'm adding it here in case anyone has a similar problem in future.
I found the solution in this stackoverflow post.
The default project generated by CubeMX was disabling Debug, so I simply had to set Debug to Serial Wire under the SYS tab in CubeMX. Then I set the jumper to pull BOOT0 high, uploaded the new project (with Debug enabled), moved the BOOT0 jumper back to low and now it works perfectly.
2020-09-12 05:37 PM
Remove the two jumpers connecting the onboard target
2020-09-13 12:08 AM
Sorry I forgot to mention that I have already removed those jumpers.
Is there anything else I could be missing?
2020-09-13 01:34 PM
I finally figured out what the problem was, so I'm adding it here in case anyone has a similar problem in future.
I found the solution in this stackoverflow post.
The default project generated by CubeMX was disabling Debug, so I simply had to set Debug to Serial Wire under the SYS tab in CubeMX. Then I set the jumper to pull BOOT0 high, uploaded the new project (with Debug enabled), moved the BOOT0 jumper back to low and now it works perfectly.