Tool/software: Code Composer Studio
I was going through the hello world sample example. I wanted to know where can i get the linker.cmd file in ccs if it is not specified in project.
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.
Tool/software: Code Composer Studio
I was going through the hello world sample example. I wanted to know where can i get the linker.cmd file in ccs if it is not specified in project.
Kousar,
Are you looking for a sample linker command file for C6678?
If you created a project via the project wizard it should have added one automatically. If you need to add one manually they are located in <ccs install dir>/ccs/ccs_base/c6000/include
In that folder there is a C6678.cmd and a C6678_unified.cmd. You will want to read the comments at the top of the file. For the C6678.cmd file this one is setup to allocate memory to each core. You then have to add --define=COREn=0 or --define=COREn=1 to the build options for your project to indicate which core on the device your project is for. The C6678_unified.cmd file makes all memory available and is used when you are going to be running the same program image on each core (SMP).
Regards,
John
Hi John,
Thank you for your quick reply.
We have imported "helloworld_evmc6678l" project from the mcsdk package and after successfully built we could see the linker.cmd file generating and placed under the debug folder which again removes after cleaning the project. But if you see the imported project we dont see any where the linker.cmd file. So our question is how the compiler fetches memory info(basically somewhere the memory informsation file should present) and places the sections(.text, .cinit....). And the next question is if I wanted to add manually the linker file how I can add.
Regards
Anju
Anju,
In the case of the mcsdk the SYS/BIOS configuration is controlling the generation of a linker command file. It will contain elements that are required for SYS/BIOS.
The SYS/BIOS Users Guide has more information on how you can specify memory placement in the SYS/BIOS configuration starting on page 152. It is also possible to specify a supplemental linker command file. I will loop in the SYS/BIOS team to assist.
http://www.ti.com/lit/ug/spruex3u/spruex3u.pdf
Regards,
John
Hi Anju,
How the compiler fetches memory info depends on which linker option is invoked. The first two snippets below explain the effects of the two linker options and can be found on pages 39-40 of the ARM Assembly Language Tools User's Guide: http://www.ti.com/lit/ug/spnu118u/spnu118u.pdf
In the second snippet, the initialized sections they are referencing are the .text, .data and .sect sections. The last snippet (Figure 2-1) explains how the sections are partitioned in memory. More information about sections can be found on page 19 of the ARM Assembly Language Tools User's Guide.
Snippet 1:
Snippet 2:
Snippet 3: