This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
In IAR main code starts with initializing Stack pointer to top of RAM.
Does that mean CCS codes this automatically?. Where does this auto initialization happens. I have looked that the CPU registers, when the execution of my code is @ main.
MSP430G2403
SP is ponted to top of RAM--> 0x3FE
PC is pointed to Flash memory 0xE000 Flash memory makes sense.
but I have kinda expected that PC would be )xFFFE reset vector and upon on next ;ine it would resume to flash. Can some one explain this to me please.
It happens during the startup code, which runs before main is called. The startup code is implemented in the runtime support library, in source files called boot.h, boot.c and boot_special.c.
If you want to step through this startup code you can disable "Run to symbol: main On a program load or restart" in the project properties:
**Attention** This is a public forum