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.

CCS6.1 creating output section "xxx" without a sections specification (warning)

Hi Guys,

I'm near the start of a project and installed CCS6.1 to be up to date before heavy coding starts. Compiler versions above 4.4 now give a warning about creating an output section without a sections specification. This warning is a linker warning, but seems to come by changing the compiler version!

Nobody posted recently on this forum with this problem. It's a warning not an error, but it would be reassuring to start a project with clean slate of no problems.

Relevant code:

#define NVM_USER_BANK    0x1800

#pragma location = NVM_USER_BANK;

volatile const uint8_t D_USER[BANK_SIZE] = {

etc....

}

The pragmas "DATA_SECTION" and "SET_DATA_SECTION" were tried, but without success so far...

  • Robert,

    Please see this wiki for an explanation of the warning. Take a look at the linker command file (.cmd) in your project and make sure that the section mentioned in the warning is explicitly allocated to a memory region.

  • Thanks AartiG,
    I added:
    .D_USER : {} > INFOA

    ...to the linker file but with out any change in the warning. I will try some variations of edit to the linker file.
    BTW I am using MPS430FR4133 for this new project.
  • If you are not able to resolve the warning, could you attach the project here for us to look at?
  • Sorry cannot attach the whole project!

    It is rather large at 6k of compiled code. Most was taken from a library, originally written with CCSV5 and something like V4.3.0 of the MSP430 compiler. Which leads me to focus on the definition:

    volatile const uint8_t D_USER[BANK_SIZE] = {  etc  };

    The linker is correctly putting it into the info memory at 0x1800 but doesn't like the 'volatile' keyword. Removing 'voltatile' gets rid of the warning. Selecting a pre V4.4.0 compiler gets rid of the warning.

    "volatile const" can be viewed as somewhat contradictory. Perhaps the writers of V4.4.0+ compiler think so?

    I tried editing the linker file but this didn't make any difference.

    Perhaps someone else will come across the same message.

  • Robert,

    It turns out that for certain 4.4.x versions of the compiler tools, the linker mistakenly issues this warning. Please see this related thread. The bug is fixed in v4.4.3 of the compiler tools, so if you upgrade to this version you should no longer see the warning.

  • Yes,

    The warning does go with the very latest V4.4.3 version! I did a clean-build all cycle to check, it now shows a clear window under "problems", thankyou!

  • hey iam using code composer studio v5 version and i too get that warning !! what to do now?? pls suggest a remedy asap ?? its urgent !!!!