Hi All - I'm attempting to use the latest CCX v6 and GCC for an existing MSP430 project.
There are lots of problems; I'd be grateful for pointers on any of them:
1) I have found NO documentation on this GCC (MSP430-specific options in particular).
SourceForge stuff has not been updated in years.
2) gcc --target-help ==> gcc: error: CreateProcess: No such file or directory
3) Trying to build results in lots of problems, sample console output below:
A) multiple definition of multiply code in libraries
B) no -mmpy option was specified (there is are no drop-down choices and no documentation I can find);
does the -mmcu setting automatically configure hardware multiply in this case?
C) linker file supplied for MSP430F5437A uses only 41kb of ROM (memory map puts main flash as far ROM !!),
so non-trivial project overflows ROM
D) relocation fixup overflows - why???
E) No options are documented for memory model control; default sure isn't working!
Anybody using GCC successfully? It works great for blinking the LED, but for real work?
Thanks in advance for any and all help,
Best Regards, Dave
Example code compilation:
'Building file: ../FreeRTOS_8_0_1/Source/portable/GCC/MSP430X/port.c'
'Invoking: GNU Compiler'
"C:/TI_CCS/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/msp430-elf-gcc.exe" -c -mmcu=msp430f5437a -I"C:/TI_CCS/ccsv6/tools/compiler/gcc_msp430_4.8.371/msp430-elf/include" -I"D:/Cap/sw/Gapman3/FreeRTOS_8_0_1/Source/portable/GCC/MSP430X" -I"D:/Cap/sw/Gapman3/FreeRTOS_8_0_1/Source/include" -I"D:/Cap/sw/Gapman3/include" -I"C:/TI_CCS/ccsv6/ccs_base/msp430/include_gcc" -Os -g -gstrict-dwarf -Wall -MMD -MP -MF"FreeRTOS_8_0_1/Source/portable/GCC/MSP430X/port.d" -MT"FreeRTOS_8_0_1/Source/portable/GCC/MSP430X/port.d" -o"FreeRTOS_8_0_1/Source/portable/GCC/MSP430X/port.o" "../FreeRTOS_8_0_1/Source/portable/GCC/MSP430X/port.c"
../FreeRTOS_8_0_1/Source/portable/GCC/MSP430X/port.c: In function 'pxPortInitialiseStack':
'Finished building: ../FreeRTOS_8_0_1/Source/portable/GCC/MSP430X/port.c'
' '
../FreeRTOS_8_0_1/Source/portable/GCC/MSP430X/port.c:143:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
*pulTopOfStack = ( uint32_t ) pxCode;
^
'Building target: Gapman3.out'
'Invoking: GNU Linker'
"C:/TI_CCS/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/msp430-elf-gcc.exe" -mmcu=msp430f5437a -Os -g -gstrict-dwarf -Wall -Wl,-Map,"Gapman3.map" -Wl,--gc-sections -o"Gapman3.out" "./adc.o" "./attr.o" "./automode.o" "./buzzer.o" "./cmd.o" "./crc32.o" "./dac.o" "./disp.o" "./env.o" "./font1.o" "./font2.o" "./font3.o" "./fram.o" "./i2c.o" "./main.o" "./meas.o" "./modem.o" "./oled.o" "./opts.o" "./pb.o" "./power.o" "./rbuf.o" "./serial.o" "./spi.o" "./util.o" "./FreeRTOS_8_0_1/Source/croutine.o" "./FreeRTOS_8_0_1/Source/event_groups.o" "./FreeRTOS_8_0_1/Source/list.o" "./FreeRTOS_8_0_1/Source/queue.o" "./FreeRTOS_8_0_1/Source/tasks.o" "./FreeRTOS_8_0_1/Source/timers.o" "./FreeRTOS_8_0_1/Source/portable/MemMang/heap_1.o" "./FreeRTOS_8_0_1/Source/portable/GCC/MSP430X/port.o" -T"../msp430f5437a.ld" -Wl,--start-group -l"c" -l"gcc" -Wl,--end-group
c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0\libgcc.a(lib2hw_mul.o): In function `__mulhi2':
/opt/redhat/msp430-130423-371/sources/tools/libgcc/config/msp430/lib2hw_mul.S:105: multiple definition of `__mulhi2'
c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0\libgcc.a(lib2mul.o):/opt/redhat/msp430-130423-371/sources/tools/libgcc/config/msp430/msp430-mul.h:30: first defined here
c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0/../../../../msp430-elf/bin/ld.exe: Warning: size of symbol `__mulhi2' changed from 40 in c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0\libgcc.a(lib2mul.o) to 20 in c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0\libgcc.a(lib2hw_mul.o)
c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0\libgcc.a(lib2hw_mul.o): In function `__mulsi2':
/opt/redhat/msp430-130423-371/sources/tools/libgcc/config/msp430/lib2hw_mul.S:110: multiple definition of `__mulsi2'
c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0\libgcc.a(lib2mul.o):/opt/redhat/msp430-130423-371/sources/tools/libgcc/config/msp430/msp430-mul.h:39: first defined here
c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0/../../../../msp430-elf/bin/ld.exe: Warning: size of symbol `__mulsi2' changed from 62 in c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0\libgcc.a(lib2mul.o) to 46 in c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0\libgcc.a(lib2hw_mul.o)
c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0/../../../../msp430-elf/bin/ld.exe: Gapman3.out section `.text' will not fit in region `ROM'
c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0/../../../../msp430-elf/bin/ld.exe: section __interrupt_vector_55 loaded at [0000ffec,0000ffed] overlaps section .text loaded at [000070c4,00015a2d]
c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0/../../../../msp430-elf/bin/ld.exe: region `ROM' overflowed by 24358 bytes
./FreeRTOS_8_0_1/Source/portable/GCC/MSP430X/port.o: In function `pxPortInitialiseStack':
D:\Cap\sw\Gapman3\Debug__GNU/../FreeRTOS_8_0_1/Source/portable/GCC/MSP430X/port.c:113: undefined reference to `vApplicationSetupTimerInterrupt'
D:\Cap\sw\Gapman3\Debug__GNU/../FreeRTOS_8_0_1/Source/portable/GCC/MSP430X/port.c:113: undefined reference to `vApplicationSetupTimerInterrupt'
./adc.o: In function `adcInit':
D:\Cap\sw\Gapman3\Debug__GNU/../adc.c:47:(.text+0x68): relocation truncated to fit: R_MSP430X_ABS16 against symbol `__mspabi_srli_2' defined in .text section in c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0\libgcc.a(srli.o)
./automode.o: In function `doAutoModeStart':
D:\Cap\sw\Gapman3\Debug__GNU/../automode.c:52:(.text+0x8a): relocation truncated to fit: R_MSP430X_ABS16 against symbol `__gtdf2' defined in .text.__gtdf2 section in c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0\libgcc.a(_gt_df.o)
./cmd.o: In function `cmdDisconnect':
D:\Cap\sw\Gapman3\Debug__GNU/../cmd.c:197:(.text+0x294): relocation truncated to fit: R_MSP430X_ABS16 against symbol `__mspabi_cvtdf' defined in .text.__truncdfsf2 section in c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0\libgcc.a(_df_to_sf.o)
D:\Cap\sw\Gapman3\Debug__GNU/../cmd.c:197:(.text+0x62a): relocation truncated to fit: R_MSP430X_ABS16 against symbol `__mspabi_cvtdf' defined in .text.__truncdfsf2 section in c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0\libgcc.a(_df_to_sf.o)
D:\Cap\sw\Gapman3\Debug__GNU/../cmd.c:197:(.text+0xd28): relocation truncated to fit: R_MSP430X_ABS16 against symbol `__mspabi_cvtfd' defined in .text.__extendsfdf2 section in c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0\libgcc.a(_sf_to_df.o)
./disp.o: In function `dispUpdateStatusLine':
D:\Cap\sw\Gapman3\Debug__GNU/../disp.c:393:(.text+0x36e): relocation truncated to fit: R_MSP430X_ABS16 against symbol `__nedf2' defined in .text.__nedf2 section in c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0\libgcc.a(_ne_df.o)
D:\Cap\sw\Gapman3\Debug__GNU/../disp.c:393:(.text+0x3a2): relocation truncated to fit: R_MSP430X_ABS16 against symbol `__eqdf2' defined in .text.__eqdf2 section in c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0\libgcc.a(_eq_df.o)
D:\Cap\sw\Gapman3\Debug__GNU/../disp.c:393:(.text+0x3d2): relocation truncated to fit: R_MSP430X_ABS16 against symbol `__ltdf2' defined in .text.__ltdf2 section in c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0\libgcc.a(_lt_df.o)
./fram.o: In function `framSetDevice':
D:\Cap\sw\Gapman3\Debug__GNU/../fram.c:58:(.text+0x66): relocation truncated to fit: R_MSP430X_ABS16 against symbol `__mspabi_srll_8' defined in .text section in c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0\libgcc.a(srli.o)
./meas.o: In function `msAppendChecksum':
D:\Cap\sw\Gapman3\Debug__GNU/../meas.c:936:(.text+0x90): relocation truncated to fit: R_MSP430X_ABS16 against symbol `__mspabi_slll_4' defined in .text section in c:/ti_ccs/ccsv6/tools/compiler/gcc_msp430_4.8.371/bin/../lib/gcc/msp430-elf/4.8.0\libgcc.a(slli.o)
D:\Cap\sw\Gapman3\Debug__GNU/../meas.c:936:(.text+0x1e8): additional relocation overflows omitted from the output
collect2.exe: error: ld returned 1 exit status
gmake: *** [Gapman3.out] Error 1
gmake: Target `all' not remade because of errors.