Skip to content

Commit b4ba455

Browse files
committed
Factored out some common build variables
1 parent 3c68dd4 commit b4ba455

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

platform.txt

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
name=Arduino
66
# Default "compiler.path" is correct, change only if you want to overidde the initial value
7-
#compiler.path={0}/hardware/tools/avr/bin/
7+
#compiler.path={ide.path}/tools/avr/bin/..
88
compiler.c.cmd=avr-gcc
99
compiler.c.flags=-c -g -Os -w -ffunction-sections -fdata-sections
1010
compiler.c.elf.flags=-Os -Wl,--gc-sections
@@ -26,22 +26,22 @@ compiler.upload.flags=
2626
# --------------------
2727

2828
## Compile c files
29-
recipe.c.o.pattern={toolchain_path}{compiler.c.cmd} {compiler.c.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={ide_version} {includes} {source_file} -o {object_file}
29+
recipe.c.o.pattern={compiler.path}{compiler.c.cmd} {compiler.c.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={ide.version} {includes} {source_file} -o {object_file}
3030

3131
## Compile c++ files
32-
recipe.cpp.o.pattern={toolchain_path}{compiler.cpp.cmd} {compiler.cpp.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={ide_version} {includes} {source_file} -o {object_file}
32+
recipe.cpp.o.pattern={compiler.path}{compiler.cpp.cmd} {compiler.cpp.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={ide.version} {includes} {source_file} -o {object_file}
3333

3434
## Create archives
35-
recipe.ar.pattern={toolchain_path}{compiler.ar.cmd} {compiler.ar.flags} {build_path}{archive_file} {object_file}
35+
recipe.ar.pattern={compiler.path}{compiler.ar.cmd} {compiler.ar.flags} {build.path}/{archive_file} {object_file}
3636

3737
## Combine gc-sections, archives, and objects
38-
recipe.c.combine.pattern={toolchain_path}{compiler.c.elf.cmd} {compiler.c.elf.flags} -mmcu={build.mcu} -o {build_path}{project_name}.elf {object_files} {build_path}{archive_file} -L{build_path} -lm
38+
recipe.c.combine.pattern={compiler.path}{compiler.c.elf.cmd} {compiler.c.elf.flags} -mmcu={build.mcu} -o {build.path}/{project_name}.elf {object_files} {build.path}/{archive_file} -L{build.path} -lm
3939

4040
## Create eeprom
41-
recipe.objcopy.eep.pattern={toolchain_path}{compiler.objcopy.cmd} {compiler.objcopy.eep.flags} {build_path}{project_name}.elf {build_path}{project_name}.eep
41+
recipe.objcopy.eep.pattern={compiler.path}{compiler.objcopy.cmd} {compiler.objcopy.eep.flags} {build.path}/{project_name}.elf {build.path}/{project_name}.eep
4242

4343
## Create hex
44-
recipe.objcopy.hex.pattern={toolchain_path}{compiler.elf2hex.cmd} {compiler.elf2hex.flags} {build_path}{project_name}.elf {build_path}{project_name}.hex
44+
recipe.objcopy.hex.pattern={compiler.path}{compiler.elf2hex.cmd} {compiler.elf2hex.flags} {build.path}/{project_name}.elf {build.path}/{project_name}.hex
4545

4646

4747

0 commit comments

Comments
 (0)