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.
Hi TI expert
We are using C2000-GANG with TMS320C28377D and facing three issues.
1. Already defined_ Flash, run the program from flash, if I want to copy the function from flash to ram, in order to use pragma code_ Section, should I put the function into the same RamFuncs? Need to redefine new ramfuncs_ loadstart, _ loadsize, _ Runstart?
2.Originally, I am using DSP28xxx_SectionCopy_nonBIOS.asm file to Copy the segment from flash to ram, but the new version of c2000ware does not have this file. Now how to copy the segment from flash to ram?
3.Copy the function from flash to ram, do I need to modify 28377xD_FLASH_link_cup1.cmd ?
Best regards,
Thomas
Thomas,
Let us first discuss the choice that you chose for your application and then we can dive in to your questions.
Please let me know why you chose to copy all the sections of your application from flash to RAM (DSP28xxx_SectionCopy_nonBIOS.asm file) instead of copying a few time critical ISRs and RAM-only execution code (like Flash initialization routine)?
I assume it is for performance reasons. If it is the case, this device has much better performance as mentioned in the datasheet below:
The on-chip flash memory is tightly integrated to the CPU, allowing code execution directly from flash through 128-bit-wide prefetch reads and a pipeline buffer. Flash performance for sequential code is equal to execution from RAM. Factoring in discontinuities, most applications will run with an efficiency of approximately 80% relative to code executing from RAM. This flash efficiency lets designers realize a 2× improvement in performance when migrating from the previous generation of MCUs.
Based on the performance of this device, please check if you can avoid copying entire application to RAM. Copying entire application will make your code complex and it limits the application size to available RAM size on this device. Let me know what you think and we can discuss further.
Thanks and regards,
Vamsi
Hi Vamsi
Thank you for your replying.
As your said, we are based on efficiency. According to your suggestion, is there any related documentation or example code?
For my fist question, If we can only copy a function, can we copy like this?
Thomas,
Regarding your question on copying a few functions: Yes, you can do like that. You need to make related changes in the linker cmd file as well. All the C2000Ware example projects are provided with both RAM and Flash build configurations. To change the build configuration from RAM to Flash, users can import the project in to CCS and right click on the project and select 'Build Configurations' -> 'Set Active' -> 'Flash'. Select the Flash build configuration and then compile/step-execute through the example. You will understand the process.
Also, please take a look at this FAQ post: https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/878674
Regarding the performance example: Please take a look at section 3.7 Understanding Flash Memory Performance In Real-Time Control Applications in https://www.ti.com/lit/spracn0
Thanks and regards,
Vamsi