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.

CODECOMPOSER: Resolving warning: section xx.out at 020000h falls in unconfigured memory

Part Number: CODECOMPOSER

Tool/software:

Hi Champ,

I am asking for my customer.

They are developing F28P65x MCU now, and successfully generate .bin file with hex2000 by following below link.

 https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1113498/tms320f280025c-post-build-to-generate-bin-file-the-size-is-too-big/4138341 

The .bin file is generated, but it also pop up a warning. 

Like to ask the expert, how to resolve the warning showing as below ? 

<Linking>

Finished building target: "BOOT.out"

"C:/ti/ccs1271/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/bin/hex2000.exe" -q -b -image -o "BOOT.bin" roms_directive_file.txt "BOOT.out"

 warning: section BOOT.out(ramgs0) at 020000h falls in unconfigured memory

.CMD configuration as below, 

RAMGS0           : origin = 0x010000, length = 0x002000

ramgs0 : > RAMGS0, type=NOINIT

ROMS {

  all_mem: o = 0x100000, l = 0x8000

}

Thanks for the input.

Regards,

Johnny

  • The reason you see ...

     warning: section BOOT.out(ramgs0) at 020000h falls in unconfigured memory

    ... is the section ramgs0 falls outside of the range of memory specified in the ROMS directive.  The ROMS directive is wrong because you skipped a step when creating it.  Go back to this post and search it for the phrase multiply these values by 2.  Carefully follow those directions.

    Thanks and regards,

    -George

  • Hi George,

    We had ROMS directive multiplied by 2 already.

    The Flash and RAM linker command as follows.

    BEGIN                             : origin = 0x080000, length = 0x000002  // Update the codestart location as needed
    FLASH_BOOT_CODE  : origin = 0x080002, length = 0x003FEC, fill = 0xFFFF
    BOOT_FUNCTION_ID : origin = 0x083FEE, length = 0x000002, fill = 0xFFFF /* Function ID record  */
    BOOT_VERSION           : origin = 0x083FF0, length = 0x000010, fill = 0xFFFF /* Boot version record */
    …
    RAMGS0             : origin = 0x010000, length = 0x002000
    …
    ramgs0 : > RAMGS0, type= NOINIT
    
    ROMS {
      all_mem: o = 0x100000, l = 0x8000
    }
    

    W can produce a .bin of 32kb w/o problem.

    Next, customer wants to have DMA buffer initializes the configuration to GS RAM -> ramgs0, the initialization procedure is as follows 

    #pragma SET_DATA_SECTION("ramgs0")
    Create_DMA_Object(dmaDcanRxObj, 16, DmaRegs.CH1);
    #pragma SET_DATA_SECTION()

    The warning: section BOOT.out(ramgs0) at 020000h falls in unconfigured memory
    (skipped) shows up again.

    However, if I remove type= NOINIT from linker (as below), the above warning disappears, but user hopes the ramgs0 zone is not initialized.

    Is there a way to meet ramgs0 isn't initialized and also the warning is gone ?

    Thanks for the comment.

    Regards,

    Johnny

  • Please configure things so this occurs ...

    "C:/ti/ccs1271/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/bin/hex2000.exe" -q -b -image -o "BOOT.bin" roms_directive_file.txt "BOOT.out"

     warning: section BOOT.out(ramgs0) at 020000h falls in unconfigured memory

    Please put these files in a zip and attach it to your next post.

    • linker command file
    • roms_directive_file.txt
    • BOOT.out

    Thanks and regards,

    -George

  • Hi George,

    Attach a zip file contains partial linker command file and roms_directive_file.txt.

    Customer could not provide the .out file to us.

    So the question is that is there a way to have ramgs0 not initialized in linker command file, and also have the warning removed after compilation ?

    5126.files.zip

    Thanks for your support.

    Johnny

  • Based on the roms directive file, the section ramgs0 is out of range.  I suspect that is intentional.

    If the section ramgs0 is uninitialized (similar to .bss), then this diagnostic ...

    warning: section BOOT.out(ramgs0) at 020000h falls in unconfigured memory

    does not get emitted.  Since it is emitted, I am forced to conclude ramgs0 is initialized (similar to .const).  Is this intentional, or some kind of error?  Based on the section name alone, I expect it to be uninitialized.

    Thanks and regards,

    -George

  • Hi George,

    Thanks for your input. 

    Based on the section name alone, I expect it to be uninitialized.

    Yes, agree with you. It should be uninitialized for the section here. 

    Is this intentional, or some kind of error? 

    Are you saying the warning is because of user's defined linker command file or our CCS ? 

    Is there any solution to this ?  

    Thanks,

    Johnny

  • Please get a better understanding of the terms initialized section and uninitialized section by searching the C28x assembly tools manual for the sub-chapter titled How the Assembler Handles Sections.  

    Because we see the diagnostic ...

    warning: section BOOT.out(ramgs0) at 020000h falls in unconfigured memory

    ... we know ramgs0 is an initialized section.  This diagnostic also means ramgs0 is not in the .bin file.  The program needs this initialized data, or it won't work.

    Everything else we see about ramgs0 indicates it is intended to be uninitialized.  So, we need to understand why it is initialized instead.  None of the files you sent earlier help explain why it is initialized.

    How does ramgs0 get created?  Please consider this question at the level of the C code (or assembly code) which creates it.  It is likely that it is created in a single C file.  If that is correct, then for that C file, please follow the directions in the article How to Submit a Compiler Test Case.  Note this calls for submitting much less than an entire CCS project.

    Thanks and regards,

    -George

  • Hi George,

    Thanks for your input. I agree with your analysis.

    How does ramgs0 get created?  Please consider this question at the level of the C code (or assembly code) which creates it.

    It is just an output section named by user then allocate to the actual memory RAMGS0 in device. There is no such C code (or assembly code) that creates the ramgs0.

    What user does here is naming an output section then allocate to memory in device, then have the data specifically copied to that output section. 

    Customer also have tried to assign the data (using #pragma SET_DATA_SECTION) to other section in main code, the diagnostic follows. 

    Is it because of all the output section address out of the range of the ROMS directive ?

    The ROMS directive is all_mem: o = 0x100000, l = 0x8000

    Thanks for your support.

    Regards,

    Johnny

  • In reply to my question ...

    How does ramgs0 get created?

    you said ...

    It is just an output section named by user then allocate to the actual memory RAMGS0 in device.

    That is vague.  The details matter.  

    Suppose it is similar to the following C code ...

    __attribute__((section("ramgs0")))
    int array[] = { 5, 6, 7, 8, 9 };

    By default, this results in an uninitalized section.  In addition, entries are made in the .cinit section.  The .cinit section is processed by the startup code from the compiler RTS library, which causes the values 5, 6, 7, 8, 9 to be copied into the RAM address for ramgs0.  

    Here is how ramgs0 is written in the linker command file.

    ramgs0 : > RAMGS0, type=NOINIT

    Because type = NOINIT is used, this default behavior is disabled.  Instead, ramgs0 is an initialized section.  In effect, you agree to somehow copy the values 5, 6, 7, 8, 9 from the the executable file into the RAM address for ramgs0.  Thus, ramgs0 is an initialized section outside of the range specified by the ROMS directive.  That causes hex2000 to issue the diagnostic ...

     warning: section BOOT.out(ramgs0) at 020000h falls in unconfigured memory

    Does this describe what is happening?

    Thanks and regards,

    -George