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?
解決済! 解決策の投稿を見る。
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
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
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?
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.