Skip to content

Commit 43a5ef6

Browse files
committed
Using runtime paths for tools
1 parent 9f0bb5d commit 43a5ef6

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

platform.txt

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,21 @@ version=1.6.2
99
# Compile variables
1010
# -----------------
1111

12-
compiler.path={runtime.ide.path}/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/
12+
compiler.warning_flags=-w
13+
compiler.warning_flags.none=-w
14+
compiler.warning_flags.default=
15+
compiler.warning_flags.more=-Wall
16+
compiler.warning_flags.all=-Wall -Wextra
17+
18+
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
1319
compiler.c.cmd=arm-none-eabi-gcc
14-
compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os -W -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD
20+
compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD
1521
compiler.c.elf.cmd=arm-none-eabi-gcc
1622
compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps
1723
compiler.S.cmd=arm-none-eabi-gcc
1824
compiler.S.flags=-c -g -x assembler-with-cpp
1925
compiler.cpp.cmd=arm-none-eabi-g++
20-
compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os -W -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD
26+
compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD
2127
compiler.ar.cmd=arm-none-eabi-ar
2228
compiler.ar.flags=rcs
2329
compiler.objcopy.cmd=arm-none-eabi-objcopy
@@ -40,7 +46,7 @@ compiler.S.extra_flags=
4046
compiler.ar.extra_flags=
4147
compiler.elf2hex.extra_flags=
4248

43-
compiler.arm.cmsis.path="-I{runtime.ide.path}/hardware/tools/CMSIS/CMSIS/Include/" "-I{runtime.ide.path}/hardware/tools/CMSIS/Device/ATMEL/"
49+
compiler.arm.cmsis.path="-I{runtime.tools.CMSIS.path}/CMSIS/Include/" "-I{runtime.tools.CMSIS.path}/Device/ATMEL/"
4450

4551
# USB Flags
4652
# ---------
@@ -72,6 +78,10 @@ recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}"
7278
## Create output (bin file)
7379
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
7480

81+
## Save hex
82+
recipe.output.tmp_file={build.project_name}.bin
83+
recipe.output.save_file={build.project_name}.{build.variant}.bin
84+
7585
## Compute size
7686
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
7787
recipe.size.regex=\.text\s+([0-9]+).*
@@ -83,9 +93,9 @@ recipe.size.regex=\.text\s+([0-9]+).*
8393
#
8494
# BOSSA
8595
#
96+
tools.bossac.path={runtime.tools.bossac.path}
8697
tools.bossac.cmd=bossac
8798
tools.bossac.cmd.windows=bossac.exe
88-
tools.bossac.path={runtime.ide.path}/hardware/tools/bossac-1.5-arduino
8999

90100
tools.bossac.upload.params.verbose=-i -d
91101
tools.bossac.upload.params.quiet=
@@ -95,9 +105,9 @@ tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.
95105
# OpenOCD sketch upload
96106
#
97107

108+
tools.openocd.path={runtime.tools.openocd.path}
98109
tools.openocd.cmd=bin/openocd
99110
tools.openocd.cmd.windows=bin/openocd.exe
100-
tools.openocd.path={runtime.ide.path}/hardware/tools/OpenOCD-0.9.0-dev-arduino
101111

102112
tools.openocd.upload.params.verbose=-d2
103113
tools.openocd.upload.params.quiet=-d0

0 commit comments

Comments
 (0)