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.
Code Composer Studio: CCS_v7
Compiler : C2000 compiler Version: TI v16.9.4.LTS
Hi Everyone,
I create a new ccs project which will load to flash memory and execute from ram memory. The project contains timer based led blink application. I had read SPRAAU8A to understand how to copy compiler sections from flash to ram memory. I reorganized the project according to SPRAAU8A. The project loads application to flash and runs from ram. When i review the disassembled code by disassembly tool, everything runs from ram except code_copy function. So everything looks normal. But It behaves weird when i change code or add new code blocks. It seems, CCS doesn't compile new changes.
Example C code and disassembly code show below;
first image shows normal behaviour. Second image shows anormal behaviour after swaping line 82 and 86.
Normal behaviour;
Anormal behaviour;
I couldn't find the way how to compile changes properly. There are some mismatches between text editor, disassembly and debugger....
Additional info:
DSP28xxx_SectionCopy_nonBIOS.asm
If I link compiler sections to flash memory as common usage and I don't copy sections to ram. Changes are compiling properly. There must be wrong usage in my application while copying compiler sections from flash to ram memory. But I couldn't figure it out.
Any help would be appreciated.
Thanks in advance.
I don't understand why, in the abnormal code, the assignment to the variable system_started occurs before the call to the function SciaEchobackInit. Those should occur in the opposite order. For the source file which contains that code, please follow the directions in the article How to Submit a Compiler Test Case.
Thanks and regards,
-George
Preprocessed File;main.pp.txt
Build options:
"C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.4.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --opt_for_speed=0 --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.4.LTS/include" --include_path="project/Inc" --include_path="project/Src" --advice:performance=all -g --preproc_with_comment --preproc_with_compile --diag_warning=225 --display_error_number --obj_directory="Src" "../Src/main.c"
'Finished building: ../Src/main.c'
Build option string contains compiler version.
Thank you for the test case. But I cannot find any problem. The source code you sent has these statements ...
system_started = 1; SciaEchobackInit();
When I build the code and inspect the compiler generated assembly, I see those operations in that order. When I swap the order in the C source, the assembly code swaps to match.
Are you certain that, for the abnormal screen shot in your first post, the source code and disassembly are from the same build? Might it be possible something went wrong when flashing the code, or loading it, or something like that?
Thanks and regards,
-George