2019-06-06 05:58 AM
Hello,
I used the following "Target Software Startup Script" in the debug configuration in Atollic TrueStudio (this is necessary since we're using a bootloader and our application binary which I would like to debug is not placed at the beginning of the STM32 flash):
How to enter this in STM32CubeIDE?
I would really need to debug my firmware, but can't figure out how to do the required settings...
Any ideas?
Kind regards,
Markus
Solved! Go to Solution.
2019-06-11 04:09 AM
My last tests with SEGGER J-Link didn't include the speed settings.
I also tried with the same three initialization commands (yes, I had initially picked the wrong addresses which came from some old debug config setup that I had)
---
set *0xe000ed08 = 0x08020000
set $sp = *(unsigned int*)0x08020000
set $pc = *(unsigned int*)0x08020004
---
Yes, I selected ST-Link as debug probe:
2019-06-11 07:04 PM
Try creating a new project and copy over your sources. See if that helps.
2019-06-12 12:22 AM
Just tried to create a new project in CubeIDE, copied over the sources and adapted the build settings and the linker script. But still, debugging works with J-Link, but not with ST-Link. After downloading the binary, the latter can't read out the target...
2019-06-12 12:27 AM
Do you have any projects in CubeIDE other than the one you are currently working on that works with ST-Link?
If you have, you could compare and see what is the difference?
If you don't, maybe create a very simple CubeIDE project for your hardware and see if you can program it using ST-Link?
2019-06-12 12:27 AM
I am assuming your ST-Link works with Atollic?
2019-06-12 01:05 AM
Yes, the ST-Link works with Atollic TrueStudio 9.2.0 - just rechecked it.
Will also try with another project in CubeIDE.
2019-06-12 02:50 AM
Have now also tried with an STM32F4DISCOVERY board and example project using CubeIDE and debugging works without any problems using ST-Link (onboard of the eval board).
But I can't figure out what the difference is here (except from the fact that my own program is located at another flash position and thus needs the additional initialization commands)...
Using the following initialziation commands, the execution of the command is always trapped in the Default_Reset_Handler:
---
set host-charset CP1252
set target-charset CP1252
set *0xE000ED08 = 0x08020000
set $sp = *(unsigned int*)0x08020000
set $pc = *(unsigned int*)0x08020004
tbreak main
continue
---
So I thought that maybe there's some problem with my linker file, but in Atollic TrueStudio it worked without problems - likewise with the J-Link in CubeIDE...
Any ideas?
2019-06-12 03:15 AM
I wonder if it is a project settings issue...
If you make a copy of the example project that works, and replace the source code with the one that is having issues, does it work?
2019-06-12 04:32 AM
I just tried that. I copied my sources and linker script to the working project and set the corresponding includes. However, the effect is the same - Debugging with J-Link works, but using the ST-Link execution hangs in the Default_Reset_Handler...
2019-06-13 06:56 PM
Maybe try testing with just your bootloader. Are you able to debug your bootloader with ST-Link?