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.

Warning: #10247-D creating output section "BSLSKEY" without a SECTIONS specification.

Other Parts Discussed in Thread: MSP430F2410


I am getting the below warning in ccs.
=====================
Warning: #10247-D creating output section "BSLSKEY" without a SECTIONS specification.
=====================

In the linker command file, BSKSKEY section is added as below.
==========
In lnk_msp430f2410.cmd file
==========
MEMORY
{
..
    BSLSKEY                 : origin = 0xFFDA, length = 0x0002
..
}
SECTIONS
{
..
..
}

In Application BSKSKEY is used as below.
=============
In Application code src.c
=============
#pragma RETAIN(bslkey)
#pragma DATA_SECTION(bslkey, "BSLSKEY")
const WORD bslkey = 0xAA55;

-------------------------------------------------
CCS_V5.5.0
Target MCU: MSP430F2410

Do i need to add "SECTIONS" of linker file with BSLSKEY something like below
.bslkey    : {} > BSLSKEY

How can i fix this warning?

 

  • vinoth s1 said:
    Do i need to add "SECTIONS" of linker file with BSLSKEY something like below
    .bslkey    : {} > BSLSKEY

    Yes.  Please see this wiki article for an explanation of the differences between memory ranges, output sections, and input sections.

    Thanks and regards,

    -George

  • If i define in linker file as below,

    SECTIONS
    {
    ..
    .bslkey : {} > BSLSKEY
    ..
    }
    

    still getting the warning.

    For ".text" inside SECTIONS is self explanatory that the code will be routed to FLASH1

    ===================

    .text       : {} > FLASH1

    ===================

    But where to define ".bslkey"and how does the copiler interpret .bslkey like .text?

     

  • I think you are getting confused, in part, because you name everything bslkey, with only minor variations.  While all these things are in different namespaces, and thus can have the same name, it is wise to avoid doing that until you understand all the differences between them.

    Here is what you need to do.  I'll name everything bslkey_something, where that something describes what it is.  Note I use all caps for the memory range name, following the unwritten convention for linker command files.

    In C code you need to write ...

    #pragma RETAIN(bslkey_c_variable)
    #pragma DATA_SECTION(bslkey_c_variable, "bslkey_section_name")
    const WORD bslkey_c_variable = 0xAA55;
    

    In the linker command file you write ...

    MEMORY
    {
       ...
       BSLKEY_MEMORY_RANGE : origin = 0xFFDA, length = 0x0002
       ...
    }
    
    SECTIONS
    {
       ...
       bslkey_section_name > BSLKEY_MEMORY_RANGE
       ...
    }
    

    Hope this helps ...

    -George

  • Thanks, i got it.
    I have a other doubt. I want to route a ".text" section to two different memory segments, i tried using like below.

    It doesn't give any compilation error.
    =====================
    .text       : {} > FLASH1 | FLASH2
    =====================
    I just want to know is this a right syntax ?

  • I think you want section splitting.  Note section splitting uses >> syntax, and not > like you do.  You are not using section splitting.  Using only > syntax means the .text output section is not split at all.  If it fits entirely in FLASH1, it is placed there.  Otherwise, all of .text goes in FLASH2.  

    Thanks and regards,

    -George

  • can you tell me how you solve this question?thanks.
  • Answer is there in the above commnets.please refer that and if you have any query please post

    -Vinoth