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.

CCS: Makefile -WI, -MMD, -MF option

Other Parts Discussed in Thread: AM3517

Tool/software: Code Composer Studio

Hello everyone?

I am trying to use CCS v7 using GNU Compile & Linker for AM3517 processor.

When I build my software on CCS, CCS created a Makefile automatically. But GNU linker does not support -WI option in Makefile.

Can anyone inform me how can I eliminate -WI option?

And then I would like to eliminate -MMD, -MF option.

Thanks in advance.

Best regards.

Sunny Kang

  • Sunny Kang said:
    But GNU linker does not support -WI option in Makefile.

    Could you please elaborate on what you mean by this?

    The -Wl option is used to pass linker options to the compiler driver (gcc). Since the build command in CCS invokes gcc rather than the linker directly, the linker options should be passed using the -Wl option. I'm wondering why you are looking to eliminate the option.

    Sunny Kang said:
    And then I would like to eliminate -MMD, -MF option.

    Where and how are these options set? If they were set via the GUI project settings in CCS, you should be able to remove them also from there.
    But perhaps I do not understand your question correctly, and if so, could you please clarify?

  • Thanks a lot for your reply.

    1. on "GNU linker does not support -WI option."
    - I used "Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-gcc.exe" and "Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-ld.exe"
    - I build on Release.

    - CCS v7 made Release\makefile as follows,
    ################################################################################
    # Automatically-generated file. Do not edit!
    ################################################################################

    SHELL = cmd.exe

    CG_TOOL_ROOT := C:/HMIDeveloper/Sourcery_G++_Lite

    GEN_OPTS__FLAG :=
    GEN_CMDS__FLAG :=

    ORDERED_OBJS += \
    "./am3517/am3517_can.o" \
    "./am3517/cache_v7.o" \
    "./am3517/canbuffer.o" \
    ~~~~ I had omitted ~~~~~~~~~~~~~~~~~
    ~~~~ I had omitted ~~~~~~~~~~~~~~~~~
    "./vfp/vfpmacros.o" \
    "./vfp/vfpmodule.o" \
    -Wl,-T"../ram-map.ld" \
    $(GEN_CMDS__FLAG) \
    -Wl,--start-group \
    -Wl,-T"I:/Sunny/SinevaSrc/control/branches/offset_501_test_TC/ram-map.ld" \
    -l:"C:/HMIDeveloper/Sourcery_G++_Lite/lib/gcc/arm-none-linux-gnueabi/4.4.1/libgcc.a" \
    -Wl,--end-group \
    ~~~~ I had omitted ~~~~~~~~~~~~~~~~~
    ~~~~ I had omitted ~~~~~~~~~~~~~~~~~

    - GNU linker detect an error as follows,
    'Building target: ucos.out'
    'Invoking: GNU Linker'
    "C:/HMIDeveloper/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-ld.exe" -nostdlib -static -o"ucos.out" "./am3517/am3517_can.o"
    ~~~~ I had omitted ~~~~~~~~~~~~~~~~~
    ~~~~ I had omitted ~~~~~~~~~~~~~~~~~
    "./vfp/vfpmodule.o" -Wl,-T"../ram-map.ld" -Wl,--start-group -Wl,-T"I:/Sunny/SinevaSrc/control/branches/offset_501_test_TC/ram-map.ld" -l:"C:/HMIDeveloper/Sourcery_G++_Lite/lib/gcc/arm-none-linux-gnueabi/4.4.1/libgcc.a" -Wl,--end-group
    makefile:429: recipe for target 'ucos.out' failed
    C:/HMIDeveloper/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-ld.exe: unrecognized option '-Wl,-T../ram-map.ld'
    C:/HMIDeveloper/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-ld.exe: use the --help option for usage information
    gmake: *** [ucos.out] Error 1


    2. on "And then I would like to eliminate -MMD, -MF, -MT option."

    'Invoking: GNU Compiler'
    "C:/HMIDeveloper/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-gcc.exe" -std=c99 -pipe -nostdinc -fno-builtin -Wno-format -c -fno-stack-protector -fno-omit-frame-pointer -funwind-tables -fno-strict-aliasing -ffast-math
    ~~~~ I had omitted ~~~~~~~~~~~~~~~~~
    ~~~~ I had omitted ~~~~~~~~~~~~~~~~~
    -O0 -Wall -MMD -MP -MF"usr/servotask.d" -MT"usr/servotask.o" -o"usr/servotask.o" "../usr/servotask.c"
    ../usr/servotask.c: In function 'ServoProcessorTask':
    ../usr/servotask.c:236: warning: implicit declaration of function 'getAlarmOvertime'
    'Finished building: ../usr/servotask.c'

    - I cannot find -MMD, -MF, -MT option in "arm-none-linux-gnueabi-gcc.exe --help"
    - So, I would like to eliminate -MMD, -MF, -MT options.

    Please help me how I cannot select above 4 options as soon as possile.

    Thank you in advance.

    Best regards.
    Sunny Kang.
  • Sunny Kang said:
    I used "Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-gcc.exe" and "Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-ld.exe"

    OK, so you are using the Code Sourcery tools and not the Linaro GNU compiler tools included with CCS?

    Is this an Eclipse C/C++ project or CCS project?

    Sunny Kang said:
    'Invoking: GNU Linker'
    "C:/HMIDeveloper/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-ld.exe" -nostdlib -static -o"ucos.out" "./am3517/am3517_can.o"
    ~~~~ I had omitted ~~~~~~~~~~~~~~~~~
    ~~~~ I had omitted ~~~~~~~~~~~~~~~~~
    "./vfp/vfpmodule.o" -Wl,-T"../ram-map.ld" -Wl,--start-group -Wl,-T"I:/Sunny/SinevaSrc/control/branches/offset_501_test_TC/ram-map.ld" -l:"C:/HMIDeveloper/Sourcery_G++_Lite/lib/gcc/arm-none-linux-gnueabi/4.4.1/libgcc.a" -Wl,--end-group


    If the tool invocation is changed from arm-none-linux-gnueabi-ld.exe to arm-none-linux-gnueabi-gcc.exe then the -Wl option will be valid and there should be no error. You should be able to change the executable that gets called (ld to gcc) from the Project Properties, Linker settings. 

    Sunny Kang said:
    - I cannot find -MMD, -MF, -MT option in "arm-none-linux-gnueabi-gcc.exe --help"
    - So, I would like to eliminate -MMD, -MF, -MT options.

    How did these options get added to begin with? I imagine you should be able to remove them from Project Properties, Compiler settings but I cannot tell for certain without looking at how the options are set in the GUI.