.elf error

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

.elf error

5,353 Views
kevynschwab
Contributor II

After adding and removing a WAIT component in my project, I rebuilt and got an .elf error. Here is the complete error message:

 

make: *** [Ultrasonic Flow Sensor.elf] Error 1

Location: line 0

 

It's odd because this is literally all of the information that KDS gives me.

How can I fix this?

Labels (1)
Tags (3)
6 Replies

2,982 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Kevyn,

(1) Please show the detail error in "Console" window .

(2)  Please tell me Your KDS version , and the chip part number .

BR

Alice

0 Kudos

2,982 Views
kevynschwab
Contributor II

Hello Alice,

Thank you for responding to me. The error message is accompanied by very little information. Here is what the console contains upon building my project:

08:55:42 **** Incremental Build of configuration Debug for project Ultrasonic Flow Sensor ****

make all

'Building target: Ultrasonic Flow Sensor.elf'

'Invoking: Cross ARM C++ Linker'

arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g3 -T "C:/Users/kschwab/workspace.kds/Ultrasonic Flow Sensor/Project_Settings/Linker_Files/ProcessorExpert.ld" -Xlinker --gc-sections -L"C:/Users/kschwab/workspace.kds/Ultrasonic Flow Sensor/Project_Settings/Linker_Files" -Wl,-Map,"Ultrasonic Flow Sensor.map" -nanolibc -o "Ultrasonic Flow Sensor.elf" ./Sources/Events.o ./Sources/Scheduler.o ./Sources/SpiCommunication.o ./Sources/UartCommunication.o ./Sources/main.o ./Sources/myMain.o ./Project_Settings/Startup_Code/startup.o ./Generated_Code/AS1.o ./Generated_Code/ASerialLdd1.o ./Generated_Code/BitIoLdd1.o ./Generated_Code/BitIoLdd2.o ./Generated_Code/BitIoLdd3.o ./Generated_Code/BitIoLdd4.o ./Generated_Code/BitIoLdd5.o ./Generated_Code/BluLedDout.o ./Generated_Code/Cpu.o ./Generated_Code/GrnLedDout.o ./Generated_Code/Maxim_pullUpResistor.o ./Generated_Code/PE_LDD.o ./Generated_Code/RedLedDout.o ./Generated_Code/RtiTimer.o ./Generated_Code/SInt.o ./Generated_Code/SM1.o ./Generated_Code/SMasterLdd1.o ./Generated_Code/SlaveSelect.o ./Generated_Code/TU1.o ./Generated_Code/TimerIntLdd1.o ./Generated_Code/Vectors.o

arm-none-eabi-g++: error: unrecognized command line option '-nanolibc'

make: *** Error 1

08:55:45 Build Finished (took 2s.714ms)

There is not a description of the error, only the Error 1 identification. I am using KDS to debug my code on a KL25Z-128.

Thank you,

Kevyn Schwab

0 Kudos

2,982 Views
joeseymour
Contributor III

> arm-none-eabi-g++: error: unrecognized command line option '-nanolibc'

The -nanolibc option is only supported by KDS2. In KDS3 you need to use -specs=nano.specs instead. This will be in the linker settings of the project properties. You can also use the KDS upgrade assistant to help make the necessary changes, it's in the Project menu.

Kinetis Design Studio: Migrating KDS V2.0.0 Projects to GNU Tools for ARM Embedded (Launchpad, KDS V...

Hope that helps

0 Kudos

2,982 Views
kevynschwab
Contributor II

I utilized the Upgrade Assistant as Joe advised, and it did remove the ‘-nanolibc’ error. However, I am still getting the same *** Error 1. My console now looks like this:

07:36:04 **** Incremental Build of configuration Debug for project Ultrasonic Flow Sensor ****

make all

'Building target: Ultrasonic Flow Sensor.elf'

'Invoking: Cross ARM C++ Linker'

arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g3 -T "C:/Users/kschwab/workspace.kds/Ultrasonic Flow Sensor/Project_Settings/Linker_Files/ProcessorExpert.ld" -Xlinker --gc-sections -L"C:/Users/kschwab/workspace.kds/Ultrasonic Flow Sensor/Project_Settings/Linker_Files" -Wl,-Map,"Ultrasonic Flow Sensor.map" --specs=nano.specs -specs=nano.specs -specs=nosys.specs -o "Ultrasonic Flow Sensor.elf" ./Sources/Events.o ./Sources/Scheduler.o ./Sources/SpiCommunication.o ./Sources/UartCommunication.o ./Sources/exit.o ./Sources/main.o ./Sources/myMain.o ./Project_Settings/Startup_Code/startup.o ./Generated_Code/AS1.o ./Generated_Code/ASerialLdd1.o ./Generated_Code/BitIoLdd1.o ./Generated_Code/BitIoLdd2.o ./Generated_Code/BitIoLdd3.o ./Generated_Code/BitIoLdd4.o ./Generated_Code/BitIoLdd5.o ./Generated_Code/BluLedDout.o ./Generated_Code/Cpu.o ./Generated_Code/GrnLedDout.o ./Generated_Code/Maxim_pullUpResistor.o ./Generated_Code/PE_LDD.o ./Generated_Code/RedLedDout.o ./Generated_Code/RtiTimer.o ./Generated_Code/SInt.o ./Generated_Code/SM1.o ./Generated_Code/SMasterLdd1.o ./Generated_Code/SlaveSelect.o ./Generated_Code/TU1.o ./Generated_Code/TimerIntLdd1.o ./Generated_Code/Vectors.o

arm-none-eabi-g++: fatal error: c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/nano.specs: attempt to rename spec 'link' to already defined spec 'nano_link'

compilation terminated.

make: *** Error 1

07:36:06 Build Finished (took 1s.55ms)

I notice that there is a fatal error for arm-none-eabi-g++; attempt to rename spec ‘link’ to already defined spec ‘nano_link’.

I really appreciate your help, thank you!

0 Kudos

2,981 Views
jamiepacker
Contributor II

This is because you have specified nano.specs twice: "--specs=nano.specs -specs=nano.specs" in you command line.

Have you ticked the "Use newlib-nano" checkbox as well as putting "-specs=nano.specs" in the Other linker options?

Note that there is a bug in the current version of KSDK Eclipse plugin where it will re-insert "-specs=nano.specs" in the Other linker options section whenever you generate the Processor Expert code. So you should avoid the checkbox.

2,981 Views
kevynschwab
Contributor II

Sure enough, that did the trick!

I un-checked the “Use newlib-nano” box and left “-specs=nano.specs -specs=nosys.specs” in the “Other linker flags” text box under Properties\C/C++ Build\Settings\Tool Settings\Cross ARM C++ Linker\Miscellaneous.

Thank you for your help!

0 Kudos