7 years ago.

LPCXpresso linker errors related to toolchain when compiling mbed_bliky.

Hello People, I recently started using LPCXpresso with mbed library, I exported mbed_blinky from the official site and exported the program offline into LPCXpresso IDE. When I try to build it , the compilation breaks in the linker with the following message :

Error :

C:/Users/Sathya/Documents/LPCXpresso_8.2.2_650/workspace5/mbed_blinky/mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/startup_LPC17xx.o: In function `Reset_Handler': (.text+0x2c): undefined reference to `_start' ./main.o: In function `mbed::DigitalOut::DigitalOut(PinName)': C:\Users\Sathya\Documents\LPCXpresso_8.2.2_650\workspace5\mbed_blinky\mbed/drivers/DigitalOut.h:53: undefined reference to `memset' C:/Users/Sathya/Documents/LPCXpresso_8.2.2_650/workspace5/mbed_blinky/mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/mbed_board.o: In function `mbed_error_vfprintf': mbed_board.c:(.text.mbed_error_vfprintf+0x12): undefined reference to `vsprintf' C:/Users/Sathya/Documents/LPCXpresso_8.2.2_650/workspace5/mbed_blinky/mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/serial_api.o: In function `serial_baud': serial_api.c:(.text.serial_baud+0x132): undefined reference to `abs' C:/Users/Sathya/Documents/LPCXpresso_8.2.2_650/workspace5/mbed_blinky/mbed/TARGET_LPC1768/TOOLCHAIN_GCC_ARM/serial_api.o: In function `serial_init': serial_api.c:(.text.serial_init+0x136): undefined reference to `memcpy' C:\Users\Sathya\Documents\LPCXpresso_8.2.2_650\workspace5\mbed_blinky\mbed\TARGET_LPC1768\TOOLCHAIN_GCC_ARM\libmbed.a(mbed_error.o): In function `error': mbed_error.c:(.text.error+0x12): undefined reference to `exit' collect2.exe: error: ld returned 1 exit status make: * [mbed_blinky.axf] Error 1

18:31:45 Build Finished (took 735ms)

I was able to compile other C programs without problems, but I am not able to figure out how to proceed with this project? What am I doing wrong? I know some for the dependencies lies with crt0.o which is not being included here, but don't really know why this shouldn't work. Any input would really help me use this mbed library for other projects.

Best Regards, Sathya

Be the first to answer this question.