SvdSinner 3 Posted April 11, 2015 Share Posted April 11, 2015 I'm port some code over to GCC (GNU_4.6.3:MSPGCC compiler inside CCS6.1) to take advantage of existing driver code for some of my devices. After clearing all basic errors, my build fails with this error: .../energia-0101e0014/hardware/tools/msp430/bin/../lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld.exe: error: no memory region specified for loadable section `.noinit.crt0' gmake: *** [main.o] Error 1 gmake: Target `all' not remade because of errors. How do I fix that? NOTE/CLUE: I tried making a new, blank GNU_4.6.3:MSPGCC project in CCS, and it gets identical compile errors. However, a new "Energia Sketch" does not have this problem. What is the difference between an "Energia Sketch" and a regular project? If the end-functionality is identical, I can just switch project types, but I don't know if a sketch project has any "gotcha"s that I will regret later. In case anything else is useful, here is the full console output of a failed compile: **** Build of configuration Debug for project MyDevicesGCC **** "C:\\TI\\ccsv6\\utils\\bin\\gmake" -k all 'Building file: ../main.cpp' 'Invoking: GNU Compiler' "C:/.../energia-0101E0014/hardware/tools/msp430/bin/msp430-gcc.exe" -c -mcpu=430x -mmcu=msp430f5529 -D__MSP430_HAS_USCI_A0__ -D__MSP430_HAS_USCI_B0__ -D__MSP430_HAS_USCI_B1__ -D__MSP430_HAS_USCI_A1__ -I"C:/.../energia-0101E0014/hardware/tools/msp430/msp430/include" -I"C:/.../energia-0101E0014/hardware/msp430/libraries/Wire" -I"C:/.../energia-0101E0014/hardware/tools/msp430/msp430/include" -I"C:/.../ElectronicsProjects/FlightControlsGCC/MyDevicesGCC/HeadersGCC" -I"C:/.../energia-0101E0014/hardware/msp430/variants/launchpad_f5529" -I"C:/.../energia-0101E0014/hardware/msp430/cores/msp430" -I"C:/TI/ccsv6/ccs_base/msp430/include_gcc" -Os -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"main.d" -MT"main.d" -o"main.o" "../main.cpp" In file included from C:/TI/ccsv6/ccs_base/msp430/include_gcc/msp430f5529.h:63:0, from C:/TI/ccsv6/ccs_base/msp430/include_gcc/msp430.h:760, from C:/.../energia-0101E0014/hardware/msp430/cores/msp430/Energia.h:4, from ../main.cpp:1: C:/TI/ccsv6/ccs_base/msp430/include_gcc/iomacros.h:70:0: warning: "__interrupt" redefined [enabled by default] <built-in>:0:0: note: this is the location of the previous definition In file included from C:/TI/ccsv6/ccs_base/msp430/include_gcc/msp430.h:760:0, from C:/.../energia-0101E0014/hardware/msp430/cores/msp430/Energia.h:4, from ../main.cpp:1: C:/TI/ccsv6/ccs_base/msp430/include_gcc/msp430f5529.h:4806:0: warning: "__MSP430_HAS_USCI_A0__" redefined [enabled by default] <command-line>:0:0: note: this is the location of the previous definition C:/TI/ccsv6/ccs_base/msp430/include_gcc/msp430f5529.h:4851:0: warning: "__MSP430_HAS_USCI_B0__" redefined [enabled by default] <command-line>:0:0: note: this is the location of the previous definition C:/TI/ccsv6/ccs_base/msp430/include_gcc/msp430f5529.h:5123:0: warning: "__MSP430_HAS_USCI_A1__" redefined [enabled by default] <command-line>:0:0: note: this is the location of the previous definition C:/TI/ccsv6/ccs_base/msp430/include_gcc/msp430f5529.h:5168:0: warning: "__MSP430_HAS_USCI_B1__" redefined [enabled by default] <command-line>:0:0: note: this is the location of the previous definition ../main.cpp: In function 'int main()': ../main.cpp:37:20: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ../main.cpp:49:13: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ../main.cpp:85:16: warning: unused variable 'repeats' [-Wunused-variable] 'Finished building: ../main.cpp' ' ' 'Building target: MyDevicesGCC.out' 'Invoking: GNU Linker' "C:/.../energia-0101E0014/hardware/tools/msp430/bin/msp430-gcc.exe" -mcpu=430x -mmcu=msp430f5529 -D__MSP430_HAS_USCI_A0__ -D__MSP430_HAS_USCI_B0__ -D__MSP430_HAS_USCI_B1__ -D__MSP430_HAS_USCI_A1__ -Os -g -gdwarf-3 -gstrict-dwarf -Wall -Wl,-Map,"MyDevicesGCC.map" -o"MyDevicesGCC.out" "./main.o" -T"../msp430f5529.ld" -Wl,--start-group -l"c" -l"gcc" -Wl,--end-group c:/.../energia-0101e0014/hardware/tools/msp430/bin/../lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld.exe: error: no memory region specified for loadable section `.noinit.crt0' collect2: ld returned 1 exit status gmake: *** [MyDevicesGCC.out] Error 1 gmake: Target `all' not remade because of errors. **** Build Finished **** Quote Link to post Share on other sites
bluehash 1,581 Posted April 13, 2015 Share Posted April 13, 2015 Are you compiling for the right chip? MSP430G5529. Here are some E2E threads: [msp430-elf] Incorrect placement of uninitialized variables to .noinit GNU v4.6.3 MSPGCC error: no memory region specified for loadable section `.noinit.crt0' Quote Link to post Share on other sites
spirilis 1,265 Posted April 13, 2015 Share Posted April 13, 2015 In CCS, you are using "GNU_4.6.3:MSPGCC" ? That sounds like a compiler hook in CCS intended for Energia builds (as Energia for msp430 uses the old @@pabigot MSPGCC 4.6.3). I would use the GCC 4.9.1 release instead as that is compatible with the TI MSP430 ABI used by TI's own compiler et al. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.