KDS 3.0 Builder Makefile changes

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

KDS 3.0 Builder Makefile changes

Jump to solution
1,114 Views
owlsnest
Contributor II

I have a project that I've imported to KDS 3.0 that was written in KDS 2.0. When I try to build the project I run into a compiler error.

 

arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -T "MKL46Z256xxx4_flash.ld" -Xlinker --gc-sections -L"C:/Users/Todd/KDS/lab2_timer_stopwatch_with_blank/Project_Settings/Linker_Files" -Wl,-Map,"lab2_timer_stopwatch.map" -nanolibc -o "lab2_timer_stopwatch.elf"  ./Sources/slcd.o ./Sources/stopwatch.o  ./Project_Settings/Startup_Code/startup_MKL46Z4.o ./Project_Settings/Startup_Code/system_MKL46Z4.o  

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

make: *** [lab2_timer_stopwatch.elf] Error 1

 

After doing some googling it appears that the -nanolibc option should be replaced with --specs=nano.specs --specs=nosys.specs. I open the makefile in KDS 3.0 and make the change to the makefile and save the modified makefile. Then when I go to build the project I get the same error and the make file has been changed back. How do I get the change to the makefile to stay?

Labels (1)
0 Kudos
1 Solution
729 Views
BlackNight
NXP Employee
NXP Employee

Hi Todd,

the make file is generated. You need to change the linker setting in the project properties. See "Linker Flags for GNU GCC ARM Embedded" in Switching ARM GNU Tool Chain and Libraries in Kinetis Design Studio | MCU on Eclipse .

I hope this helps,

Erich

View solution in original post

0 Kudos
3 Replies
730 Views
BlackNight
NXP Employee
NXP Employee

Hi Todd,

the make file is generated. You need to change the linker setting in the project properties. See "Linker Flags for GNU GCC ARM Embedded" in Switching ARM GNU Tool Chain and Libraries in Kinetis Design Studio | MCU on Eclipse .

I hope this helps,

Erich

0 Kudos
729 Views
owlsnest
Contributor II

Erich,

     Thank for your response!

     Under "Project Settings">C/C++ Build>Settings I don't have the "Tool Settings" Tab. Where am I supposed to set the Linker options?

     pastedImage_1.png

0 Kudos
729 Views
owlsnest
Contributor II

I figured it out. That tab is only available if the makefile is automatically generated. Also, if anyone if the future sees this please note the you have to do a make clean (build->clean) before the builder will generate new output files.

0 Kudos