9 years, 10 months ago.

offline GCC toolchain with LPC1347

I want to build mBed project with GCC offline toolchain for my board LPC1347. I use the GCC toolchain on Ubuntu 14.04. I used following steps: 1) I used the online compiler to build a program WifiDip-KitchenSink. Project builds fine. 2) I downloaded the project for Keil toolchain. 3) I downloaded makefile form mbed_gcc_makefile project from GitHub and played with it to introduce the board specific files like cmsis_nvic.o, retarget.o, startup_LPC13xx.o, sys.o and system_LPC13Uxx.o 4) based on LPC1347.sct I made LPC1347.ld file The compiler compiles my files, but linking fails in multiple places, e.g: mbed/TARGET_LPC1347/TOOLCHAIN_GCC_ARM/cmsis_nvic.o: In function `asm_12_cmsis_nvic_c_3e7ad7caREV16': C:\work\mbed\git_arm\libraries\mbed\targets\cmsis\TARGET_NXP\TARGET_LPC13XX\cmsis_nvic.c:(.rev16_text+0x0): multiple definition of `asm_12_cmsis_nvic_c_3e7ad7caREV16' mbed/TARGET_LPC1347/TOOLCHAIN_GCC_ARM/cmsis_nvic.o:C:\work\mbed\git_arm\libraries\mbed\targets\cmsis\TARGET_NXP\TARGET_LPC13XX\cmsis_nvic.c:(.rev16_text+0x0): first defined here

Can you advice what goes wrong?

1 Answer

9 years, 9 months ago.

Hi Ivan,

Take a look at this article: http://0xc0170.github.io/mbed/2013/08/05/mbed-gcc-with-eclipse-kl25z-part-1/

Specifically pay attention to step 3. I think you're issue might be that you need to build the mbed library locally. In that article he builds it for the KL25Z, so you should just replace that with the LPC1347. If you've never built the mbed library locally just read that whole article, it walks you through most of the process. You can ignore the Eclipse stuff if you're not using an IDE :) Here's a lot of good info on building the mbed library locally: http://developer.mbed.org/handbook/mbed-tools. You shouldn't have to mess with any of the directories, .sct, or object files.

I couldn't find an LPC1347, but I did test this on a KL46Z and it worked fine. Let me know how it goes!

All the best, Brian