2011-12-30 15:46:04 +01:00
|
|
|
|
2011-12-31 14:32:48 +01:00
|
|
|
# AVR compile variables
|
|
|
|
# ---------------------
|
2011-12-30 15:46:04 +01:00
|
|
|
|
|
|
|
name=Arduino
|
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
|
2011-12-31 14:32:48 +01:00
|
|
|
compiler.S.flags=-c -g -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
|
2011-12-30 15:46:04 +01:00
|
|
|
|
2011-12-31 14:32:48 +01:00
|
|
|
# AVR compile patterns
|
|
|
|
# --------------------
|
|
|
|
|
|
|
|
## Compile c files
|
2012-05-23 09:22:52 +02:00
|
|
|
recipe.c.o.pattern={compiler.path}{compiler.c.cmd} {compiler.c.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} {build.extra_flags} {includes} {source_file} -o {object_file}
|
2011-12-31 14:32:48 +01:00
|
|
|
|
|
|
|
## Compile c++ files
|
2012-05-23 09:22:52 +02:00
|
|
|
recipe.cpp.o.pattern={compiler.path}{compiler.cpp.cmd} {compiler.cpp.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} {build.extra_flags} {includes} {source_file} -o {object_file}
|
2011-12-31 14:32:48 +01:00
|
|
|
|
|
|
|
## Create archives
|
2012-01-13 20:39:48 +01: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-02-01 14:34:29 +01: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-02-01 14:34:29 +01: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-02-01 14:34:29 +01: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
|
|
|
|
recipe.size.pattern={compiler.path}{compiler.size.cmd} -A {build.path}/{build.project_name}.hex
|
|
|
|
recipe.size.regex=Total\s+([0-9]+).*
|
|
|
|
|
2011-12-31 14:32:48 +01:00
|
|
|
|
2012-02-01 14:34:29 +01:00
|
|
|
# AVR Uploader/Programmers tools
|
|
|
|
# -------------------
|
|
|
|
|
2012-02-05 23:17:15 +01:00
|
|
|
tools.avrdude.cmd=avrdude
|
|
|
|
tools.avrdude.path={runtime.ide.path}/hardware/tools
|
|
|
|
tools.avrdude.config.path={path}/avrdude.conf
|
|
|
|
|
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-02-05 23:17:15 +01:00
|
|
|
tools.avrdude.upload.pattern={path}/{cmd} -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-02-05 23:17:15 +01:00
|
|
|
tools.avrdude.program.pattern={path}/{cmd} -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-02-05 23:17:15 +01:00
|
|
|
tools.avrdude.bootloader.params.verbose=-v -v -v -v
|
|
|
|
tools.avrdude.bootloader.params.quiet=-q -q
|
|
|
|
tools.avrdude.bootloader.pattern={path}/{cmd} -C{config.path} {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params} {bootloader.params}
|