Make: .axf Error 1

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

Make: .axf Error 1

4,257 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bitcast on Fri Dec 07 05:53:00 MST 2012
I have a project working fine, then I tried to create another one, following same steps on creation to test ADC functions.
On "Build" I get this error:
make: *** [adc_lcd.axf] Error 1
unrecognized option '-T'

Can anyone tell me whats wrong? In fact it only works on 1 project, all other I tried to create after that are showing this error.
0 Kudos
6 Replies

2,015 Views
ptpaterson
Contributor I

The empty string in -T "" means that the linker script file location setting has something in it, but cannot be computed.  When I exported a project from mbed to lpcxpresso, I found "${workspace_loc:/${ProjName}/None}" in managed linker settings, which points to nothing, and causes the error.

My export also did not have the toolchain object and linker files when exporting my project.  I still haven't figure out where proper library files are and how to link them manually.  I created a duplicate project that used the mbed_src library.  So when I exported I have the entire source code and it compiled completely first try.

0 Kudos

2,015 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Tue Dec 11 03:17:45 MST 2012
It wants to link with the mbed library and 'capi' (whatever that is). Suggest you ask on the mbed forum where to get these libraries from,
0 Kudos

2,015 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bitcast on Mon Dec 10 07:01:07 MST 2012
Turned "manager liker scritp" on and the problem changed to:

Building target: lcd3.axf
Invoking: MCU C++ Linker
arm-none-eabi-c++ -nostdlib -L"C:\Users\Vitor\Documents\LPCXpresso_4.2.2_275\workspace\lcd3" -L"C:\Users\Vitor\Documents\LPCXpresso_4.2.2_275\workspace\lcd3\mbed" -L"C:\Users\Vitor\Documents\LPCXpresso_4.2.2_275\workspace\lcd3\TextLCD" -Xlinker -Map="lcd3.map" -Xlinker --gc-sections -mcpu=cortex-m3 -mthumb -T "C:\Users\Vitor\Documents\LPCXpresso_4.2.2_275\workspace\lcd3\mbed\LPC1768\GCC_CR\LPC1768.ld" -o"lcd3.axf"  ./main.o  ./TextLCD/TextLCD.o   -lmbed -lcapi
c:/nxp/lpcxpresso_4.2.2_275/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/bin/ld.exe: [COLOR=red]cannot find -lmbed[/COLOR]
c:/nxp/lpcxpresso_4.2.2_275/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/bin/ld.exe: [COLOR=red]cannot find -lcapi[/COLOR]
collect2: ld returned 1 exit status
[COLOR=Red]make: *** [lcd3.axf] Error 1[/COLOR]
0 Kudos

2,015 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Mon Dec 10 06:29:43 MST 2012
Looks like you have switched off the "manage linker script" option in the Linker 'Target' settings
0 Kudos

2,015 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bitcast on Mon Dec 10 06:23:58 MST 2012
Building file: ../TextLCD/TextLCD.cpp
Invoking: MCU C++ Compiler
arm-none-eabi-c++ -D__NEWLIB__ -DTOOLCHAIN_GCC_CR -DTARGET_LPC1768 -D__CODE_RED -DCPP_USE_HEAP -I"C:\Users\Vitor\Documents\LPCXpresso_4.2.2_275\workspace\lcd3" -I"C:\Users\Vitor\Documents\LPCXpresso_4.2.2_275\workspace\lcd3\mbed\LPC1768\GCC_CR" -I"C:\Users\Vitor\Documents\LPCXpresso_4.2.2_275\workspace\CMSISv1p30_LPC17xx" -I"C:\Users\Vitor\Documents\LPCXpresso_4.2.2_275\workspace\lcd3\mbed\LPC1768" -I"C:\Users\Vitor\Documents\LPCXpresso_4.2.2_275\workspace\lcd3\mbed" -I"C:\Users\Vitor\Documents\LPCXpresso_4.2.2_275\workspace\lcd3\TextLCD" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fno-exceptions -mcpu=cortex-m3 -mthumb -MMD -MP -MF"TextLCD/TextLCD.d" -MT"TextLCD/TextLCD.d" -o"TextLCD/TextLCD.o" "../TextLCD/TextLCD.cpp"
c:/nxp/lpcxpresso_4.2.2_275/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/bin/ld.exe: unrecognized option '-T'
Finished building: ../TextLCD/TextLCD.cpp
c:/nxp/lpcxpresso_4.2.2_275/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/bin/ld.exe: use the --help option for usage information

collect2: ld returned 1 exit status
Building target: lcd3.axf
make: *** [lcd3.axf] Error 1
Invoking: MCU C++ Linker
arm-none-eabi-c++ -nostdlib -L"C:\Users\Vitor\Documents\LPCXpresso_4.2.2_275\workspace\lcd3" -L"C:\Users\Vitor\Documents\LPCXpresso_4.2.2_275\workspace\lcd3\mbed" -L"C:\Users\Vitor\Documents\LPCXpresso_4.2.2_275\workspace\lcd3\TextLCD" -Xlinker -Map="lcd3.map" -Xlinker --gc-sections -mcpu=cortex-m3 -mthumb -T "" -o"lcd3.axf"  ./main.o  ./TextLCD/TextLCD.o   -lmbed -lcapi
0 Kudos

2,015 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by frame on Sat Dec 08 06:13:51 MST 2012
It would be helpful to post the whole build command line that threw this error.
One of the commands involved doesn't like a '-T' option.
0 Kudos