Hi All,
I am using STM32 ARM cortex controller.I use UIlink debugger I am new to controller programming. I have written a program which sets one of the GPIO Pin. The program compiles with no errors. When I debug the code line by line, i could see that it doesnt enter my application, that is main program. It stops after SystemInit function. I cannot see it executing my functions. Any idea on this would be appreciated.
Thanks in advance
Deselect 'run to main' and single step through the startup code.
Hello,
I have already deselected 'run to main'. But still its not working. Could you please let me what might be cause for this problem.
Thanks
Step through the startup code and see where it's going wrong.
But the program might fail during scatter loading. Check your memory layout - maybe there is a memory region declared that does not exist in reality.
Wrong clock settings...?
But the program might fail during scatter loading.
That's why I said twice "step through the startup code". Find where it's going wrong first and then find out why it's going wrong.
Firstly start a debug session then you are at the first line of your main(). Secondly press the KEIL's "Reset CPU" which's a red button then you will put the debug step into the first line of your startup.s. Hope my way could help :)
Great that you try to help - but please note that this post is 9 (!) years old by today.
There i.e. are also other related explanations regarding this not reached main function that we can offer today, like:
https://developer.arm.com/documentation/ka002219/latest
But, is preferable to comment on current requests, thanks.