10 years, 7 months ago.

Project exported to LPCXpresso fails to build with linker error

Hi,

I'm trying to build a project which I exported from the online IDE. I follow the instructions on the following page: https://developer.mbed.org/handbook/Exporting-to-Eclipse-IDEs and try to build the imported project in LPCXpresso (LPCXpresso v7.6.2 [Build 326] [2015-02-02]). It fails with the following error:

14:52:26 **** Incremental Build of configuration Debug for project fvb_spi_test ****
make -r all 
Building target: fvb_spi_test.axf
Invoking: MCU C++ Linker
arm-none-eabi-c++ -nostdlib -L"C:\Users\ex-vanbever-f\workspace\fvb_spi_test" -L"C:\Users\ex-vanbever-f\workspace\fvb_spi_test\mbed" -L"C:\Users\ex-vanbever-f\workspace\fvb_spi_test\mbed\TARGET_LPC824" -L"C:\Users\ex-vanbever-f\workspace\fvb_spi_test\mbed\TARGET_LPC824\TARGET_NXP" -L"C:\Users\ex-vanbever-f\workspace\fvb_spi_test\mbed\TARGET_LPC824\TARGET_NXP\TARGET_LPC82X" -L"C:\Users\ex-vanbever-f\workspace\fvb_spi_test\mbed\TARGET_LPC824\TARGET_NXP\TARGET_LPC82X\TARGET_LPC824" -Xlinker -Map="fvb_spi_test.map" -Xlinker --gc-sections -mcpu=cortex-m0 -mthumb -T "" -o "fvb_spi_test.axf"  ./main.o   
c:/nxp/lpcxpresso_7.6.2_326/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot open linker script file : No such file or directory
collect2.exe: error: ld returned 1 exit status
make: *** [fvb_spi_test.axf] Error 1

14:52:26 Build Finished (took 345ms)

How can I solve this?

EDIT: this is the project I'm trying to export

Import programfvb_spi_test

basic spi test

Can you publish the program you are trying to export?

posted by Sam Grove 24 Feb 2015

I edited my post to include the program I'm trying to export.

posted by Frank Vanbever 25 Feb 2015

1 Answer

10 years, 5 months ago.

Hi Frank,

I was able to get it building with LPCXpresso. There is currently a bug with our exporter and build system that isn't bundling the built mbed library. I've submitted a pull request here: https://github.com/mbedmicro/mbed/pull/1030

Also, due to the limited flash size of the LPC824, your program above won't fit on the device.Here were the final statistics if you're interested:

   text	   data	    bss	    dec	    hex	filename
  59796	   2224	    564	  62584	   f478	fvb_spi_test_lib.axf

Accepted Answer