cancel
Showing results for 
Search instead for 
Did you mean: 

Hello, I'm new to the forum, and it's also the first time I've used this microontroller. A few years after my first I started having a blockage in my code, when I run my code I am always stuck in assembly code while I am coding in c: ldr sp,=_stack

Essayator
Associate III

ldr sp,=_stack /* Set stack pointer */

It is this code that I am always brought back, it is in the file: startup_stm2l476rgtx.s

1 ACCEPTED SOLUTION

Accepted Solutions

What IF you Run (Play, Go ?) from that point onward?

Strikes me that it's just breakpointed at the CPU entry point, and you just need to start execution.

After it initializes the statics, and constructors, etc it should then get to your main() function.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

6 REPLIES 6

What IF you Run (Play, Go ?) from that point onward?

Strikes me that it's just breakpointed at the CPU entry point, and you just need to start execution.

After it initializes the statics, and constructors, etc it should then get to your main() function.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I understand but how to avoid stops at this point?

TDK
Guru

Hard to decipher what the actual question is here.

The startup_stm2l476rgtx.s file will always be opened when starting a debug session. There is no way around that.

You are not currently debugging anything in the screenshot you provided. You just have the startup file open with the cursor on a line.

If you feel a post has answered your question, please click "Accept as Solution".

Yes you are right, my question is not very well explained... but when I got my answer, In my first program the file did not open when I ran the code it was because I did not understand.

I understand ar I have code to make del blink that works

Essayator
Associate III

This is my code to read in i2c the data on a sensor that does not work, maybe the address I have is wrong