Loading...
 
Skip to main content

System Workbench for STM32


Debugging reset handler

i see you learning the hard ways then 😉

i do not have any f030 to try out your code

i also found strange you can't debug from the reset

Did you try settign a break pount at 0x08000000 see what is on your flash memory and what goes wrong wiht debugger ?

The way you put data in flash text is quite strange but i gues sis ok am mor use to synthax like

.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */

. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
} >RAM AT> FLASH

As you do not have any "inititialzed" data it wan't make any diference even that could be an issue.
also it wan't explain why it would work w/o debugger

Some debuger/loader set ram at init from ram section they find in the elf but i do not know if that is the case for opencocd/stlink . Hslal ti be teh case i would expect it work with debuger and not witout 🙄

they may be a lot of text data and rodata section you may miss with your ld
you shall add
*(.text*)
same for data *(.*data*) and rodata*

that is to collect some fency section such as aligned data.b data.w etc ...

fro text some compile option coud generate mutliple text section ie text1 text2....
i think here aboutMCu GCC c/c++ optimization "place the functon in their own section"

is can see belwo section in f4 ld is that mandatory for some tumb instructon ?
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */


i'm scared and wan't be abble to help you much.