mirror of
https://github.com/digistump/DigistumpArduino.git
synced 2025-04-27 23:29:01 -07:00
80 lines
3.8 KiB
Plaintext
80 lines
3.8 KiB
Plaintext
![]() |
|
||
|
# Arduino AVR Core and platform.
|
||
|
# ------------------------------
|
||
|
|
||
|
# For more info:
|
||
|
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
|
||
|
|
||
|
name=Digistump AVR Boards
|
||
|
version=1.5.4
|
||
|
|
||
|
# AVR compile variables
|
||
|
# ---------------------
|
||
|
|
||
|
# Default "compiler.path" is correct, change only if you want to overidde the initial value
|
||
|
compiler.path={runtime.ide.path}/hardware/tools/avr/bin/
|
||
|
compiler.c.cmd=avr-gcc
|
||
|
compiler.c.flags=-c -g -Os -w -ffunction-sections -fdata-sections -MMD
|
||
|
compiler.c.elf.flags=-Os -Wl,--gc-sections
|
||
|
compiler.c.elf.cmd=avr-gcc
|
||
|
compiler.S.flags=-c -g -x assembler-with-cpp
|
||
|
compiler.cpp.cmd=avr-g++
|
||
|
compiler.cpp.flags=-c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD
|
||
|
compiler.ar.cmd=avr-ar
|
||
|
compiler.ar.flags=rcs
|
||
|
compiler.objcopy.cmd=avr-objcopy
|
||
|
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
|
||
|
compiler.elf2hex.cmd=avr-objcopy
|
||
|
compiler.ldflags=
|
||
|
compiler.size.cmd=avr-size
|
||
|
# this can be overriden in boards.txt
|
||
|
build.extra_flags=
|
||
|
|
||
|
# AVR compile patterns
|
||
|
# --------------------
|
||
|
|
||
|
## Compile c files
|
||
|
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}"
|
||
|
|
||
|
## Compile c++ files
|
||
|
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}"
|
||
|
|
||
|
## 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}"
|
||
|
|
||
|
## Create archives
|
||
|
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{build.path}/{archive_file}" "{object_file}"
|
||
|
|
||
|
## Combine gc-sections, archives, and objects
|
||
|
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
|
||
|
|
||
|
## Create eeprom
|
||
|
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"
|
||
|
|
||
|
## Create hex
|
||
|
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
|
||
|
|
||
|
## Compute size
|
||
|
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]+).*
|
||
|
|
||
|
|
||
|
# AVR Uploader/Programmers tools
|
||
|
# ------------------------------
|
||
|
|
||
|
tools.micronucleus.cmd.path={sketchbook.path}/hardware/digistump/avr/tools/avrdude
|
||
|
tools.micronucleus.cmd.path.linux={sketchbook.path}/hardware/digistump/avr/tools/avrdude
|
||
|
|
||
|
tools.micronucleus.upload.params.verbose=-v
|
||
|
tools.micronucleus.upload.params.quiet=-q
|
||
|
#tools.micronucleus.upload.pattern="{cmd.path}" --run --timeout 60 "{build.path}/{build.project_name}.hex"
|
||
|
tools.micronucleus.upload.pattern="{cmd.path}" -cdigispark --timeout 60 -Uflash:w:{build.path}/{build.project_name}.hex:i
|
||
|
|
||
|
# 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=
|
||
|
build.usb_flags=
|