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 represent a group of undergraduate engineers attempting to program a C2000 Piccolo Launchpad for standalone functionality. Our group is not very familiar with the C2000 Launchpad family and we have consulted available datasheets and other forums posts on TI, but have been unable to solve our issue.
We are currently able to run our program while in debug mode, however, the program ceases to work in standalone, GetMode operation (i.e. accessing flash). We have noticed that our program continues to work after we pull trigger 3 (TRST) low immediately after disconnecting the device from the debugger, which we believe is consistent with standalone boot, but our program ceases to function when we either power cycle or reset the C2000 Launchpad. It seems, honestly, as though the program is being erased when the device powers down. Based on feedback to other members on this forum and the TI Application Report, we believe that our code is being written to flash, but we would appreciate any methods to check for sure. Here are our current linker files and the memcpy and InitFlash calls:
#ifdef _FLASH
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
InitFlash();
#endif
We welcome any comments or suggestions to help fix this issue. I will provide any additional information as necessary.
Regards,
Andrew
Hello Andrew, and greetings to your 'Team',
First thing you have to determine is if you have a code problem, or if it is a bootmode problem. My guess is a code problem since if you do nothing special to the Piccolo device it should boot-up in jump-to-flash mode.
Try using the code example in appnote SPRA958. The appnote might help you too.
Use the 'F28027_example_nonBIOS_flash' code example. This is a CCSv5.3.0 example (it probably won't work right on older versions of CCS). The example outputs 2kHz PWM on EPWM1A pin, and toggles GPIO34 pin at a 2Hz rate. The project was designed for a different eval board where GPIO34 was connected to an LED. But on the LaunchPad you can just probe GPIO34 and display it on the scope (or display EPWM1A pin on scope, your choice). This project is all setup to run correctly from flash, standalone.
Good luck with your education.
Regards,
David
Dear Mr. Alter,
Thank you very much for your help. Unfortunately, we are novices at programming a C2000 microprocessor and have found it difficult to get the example program to load. We assume that all the assisting C files should go into the pre-include section in the C2000 linker, but there are some .asm files that need to be included as well. Unfortunately, we do not know where to place them so that the debugger recognizes them as assembly rather than C files. This gives us a large number of errors that we do not know how to fix. Any additional help would be greatly appreciated.
Andrew,
Andrew Badachhape said:have found it difficult to get the example program to load.
The example from SPRA958 should load without any problem what so ever. Why do you say you are finding it difficult to load?
Andrew Badachhape said:We assume that all the assisting C files should go into the pre-include section in the C2000 linker, but there are some .asm files that need to be included as well. Unfortunately, we do not know where to place them so that the debugger recognizes them as assembly rather than C files.
Assembly is no different than C. The sections are linked based on whether they are initialized or uninitialized sections. Initialized sections need to go in flash. Uninitialized section to RAM. That is the basic rule of thumb. Again, assembly is no different. The example in SPRA958 has all the sections accounted for and linked in the linker .cmd file.
Perhaps what's confusing you is that CCS is reporting it cannot find the source for _c_int00? That is a library function. Libraries do not have the source code embedded in them, so CCS complains. Just ignor it.
Regards,
- David