Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE
The CLA program is not loaded in FLASH and asks for help. thanks
The following is the entire project file, asking for help with the diagnosis.
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.
Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE
The CLA program is not loaded in FLASH and asks for help. thanks
The following is the entire project file, asking for help with the diagnosis.
I am writing the entire program in assembly language.The CLA program can be executed in RAM during debugging, but it cannot be burned to the specified unit of FLASH.When the power is reset, CLA can't be executed again.
Hi,
In the file you sent you have commented out the two following lines in ccpu.asm:
initial_cla: ;lc flash_initialize ;FLASH初始化 ;lc copyprogramtosram ;搬运程序到CLA程序区
To run from flash you need to initialize the flash memory and copy the CLA program from there to the desired RAM area.
Can you check why these two calls are commented out?
Hello!
I tried to solve this problem with the method you provided, but the result was a failure. You can debug it according to the project I provided.
Check to see if the CLA program can be loaded into FLASH.
Hi,
The best source of information for this topic is the Assembly Language Tools document : SPRU513. The relevant chapter is 8.5 Linker Command Files.
The thing is that your assembly code is in a section called "claprog" which is placed in RAM. You need to do something else, similar to the other section "ClaProg" which you are not using in the current version.
ClaProg : LOAD = FLASHD,
RUN = RAMLS0,
LOAD_START(_Cla1funcsLoadStart),
LOAD_END(_Cla1funcsLoadEnd),
RUN_START(_Cla1funcsRunStart),
LOAD_SIZE(_Cla1funcsLoadSize),
PAGE = 0, ALIGN(4)
If you use this command all the code you allocated to section ClaProg will be copied in the flash area FLASHD but the symbols (e.g callable functions, etc.) will have their address in the RAM area RAMLS0. Furthermore the linker will define global symbols _Cla1funcsLoadStart, _Cla1funcsLoadEnd, _Cla1funcsRunStart.
You will then need to use these global symbols to copy the data from the flash range (_Cla1funcsLoadStart, _Cla1funcsLoadEnd) to the RAM range (_Cla1funcsRunStart, _Cla1funcsRunStart + _Cla1funcsLoadSize).
It seems that you have a custom function copyprogramtosram but it doesn't look like a mere sequential copy of the CLA code.