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.
Folks,
I know this thing has been discussed several times, have read the TI doc, Wiki page and some discussions on the forum. Still can't figure out a few things. Here are my questions. Appreciate the help in advance.
1. Where can I find examples that has code, linker command files et al that I can play around with ?
2. How are the linkages handled ? Code from flash calls a function that should have been in flash but is now in RAM ...
3. Is there any limit as to how much code can I place in RAM ? Is there a logical limit or is it governed by available space in RAM ?
Any other pointers that will help me will be really appreciated.
Thanks. -Bhaktha
Bhaktha,
HAve you seen appnote SPRA958?
>> 1. Where can I find examples that has code, linker command files et al that I can play around with ?
SPRA958 has example code.
>> 2. How are the linkages handled ? Code from flash calls a function that should have been in flash but is now in RAM ...
You link the relevant code to load to flash, but run from RAM. This resolves all runtime addresses to the RAM address. SPRA958 explains this.
>> 3. Is there any limit as to how much code can I place in RAM ? Is there a logical limit or is it governed by available space in RAM ?
No limit other than the amount of RAM you have available. Note that as you link more and more code to RAM, you have less and less space for data. People generally only move time critical code to RAM to get maximum performance. On F2806x, there is not all that much difference in performance with code in flash vs. RAM however.
Regards,
David
The flash_f28069 example in C2000Ware demonstrates putting some ISRs in ramfuncs as well.
Whitney
David and Whitney, Thanks for your help. We got it working correctly on our system. A few follow up questions before I close this thread.
1. You mention that there is a small performance difference on F28069M between flash and RAM. Can you quantify you answer ? Is the performance degradation in the 10% range or something else ? Is there a thumb rule ?
2. After the I burn our application onto Flash, I have to do the right S1 setting (aka getMode)on the launchxl board so that it boots and runs without the USB connection. If I keep the switch setting with TRST to 1, will that facilitate debugging with a USB cable even while the code is running from FLash and/or code copied into RAM ? Will there be any performance penalty if do that ?
3. I am assuming that the launch xl board has "boot ROM" that starts at the reset vector does init and branches off to cinit. Question is what does the boot ROM do ? Where can I find explanation about that ? In production boards where we redesign our boards without the launch xl boards, will the boot code still be "there" ? Maybe a stupid question, but wanted to be sure.
4. For production boards what is the preferred way of programming code in the factory ? Thru USB or something else ?
Thanks. -Bhaktha
Hi Bhaktha,
Thanks for your patience. Here are the answers to your follow up questions:
1. I believe David was referring the effect of flash wait states. They're described in the document he shared and specific numbers for your device can be found in the datasheet.
2. Yes, it is possible to connect to the device after it has booted from flash. In CCS, you would create a target configuration with the GEL file removed, so it won't reset the device when it connects and disrupt the state of the running application. Once you launch that target config and connect, you'll be able to load the symbols for the application and debug it.
3. Yes, the boot code will still be there. As to what what it does, there's a chapter on the Boot ROM in the device technical reference manual. We also share the actual source code and symbols in C2000Ware under \libraries\boot_rom\f2806x.
4. TI provides the UniFlash tool, so I suppose that's what we prefer, but ultimately it depends on the requirements of your system. There are other third party tools out there that support some of the different peripheral modes.
Whitney