Hello
Couple of questions here.
When you change from the debug to the stand alone version of your project did you pay attention to the following;
- Did you initialize the vector table and provide a correct reset vector at address 0x0000?
The processor will retrieve the application start address and stack pointer after reset from address 0x00 and 0x04.
- Did you add code to initialize configuration registers in your application? While in debug mode configuration registers are initialized in the .cfg file you have specified. You may need to set up the registers in your application for a proper setup.
- Do you have global variable declared with an initialization value in your application?
Generally speaking if you want to run a stand alone version of your application I would recommend you to use the INTERNAL_FLASH build target from your project to build the executable.
This build target takes care of the 3 item enumerated above.
CrasyCat