Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 4 months ago.
GCC ARM Embedded 4.7-2012-q4-major - Export doesn't build
Hi Guys,
The link to ARM Embedded on this page gives you 4.7
The exported project will not build on 4.7
First issue is forward enums, I commented them out
Second issue is the link script of None, removed this.
Then the link fails:
Andrew-Capons-MacBook-Pro:01_blinky1 andrewcapon$ make
/Development/gcc-arm-none-eabi-4_7-2012q4/bin/arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Wl,gc-sections specs=nano.specs -u _printf_float -u _scanf_float -o 01_blinky1.elf main.o mbed/LPC1768/cmsis_nvic.o mbed/LPC1768/system_LPC17xx.o mbed/LPC1768/core_cm3.o mbed/LPC1768/stackheap.o mbed/LPC1768/startup_LPC17xx.o -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
/Development/gcc-arm-none-eabi-4_7-2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld: warning: mbed/LPC1768/cmsis_nvic.o uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/Development/gcc-arm-none-eabi-4_7-2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld: warning: mbed/LPC1768/system_LPC17xx.o uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/Development/gcc-arm-none-eabi-4_7-2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld: warning: mbed/LPC1768/stackheap.o uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
main.o: In function `mbed::DigitalOut::DigitalOut()':
main.cpp:(.text._ZN4mbed10DigitalOutD2Ev[_ZN4mbed10DigitalOutD5Ev]+0x8): undefined reference to `mbed::Base::Base()'
main.cpp:(.text._ZN4mbed10DigitalOutD2Ev[_ZN4mbed10DigitalOutD5Ev]+0x10): undefined reference to `vtable for mbed::DigitalOut'
main.o: In function `_GLOBALsub_I_mled0':
main.cpp:(.text.startup._GLOBALsub_I_mled0+0xe): undefined reference to `mbed::DigitalOut::DigitalOut(PinName, char const*)'
main.cpp:(.text.startup._GLOBALsub_I_mled0+0x24): undefined reference to `mbed::DigitalOut::DigitalOut(PinName, char const*)'
main.cpp:(.text.startup._GLOBALsub_I_mled0+0x3a): undefined reference to `mbed::DigitalOut::DigitalOut(PinName, char const*)'
main.cpp:(.text.startup._GLOBALsub_I_mled0+0x50): undefined reference to `mbed::DigitalOut::DigitalOut(PinName, char const*)'
/Development/gcc-arm-none-eabi-4_7-2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld: 01_blinky1.elf: hidden symbol `main' isn't defined
/Development/gcc-arm-none-eabi-4_7-2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make: * [01_blinky1.elf] Error 1
Question relating to:
1 Answer
11 years, 4 months ago.
Ignore me, I must have forgot to update the mbed lib to the new version.
Once this is done it works.