diff --git a/hardware/arduino/sam/platform.txt b/hardware/arduino/sam/platform.txt index 6472e0e09..2f8b29493 100644 --- a/hardware/arduino/sam/platform.txt +++ b/hardware/arduino/sam/platform.txt @@ -3,8 +3,7 @@ # --------------------- name=Atmel SAM3 -#compiler.path Official default is correct, only need to change this if you want to overide the initial default -compiler.path={0}/hardware/tools/g++_arm_none_eabi/bin/ +compiler.path={ide.path}/hardware/tools/g++_arm_none_eabi/bin/ compiler.c.cmd=arm-none-eabi-gcc compiler.c.flags=-c -g -Os -w -mthumb -mlong-calls -ffunction-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf compiler.c.elf.cmd=arm-none-eabi-gcc @@ -24,32 +23,30 @@ compiler.upload.cmd= compiler.upload.flags= compiler.define=-DARDUINO= -compiler.libsam.c.flags=-I{core_path}/../../system/libsam -I{core_path}/../../system/CMSIS/Include/ -#library.path=hardware/sam/cores/sam -#library.core.path=libraries;hardware/sam/libraries +compiler.libsam.c.flags=-I{build.system.path}/libsam -I{build.system.path}/CMSIS/Include/ # SAM3 compile patterns # --------------------- ## Compile c files -recipe.c.o.pattern={toolchain_path}{compiler.c.cmd} {compiler.c.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={ide_version} {build.extra_flags} {compiler.libsam.c.flags} {includes} {source_file} -o {object_file} +recipe.c.o.pattern={compiler.path}{compiler.c.cmd} {compiler.c.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={ide.version} {build.extra_flags} {compiler.libsam.c.flags} {includes} {source_file} -o {object_file} ## Compile c++ files -recipe.cpp.o.pattern={toolchain_path}{compiler.cpp.cmd} {compiler.cpp.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={ide_version} {build.extra_flags} {compiler.libsam.c.flags} {includes} {source_file} -o {object_file} +recipe.cpp.o.pattern={compiler.path}{compiler.cpp.cmd} {compiler.cpp.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={ide.version} {build.extra_flags} {compiler.libsam.c.flags} {includes} {source_file} -o {object_file} ## Create archives -recipe.ar.pattern={toolchain_path}{compiler.ar.cmd} {compiler.ar.flags} {build_path}{archive_file} {object_file} +recipe.ar.pattern={compiler.path}{compiler.ar.cmd} {compiler.ar.flags} {build.path}/{archive_file} {object_file} ## Combine gc-sections, archives, and objects -recipe.c.combine.pattern={toolchain_path}{compiler.c.elf.cmd} {compiler.c.elf.flags} -mcpu={build.mcu} -T{variant_path}{build.ldscript} -Wl,-Map,{build_path}{project_name}.map -o {build_path}{project_name}.elf -L{build_path} -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group {object_files} {variant_path}libsam_sam3u4e_gcc_rel.a {build_path}{archive_file} -Wl,--end-group +recipe.c.combine.pattern={compiler.path}{compiler.c.elf.cmd} {compiler.c.elf.flags} -mcpu={build.mcu} -T{build.variant.path}/{build.ldscript} -Wl,-Map,{build.path}/{project_name}.map -o {build.path}/{project_name}.elf -L{build.path} -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group {object_files} {build.variant.path}/libsam_sam3u4e_gcc_rel.a {build.path}/{archive_file} -Wl,--end-group ## Create eeprom recipe.objcopy.eep.pattern= ## Create hex -recipe.objcopy.hex.pattern={toolchain_path}{compiler.elf2hex.cmd} {compiler.elf2hex.flags} {build_path}{project_name}.elf {build_path}{project_name}.bin +recipe.objcopy.hex.pattern={compiler.path}{compiler.elf2hex.cmd} {compiler.elf2hex.flags} {build.path}/{project_name}.elf {build.path}/{project_name}.bin ## Compute Size -#recipe.size.pattern={toolchain_path}{1} {2}.elf +#recipe.size.pattern={compiler.path}{1} {2}.elf