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 - Section was padded...

Hi there,

Compiling a project with CCS6, for Tiva TM4C129x.

I started getting this warning:

"section 906532 PSIO.out(.text) was padded by 2 to a size of 13792 to"

It doesn't appear to affect the firmware, but I'd like to know what does it mean, and more important, where do I research for the meaning of such messages.

Thanks!

Bruno

  • I need to see the full context of that diagnostic.  The Console view has an icon titled Copy Build Log.  Float your mouse over each icon to see a tool tip pop up that names the icon.  Use that icon to copy the entire build log to a text file.  Attach that text file to your next post.

    Thanks and regards,

    -George

  • It's a hex converter message. The full message is:
    section 906532 PSIO.out(.text) was padded by 2 to a size of 13792 to satisfy the specified memory width of ????
    where I don't know ????
    It should be harmless.
  • Got the same thing this morning, so I was able to attach the log as suggested before. Here it goes.

    log_for_padded_section.txt
    **** Build of configuration Debug for project 906532 PSIO ****
    
    "c:\\ti\\ccsv6\\utils\\bin\\gmake" -k all 
    'Building file: ../906532_main.c'
    'Invoking: ARM Compiler'
    "c:/ti/ccsv6/tools/compiler/arm_5.1.10/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O0 --opt_for_speed=2 --include_path="c:/ti/ccsv6/tools/compiler/arm_5.1.10/include" --include_path="C:/ti/tivaware" -g --gcc --define=ccs="ccs" --define=PART_IS_BLIZZARD_RA1 --define=PART_TM4C1294NCPDT --display_error_number --diag_warning=225 --diag_wrap=off --preproc_with_compile --preproc_dependency="906532_main.pp"  "../906532_main.c"
    'Finished building: ../906532_main.c'
    ' '
    'Building file: ../infinity_nomadtan.c'
    'Invoking: ARM Compiler'
    "c:/ti/ccsv6/tools/compiler/arm_5.1.10/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O0 --opt_for_speed=2 --include_path="c:/ti/ccsv6/tools/compiler/arm_5.1.10/include" --include_path="C:/ti/tivaware" -g --gcc --define=ccs="ccs" --define=PART_IS_BLIZZARD_RA1 --define=PART_TM4C1294NCPDT --display_error_number --diag_warning=225 --diag_wrap=off --preproc_with_compile --preproc_dependency="infinity_nomadtan.pp"  "../infinity_nomadtan.c"
    'Finished building: ../infinity_nomadtan.c'
    ' '
    'Building file: ../tm4c1294ncpdt_startup_ccs.c'
    'Invoking: ARM Compiler'
    "c:/ti/ccsv6/tools/compiler/arm_5.1.10/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O0 --opt_for_speed=2 --include_path="c:/ti/ccsv6/tools/compiler/arm_5.1.10/include" --include_path="C:/ti/tivaware" -g --gcc --define=ccs="ccs" --define=PART_IS_BLIZZARD_RA1 --define=PART_TM4C1294NCPDT --display_error_number --diag_warning=225 --diag_wrap=off --preproc_with_compile --preproc_dependency="tm4c1294ncpdt_startup_ccs.pp"  "../tm4c1294ncpdt_startup_ccs.c"
    'Finished building: ../tm4c1294ncpdt_startup_ccs.c'
    ' '
    'Building target: 906532 PSIO.out'
    'Invoking: ARM Linker'
    "c:/ti/ccsv6/tools/compiler/arm_5.1.10/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O0 --opt_for_speed=2 -g --gcc --define=ccs="ccs" --define=PART_IS_BLIZZARD_RA1 --define=PART_TM4C1294NCPDT --display_error_number --diag_warning=225 --diag_wrap=off -z -m"906532 PSIO.map" --heap_size=0 --stack_size=4096 -i"c:/ti/ccsv6/tools/compiler/arm_5.1.10/lib" -i"c:/ti/ccsv6/tools/compiler/arm_5.1.10/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="906532 PSIO_linkInfo.xml" --rom_model -o "906532 PSIO.out"  "./906532_main.obj" "./infinity_nomadtan.obj" "./tm4c1294ncpdt_startup_ccs.obj" "C:/ti/tivaware/driverlib/ccs/Debug/driverlib.lib" "../tm4c1294ncpdt.cmd" -l"libc.a" 
    <Linking>
    'Finished building target: 906532 PSIO.out'
    ' '
    "c:/ti/ccsv6/utils/tiobj2bin/tiobj2bin" "906532 PSIO.out" "906532 PSIO.bin" "c:/ti/ccsv6/tools/compiler/arm_5.1.10/bin/armofd" "c:/ti/ccsv6/tools/compiler/arm_5.1.10/bin/armhex" "c:/ti/ccsv6/utils/tiobj2bin/mkhex4bin"
    ' '
    'Invoking: ARM Hex Utility'
    "c:/ti/ccsv6/tools/compiler/arm_5.1.10/bin/armhex"  -o "906532 PSIO.hex"  "906532 PSIO.out" 
    warning: section 906532 PSIO.out(.text) was padded by 2 to a size of 13884 to
       satisfy the specified memory width of 4
    Translating to Extended Tektronix format...
       "906532 PSIO.out"   ==> .intvecs
       "906532 PSIO.out"   ==> .text
       "906532 PSIO.out"   ==> .const
       "906532 PSIO.out"   ==> .cinit
    'Finished building: 906532 PSIO.hex'
    ' '
    
    **** Build Finished ****
    

  • Except for naming one of the four output files, you take all the defaults of the hex utility.  This means Tektronix output format, and a memory width (--memwidth option) of 4 bytes.  Thus every section that is converted (all the initialized sections) which is not a multiple of 4 bytes in length gets additional padding.  In your particular case the .text section is padded with 2 extra bytes.  This padding is only present in the hex output.  It depends on what is done with this output hex file as to whether this padding causes any issues.  In most cases, it is probably harmless.

    BTW, are you aware that hex command creates four separate output files?  You explicitly name the one file that gets the least significant byte of each 32-bit word.  There additional files are created, with the extensions .x1, .x1, and .x3.  These files contain the other bytes from each word.  This is discussed in the section titled Partitioning Data Into Output Files in the ARM assembly language tools manual.

    Thanks and regards,

    -George

  • Back to the subject after a long while... the message still happens in most of my projects. This is the full context:

    'Invoking: ARM Hex Utility'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.6/bin/armhex" --quiet -o "908325_RDBSx3B1.hex" "908325_RDBSx3B1.out"
    warning: section 908325_RDBSx3B1.out(.text) was padded by 2 to a size of 64280

    I tried the --quiet parameter to see if the message would go away, but it is still generated. It certainly does no harm, but I don't like those !!! warnings on my projects - how can I configure the padding options or at least turn the warning off?

    GOT IT! Just keeping it here in case someone needs the answer:

    - With the advanced settings on, go to the project properties, ARM Hex Utility, Diagnostic Options, and check "Suppress Warnings".