2011-12-30 15:46:04 +01:00
|
|
|
|
2013-03-21 09:20:29 +01:00
|
|
|
# Arduino AVR Core and platform.
|
|
|
|
# ------------------------------
|
|
|
|
|
|
|
|
# For more info:
|
|
|
|
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
|
|
|
|
|
|
|
|
name=Arduino AVR Boards
|
2014-02-19 18:14:31 +01:00
|
|
|
version=1.5.6
|
2013-03-21 09:20:29 +01:00
|
|
|
|
2011-12-31 14:32:48 +01:00
|
|
|
# AVR compile variables
|
|
|
|
# ---------------------
|
2011-12-30 15:46:04 +01:00
|
|
|
|
2011-12-31 14:32:48 +01:00
|
|
|
# Default "compiler.path" is correct, change only if you want to overidde the initial value
|
2012-01-13 20:39:48 +01:00
|
|
|
#compiler.path={ide.path}/tools/avr/bin/..
|
2011-12-30 15:46:04 +01:00
|
|
|
compiler.c.cmd=avr-gcc
|
2012-05-23 09:22:52 +02:00
|
|
|
compiler.c.flags=-c -g -Os -w -ffunction-sections -fdata-sections -MMD
|
2011-12-31 14:32:48 +01:00
|
|
|
compiler.c.elf.flags=-Os -Wl,--gc-sections
|
2011-12-30 15:46:04 +01:00
|
|
|
compiler.c.elf.cmd=avr-gcc
|
2014-01-21 21:57:35 +01:00
|
|
|
compiler.S.flags=-c -g -x assembler-with-cpp
|
2011-12-30 15:46:04 +01:00
|
|
|
compiler.cpp.cmd=avr-g++
|
2012-05-23 09:22:52 +02:00
|
|
|
compiler.cpp.flags=-c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD
|
2011-12-30 15:46:04 +01:00
|
|
|
compiler.ar.cmd=avr-ar
|
|
|
|
compiler.ar.flags=rcs
|
|
|
|
compiler.objcopy.cmd=avr-objcopy
|
2011-12-31 14:32:48 +01: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 15:46:04 +01:00
|
|
|
compiler.elf2hex.cmd=avr-objcopy
|
|
|
|
compiler.ldflags=
|
2012-02-06 00:51:24 +01:00
|
|
|
compiler.size.cmd=avr-size
|
2012-06-26 00:52:05 +02:00
|
|
|
# this can be overriden in boards.txt
|
|
|
|
build.extra_flags=
|
2011-12-30 15:46:04 +01:00
|
|
|
|
2011-12-31 14:32:48 +01:00
|
|
|
# AVR compile patterns
|
|
|
|
# --------------------
|
|
|
|
|
|
|
|
## Compile c files
|
2013-03-18 13:14:30 +01: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} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
|
2011-12-31 14:32:48 +01:00
|
|
|
|
|
|
|
## Compile c++ files
|
2013-03-18 13:14:30 +01: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} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
|
2011-12-31 14:32:48 +01:00
|
|
|
|
2013-07-12 21:09:45 +02:00
|
|
|
## Compile S files
|
|
|
|
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} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
|
|
|
|
|
2011-12-31 14:32:48 +01:00
|
|
|
## Create archives
|
2012-05-25 11:47:22 +02:00
|
|
|
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{build.path}/{archive_file}" "{object_file}"
|
2011-12-31 14:32:48 +01:00
|
|
|
|
|
|
|
## Combine gc-sections, archives, and objects
|
2012-05-25 11:47:22 +02:00
|
|
|
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm
|
2011-12-31 14:32:48 +01:00
|
|
|
|
|
|
|
## Create eeprom
|
2012-05-25 11:47:22 +02:00
|
|
|
recipe.objcopy.eep.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.objcopy.eep.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.eep"
|
2011-12-31 14:32:48 +01:00
|
|
|
|
|
|
|
## Create hex
|
2012-05-25 11:47:22 +02:00
|
|
|
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
|
2011-12-31 14:32:48 +01:00
|
|
|
|
2012-02-06 00:51:24 +01:00
|
|
|
## Compute size
|
2013-04-23 02:48:22 +02:00
|
|
|
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
|
|
|
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-06 00:51:24 +01:00
|
|
|
|
2011-12-31 14:32:48 +01:00
|
|
|
|
2012-02-01 14:34:29 +01:00
|
|
|
# AVR Uploader/Programmers tools
|
2013-03-21 09:20:29 +01:00
|
|
|
# ------------------------------
|
2012-02-01 14:34:29 +01:00
|
|
|
|
2012-05-25 18:29:52 +02:00
|
|
|
tools.avrdude.cmd.path={runtime.ide.path}/hardware/tools/avr/bin/avrdude
|
|
|
|
tools.avrdude.config.path={runtime.ide.path}/hardware/tools/avr/etc/avrdude.conf
|
|
|
|
tools.avrdude.cmd.path.linux={runtime.ide.path}/hardware/tools/avrdude
|
|
|
|
tools.avrdude.config.path.linux={runtime.ide.path}/hardware/tools/avrdude.conf
|
2012-02-05 23:17:15 +01:00
|
|
|
|
2012-02-01 14:34:29 +01:00
|
|
|
tools.avrdude.upload.params.verbose=-v -v -v -v
|
|
|
|
tools.avrdude.upload.params.quiet=-q -q
|
2012-11-04 01:05:54 +01:00
|
|
|
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"
|
2012-02-01 14:34:29 +01:00
|
|
|
|
|
|
|
tools.avrdude.program.params.verbose=-v -v -v -v
|
|
|
|
tools.avrdude.program.params.quiet=-q -q
|
2012-11-04 01:05:54 +01:00
|
|
|
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"
|
2011-12-31 14:32:48 +01:00
|
|
|
|
2012-05-25 17:31:55 +02:00
|
|
|
tools.avrdude.erase.params.verbose=-v -v -v -v
|
|
|
|
tools.avrdude.erase.params.quiet=-q -q
|
2012-11-04 01:05:54 +01: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 17:31:55 +02:00
|
|
|
|
2012-02-05 23:17:15 +01:00
|
|
|
tools.avrdude.bootloader.params.verbose=-v -v -v -v
|
|
|
|
tools.avrdude.bootloader.params.quiet=-q -q
|
2014-01-05 12:42:27 +01: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 11:47:22 +02:00
|
|
|
|
2013-04-24 09:49:24 +02:00
|
|
|
|
|
|
|
# USB Default Flags
|
|
|
|
# Default blank usb manufacturer will be filled it at compile time
|
|
|
|
# - from numeric vendor ID, set to Unknown otherwise
|
|
|
|
build.usb_manufacturer=
|
2013-08-01 15:20:24 +02:00
|
|
|
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'
|