I have a 2812 program that builds with CCS3 and CCS2 with no problem. When I port to CCS4 it builds but comes up with the linker warning "no matching section". Any ideas?
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.
I have a 2812 program that builds with CCS3 and CCS2 with no problem. When I port to CCS4 it builds but comes up with the linker warning "no matching section". Any ideas?
Rich,
A section has been assigned to a memory block in the linker command file but that section is not present in the build.
Here is an example. Say you are including the IQmath library. This library has sin/cos lookup tables that are in a named assembly section. But if your code never uses the IQsin or IQcos functions this table won't be linked in. The .cmd file, however, may have assigned the section with this lookup table to memory in the boot ROM in this case you will get the warning - the table isn't used so the section doesn't appear in the object file.
But if you later change the code to call IQsin the table will be included and is already properly assigned its memory allocation.
-Lori
Lori - thanks for responding so quickly. I understand if there's an assigned section in the command file that's not present, but there should not be and the project builds without error or warnings with CCS3 & 2. Is it that CCS3 & 2 did not flag this warning?
RichS said:I understand if there's an assigned section in the command file that's not present, but there should not be and the project builds without error or warnings with CCS3 & 2. Is it that CCS3 & 2 did not flag this warning?
Rich,
Are you using different compiler versions? I believe it will be the linker that will flag this and that would explain the difference you see.
-Lori
If the compiler version is identical, then that means the change comes from project source, the linker command file, or the options passed by CCS to the linker, so you should look at these things first. Without a reproducible test case, it's unlikely that the compiler team will be able to tell you anything. What exactly is the text of the warning?
The exact text is "no matching section". The project was CCS3 and was imported to CCS4 and now I get this warning. Since the linker,compiler and cmd file is the same it must be the project.
The warning should at least tell you the line number of the linker command file which contains the section specifier which doesn't match any sections. After finding this pattern, use ofd2000 on the before and after executable files to verify that there is a section matching the pattern present for one and not the other. This will be a good start toward narrowing down the problem.
Are you sure the CCS4 import didn't alter your linker command file?
CCSv4 shouldn't mess with the linker command file. But it is possible that some of the options stored in the CCS v3.x pjt didn't get properly imported into v4.
I recieve the exact same warning. Will I be able to run my program with this warning or does it need to be fixed?
The warning "no matching section" is usually harmless. It means that your linker command file said "put section X here", but the linker could not find section X in your program. Usually, that's not a problem, but it could indicate that your program is not laid out in memory as you desire. This warning is emitted by the linker because if X is something like an interrupt vector table, which might not be referred to anywhere but the linker command file, its absence is a more serious problem.
I understand that the memory may not be layout in the same manner as written in the linker command file, so I might get such a warning, but in my linker command file, I have specified:
.bss_nf_KF : {D:\nf_kalmanfilter.obj(.bss)}
and the object file gets created in the specified directory, so what is the reason that I get the same warning?