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.

How to change the SHELL in auto-generated makefiles on Windows 10 to sh.exe

My computer refuses to run randomly created batch files per IT security policy. These files are the default action of gmake on Windows. Is it possible to use sh.exe as the SHELL in the makefiles and build Linux-style makefiles? The SHELL line is inserted by TI. It doesn't appear to exist in Eclipse's makefile generator.

Also posted on StackOverflow with a little more information: https://stackoverflow.com/questions/69815672/change-the-shell-used-in-ti-code-composer-studios-auto-generated-makefiles-on-w

  • Hello,

    Which generated batch/makefiles files are you referring to? Are you building from within CCS?

    Thanks

    ki

  • Yes, I imported the "blinky" example from Resource Explorer. It's generating makefiles under ${PROJECT_ROOT}/Debug. Here's the start of Debug/makefile. Everything between the commented header and the makefile.init line is inserted by TI.

    ################################################################################
    # Automatically-generated file. Do not edit!
    ################################################################################
    
    SHELL = cmd.exe
    
    CG_TOOL_ROOT := C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS
    
    GEN_OPTS__FLAG := 
    GEN_CMDS__FLAG := 
    
    ORDERED_OBJS += \
    "./msp430fr60x7_1.obj" \
    "../lnk_msp430fr6047.cmd" \
    $(GEN_CMDS__FLAG) \
    -llibmpu_init.a \
    -llibmath.a \
    -llibc.a \
    
    -include ../makefile.init
  • I checked with engineering and they mentioned that it is not possible to specify the shell to be used. It is hard coded depending on the OS being used.

    There is one workaround. It is not ideal but it is an option.

    That is to completely turn off automatic makefile generation for a project - uncheck the Generate Makefiles automatically checkbox. This way, you have full control over the makefiles (modify as needed), but you would have to manage the makefiles manually every time you make changes to the project. 

    Thanks

    ki

  • Thanks for the information. That confirms what I suspected. I posted a workaround on StackOverflow that allows one to maintain automatic generation of the makefiles.

    stackoverflow.com/.../47078

  • Thank you for sharing your workaround!