KDS 3.0 Builder Makefile changes

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

KDS 3.0 Builder Makefile changes

跳至解决方案
1,144 次查看
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?

标签 (1)
0 项奖励
1 解答
759 次查看
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 项奖励
3 回复数
760 次查看
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 项奖励
759 次查看
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 项奖励
759 次查看
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 项奖励