1- # Spark Board Contribution Platform Configuration
2- #
3- # For more information see:
4- # * https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
5- # * https://github.com/arduino/Arduino/wiki/Arduino-Hardware-Cores-migration-guide-from-1.0-to-1.6
1+
2+ # Arduino AVR Core and platform.
3+ # ------------------------------
64#
7- name=SparkFun Boards
8- version=1.0.0
5+ # For more info:
6+ # https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification
7+
8+ name=Arduino AVR Boards
9+ version=1.6.19
10+
11+ # AVR compile variables
12+ # ---------------------
13+
14+ compiler.warning_flags=-w
15+ compiler.warning_flags.none=-w
16+ compiler.warning_flags.default=
17+ compiler.warning_flags.more=-Wall
18+ compiler.warning_flags.all=-Wall -Wextra
19+
20+ # Default "compiler.path" is correct, change only if you want to override the initial value
21+ compiler.path={runtime.tools.avr-gcc.path}/bin/
22+ compiler.c.cmd=avr-gcc
23+ compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects
24+ compiler.c.elf.flags={compiler.warning_flags} -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections
25+ compiler.c.elf.cmd=avr-gcc
26+ compiler.S.flags=-c -g -x assembler-with-cpp -flto -MMD
27+ compiler.cpp.cmd=avr-g++
28+ compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto
29+ compiler.ar.cmd=avr-gcc-ar
30+ compiler.ar.flags=rcs
31+ compiler.objcopy.cmd=avr-objcopy
32+ compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
33+ compiler.elf2hex.flags=-O ihex -R .eeprom
34+ compiler.elf2hex.cmd=avr-objcopy
35+ compiler.ldflags=
36+ compiler.size.cmd=avr-size
37+
38+ # This can be overridden in boards.txt
39+ build.extra_flags=
40+
41+ # These can be overridden in platform.local.txt
42+ compiler.c.extra_flags=
43+ compiler.c.elf.extra_flags=
44+ compiler.S.extra_flags=
45+ compiler.cpp.extra_flags=
46+ compiler.ar.extra_flags=
47+ compiler.objcopy.eep.extra_flags=
48+ compiler.elf2hex.extra_flags=
49+
50+ # AVR compile patterns
51+ # --------------------
52+
53+ ## Compile c files
54+ recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
55+
56+ ## Compile c++ files
57+ recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
58+
59+ ## Compile S files
60+ recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.S.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
61+
62+ ## Create archives
63+ # archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value
64+ archive_file_path={build.path}/{archive_file}
65+ recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
66+
67+ ## Combine gc-sections, archives, and objects
68+ recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm
69+
70+ ## Create output files (.eep and .hex)
71+ recipe.objcopy.eep.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.objcopy.eep.flags} {compiler.objcopy.eep.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.eep"
72+ recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
73+
74+ ## Save hex
75+ recipe.output.tmp_file={build.project_name}.hex
76+ recipe.output.save_file={build.project_name}.{build.variant}.hex
77+
78+ ## Compute size
79+ recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
80+ recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).*
81+ recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
82+ recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*
83+
84+ ## Preprocessor
85+ preproc.includes.flags=-w -x c++ -M -MG -MP
86+ recipe.preproc.includes="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {preproc.includes.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}"
87+
88+ preproc.macros.flags=-w -x c++ -E -CC
89+ recipe.preproc.macros="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {preproc.macros.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{preprocessed_file_path}"
990
1091# AVR Uploader/Programmers tools
1192# ------------------------------
1293tools.avrdude.path={runtime.tools.avrdude.path}
1394tools.avrdude.cmd.path={path}/bin/avrdude
14- tools.avrdude.config.path={runtime.platform.path}/avrdude.conf
95+ tools.avrdude.config.path={path}/etc/avrdude.conf
96+
97+ tools.avrdude.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
1598
1699tools.avrdude.upload.params.verbose=-v
17100tools.avrdude.upload.params.quiet=-q -q
18- tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i"
101+ # tools.avrdude.upload.verify is needed for backwards compatibility with IDE 1.6.8 or older, IDE 1.6.9 or newer overrides this value
102+ tools.avrdude.upload.verify=
103+ tools.avrdude.upload.params.noverify=-V
104+ tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} {upload.verify} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i"
19105
20106tools.avrdude.program.params.verbose=-v
21107tools.avrdude.program.params.quiet=-q -q
22- tools.avrdude.program.pattern="{cmd.path}" "-C{config.path}" {program.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{build.path}/{build.project_name}.hex:i"
108+ # tools.avrdude.program.verify is needed for backwards compatibility with IDE 1.6.8 or older, IDE 1.6.9 or newer overrides this value
109+ tools.avrdude.program.verify=
110+ tools.avrdude.program.params.noverify=-V
111+ tools.avrdude.program.pattern="{cmd.path}" "-C{config.path}" {program.verbose} {program.verify} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{build.path}/{build.project_name}.hex:i"
23112
24113tools.avrdude.erase.params.verbose=-v
25114tools.avrdude.erase.params.quiet=-q -q
@@ -29,8 +118,12 @@ tools.avrdude.bootloader.params.verbose=-v
29118tools.avrdude.bootloader.params.quiet=-q -q
30119tools.avrdude.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{runtime.platform.path}/bootloaders/{bootloader.file}:i" -Ulock:w:{bootloader.lock_bits}:m
31120
121+ tools.avrdude_remote.upload.pattern=/usr/bin/run-avrdude /tmp/sketch.hex {upload.verbose} -p{build.mcu}
122+
123+ tools.avrdude.upload.network_pattern="{network_cmd}" -address {serial.port} -port {upload.network.port} -sketch "{build.path}/{build.project_name}.hex" -upload {upload.network.endpoint_upload} -sync {upload.network.endpoint_sync} -reset {upload.network.endpoint_reset} -sync_exp {upload.network.sync_return}
124+
32125# USB Default Flags
33- # Default blank usb manufacturer will be filled it at compile time
126+ # Default blank usb manufacturer will be filled in at compile time
34127# - from numeric vendor ID, set to Unknown otherwise
35128build.usb_manufacturer="Unknown"
36129build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'
0 commit comments