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.

Compiler/MSP430FR2311: Unable to build MSP430 CCS project in small memory model

Guru 56685 points
Part Number: MSP430FR2311


Tool/software: TI C/C++ Compiler

For some reason I am unable to build projects in small memory model. I'm tying to build a project as small as possible and my team has noticed that on very small devices that using large memory model (default) will had a few bytes to be used. I've attempted to compile one of the code examples as small memory model, but CCS fails make the automatic library. I've attached the build log. I tried this earlier today and realized I was not on the newest CCS so I installed all available updates. I am now on CCSv7.2 and MSP430 Compiler v17.6.0.  The rest of my team seems to be able to build in small memory model.  Any thoughts?

**** Build of configuration Debug for project msp430fr231x_RTC_01.c ****

"C:\\TI\\ccsv7\\utils\\bin\\gmake" -k -j 4 all -O 
'Building file: ../msp430fr231x_RTC_01.c'
'Invoking: MSP430 Compiler'
"C:/TI/ccsv7/tools/compiler/ti-cgt-msp430_17.6.0.STS/bin/cl430" -vmspx --code_model=small --use_hw_mpy=none --include_path="C:/TI/ccsv7/ccs_base/msp430/include" --include_path="C:/Users/a0273957/CCS_Workspaces/25for25/msp430fr231x_RTC_01.c" --include_path="C:/TI/ccsv7/tools/compiler/ti-cgt-msp430_17.6.0.STS/include" --advice:power="all" --advice:hw_config="all" --define=__MSP430FR2311__ -g --printf_support=minimal --diag_warning=225 --diag_wrap=off --display_error_number --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU40 --preproc_with_compile --preproc_dependency="msp430fr231x_RTC_01.d"  "../msp430fr231x_RTC_01.c"
'Finished building: ../msp430fr231x_RTC_01.c'
' '
'Building target: msp430fr231x_RTC_01.c.out'
'Invoking: MSP430 Linker'
"C:/TI/ccsv7/tools/compiler/ti-cgt-msp430_17.6.0.STS/bin/cl430" -vmspx --code_model=small --use_hw_mpy=none --advice:power="all" --advice:hw_config="all" --define=__MSP430FR2311__ -g --printf_support=minimal --diag_warning=225 --diag_wrap=off --display_error_number --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU40 -z -m"msp430fr231x_RTC_01.c.map" --heap_size=160 --stack_size=160 --cinit_hold_wdt=on -i"C:/TI/ccsv7/ccs_base/msp430/include" -i"C:/TI/ccsv7/tools/compiler/ti-cgt-msp430_17.6.0.STS/lib" -i"C:/TI/ccsv7/tools/compiler/ti-cgt-msp430_17.6.0.STS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="msp430fr231x_RTC_01.c_linkInfo.xml" --use_hw_mpy=none --rom_model --zero_init=off -o "msp430fr231x_RTC_01.c.out" "./msp430fr231x_RTC_01.obj" "../lnk_msp430fr2311.cmd"  -llibc.a 
<Linking>
warning #10366-D: automatic library build: using library "C:\TI\ccsv7\tools\compiler\ti-cgt-msp430_17.6.0.STS\lib\rts430x_sc_sd_eabi.lib" for the first time, so it must be built.  This may take a few minutes.
process_begin: CreateProcess(NULL, echo Creating library c:/users/a0273957/appdata/local/temp/ti7a79~1/rts430x_sc_sd_eabi.lib, ...) failed.
make (e=2): The system cannot find the file specified.
Makefile:1150: recipe for target 'library' failed

remark #10372-D: (ULP 4.1) Detected uninitialized Port 2 in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.
remark #10372-D: (ULP 4.1) Detected uninitialized Port A in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.

>> Compilation failure
makefile:141: recipe for target 'msp430fr231x_RTC_01.c.out' failed
gmake.exe[2]: *** [library] Error 2
>> ERROR: mklib: gmake error during rts430x_sc_sd_eabi.lib build
warning #10207-D: automatic RTS selection:  resolving index library "libc.a" to "rts430x_sc_sd_eabi.lib", but "rts430x_sc_sd_eabi.lib" was not found
"../lnk_msp430fr2311.cmd", line 221: warning #10374-D: Interrupt vector "ECOMP0" does not have an interrupt handler routine.
"../lnk_msp430fr2311.cmd", line 222: warning #10374-D: Interrupt vector "PORT2" does not have an interrupt handler routine.
"../lnk_msp430fr2311.cmd", line 223: warning #10374-D: Interrupt vector "PORT1" does not have an interrupt handler routine.
"../lnk_msp430fr2311.cmd", line 224: warning #10374-D: Interrupt vector "ADC" does not have an interrupt handler routine.
"../lnk_msp430fr2311.cmd", line 225: warning #10374-D: Interrupt vector "EUSCI_B0" does not have an interrupt handler routine.
"../lnk_msp430fr2311.cmd", line 226: warning #10374-D: Interrupt vector "EUSCI_A0" does not have an interrupt handler routine.
"../lnk_msp430fr2311.cmd", line 227: warning #10374-D: Interrupt vector "WDT" does not have an interrupt handler routine.
"../lnk_msp430fr2311.cmd", line 229: warning #10374-D: Interrupt vector "TIMER1_B1" does not have an interrupt handler routine.
"../lnk_msp430fr2311.cmd", line 230: warning #10374-D: Interrupt vector "TIMER1_B0" does not have an interrupt handler routine.
"../lnk_msp430fr2311.cmd", line 231: warning #10374-D: Interrupt vector "TIMER0_B1" does not have an interrupt handler routine.
"../lnk_msp430fr2311.cmd", line 232: warning #10374-D: Interrupt vector "TIMER0_B0" does not have an interrupt handler routine.
"../lnk_msp430fr2311.cmd", line 233: warning #10374-D: Interrupt vector "UNMI" does not have an interrupt handler routine.
"../lnk_msp430fr2311.cmd", line 234: warning #10374-D: Interrupt vector "SYSNMI" does not have an interrupt handler routine.
warning #10062-D: entry-point symbol "_c_int00" undefined

 undefined  first referenced
  symbol        in file     
 ---------  ----------------
 __TI_int45                 
 __TI_int46                 
 __TI_int47                 
 __TI_int48                 
 __TI_int49                 
 __TI_int50                 
 __TI_int51                 
 __TI_int53                 
 __TI_int54                 
 __TI_int55                 
 __TI_int56                 
 __TI_int57                 
 __TI_int58                 

error #10234-D: unresolved symbols remain
warning #10202-D: no suitable entry-point found; setting to 0
error #10010: errors encountered during linking; "msp430fr231x_RTC_01.c.out" not built
gmake[1]: *** [msp430fr231x_RTC_01.c.out] Error 1
gmake: *** [all] Error 2
makefile:137: recipe for target 'all' failed

**** Build Finished ****

  • I am confident you are experiencing the same issue discussed in this forum thread.  It contains a workaround.

    Thanks and regards,

    -George

  • George,

    I do not believe this is the case for my issue. I can build the project just fine when selected memory model to be large. The only difference between the makefiles of a failing case and a passing case is the --code_model=small or --code_model=large option within the Tool invocations section. I've attached the makefiles for reference.

    ################################################################################
    # Automatically-generated file. Do not edit!
    ################################################################################
    
    SHELL = cmd.exe
    
    CG_TOOL_ROOT := C:/TI/ccsv7/tools/compiler/ti-cgt-msp430_17.6.0.STS
    
    GEN_OPTS__FLAG := 
    GEN_CMDS__FLAG := 
    
    ORDERED_OBJS += \
    "./msp430fr231x_RTC_01.obj" \
    "../lnk_msp430fr2311.cmd" \
    $(GEN_CMDS__FLAG) \
    -llibc.a \
    
    -include ../makefile.init
    
    RM := DEL /F
    RMDIR := RMDIR /S/Q
    
    # All of the sources participating in the build are defined here
    -include sources.mk
    -include subdir_vars.mk
    -include subdir_rules.mk
    -include objects.mk
    
    ifneq ($(MAKECMDGOALS),clean)
    ifneq ($(strip $(C55_DEPS)),)
    -include $(C55_DEPS)
    endif
    ifneq ($(strip $(C_UPPER_DEPS)),)
    -include $(C_UPPER_DEPS)
    endif
    ifneq ($(strip $(S67_DEPS)),)
    -include $(S67_DEPS)
    endif
    ifneq ($(strip $(S62_DEPS)),)
    -include $(S62_DEPS)
    endif
    ifneq ($(strip $(S_DEPS)),)
    -include $(S_DEPS)
    endif
    ifneq ($(strip $(OPT_DEPS)),)
    -include $(OPT_DEPS)
    endif
    ifneq ($(strip $(C??_DEPS)),)
    -include $(C??_DEPS)
    endif
    ifneq ($(strip $(ASM_UPPER_DEPS)),)
    -include $(ASM_UPPER_DEPS)
    endif
    ifneq ($(strip $(S??_DEPS)),)
    -include $(S??_DEPS)
    endif
    ifneq ($(strip $(C64_DEPS)),)
    -include $(C64_DEPS)
    endif
    ifneq ($(strip $(CXX_DEPS)),)
    -include $(CXX_DEPS)
    endif
    ifneq ($(strip $(S64_DEPS)),)
    -include $(S64_DEPS)
    endif
    ifneq ($(strip $(INO_DEPS)),)
    -include $(INO_DEPS)
    endif
    ifneq ($(strip $(CLA_DEPS)),)
    -include $(CLA_DEPS)
    endif
    ifneq ($(strip $(S55_DEPS)),)
    -include $(S55_DEPS)
    endif
    ifneq ($(strip $(SV7A_DEPS)),)
    -include $(SV7A_DEPS)
    endif
    ifneq ($(strip $(C62_DEPS)),)
    -include $(C62_DEPS)
    endif
    ifneq ($(strip $(C67_DEPS)),)
    -include $(C67_DEPS)
    endif
    ifneq ($(strip $(PDE_DEPS)),)
    -include $(PDE_DEPS)
    endif
    ifneq ($(strip $(K_DEPS)),)
    -include $(K_DEPS)
    endif
    ifneq ($(strip $(C_DEPS)),)
    -include $(C_DEPS)
    endif
    ifneq ($(strip $(CC_DEPS)),)
    -include $(CC_DEPS)
    endif
    ifneq ($(strip $(C++_DEPS)),)
    -include $(C++_DEPS)
    endif
    ifneq ($(strip $(C43_DEPS)),)
    -include $(C43_DEPS)
    endif
    ifneq ($(strip $(S43_DEPS)),)
    -include $(S43_DEPS)
    endif
    ifneq ($(strip $(ASM_DEPS)),)
    -include $(ASM_DEPS)
    endif
    ifneq ($(strip $(S_UPPER_DEPS)),)
    -include $(S_UPPER_DEPS)
    endif
    ifneq ($(strip $(CPP_DEPS)),)
    -include $(CPP_DEPS)
    endif
    ifneq ($(strip $(SA_DEPS)),)
    -include $(SA_DEPS)
    endif
    endif
    
    -include ../makefile.defs
    
    # Add inputs and outputs from these tool invocations to the build variables 
    EXE_OUTPUTS += \
    msp430fr231x_RTC_01.c.out \
    
    EXE_OUTPUTS__QUOTED += \
    "msp430fr231x_RTC_01.c.out" \
    
    BIN_OUTPUTS += \
    msp430fr231x_RTC_01.c.hex \
    
    BIN_OUTPUTS__QUOTED += \
    "msp430fr231x_RTC_01.c.hex" \
    
    
    # All Target
    all: $(OBJS) $(CMD_SRCS) $(GEN_CMDS)
    	@$(MAKE) --no-print-directory -Onone "msp430fr231x_RTC_01.c.out"
    
    # Tool invocations
    msp430fr231x_RTC_01.c.out: $(OBJS) $(CMD_SRCS) $(GEN_CMDS)
    	@echo 'Building target: $@'
    	@echo 'Invoking: MSP430 Linker'
    	"C:/TI/ccsv7/tools/compiler/ti-cgt-msp430_17.6.0.STS/bin/cl430" -vmspx --code_model=large --use_hw_mpy=none --advice:power="all" --advice:hw_config="all" --define=__MSP430FR2311__ -g --printf_support=minimal --diag_warning=225 --diag_wrap=off --display_error_number --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU40 -z -m"msp430fr231x_RTC_01.c.map" --heap_size=160 --stack_size=160 --cinit_hold_wdt=on -i"C:/TI/ccsv7/ccs_base/msp430/include" -i"C:/TI/ccsv7/tools/compiler/ti-cgt-msp430_17.6.0.STS/lib" -i"C:/TI/ccsv7/tools/compiler/ti-cgt-msp430_17.6.0.STS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="msp430fr231x_RTC_01.c_linkInfo.xml" --use_hw_mpy=none --rom_model --zero_init=off -o "msp430fr231x_RTC_01.c.out" $(ORDERED_OBJS)
    	@echo 'Finished building target: $@'
    	@echo ' '
    
    msp430fr231x_RTC_01.c.hex: $(EXE_OUTPUTS)
    	@echo 'Invoking: MSP430 Hex Utility'
    	"C:/TI/ccsv7/tools/compiler/ti-cgt-msp430_17.6.0.STS/bin/hex430" --memwidth=8 --romwidth=8 -o "msp430fr231x_RTC_01.c.hex" $(EXE_OUTPUTS__QUOTED)
    	@echo 'Finished building: $@'
    	@echo ' '
    
    # Other Targets
    clean:
    	-$(RM) $(BIN_OUTPUTS__QUOTED)$(EXE_OUTPUTS__QUOTED)
    	-$(RM) "msp430fr231x_RTC_01.obj" 
    	-$(RM) "msp430fr231x_RTC_01.d" 
    	-@echo 'Finished clean'
    	-@echo ' '
    
    .PHONY: all clean dependents
    .SECONDARY:
    
    -include ../makefile.targets
    
    
    ################################################################################
    # Automatically-generated file. Do not edit!
    ################################################################################
    
    SHELL = cmd.exe
    
    CG_TOOL_ROOT := C:/TI/ccsv7/tools/compiler/ti-cgt-msp430_17.6.0.STS
    
    GEN_OPTS__FLAG := 
    GEN_CMDS__FLAG := 
    
    ORDERED_OBJS += \
    "./msp430fr231x_RTC_01.obj" \
    "../lnk_msp430fr2311.cmd" \
    $(GEN_CMDS__FLAG) \
    -llibc.a \
    
    -include ../makefile.init
    
    RM := DEL /F
    RMDIR := RMDIR /S/Q
    
    # All of the sources participating in the build are defined here
    -include sources.mk
    -include subdir_vars.mk
    -include subdir_rules.mk
    -include objects.mk
    
    ifneq ($(MAKECMDGOALS),clean)
    ifneq ($(strip $(C55_DEPS)),)
    -include $(C55_DEPS)
    endif
    ifneq ($(strip $(C_UPPER_DEPS)),)
    -include $(C_UPPER_DEPS)
    endif
    ifneq ($(strip $(S67_DEPS)),)
    -include $(S67_DEPS)
    endif
    ifneq ($(strip $(S62_DEPS)),)
    -include $(S62_DEPS)
    endif
    ifneq ($(strip $(S_DEPS)),)
    -include $(S_DEPS)
    endif
    ifneq ($(strip $(OPT_DEPS)),)
    -include $(OPT_DEPS)
    endif
    ifneq ($(strip $(C??_DEPS)),)
    -include $(C??_DEPS)
    endif
    ifneq ($(strip $(ASM_UPPER_DEPS)),)
    -include $(ASM_UPPER_DEPS)
    endif
    ifneq ($(strip $(S??_DEPS)),)
    -include $(S??_DEPS)
    endif
    ifneq ($(strip $(C64_DEPS)),)
    -include $(C64_DEPS)
    endif
    ifneq ($(strip $(CXX_DEPS)),)
    -include $(CXX_DEPS)
    endif
    ifneq ($(strip $(S64_DEPS)),)
    -include $(S64_DEPS)
    endif
    ifneq ($(strip $(INO_DEPS)),)
    -include $(INO_DEPS)
    endif
    ifneq ($(strip $(CLA_DEPS)),)
    -include $(CLA_DEPS)
    endif
    ifneq ($(strip $(S55_DEPS)),)
    -include $(S55_DEPS)
    endif
    ifneq ($(strip $(SV7A_DEPS)),)
    -include $(SV7A_DEPS)
    endif
    ifneq ($(strip $(C62_DEPS)),)
    -include $(C62_DEPS)
    endif
    ifneq ($(strip $(C67_DEPS)),)
    -include $(C67_DEPS)
    endif
    ifneq ($(strip $(PDE_DEPS)),)
    -include $(PDE_DEPS)
    endif
    ifneq ($(strip $(K_DEPS)),)
    -include $(K_DEPS)
    endif
    ifneq ($(strip $(C_DEPS)),)
    -include $(C_DEPS)
    endif
    ifneq ($(strip $(CC_DEPS)),)
    -include $(CC_DEPS)
    endif
    ifneq ($(strip $(C++_DEPS)),)
    -include $(C++_DEPS)
    endif
    ifneq ($(strip $(C43_DEPS)),)
    -include $(C43_DEPS)
    endif
    ifneq ($(strip $(S43_DEPS)),)
    -include $(S43_DEPS)
    endif
    ifneq ($(strip $(ASM_DEPS)),)
    -include $(ASM_DEPS)
    endif
    ifneq ($(strip $(S_UPPER_DEPS)),)
    -include $(S_UPPER_DEPS)
    endif
    ifneq ($(strip $(CPP_DEPS)),)
    -include $(CPP_DEPS)
    endif
    ifneq ($(strip $(SA_DEPS)),)
    -include $(SA_DEPS)
    endif
    endif
    
    -include ../makefile.defs
    
    # Add inputs and outputs from these tool invocations to the build variables 
    EXE_OUTPUTS += \
    msp430fr231x_RTC_01.c.out \
    
    EXE_OUTPUTS__QUOTED += \
    "msp430fr231x_RTC_01.c.out" \
    
    BIN_OUTPUTS += \
    msp430fr231x_RTC_01.c.hex \
    
    BIN_OUTPUTS__QUOTED += \
    "msp430fr231x_RTC_01.c.hex" \
    
    
    # All Target
    all: $(OBJS) $(CMD_SRCS) $(GEN_CMDS)
    	@$(MAKE) --no-print-directory -Onone "msp430fr231x_RTC_01.c.out"
    
    # Tool invocations
    msp430fr231x_RTC_01.c.out: $(OBJS) $(CMD_SRCS) $(GEN_CMDS)
    	@echo 'Building target: $@'
    	@echo 'Invoking: MSP430 Linker'
    	"C:/TI/ccsv7/tools/compiler/ti-cgt-msp430_17.6.0.STS/bin/cl430" -vmspx --code_model=small --use_hw_mpy=none --advice:power="all" --advice:hw_config="all" --define=__MSP430FR2311__ -g --printf_support=minimal --diag_warning=225 --diag_wrap=off --display_error_number --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU40 -z -m"msp430fr231x_RTC_01.c.map" --heap_size=160 --stack_size=160 --cinit_hold_wdt=on -i"C:/TI/ccsv7/ccs_base/msp430/include" -i"C:/TI/ccsv7/tools/compiler/ti-cgt-msp430_17.6.0.STS/lib" -i"C:/TI/ccsv7/tools/compiler/ti-cgt-msp430_17.6.0.STS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="msp430fr231x_RTC_01.c_linkInfo.xml" --use_hw_mpy=none --rom_model --zero_init=off -o "msp430fr231x_RTC_01.c.out" $(ORDERED_OBJS)
    	@echo 'Finished building target: $@'
    	@echo ' '
    
    msp430fr231x_RTC_01.c.hex: $(EXE_OUTPUTS)
    	@echo 'Invoking: MSP430 Hex Utility'
    	"C:/TI/ccsv7/tools/compiler/ti-cgt-msp430_17.6.0.STS/bin/hex430" --memwidth=8 --romwidth=8 -o "msp430fr231x_RTC_01.c.hex" $(EXE_OUTPUTS__QUOTED)
    	@echo 'Finished building: $@'
    	@echo ' '
    
    # Other Targets
    clean:
    	-$(RM) $(BIN_OUTPUTS__QUOTED)$(EXE_OUTPUTS__QUOTED)
    	-$(RM) "msp430fr231x_RTC_01.obj" 
    	-$(RM) "msp430fr231x_RTC_01.d" 
    	-@echo 'Finished clean'
    	-@echo ' '
    
    .PHONY: all clean dependents
    .SECONDARY:
    
    -include ../makefile.targets
    
    

  • Is it the case that the large model build does not require a new RTS library to be built from scratch, and instead uses an RTS library that is supplied with the compiler?  If so, that is consistent with my earlier explanation.

    Thanks and regards,

    -George

  • George,

    I see what you are saying now. It seems I was looking at the wrong makefile. I was looking at the project makefile and not the library makefile. this has solved my issue. I guess we need to add the MSP430 codegen tools to have this fix as well.