6 years ago.

Compile errors when exporting to LPCXpresso (LPC1549)

Hi,

I am trying to export an mbed application for LPC1549 to LPCXpresso (OS X, version 7.3.0).

It builds fine inside the online IDE, but when I build in LPCXpresso, I get an error "ld: read in flex scanner failed".

I also tried to create a new project and import all the files into this new project, and when I export and build in LPCXpresso, I get another error: undefined reference to `typeinfo for mbed::Stream'

Any help would be apreciated.

arm-none-eabi-c++ -nostdlib -L"/Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test1" -L"/Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test1/mbed" -L"/Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test1/mbed/TARGET_LPC1549" -L"/Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test1/mbed/TARGET_LPC1549/TARGET_NXP" -L"/Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test1/mbed/TARGET_LPC1549/TARGET_NXP/TARGET_LPC15XX" -L"/Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test1/ds1302" -L"/Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test1/PwmSound" -Xlinker -Map="test1.map" -Xlinker gc-sections -mcpu=cortex-m3 -mthumb -T "" -o "test1.axf" ./ds1302/ds1302.o ./PwmSound/PwmSound.o ./PwmSound/play.o ./IV18Display.o ./IVL275Display.o ./VFDDisplay.o ./button.o ./font_7seg.o ./main.o ./menu.o ./rtc.o /Applications/lpcxpresso_7.3.0_186/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld: read in flex scanner failed collect2: error: ld returned 1 exit status make: * [test1.axf] Error 1

Error 2:

arm-none-eabi-c++ -nostdlib -L"/Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test2" -L"/Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test2/mbed" -L"/Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test2/mbed/TARGET_LPC1549" -L"/Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test2/mbed/TARGET_LPC1549/TOOLCHAIN_GCC_CR" -L"/Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test2/mbed/TARGET_LPC1549/TARGET_NXP" -L"/Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test2/mbed/TARGET_LPC1549/TARGET_NXP/TARGET_LPC15XX" -L"/Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test2/ds1302" -L"/Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test2/PwmSound" -Xlinker -Map="test2.map" -Xlinker gc-sections -mcpu=cortex-m3 -mthumb -T "/Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test2/mbed/TARGET_LPC1549/TOOLCHAIN_GCC_CR/LPC1549.ld" -o "test2.axf" ./ds1302/ds1302.o ./PwmSound/PwmSound.o ./PwmSound/play.o ./IV18Display.o ./IVL275Display.o ./VFDDisplay.o ./button.o ./font_7seg.o ./main.o ./menu.o ./rtc.o /Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test2/mbed/TARGET_LPC1549/TOOLCHAIN_GCC_CR/system_LPC15xx.o /Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test2/mbed/TARGET_LPC1549/TOOLCHAIN_GCC_CR/cmsis_nvic.o /Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test2/mbed/TARGET_LPC1549/TOOLCHAIN_GCC_CR/startup_LPC15xx.o /Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test2/mbed/TARGET_LPC1549/TOOLCHAIN_GCC_CR/board.o /Users/xxx/Documents/LPCXpresso_7.3.0/workspace/test2/mbed/TARGET_LPC1549/TOOLCHAIN_GCC_CR/retarget.o -lmbed ./VFDDisplay.o:(.rodata._ZTI10VFDDisplay+0x8): undefined reference to `typeinfo for mbed::Stream' collect2: error: ld returned 1 exit status make: * [test2.axf] Error 1

Have you tried to export a simple blinky program? Does this work for you? http://developer.mbed.org/teams/mbed/code/mbed_blinky/export

posted by Sam Grove 08 Oct 2014

This works:

- Create new mbed_blinky with board set to LPC1549 - Export to LPCXpresso and import

> Builds

This fails:

- Create new mbed_blinky with board set to LPC1114 - Export to LPCXpresso and import

> Fails with arm-none-eabi/bin/ld: read in flex scanner failed

My project, which is for LPC1549 seems to always fail with the "read in flex scanner failed", but I cannot reproduce this on the mbed_blinky created for LPC1549, only for LPC1114.

posted by Per J. G. 08 Oct 2014
Be the first to answer this question.