Platform and Boards

This commit is contained in:
Richard Wackerbarth 2015-05-12 12:10:00 -05:00
parent 1d8f61ca8a
commit 1b707a7cf7
3 changed files with 199 additions and 1 deletions

View File

@ -1,4 +1,5 @@
# See: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
# See: http://code.google.com/p/arduino/wiki/Platforms
##############################################################
@ -70,3 +71,89 @@ sanguino.menu.cpu.atmega1284.bootloader.file=ATmegaBOOT_168_atmega1284p.hex
sanguino.menu.cpu.atmega1284m=ATmega1284p 20MHz
sanguino.menu.cpu.atmega1284m.bootloader.file=ATmegaBOOT_168_atmega1284p.hex
sanguino.menu.cpu.atmega1284m.build.f_cpu=20000000L
########################################
## Brainwave
########################################
Brainwave.name=Brainwave
Brainwave.bootloader.tool=avrdude
Brainwave.bootloader.low_fuses=0xFF
Brainwave.bootloader.high_fuses=0x99
Brainwave.bootloader.extended_fuses=0xF0
Brainwave.bootloader.unlock_bits=0x3F
Brainwave.bootloader.lock_bits=0x02F
Brainwave.bootloader.path=brainwave
Brainwave.bootloader.file=Brainwave-646-LUFA.hex
Brainwave.upload.tool=avrdude
Brainwave.upload.protocol=avr109
Brainwave.upload.maximum_size=61440
Brainwave.upload.speed=115200
Brainwave.upload.disable_flushing=true
Brainwave.build.mcu=at90usb646
Brainwave.build.f_cpu=16000000L
Brainwave.build.core=brainwave
Brainwave.build.dependency=true
Brainwave.build.variant=brainwave
Brainwave.build.vid=0x16D0
Brainwave.build.pid=0x076B
########################################
## BrainwavePro
########################################
BrainwavePro.name=Brainwave Pro
BrainwavePro.bootloader.tool=avrdude
BrainwavePro.bootloader.low_fuses=0xFF
BrainwavePro.bootloader.high_fuses=0x9B
BrainwavePro.bootloader.extended_fuses=0xF0
BrainwavePro.bootloader.unlock_bits=0x3F
BrainwavePro.bootloader.lock_bits=0x02F
BrainwavePro.bootloader.path=brainwave
BrainwavePro.bootloader.file=BrainwavePro-1286-LUFA.hex
BrainwavePro.upload.tool=avrdude
BrainwavePro.upload.protocol=avr109
BrainwavePro.upload.maximum_size=126976
BrainwavePro.upload.speed=115200
BrainwavePro.upload.disable_flushing=true
BrainwavePro.build.mcu=at90usb1286
BrainwavePro.build.f_cpu=16000000L
BrainwavePro.build.core=brainwave
BrainwavePro.build.dependency=true
BrainwavePro.build.variant=brainwavepro
BrainwavePro.build.vid=0x16D0
BrainwavePro.build.pid=0x076B
BrainwavePro.build.extra_flags=-DAT90USBxx_TEENSYPP_ASSIGNMENTS -DUSB_VID={build.vid} -DUSB_PID={build.pid}
########################################
## KosselPro -- BrainwavePro with HID boot
########################################
KosselPro.name=Kossel Pro (HID Bootloader)
KosselPro.bootloader.tool=avrdude
KosselPro.bootloader.low_fuses=0xFF
KosselPro.bootloader.high_fuses=0x9B
KosselPro.bootloader.extended_fuses=0xF0
KosselPro.bootloader.unlock_bits=0x3F
KosselPro.bootloader.lock_bits=0x02F
KosselPro.bootloader.path=brainwave
KosselPro.bootloader.file=BootloaderHID.hex
KosselPro.upload.tool=hidloader
KosselPro.upload.protocol=halfkay
KosselPro.upload.maximum_size=126976
KosselPro.upload.speed=115200
KosselPro.upload.disable_flushing=true
KosselPro.build.mcu=at90usb1286
KosselPro.build.f_cpu=16000000L
KosselPro.build.core=brainwave
KosselPro.build.dependency=true
KosselPro.build.variant=brainwavepro
KosselPro.build.vid=0x16D0
KosselPro.build.pid=0x076B
KosselPro.build.extra_flags=-DAT90USBxx_TEENSYPP_ASSIGNMENTS -DUSB_VID={build.vid} -DUSB_PID={build.pid}

View File

@ -1 +1,2 @@
compiler.cpp.extra_flags=-DHAS_AUTOMATIC_VERSIONING
recipe.hooks.prebuild.pattern=/usr/local/bin/generate_version_header_for_marlin {build.source.path} {build.path}/_Version.h

View File

@ -1,5 +1,5 @@
# Marlin AVR Core and platform.
# Arduino AVR Core and platform.
# ------------------------------
# For more info:
@ -7,3 +7,113 @@
name=Marlin AVR Boards
version=1.5.6
# 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
# -w flag added to avoid printing a wrong warning http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59396
# This is fixed in gcc 4.8.3 and will be removed as soon as we update the toolchain
compiler.c.elf.flags=-w -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 -fno-threadsafe-statics -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=
# 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=
# 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} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
## Compile c++ files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {compiler.cpp.extra_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} {compiler.S.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
## Create archives
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_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} {compiler.c.elf.extra_flags} -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} {compiler.objcopy.eep.extra_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} {compiler.elf2hex.extra_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.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.upload.params.verbose=-v
tools.avrdude.upload.params.quiet=-q -q
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"
tools.avrdude.program.params.verbose=-v
tools.avrdude.program.params.quiet=-q -q
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"
tools.avrdude.erase.params.verbose=-v
tools.avrdude.erase.params.quiet=-q -q
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
tools.avrdude.bootloader.params.verbose=-v
tools.avrdude.bootloader.params.quiet=-q -q
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.path}/{bootloader.file}:i" -Ulock:w:{bootloader.lock_bits}:m
tools.hidloader.cmd.path=/usr/local/bin/HIDUploader
tools.hidloader.upload.params.verbose=-v
tools.hidloader.upload.params.quiet=
tools.hidloader.upload.pattern="{cmd.path}" --upload -mmcu={build.mcu} {upload.verbose} -w "{build.path}/{build.project_name}.hex"
tools.nativehid.program.params.verbose=-v
tools.nativehid.program.params.quiet=-q -q
tools.hidloader.program.params.verbose=-v
tools.hidloader.program.params.quiet=-q -q
tools.hidloader.program.pattern="{cmd.path}" -mmcu={build.mcu} {upload.verbose} -w "{build.path}/{build.project_name}.hex"
tools.hidloader.erase.params.verbose=-v
tools.hidloader.erase.params.quiet=-q -q
tools.hidloader.erase.pattern="{cmd.path}" --erase "-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
# 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=-DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'