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.

Tiva C Example Projects TI Compiler to GCC

Other Parts Discussed in Thread: TM4C123GH6PM, EK-TM4C123GXL

I'm trying to simply use the gcc compiler to comile the blinky project and I have followed the steps outlines here and tried many other options in trying to get it to work and i keep getting the same errors.  

This seems like it should just compile.. I'm not even moving the folder around from the tiva ware main folder.  

I used this link to try and tried other options and still nothing:

processors.wiki.ti.com/.../Using_GCC_with_Tiva_in_CCSv6

Errors I get are:

**** Build of configuration Debug__GNU for project blinky ****

"C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
'Building target: blinky.out'
'Invoking: GNU Linker'
"C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc.exe" -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DPART_TM4C123GH6PM -ffunction-sections -fdata-sections -g -gdwarf-3 -gstrict-dwarf -Wall -Wl,-Map,"blinky.map" -o"blinky.out" "./blinky.o" "./tm4c123gh6pm_startup_ccs_gcc.o" -Wl,-T"../tm4c123gh6pm.lds" -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group
makefile:145: recipe for target 'blinky.out' failed
./blinky.o: In function `main':
C:/ti/TivaWare_C_Series-2.1.3.156/examples/boards/ek-tm4c123gxl/blinky/blinky.c:54: undefined reference to `SysCtlPeripheralEnable'
C:/ti/TivaWare_C_Series-2.1.3.156/examples/boards/ek-tm4c123gxl/blinky/blinky.c:59: undefined reference to `SysCtlPeripheralReady'
C:/ti/TivaWare_C_Series-2.1.3.156/examples/boards/ek-tm4c123gxl/blinky/blinky.c:67: undefined reference to `GPIOPinTypeGPIOOutput'
C:/ti/TivaWare_C_Series-2.1.3.156/examples/boards/ek-tm4c123gxl/blinky/blinky.c:77: undefined reference to `GPIOPinWrite'
C:/ti/TivaWare_C_Series-2.1.3.156/examples/boards/ek-tm4c123gxl/blinky/blinky.c:89: undefined reference to `GPIOPinWrite'
collect2.exe: error: ld returned 1 exit status
gmake: *** [blinky.out] Error 1
gmake: Target 'all' not remade because of errors.

**** Build Finished ****

  • Hello Branko,

    Looks like the driverlib is not being picked up by the linker. Have you added the file "./driverlib/gcc/libdriver.a" to the library section of the linker. From the log you provided, I cannot see this file.

    Thanks,
    Sai
  • ok i was able to get it to compile after removing the prefix lib and i also kept messing around so i'm not sure exactly what it was but I think it was the prefix.  

    This is actually my first time trying to compile any of the example and for the first attempt i wanted to do it in gcc.  I compiled blinky and tried to debug and it doesn't let me step through the code.  The program can't be loaded to the device.  

    I clicked on the load button since the play button wasn't highlighted for me to click on like usual and run the code and I got the following message:

    CORTEX_M4_0: Error: Debug Port error occurred.

    I do have another blinky program i did on the side without the tivaware stuff and it works when i load that but i wanted to try using the tivaware with gcc and get that to work. 

    So now it just doesn't load into the device i'm assuming.

  • Branko Miletic said:
    c:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lC:/ti/TivaWare_C_Series-2.1.3.156/driverlib/gcc/libdriver.a

    With the GCC linker the -l option doesn't accept the absolute pathname of a library file, but the name of library without the "lib" prefix or the ".a" file extension. What this means is that the Library search path (-L) must be set to the directory which contains the GCC driverlib, and the libraries (-l) set to "driver".

    An example from the CCS Project Properties from a CCS 6.1.3 project which uses GCC and TivaWare:

  • thanks, i was able to get it to compile and i think it was because of the prefix.

    Now the program doesn't get loaded properly and i can't step through the code like usual.

    This is what my screeen looks like after i press the debug button:

    The green arrow isn't highlighted and i can't press it.  When i press suspend i get the following:

  • This is what i get when i can't debug properly.


    **** Build of configuration Debug__GNU for project blinky ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: C:/ti/TivaWare_C_Series-2.1.3.156/examples/boards/ek-tm4c123gxl/blinky/blinky.c'
    'Invoking: GNU Compiler'
    "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-m4 -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DPART_TM4C123GH6PM -I"C:/ti/TivaWare_C_Series-2.1.3.156" -I"C:/ti/TivaWare_C_Series-2.1.3.156/examples/boards/ek-tm4c123gxl" -I"C:/ti/TivaWare_C_Series-2.1.3.156/driverlib/gcc" -ffunction-sections -fdata-sections -g -gdwarf-3 -gstrict-dwarf -Wall -MD -std=c99 -c -MMD -MP -MF"blinky.d" -MT"blinky.o" -o"blinky.o" "C:/ti/TivaWare_C_Series-2.1.3.156/examples/boards/ek-tm4c123gxl/blinky/blinky.c"
    'Finished building: C:/ti/TivaWare_C_Series-2.1.3.156/examples/boards/ek-tm4c123gxl/blinky/blinky.c'
    ' '
    'Building file: ../tm4c123gh6pm_startup_ccs_gcc.c'
    'Invoking: GNU Compiler'
    "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-m4 -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DPART_TM4C123GH6PM -I"C:/ti/TivaWare_C_Series-2.1.3.156" -I"C:/ti/TivaWare_C_Series-2.1.3.156/examples/boards/ek-tm4c123gxl" -I"C:/ti/TivaWare_C_Series-2.1.3.156/driverlib/gcc" -ffunction-sections -fdata-sections -g -gdwarf-3 -gstrict-dwarf -Wall -MD -std=c99 -c -MMD -MP -MF"tm4c123gh6pm_startup_ccs_gcc.d" -MT"tm4c123gh6pm_startup_ccs_gcc.o" -o"tm4c123gh6pm_startup_ccs_gcc.o" "../tm4c123gh6pm_startup_ccs_gcc.c"
    'Finished building: ../tm4c123gh6pm_startup_ccs_gcc.c'
    ' '
    'Building target: blinky.out'
    'Invoking: GNU Linker'
    "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc.exe" -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DPART_TM4C123GH6PM -ffunction-sections -fdata-sections -g -gdwarf-3 -gstrict-dwarf -Wall -Wl,-Map,"blinky.map" -L"C:/ti/TivaWare_C_Series-2.1.3.156/driverlib/gcc" -L"C:/ti/TivaWare_C_Series-2.1.3.156" -L"C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/arm-none-eabi/include" -o"blinky.out" "./blinky.o" "./tm4c123gh6pm_startup_ccs_gcc.o" -Wl,-T"../tm4c123gh6pm.lds" -Wl,--start-group -lc -lgcc -lnosys -ldriver -Wl,--end-group
    'Finished building target: blinky.out'
    ' '
    "C:/ti/ccsv6/utils/tiobj2bin/tiobj2bin" "blinky.out" "blinky.bin" "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/armofd" "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/armhex" "C:/ti/ccsv6/utils/tiobj2bin/mkhex4bin"
    tiobj2bin.bat failed on C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/armofd
    Please see processors.wiki.ti.com/.../Tiobj2bin_Failed
    tiobj2bin.bat failed on C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/armhex
    Please see processors.wiki.ti.com/.../Tiobj2bin_Failed
    C:/ti/ccsv6/utils/tiobj2bin/mkhex4bin failure occurred. Giving up.
    ' '
    'C:\ti\ccsv6\tools\compiler\gcc-arm-none-eabi-4_9-2015q3\bin\ofd470' is not recognized as an internal or external command,
    operable program or batch file.
    File does not exist: at XML_TI_OFD.pm line 877.

    **** Build Finished ****
  • Branko Miletic said:
    Now the program doesn't get loaded properly and i can't step through the code like usual.

    It looks like you are encountering a problem where the CCS debugger doesn't use the correct entry point for the program, as described in Known issue when using CCS 6.1/Linaro GCC 4.8.4 . In the linker script (.lds file) try the work-around of adding the following (before the SECTIONS):

    ENTRY(ResetISR)

    [While the referenced Wiki page was reported against CCS 6.1 and the Linaro GCC 4.8.4, I have checked and the same problem can occur with CCS 6.1.3 and Linaro GCC 4.9.3]

  • Branko Miletic said:
    "C:/ti/ccsv6/utils/tiobj2bin/tiobj2bin" "blinky.out" "blinky.bin" "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/armofd" "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/armhex" "C:/ti/ccsv6/utils/tiobj2bin/mkhex4bin"
    tiobj2bin.bat failed on C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/armofd
    Please see processors.wiki.ti.com/.../Tiobj2bin_Failed
    tiobj2bin.bat failed on C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/armhex
    Please see processors.wiki.ti.com/.../Tiobj2bin_Failed
    C:/ti/ccsv6/utils/tiobj2bin/mkhex4bin failure occurred. Giving up.
    ' '
    'C:\ti\ccsv6\tools\compiler\gcc-arm-none-eabi-4_9-2015q3\bin\ofd470' is not recognized as an internal or external command,
    operable program or batch file.

    The armofd and armhex programs are part of the TI compiler, rather than the GNU compiler.

    For the GCC compiler the objcopy program can be used as post-build step to create a binary file. Try changing the post-build step to the following to create a binary file using objcopy:

    "${CG_TOOL_OBJCOPY}" -S -O binary  "${ProjName}.out" "${ProjName}.bin"

  • I did what you mentioned here and it didn't work so then i kept that change that you mentioned and decided to just randomly make another change somewhere else.

    The change that I made was where it said on the website for porting the blinky led to gcc "Edit the linker script (.lds file) to rename the interrupt vector section from .intvecs to .isr_vector "

    processors.wiki.ti.com/.../Using_GCC_with_Tiva_in_CCSv6

    What i did was I put it back to how it originally was and the LED started to blink and i was able to debug. So i did the opposite as it was said on the site.

    I will see later which one of the two changes fixed it or if it was having both.

    Now i can see it blink and debug BUT .. not done yet. Still need to fix that bin generation file as i still get the same message as before.

    The bin file generation is the last thing i presume.

    Is objcopy in windows 7 that i can use... or some sort of utility?
  • Branko Miletic said:
    Is objcopy in windows 7 that i can use... or some sort of utility?

    objcopy is a GNU utility, which comes with the GCC compiler. When you create a CCS project which uses a GCC compiler, CCS automatically sets the build variable CG_TOOL_OBJCOPY to the objcopy program in the GCC compiler installation.

  • Thanks for the explanation.

    I input what you mentioned above as follows and got the following.

    **** Build of configuration Debug__GNU for project blinky ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Invoking: GNU Objcopy Utility'
    "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-objcopy.exe" -S -O binary "blinky.out" "blinky.bin" "blinky.out" "blinky.hex"
    makefile:153: recipe for target 'blinky.hex' failed
    Usage: C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-objcopy.exe [option(s)] in-file [out-file]
    Copies a binary file, possibly transforming it in the process
    The options are:
    -I --input-target <bfdname> Assume input file is in format <bfdname>
    -O --output-target <bfdname> Create an output file in format <bfdname>
    -B --binary-architecture <arch> Set output arch, when input is arch-less
    -F --target <bfdname> Set both input and output format to <bfdname>
    --debugging Convert debugging information, if possible
    -p --preserve-dates Copy modified/access timestamps to the output
    -D --enable-deterministic-archives
    Produce deterministic output when stripping archives
    -U --disable-deterministic-archives
    Disable -D behavior (default)
    -j --only-section <name> Only copy section <name> into the output
    --add-gnu-debuglink=<file> Add section .gnu_debuglink linking to <file>
    -R --remove-section <name> Remove section <name> from the output
    -S --strip-all Remove all symbol and relocation information
    -g --strip-debug Remove all debugging symbols & sections
    --strip-dwo Remove all DWO sections
    --strip-unneeded Remove all symbols not needed by relocations
    -N --strip-symbol <name> Do not copy symbol <name>
    --strip-unneeded-symbol <name>
    Do not copy symbol <name> unless needed by
    relocations
    --only-keep-debug Strip everything but the debug information
    --extract-dwo Copy only DWO sections
    --extract-symbol Remove section contents but keep symbols
    -K --keep-symbol <name> Do not strip symbol <name>
    --keep-file-symbols Do not strip file symbol(s)
    --localize-hidden Turn all ELF hidden symbols into locals
    -L --localize-symbol <name> Force symbol <name> to be marked as a local
    --globalize-symbol <name> Force symbol <name> to be marked as a global
    -G --keep-global-symbol <name> Localize all symbols except <name>
    -W --weaken-symbol <name> Force symbol <name> to be marked as a weak
    --weaken Force all global symbols to be marked as weak
    -w --wildcard Permit wildcard in symbol comparison
    -x --discard-all Remove all non-global symbols
    -X --discard-locals Remove any compiler-generated symbols
    -i --interleave [<number>] Only copy N out of every <number> bytes
    --interleave-width <number> Set N for --interleave
    -b --byte <num> Select byte <num> in every interleaved block
    --gap-fill <val> Fill gaps between sections with <val>
    --pad-to <addr> Pad the last section up to address <addr>
    --set-start <addr> Set the start address to <addr>
    {--change-start|--adjust-start} <incr>
    Add <incr> to the start address
    {--change-addresses|--adjust-vma} <incr>
    Add <incr> to LMA, VMA and start addresses
    {--change-section-address|--adjust-section-vma} <name>{=|+|-}<val>
    Change LMA and VMA of section <name> by <val>
    --change-section-lma <name>{=|+|-}<val>
    Change the LMA of section <name> by <val>
    --change-section-vma <name>{=|+|-}<val>
    Change the VMA of section <name> by <val>
    {--[no-]change-warnings|--[no-]adjust-warnings}
    Warn if a named section does not exist
    --set-section-flags <name>=<flags>
    Set section <name>'s properties to <flags>
    --add-section <name>=<file> Add section <name> found in <file> to output
    --rename-section <old>=<new>[,<flags>] Rename section <old> to <new>
    --long-section-names {enable|disable|keep}
    Handle long section names in Coff objects.
    --change-leading-char Force output format's leading character style
    --remove-leading-char Remove leading character from global symbols
    --reverse-bytes=<num> Reverse <num> bytes at a time, in output sections with content
    --redefine-sym <old>=<new> Redefine symbol name <old> to <new>
    --redefine-syms <file> --redefine-sym for all symbol pairs
    listed in <file>
    --srec-len <number> Restrict the length of generated Srecords
    --srec-forceS3 Restrict the type of generated Srecords to S3
    --strip-symbols <file> -N for all symbols listed in <file>
    --strip-unneeded-symbols <file>
    --strip-unneeded-symbol for all symbols listed
    in <file>
    --keep-symbols <file> -K for all symbols listed in <file>
    --localize-symbols <file> -L for all symbols listed in <file>
    --globalize-symbols <file> --globalize-symbol for all in <file>
    --keep-global-symbols <file> -G for all symbols listed in <file>
    --weaken-symbols <file> -W for all symbols listed in <file>
    --alt-machine-code <index> Use the target's <index>'th alternative machine
    --writable-text Mark the output text as writable
    --readonly-text Make the output text write protected
    --pure Mark the output file as demand paged
    --impure Mark the output file as impure
    --prefix-symbols <prefix> Add <prefix> to start of every symbol name
    --prefix-sections <prefix> Add <prefix> to start of every section name
    --prefix-alloc-sections <prefix>
    Add <prefix> to start of every allocatable
    section name
    --file-alignment <num> Set PE file alignment to <num>
    --heap <reserve>[,<commit>] Set PE reserve/commit heap to <reserve>/
    <commit>
    --image-base <address> Set PE image base to <address>
    --section-alignment <num> Set PE section alignment to <num>
    --stack <reserve>[,<commit>] Set PE reserve/commit stack to <reserve>/
    <commit>
    --subsystem <name>[:<version>]
    Set PE subsystem to <name> [& <version>]
    --compress-debug-sections Compress DWARF debug sections using zlib
    --decompress-debug-sections Decompress DWARF debug sections using zlib
    -v --verbose List all object files modified
    @<file> Read options from <file>
    -V --version Display this program's version number
    -h --help Display this output
    --info List object formats & architectures supported
    C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-objcopy.exe: supported targets: elf32-littlearm elf32-bigarm elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
    gmake: *** [blinky.hex] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

  • Branko Miletic said:
    The change that I made was where it said on the website for porting the blinky led to gcc "Edit the linker script (.lds file) to rename the interrupt vector section from .intvecs to .isr_vector "

    processors.wiki.ti.com/.../Using_GCC_with_Tiva_in_CCSv6

    What i did was I put it back to how it originally was and the LED started to blink and i was able to debug. So i did the opposite as it was said on the site.

    The interrupt vector section in the linker script (.lds file) needs to match the section name used on the definition of the vector table in the <device_name>_startup_ccs_gcc.c file. I think the need to rename the interrupt vector section only applied for projects created in CCS 6.0.0 which had a mis-match in the example files.

    Looking at a project created in CCS 6.1.x the interrupt vector section is named .intvecs in both the linker script and the <device_name>_startup_ccs_gcc.c file.

  • I put in what you mentioned for the post-build and the following occured. Is it something wrong with the makefile?

    **** Build of configuration Debug__GNU for project blinky ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building target: blinky.out'
    'Invoking: GNU Linker'
    "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc.exe" -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DPART_TM4C123GH6PM -ffunction-sections -fdata-sections -g -gdwarf-3 -gstrict-dwarf -Wall -Wl,-Map,"blinky.map" --entry ResetISR -L"C:/ti/TivaWare_C_Series-2.1.3.156" -L"C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/arm-none-eabi/include" -L"C:/ti/TivaWare_C_Series-2.1.3.156/driverlib/gcc" -o"blinky.out" "./blinky.o" "./tm4c123gh6pm_startup_ccs_gcc.o" -Wl,-T"../tm4c123gh6pm.lds" -Wl,--start-group -lgcc -lc -lnosys -ldriver -Wl,--end-group
    'Finished building target: blinky.out'
    ' '
    'Invoking: GNU Objcopy Utility'
    "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-objcopy.exe" -S -O binary "blinky.out" "blinky.bin" "blinky.out" "blinky.hex"
    makefile:153: recipe for target 'blinky.hex' failed
    Usage: C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-objcopy.exe [option(s)] in-file [out-file]
    Copies a binary file, possibly transforming it in the process
    The options are:
    -I --input-target <bfdname> Assume input file is in format <bfdname>
    -O --output-target <bfdname> Create an output file in format <bfdname>
    -B --binary-architecture <arch> Set output arch, when input is arch-less
    -F --target <bfdname> Set both input and output format to <bfdname>
    --debugging Convert debugging information, if possible
    -p --preserve-dates Copy modified/access timestamps to the output
    -D --enable-deterministic-archives
    Produce deterministic output when stripping archives
    -U --disable-deterministic-archives
    Disable -D behavior (default)
    -j --only-section <name> Only copy section <name> into the output
    --add-gnu-debuglink=<file> Add section .gnu_debuglink linking to <file>
    -R --remove-section <name> Remove section <name> from the output
    -S --strip-all Remove all symbol and relocation information
    -g --strip-debug Remove all debugging symbols & sections
    --strip-dwo Remove all DWO sections
    --strip-unneeded Remove all symbols not needed by relocations
    -N --strip-symbol <name> Do not copy symbol <name>
    --strip-unneeded-symbol <name>
    Do not copy symbol <name> unless needed by
    relocations
    --only-keep-debug Strip everything but the debug information
    --extract-dwo Copy only DWO sections
    --extract-symbol Remove section contents but keep symbols
    -K --keep-symbol <name> Do not strip symbol <name>
    --keep-file-symbols Do not strip file symbol(s)
    --localize-hidden Turn all ELF hidden symbols into locals
    -L --localize-symbol <name> Force symbol <name> to be marked as a local
    --globalize-symbol <name> Force symbol <name> to be marked as a global
    -G --keep-global-symbol <name> Localize all symbols except <name>
    -W --weaken-symbol <name> Force symbol <name> to be marked as a weak
    --weaken Force all global symbols to be marked as weak
    -w --wildcard Permit wildcard in symbol comparison
    -x --discard-all Remove all non-global symbols
    -X --discard-locals Remove any compiler-generated symbols
    -i --interleave [<number>] Only copy N out of every <number> bytes
    --interleave-width <number> Set N for --interleave
    -b --byte <num> Select byte <num> in every interleaved block
    --gap-fill <val> Fill gaps between sections with <val>
    --pad-to <addr> Pad the last section up to address <addr>
    --set-start <addr> Set the start address to <addr>
    {--change-start|--adjust-start} <incr>
    Add <incr> to the start address
    {--change-addresses|--adjust-vma} <incr>
    Add <incr> to LMA, VMA and start addresses
    {--change-section-address|--adjust-section-vma} <name>{=|+|-}<val>
    Change LMA and VMA of section <name> by <val>
    --change-section-lma <name>{=|+|-}<val>
    Change the LMA of section <name> by <val>
    --change-section-vma <name>{=|+|-}<val>
    Change the VMA of section <name> by <val>
    {--[no-]change-warnings|--[no-]adjust-warnings}
    Warn if a named section does not exist
    --set-section-flags <name>=<flags>
    Set section <name>'s properties to <flags>
    --add-section <name>=<file> Add section <name> found in <file> to output
    --rename-section <old>=<new>[,<flags>] Rename section <old> to <new>
    --long-section-names {enable|disable|keep}
    Handle long section names in Coff objects.
    --change-leading-char Force output format's leading character style
    --remove-leading-char Remove leading character from global symbols
    --reverse-bytes=<num> Reverse <num> bytes at a time, in output sections with content
    --redefine-sym <old>=<new> Redefine symbol name <old> to <new>
    --redefine-syms <file> --redefine-sym for all symbol pairs
    listed in <file>
    --srec-len <number> Restrict the length of generated Srecords
    --srec-forceS3 Restrict the type of generated Srecords to S3
    --strip-symbols <file> -N for all symbols listed in <file>
    --strip-unneeded-symbols <file>
    --strip-unneeded-symbol for all symbols listed
    in <file>
    --keep-symbols <file> -K for all symbols listed in <file>
    --localize-symbols <file> -L for all symbols listed in <file>
    --globalize-symbols <file> --globalize-symbol for all in <file>
    --keep-global-symbols <file> -G for all symbols listed in <file>
    --weaken-symbols <file> -W for all symbols listed in <file>
    --alt-machine-code <index> Use the target's <index>'th alternative machine
    --writable-text Mark the output text as writable
    --readonly-text Make the output text write protected
    --pure Mark the output file as demand paged
    --impure Mark the output file as impure
    --prefix-symbols <prefix> Add <prefix> to start of every symbol name
    --prefix-sections <prefix> Add <prefix> to start of every section name
    --prefix-alloc-sections <prefix>
    Add <prefix> to start of every allocatable
    section name
    --file-alignment <num> Set PE file alignment to <num>
    --heap <reserve>[,<commit>] Set PE reserve/commit heap to <reserve>/
    <commit>
    --image-base <address> Set PE image base to <address>
    --section-alignment <num> Set PE section alignment to <num>
    --stack <reserve>[,<commit>] Set PE reserve/commit stack to <reserve>/
    <commit>
    --subsystem <name>[:<version>]
    Set PE subsystem to <name> [& <version>]
    --compress-debug-sections Compress DWARF debug sections using zlib
    --decompress-debug-sections Decompress DWARF debug sections using zlib
    -v --verbose List all object files modified
    @<file> Read options from <file>
    -V --version Display this program's version number
    -h --help Display this output
    --info List object formats & architectures supported
    C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-objcopy.exe: supported targets: elf32-littlearm elf32-bigarm elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
    gmake: *** [blinky.hex] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****
  • Branko Miletic said:
    I input what you mentioned above as follows and got the following.

    I wasn't clear, but the example command I gave was entered as a Post-build step in the CCS Build options, while leaving the GNU Objcopy Utility as "Disabled" in the CCS build options:

    If the complete command "${CG_TOOL_OBJCOPY}" -S -O binary  "${ProjName}.out" "${ProjName}.bin" is entered in the GNU Objcopy Utility options as the command then objcopy reports the error you saw as it gets too many input/output file arguments.

    [The addition of CCS project properties for the GNU Objcopy Utility is relatively new, and in old examples a post-build step was used to generate a binary file.]

  • Branko Miletic said:
    I put in what you mentioned for the post-build and the following occured. Is it something wrong with the makefile?

    It looks like the GNU Objcopy Utility with the incorrect command is still enabled in the CCS project properties. Now that you have added a post-build command, in the GNU Objcopy Utility properties untick the "Enable GNU Objcopy Utility" check-box.

  • I just did what you mentioned and it looks like it worked as below. Thanks for helping me out on this late night.. well here its eastern. Really appreciate your patients with me. One of the post i may have repeated myself accidentally because i didn't see your reply.. but thankss... this is awesome. From this.. now i can use all the rest of the demos that came with the board and continue on with my journey. This was my first help post.. i think... and is there something i can click ... like a like button or something in return?

    **** Build of configuration Debug__GNU for project blinky ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: C:/ti/TivaWare_C_Series-2.1.3.156/examples/boards/ek-tm4c123gxl/blinky/blinky.c'
    'Invoking: GNU Compiler'
    "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-m4 -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DPART_TM4C123GH6PM -I"C:/ti/TivaWare_C_Series-2.1.3.156" -I"C:/ti/TivaWare_C_Series-2.1.3.156/examples/boards/ek-tm4c123gxl" -I"C:/ti/TivaWare_C_Series-2.1.3.156/driverlib/gcc" -ffunction-sections -fdata-sections -g -gdwarf-3 -gstrict-dwarf -Wall -MD -std=c99 -c -MMD -MP -MF"blinky.d" -MT"blinky.o" -o"blinky.o" "C:/ti/TivaWare_C_Series-2.1.3.156/examples/boards/ek-tm4c123gxl/blinky/blinky.c"
    'Finished building: C:/ti/TivaWare_C_Series-2.1.3.156/examples/boards/ek-tm4c123gxl/blinky/blinky.c'
    ' '
    'Building file: ../tm4c123gh6pm_startup_ccs_gcc.c'
    'Invoking: GNU Compiler'
    "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-m4 -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DPART_TM4C123GH6PM -I"C:/ti/TivaWare_C_Series-2.1.3.156" -I"C:/ti/TivaWare_C_Series-2.1.3.156/examples/boards/ek-tm4c123gxl" -I"C:/ti/TivaWare_C_Series-2.1.3.156/driverlib/gcc" -ffunction-sections -fdata-sections -g -gdwarf-3 -gstrict-dwarf -Wall -MD -std=c99 -c -MMD -MP -MF"tm4c123gh6pm_startup_ccs_gcc.d" -MT"tm4c123gh6pm_startup_ccs_gcc.o" -o"tm4c123gh6pm_startup_ccs_gcc.o" "../tm4c123gh6pm_startup_ccs_gcc.c"
    'Finished building: ../tm4c123gh6pm_startup_ccs_gcc.c'
    ' '
    'Building target: blinky.out'
    'Invoking: GNU Linker'
    "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc.exe" -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DPART_TM4C123GH6PM -ffunction-sections -fdata-sections -g -gdwarf-3 -gstrict-dwarf -Wall -Wl,-Map,"blinky.map" --entry ResetISR -L"C:/ti/TivaWare_C_Series-2.1.3.156" -L"C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/arm-none-eabi/include" -L"C:/ti/TivaWare_C_Series-2.1.3.156/driverlib/gcc" -o"blinky.out" "./blinky.o" "./tm4c123gh6pm_startup_ccs_gcc.o" -Wl,-T"../tm4c123gh6pm.lds" -Wl,--start-group -lgcc -lc -lnosys -ldriver -Wl,--end-group
    'Finished building target: blinky.out'
    ' '
    "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-objcopy.exe" -S -O binary "blinky.out" "blinky.bin"
    ' '

    **** Build Finished ****
  • Poster Chester's effort was extraordinary - clearly "above & beyond." You should click the, "Verified Answer" button - which appears w/Chester's posts. (as I recall - at the bottom of each post - but it IS there)

    Multiple such Verifies - and Likes - would (somewhat) repay his kindness, effort & expertise...