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.

CCStudio 10.3 generates broken makefiles for GCC?

Other Parts Discussed in Thread: CCSTUDIO

Hi,

I'm using GCC to build my MSP432 project. I got the following error messages during the build

    gmake: *** No rule to make target '../common.h ../data.h', needed by 'main.o'.

There are several other similar error messages with different header and object file names. Looks like makefiles generated by CCStudio is broken. In Debug__GNU/main.d, there is a line:

    ../common.h\ ../data.h

If I remove the backslash between header filenames, main.c can be compiled. However, main.d is overwritten with a broken one once main.c is compiled.

Also, if I clean the whole project and the build, everything is fine. However, modifying a few files and then building without cleaning first does not work.

I remember there was no issue with CCStudio 10.2. Is it a regression?

Environment:

* Compiler: GCC 7.2.1 (Linaro)

* Device: MSP432P401R

* IDE: CCStudio 10.3.0.00007

* OS: Arch Linux

  • I'm using GCC to build my MSP432 project. I got the following error messages during the build

        gmake: *** No rule to make target '../common.h ../data.h', needed by 'main.o'.

    The attached project was created, and repeats the problem with 10.3.0.00007 using GCC 7.2.1 (Linaro) under Ubuntu 18.04.5 LTS.

    Where the Debug/main.d created by CCS contains:

    main.o: ../main.c \
     /home/mr_halfword/ti/ccs1030/ccs/ccs_base/arm/include/msp.h \
     /home/mr_halfword/ti/ccs1030/ccs/ccs_base/arm/include/msp432p401r.h \
     /home/mr_halfword/ti/ccs1030/ccs/ccs_base/arm/include/msp_compatibility.h \
     /home/mr_halfword/ti/ccs1030/ccs/ccs_base/arm/include/msp432p401r_classic.h \
     /home/mr_halfword/ti/ccs1030/ccs/ccs_base/arm/include/CMSIS/core_cm4.h \
     /home/mr_halfword/ti/ccs1030/ccs/ccs_base/arm/include/CMSIS/cmsis_compiler.h \
     /home/mr_halfword/ti/ccs1030/ccs/ccs_base/arm/include/CMSIS/cmsis_gcc.h \
     /home/mr_halfword/ti/ccs1030/ccs/ccs_base/arm/include/system_msp432p401r.h \
     ../common.h\ ../data.h
    

    I found if perform a "Rebuild Project" the build is successful even though there is a backslash between the header names in the Makefile dependencies:

    **** Clean-only build of configuration Debug for project MSP432P401R_gnu_hello ****
    
    /home/mr_halfword/ti/ccs1030/ccs/utils/bin/gmake -k -j 12 clean -O 
     
    rm -rf  "MSP432P401R_gnu_hello.hex"  "MSP432P401R_gnu_hello.out" 
    rm -rf "main.o" "startup_msp432p401r_gcc.o" "system_msp432p401r.o" 
    rm -rf "main.d" "startup_msp432p401r_gcc.d" "system_msp432p401r.d" 
    Finished clean
     
    
    **** Build Finished ****
    
    **** Build of configuration Debug for project MSP432P401R_gnu_hello ****
    
    /home/mr_halfword/ti/ccs1030/ccs/utils/bin/gmake -k -j 12 all -O 
     
    Building file: "../startup_msp432p401r_gcc.c"
    Invoking: GNU Compiler
    "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gcc-7.2.1" -c -mcpu=cortex-m4 -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -D__MSP432P401R__ -Dgcc -I"/home/mr_halfword/ti/ccs1030/ccs/ccs_base/arm/include" -I"/home/mr_halfword/ti/ccs1030/ccs/ccs_base/arm/include/CMSIS" -I"/home/mr_halfword/workspace_v10/MSP432P401R_gnu_hello" -I"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include" -Og -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"startup_msp432p401r_gcc.d_raw" -MT"startup_msp432p401r_gcc.o"   -o"startup_msp432p401r_gcc.o" "../startup_msp432p401r_gcc.c"
    Finished building: "../startup_msp432p401r_gcc.c"
     
    Building file: "../main.c"
    Invoking: GNU Compiler
    "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gcc-7.2.1" -c -mcpu=cortex-m4 -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -D__MSP432P401R__ -Dgcc -I"/home/mr_halfword/ti/ccs1030/ccs/ccs_base/arm/include" -I"/home/mr_halfword/ti/ccs1030/ccs/ccs_base/arm/include/CMSIS" -I"/home/mr_halfword/workspace_v10/MSP432P401R_gnu_hello" -I"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include" -Og -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"main.d_raw" -MT"main.o"   -o"main.o" "../main.c"
    Finished building: "../main.c"
     
    Building file: "../system_msp432p401r.c"
    Invoking: GNU Compiler
    "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gcc-7.2.1" -c -mcpu=cortex-m4 -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -D__MSP432P401R__ -Dgcc -I"/home/mr_halfword/ti/ccs1030/ccs/ccs_base/arm/include" -I"/home/mr_halfword/ti/ccs1030/ccs/ccs_base/arm/include/CMSIS" -I"/home/mr_halfword/workspace_v10/MSP432P401R_gnu_hello" -I"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include" -Og -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"system_msp432p401r.d_raw" -MT"system_msp432p401r.o"   -o"system_msp432p401r.o" "../system_msp432p401r.c"
    Finished building: "../system_msp432p401r.c"
     
    Building target: "MSP432P401R_gnu_hello.out"
    Invoking: GNU Linker
    "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gcc-7.2.1" -D__MSP432P401R__ -Dgcc -Og -g -gdwarf-3 -gstrict-dwarf -Wall -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,-Map,"MSP432P401R_gnu_hello.map" -mthumb -g -gstrict-dwarf -Wall -o"MSP432P401R_gnu_hello.out" "./main.o" "./startup_msp432p401r_gcc.o" "./system_msp432p401r.o" -Wl,-T"../msp432p401r.lds"  -Wl,--start-group -lgcc -lnosys -lc -Wl,--end-group 
    Finished building target: "MSP432P401R_gnu_hello.out"
     
    
    **** Build Finished ****
    

    Whereas if cause just main.o to be rebuilt, say by editing main.c, and performing "Build Project" the build fails with:

    **** Build of configuration Debug for project MSP432P401R_gnu_hello ****
    
    /home/mr_halfword/ti/ccs1030/ccs/utils/bin/gmake -k -j 12 all -O 
     
    gmake: *** No rule to make target '../common.h ../data.h', needed by 'main.o'.
    gmake: Target 'all' not remade because of errors.
    
    **** Build Finished ****
    

    I also confirm the problem doesn't occur with CCS 10.2.0

    MSP432P401R_gnu_hello.zip

  • Thanks a lot for confirmation and a minimal example!

  • Hi Gillion,

    Thank you for answering the question,

    Eason