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.
Hello,
I know that c2000 launchpad pre-program a demo application before shipment, this application test temperature using internal ADC channel, right?
I have developed my own application, it can pass build, debug press F11 and can run to main. I can use CCS to debug my code step by step. Everything can work fine and feature I want can be achieve.
But, when I terminate debug session and re-power up my c2000 launchpad, it didn't run my own application, but run demo application before shipment. Why my debug session can load firmware into c2000's flash? what should I do?
BR
Ren Kai
Kai Ren said:But, when I terminate debug session and re-power up my c2000 launchpad, it didn't run my own application, but run demo application before shipment. Why my debug session can load firmware into c2000's flash?
During power on, only the program in Flash can run. I suspect that for the application you developed, loaded and ran on the device, the code was loaded to RAM and not Flash. You can confirm this by checking which linker command file is used in the project.
The demo program uses the linker command file F28027.cmd which places code in Flash. Most other examples included in ControlSuite(and likely your application as well) uses linker command file F2802x_generic_ram.cmd (or similar) which places code in RAM. To modify your application to run from Flash, make sure to use the F28027.cmd in your project.
Just FYI, there are two examples at least in ControlSuite that I am aware of that are designed to run from Flash - "C2kLaunchPadDemo" and "flash_f28027", which you can use as reference.
Hello
As you said, my code actually is in Ram.
Now I have put it in Flash and download *.out image into c2000 launchpad using Uniflash.
But why my code always go to here when I debug to tracking my code:
interrupt void ILLEGAL_ISR(void) // Illegal operation TRAP
{
// Insert ISR Code here
// Next two lines for debug only to halt the processor here
// Remove after inserting ISR Code
asm(" ESTOP0");
for(;;);
}
Is something wrong in my launchpad system control setting?
BR
Ren Kai
Hello
As per your advice, I have add my source code into C2kLaunchPadDemo project and remove its exampe_c2klaunchpad.c. Build is passed and debug is ok and can run to main function except ILLEGAL_ISR().
My code use DSP2802x_usDelay.asm for delay function, someone said that should put _DSP28x_usDelay into ram to avoid ILLEGAL_ISR, is that true?
BR
Ren Kai
Kai Ren said:My code use DSP2802x_usDelay.asm for delay function, someone said that should put _DSP28x_usDelay into ram to avoid ILLEGAL_ISR, is that true?
This question would be better answered by the C2000 device forum, but I found a couple of related threads that might help you:
http://e2e.ti.com/support/microcontrollers/c2000/f/171/p/169949/620692.aspx#620692
http://e2e.ti.com/support/microcontrollers/c2000/f/171/t/104980.aspx
If you are still having trouble with landing in ILLEGAL_ISR after reviewing these threads please post a new question to the C2000 forum as they may be able to help better with this issue.