LpcXpresso Make Error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LpcXpresso Make Error

535 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by maxtippy on Wed Jun 12 07:30:45 MST 2013
Hi,
I try to program a Lpc1850 on a MCB1800 with LPCXpresso.
When I built it, I get this message error :



16:00:16 **** Incremental Build of configuration Debug for project FreeRTOS_Lpc18xx ****
make all
Building file: ../src/cr_startup_lpc18xx.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -DCORE_M3 -D__LPC18XX__ -I"C:\Users\Vulliens.HQ\Documents\LPCXpresso_5.2.2_2108\workspace2\FreeRTOS_Lpc18xx\Include\Usb\USB" -I"C:\Users\Vulliens.HQ\Documents\LPCXpresso_5.2.2_2108\workspace2\FreeRTOS_Lpc18xx\Include\Usb" -I"C:\Users\Vulliens.HQ\Documents\LPCXpresso_5.2.2_2108\workspace2\FreeRTOS_Lpc18xx\Include\FreeRTOS" -I"C:\Users\Vulliens.HQ\Documents\LPCXpresso_5.2.2_2108\workspace2\FreeRTOS_Lpc18xx\Include\Driv" -I"C:\Users\Vulliens.HQ\Documents\LPCXpresso_5.2.2_2108\workspace2\FreeRTOS_Lpc18xx\Include\LPCOpen" -I"C:\Users\Vulliens.HQ\Documents\LPCXpresso_5.2.2_2108\workspace2\FreeRTOS_Lpc18xx\Include\LPCOpen\lpc_ip" -I"C:\Users\Vulliens.HQ\Documents\LPCXpresso_5.2.2_2108\workspace2\FreeRTOS_Lpc18xx\Include\LPCOpen\chip_common" -I"C:\Users\Vulliens.HQ\Documents\LPCXpresso_5.2.2_2108\workspace2\FreeRTOS_Lpc18xx\Include\LPCOpen\chip_18xx_43xx" -I"C:\Users\Vulliens.HQ\Documents\LPCXpresso_5.2.2_2108\workspace2\FreeRTOS_Lpc18xx\" -Os -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m3 -mthumb -MMD -MP -MF"src/cr_startup_lpc18xx.d" -MT"src/cr_startup_lpc18xx.d" -o "src/cr_startup_lpc18xx.o" "../src/cr_startup_lpc18xx.c"
/bin/sh.exe: -c: line 1: unexpected EOF while looking for matching `"'
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: *** [src/cr_startup_lpc18xx.o] Error 2

16:00:16 Build Finished (took 275ms)

Can someone help me to know what's happend ?

Thanks
0 Kudos
5 Replies

470 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by maxtippy on Mon Jun 17 05:35:38 MST 2013
Hello R2D2,

Sorry for the time I don't answer, I was in hollidays.

Thank you for your help.

I find out my error. It was about compilation with -fPIC. I don't have many experiences with make file and I don't knew how to do that before.
0 Kudos

470 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu Jun 13 01:35:22 MST 2013
Could be useful if you post a project to your build.

Not sure what you are doing, but it looks like you are trying to generate a shared library. Therefore your code should be '[COLOR=Red]P[/COLOR]osition [COLOR=Red]I[/COLOR]ndependent[COLOR=Red] C[/COLOR]ode' and you should link with -fPIC as suggested.
0 Kudos

470 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by maxtippy on Wed Jun 12 22:54:31 MST 2013
Hi,

Thanks for the fast answer.
I found out one of my error, and it was what you say about wrong paths.
But now I always have one make error. I'm sorry bu I'm not familiar with this makefile.

Maybe somethings like that :
07:43:02 **** Incremental Build of configuration Debug for project FreeRTOS_Lpc18xx ****
make all
Building target: libFreeRTOS_Lpc18xx.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -Xlinker -Map="libFreeRTOS_Lpc18xx.map" -Xlinker --gc-sections -shared -mcpu=cortex-m3 -mthumb -T "FreeRTOS_Lpc18xx_Debug.ld" -o "libFreeRTOS_Lpc18xx.axf"  ./src/cr_startup_lpc18xx.o ./src/freertos_blinky.o  
c:/nxp/lpcxpresso/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/bin/ld.exe: ./src/freertos_blinky.o: relocation R_ARM_THM_MOVW_ABS_NC against `sec' can not be used when making a shared object; recompile with -fPIC
./src/freertos_blinky.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libFreeRTOS_Lpc18xx.axf] Error 1

tell you something ?

Kind regards,
0 Kudos

470 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Jun 12 07:44:57 MST 2013

Quote: maxtippy
Can someone help me to know what's happend ?



Your shell script is confused. Looking for a matching " it reached the end of the file. So there's something wrong with your path syntax.

See also: http://stackoverflow.com/questions/16433006/unexpected-eof-when-linking-arduino-project-in-eclipse-o...
0 Kudos

470 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by frame on Wed Jun 12 07:44:01 MST 2013
Looks like a syntax error, more precisely an unterminated string.
Perhaps you forgot the closing <[B]"[/B]>in a printf() parameter ?
0 Kudos