2011-06-06 18:57:11 -07:00
|
|
|
|
2013-03-21 01:20:29 -07:00
|
|
|
# Arduino AVR Core and platform.
|
|
|
|
# ------------------------------
|
2015-04-13 03:22:37 -07:00
|
|
|
#
|
2013-03-21 01:20:29 -07:00
|
|
|
# For more info:
|
2015-07-31 15:54:22 -07:00
|
|
|
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification
|
2013-03-21 01:20:29 -07:00
|
|
|
|
|
|
|
name=Arduino AVR Boards
|
2016-08-05 05:41:08 -07:00
|
|
|
version=1.6.13
|
2013-03-21 01:20:29 -07:00
|
|
|
|
2011-12-31 05:32:48 -08:00
|
|
|
# AVR compile variables
|
2016-03-15 15:42:16 -07:00
|
|
|
# ---------------------
|
2011-06-06 18:57:11 -07:00
|
|
|
|
2015-04-24 00:06:30 -07:00
|
|
|
compiler.warning_flags=-w
|
2015-04-13 03:22:37 -07:00
|
|
|
compiler.warning_flags.none=-w
|
2015-04-13 08:18:23 -07:00
|
|
|
compiler.warning_flags.default=
|
|
|
|
compiler.warning_flags.more=-Wall
|
|
|
|
compiler.warning_flags.all=-Wall -Wextra
|
2015-04-13 03:22:37 -07:00
|
|
|
|
2016-03-15 15:42:16 -07:00
|
|
|
# Default "compiler.path" is correct, change only if you want to override the initial value
|
2015-03-13 08:07:21 -07:00
|
|
|
compiler.path={runtime.tools.avr-gcc.path}/bin/
|
2011-12-30 06:46:04 -08:00
|
|
|
compiler.c.cmd=avr-gcc
|
2016-06-16 04:05:24 -07:00
|
|
|
compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects
|
2016-07-25 05:56:35 -07:00
|
|
|
compiler.c.elf.flags={compiler.warning_flags} -Os -flto -fuse-linker-plugin -Wl,--gc-sections
|
2011-12-30 06:46:04 -08:00
|
|
|
compiler.c.elf.cmd=avr-gcc
|
2016-06-16 04:05:24 -07:00
|
|
|
compiler.S.flags=-c -g -x assembler-with-cpp -flto
|
2011-12-30 06:46:04 -08:00
|
|
|
compiler.cpp.cmd=avr-g++
|
2016-06-16 04:05:24 -07:00
|
|
|
compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto
|
|
|
|
compiler.ar.cmd=avr-gcc-ar
|
2011-12-30 06:46:04 -08:00
|
|
|
compiler.ar.flags=rcs
|
|
|
|
compiler.objcopy.cmd=avr-objcopy
|
2011-12-31 05:32:48 -08:00
|
|
|
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
|
|
|
|
compiler.elf2hex.flags=-O ihex -R .eeprom
|
2011-12-30 06:46:04 -08:00
|
|
|
compiler.elf2hex.cmd=avr-objcopy
|
|
|
|
compiler.ldflags=
|
2012-02-05 15:51:24 -08:00
|
|
|
compiler.size.cmd=avr-size
|
2014-04-04 02:31:50 -07:00
|
|
|
|
2016-03-15 15:42:16 -07:00
|
|
|
# This can be overridden in boards.txt
|
2012-06-25 15:52:05 -07:00
|
|
|
build.extra_flags=
|
2011-06-06 18:57:11 -07:00
|
|
|
|
2014-04-04 02:31:50 -07:00
|
|
|
# These can be overridden in platform.local.txt
|
|
|
|
compiler.c.extra_flags=
|
|
|
|
compiler.c.elf.extra_flags=
|
|
|
|
compiler.S.extra_flags=
|
|
|
|
compiler.cpp.extra_flags=
|
|
|
|
compiler.ar.extra_flags=
|
|
|
|
compiler.objcopy.eep.extra_flags=
|
|
|
|
compiler.elf2hex.extra_flags=
|
|
|
|
|
2011-12-31 05:32:48 -08:00
|
|
|
# AVR compile patterns
|
|
|
|
# --------------------
|
|
|
|
|
|
|
|
## Compile c files
|
2014-04-04 02:31:50 -07:00
|
|
|
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}"
|
2011-12-31 05:32:48 -08:00
|
|
|
|
|
|
|
## Compile c++ files
|
2014-04-04 02:31:50 -07:00
|
|
|
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}"
|
2011-12-31 05:32:48 -08:00
|
|
|
|
2013-07-12 12:09:45 -07:00
|
|
|
## Compile S files
|
2014-04-04 02:31:50 -07:00
|
|
|
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}"
|
2013-07-12 12:09:45 -07:00
|
|
|
|
2011-12-31 05:32:48 -08:00
|
|
|
## Create archives
|
2016-04-04 10:27:47 -07:00
|
|
|
# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value
|
2016-03-22 03:31:10 -07:00
|
|
|
archive_file_path={build.path}/{archive_file}
|
2015-09-24 02:28:02 -07:00
|
|
|
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
|
2011-12-31 05:32:48 -08:00
|
|
|
|
|
|
|
## Combine gc-sections, archives, and objects
|
2015-09-18 02:21:13 -07:00
|
|
|
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
|
2011-12-31 05:32:48 -08:00
|
|
|
|
2015-02-16 05:06:20 -08:00
|
|
|
## Create output files (.eep and .hex)
|
2015-09-18 02:21:13 -07:00
|
|
|
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"
|
|
|
|
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"
|
2011-12-31 05:32:48 -08:00
|
|
|
|
2015-01-22 19:00:46 -08:00
|
|
|
## Save hex
|
2015-02-09 14:24:48 -08:00
|
|
|
recipe.output.tmp_file={build.project_name}.hex
|
|
|
|
recipe.output.save_file={build.project_name}.{build.variant}.hex
|
2015-01-22 19:00:46 -08:00
|
|
|
|
2012-02-05 15:51:24 -08:00
|
|
|
## Compute size
|
2015-09-18 02:21:13 -07:00
|
|
|
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
2013-04-22 17:48:22 -07:00
|
|
|
recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).*
|
|
|
|
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
|
|
|
|
recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*
|
2012-02-05 15:51:24 -08:00
|
|
|
|
2015-09-15 03:15:48 -07:00
|
|
|
## Preprocessor
|
|
|
|
preproc.includes.flags=-w -x c++ -M -MG -MP
|
2015-09-18 04:32:25 -07:00
|
|
|
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}"
|
2015-09-15 03:15:48 -07:00
|
|
|
|
|
|
|
preproc.macros.flags=-w -x c++ -E -CC
|
2015-11-18 00:34:33 -08:00
|
|
|
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}"
|
2011-12-31 05:32:48 -08:00
|
|
|
|
2012-02-01 05:34:29 -08:00
|
|
|
# AVR Uploader/Programmers tools
|
2013-03-21 01:20:29 -07:00
|
|
|
# ------------------------------
|
2012-02-01 05:34:29 -08:00
|
|
|
|
2015-03-02 08:28:55 -08:00
|
|
|
tools.avrdude.path={runtime.tools.avrdude.path}
|
2015-03-02 08:41:37 -08:00
|
|
|
tools.avrdude.cmd.path={path}/bin/avrdude
|
|
|
|
tools.avrdude.config.path={path}/etc/avrdude.conf
|
2012-02-05 14:17:15 -08:00
|
|
|
|
2014-04-10 02:54:25 -07:00
|
|
|
tools.avrdude.upload.params.verbose=-v
|
2012-02-01 05:34:29 -08:00
|
|
|
tools.avrdude.upload.params.quiet=-q -q
|
2016-04-15 13:15:34 -07:00
|
|
|
tools.avrdude.upload.params.noverify=-V
|
|
|
|
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"
|
2012-02-01 05:34:29 -08:00
|
|
|
|
2014-04-10 02:54:25 -07:00
|
|
|
tools.avrdude.program.params.verbose=-v
|
2012-02-01 05:34:29 -08:00
|
|
|
tools.avrdude.program.params.quiet=-q -q
|
2016-04-15 13:15:34 -07:00
|
|
|
tools.avrdude.program.params.noverify=-V
|
|
|
|
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"
|
2011-12-31 05:32:48 -08:00
|
|
|
|
2014-04-10 02:54:25 -07:00
|
|
|
tools.avrdude.erase.params.verbose=-v
|
2012-05-25 08:31:55 -07:00
|
|
|
tools.avrdude.erase.params.quiet=-q -q
|
2012-11-03 17:05:54 -07:00
|
|
|
tools.avrdude.erase.pattern="{cmd.path}" "-C{config.path}" {erase.verbose} -p{build.mcu} -c{protocol} {program.extra_params} -e -Ulock:w:{bootloader.unlock_bits}:m -Uefuse:w:{bootloader.extended_fuses}:m -Uhfuse:w:{bootloader.high_fuses}:m -Ulfuse:w:{bootloader.low_fuses}:m
|
2012-05-25 08:31:55 -07:00
|
|
|
|
2014-04-10 02:54:25 -07:00
|
|
|
tools.avrdude.bootloader.params.verbose=-v
|
2012-02-05 14:17:15 -08:00
|
|
|
tools.avrdude.bootloader.params.quiet=-q -q
|
2014-01-05 03:42:27 -08:00
|
|
|
tools.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
|
2012-05-25 02:47:22 -07:00
|
|
|
|
2016-04-05 09:11:40 -07:00
|
|
|
tools.avrdude_remote.upload.pattern=/usr/bin/run-avrdude /tmp/sketch.hex {upload.verbose} -p{build.mcu}
|
2013-04-24 00:49:24 -07:00
|
|
|
|
|
|
|
# USB Default Flags
|
2016-03-15 15:42:16 -07:00
|
|
|
# Default blank usb manufacturer will be filled in at compile time
|
2013-04-24 00:49:24 -07:00
|
|
|
# - from numeric vendor ID, set to Unknown otherwise
|
2015-03-06 03:46:21 -08:00
|
|
|
build.usb_manufacturer="Unknown"
|
2013-08-01 06:20:24 -07:00
|
|
|
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'
|