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.

Section management with GROUP keyword is not working

Hello,

I have a situation where a client application runs the library( .lib) file. I'm using C6678 processor and CCS v5.1.

With #pragma CODE_SECTION statments, inside the library file, I have mapped some functions spread over multiple files, to different sections. I created a .xdt file and called it from the configuration (.cfg) file to get the linker.cmd file.

For ex. my file1.c file contains sections .section1 and .section 2.

file2.c contains .section1 and .section3.

I need all these sections gets memory mapped in the following order, section1, section2, section3.

I tried GROUP keyword as mentioned above, to get that, but it is not mapping across multiple files. (with -mo option off.). ie section1 functions inside file1.c and section1 functions inside file2.c are mapped continuously in the .map file. I tried several combinations of that but still I could not get that working across the files.

I tried like these,

GROUP : load > MSMCSRAM
{
    .Section1
    .Section2

    .Section3

}

I could get this working using .SECTION keyword from Client application, but since it has to refer obj files inside library file, I cannot use that option, in my application.

ex.

.text : {

-l =file_lib.lib<file1.obj>(.text,Section1) 
-l =file_lib.lib<file1.obj>(.text,Section2) 
-l = file_lib.lib<file2.obj>(.text,Section1)
-l = file_lib.lib<file2.obj>(.text,Section3)
} > MSMCSRAM

Please suggest me alternatives that will suit to my need.

Thanks and regards

Sudhi