Other Parts Discussed in Thread: MSP430WARE
Tool/software: Code Composer Studio
I have migrated working IAR code to CCS with no assembly errors. However I have a linker error I can't solve.
I copied the below from the TI CCS blank ASM example.
.cdecls C,LIST,"msp430.h" ; Include device header file
;-------------------------------------------------------------------------------
.def RESET ; Export program entry-point to
; make it known to linker.
;-------------------------------------------------------------------------------
.text ; Assemble into program memory.
.retain ; Override ELF conditional linking
; and retain current section.
.retainrefs ; And retain any sections that have
; references to current section.
;-------------------------------------------------------------------------------
; Stack Pointer definition
;-------------------------------------------------------------------------------
.global __STACK_END
.sect .stack
RESET mov.w #__STACK_END,SP ; Initialize stackpointer
I then defined all my variables as illustrated below using the same format below. My last variable was around 0600h, which is well within the RAM resources.
garb .equ 0200h ;garb indicates start of ram
Below is the build error. There were no reported assembly errors. With IAR, I never had to view or change any compile or linker settings, as it automatically set them based on the assembly code and MSP part. Is this not true for CCS??? Please advise what needs to be changed to fix it Since I used the TI CCS default blank assembly setup, I would not expect to have to get into the complier or linker code. That is, if the assembly code reported no errors, it should compile, link, and load correctly based on the selected MSP part. Thanks.
**** Build of configuration Debug for project G4_Build ****
"C:\\ti\\ccs1000\\ccs\\utils\\bin\\gmake" -k -j 4 all -O
Building target: "G4_Build.out"
Invoking: MSP430 Linker
"C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-msp430_20.2.0.LTS/bin/cl430" -vmsp --code_model=small --data_model=small --use_hw_mpy=16 --advice:power=all --define=__MSP430F449__ -g --printf_support=minimal --diag_warning=225 --diag_wrap=off --display_error_number -z -m"G4_Build.map" --heap_size=0 --stack_size=0 -i"C:/ti/ccs1000/ccs/ccs_base/msp430/include" -i"C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-msp430_20.2.0.LTS/lib" -i"C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-msp430_20.2.0.LTS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="G4_Build_linkInfo.xml" --entry_point=RESET --use_hw_mpy=16 -o "G4_Build.out" "./main.obj" "../lnk_msp430f449.cmd" -llibc.a
<Linking>
"../lnk_msp430f449.cmd", line 91: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment fails for section ".stack" size 0x2ec2. Available memory ranges:
RAM size: 0x800 unused: 0x800 max hole: 0x800
error #10010: errors encountered during linking; "G4_Build.out" not built
>> Compilation failure
makefile:141: recipe for target 'G4_Build.out' failed
gmake[1]: *** [G4_Build.out] Error 1
makefile:137: recipe for target 'all' failed
gmake: *** [all] Error 2
**** Build Finished ****