Browse Source

Add dfu_programmer to tools.

master
flabbergast 7 years ago
parent
commit
e132bbdaf6
  1. 6
      tools/dfu-programmer.run.sh
  2. 22
      xmega/boards.txt
  3. 2
      xmega/cores/xmega/wiring.c
  4. 7
      xmega/platform.txt
  5. 0
      xmega/variants/xa4u/pins_arduino.h
  6. 0
      xmega/variants/xa4u/serial_init.inc

6
tools/dfu-programmer.run.sh

@ -0,0 +1,6 @@
#!/bin/bash -x
#echo RR$1RR RR$2RR RR$3RR RR$4RR RR$5RR RR$6RR RR$7RR
dfu-programmer $1 erase
dfu-programmer $@
dfu-programmer $1 reset
exit 0

22
xmega/boards.txt

@ -4,19 +4,21 @@ menu.usb=USB Type
##############################################################
x-a4u.name=X-A4U USB stick
xa4u.name=X-A4U USB stick
x-a4u.build.mcu=atxmega128a4u
x-a4u.build.f_cpu=32000000L
x-a4u.build.core=xmega
x-a4u.build.variant=x-a4u
xa4u.build.mcu=atxmega128a4u
xa4u.build.f_cpu=32000000L
xa4u.build.core=xmega
xa4u.build.variant=xa4u
x-a4u.upload.tool=avrdude
x-a4u.upload.protocol=flip2
x-a4u.upload.maximum_size=131072
xa4u.upload.tool=dfu_programmer
#xa4u.upload.tool=avrdude
xa4u.upload.protocol=flip2
xa4u.upload.speed=115200
xa4u.upload.maximum_size=131072
x-a4u.menu.usb.serial=Serial
x-a4u.menu.usb.serial.build.usbtype=USB_SERIAL
xa4u.menu.usb.serial=Serial
xa4u.menu.usb.serial.build.usbtype=USB_SERIAL
##############################################################

2
xmega/cores/xmega/wiring.c

@ -388,7 +388,7 @@ static void initAdc( ADC_t* adc ) {
;
// Some fixes since A4U constants have sometimes different names
#ifndef ADC_REFSEL_GCC_gc
#if defined(__AVR_ATxmega128A4U__)
#define ADC_REFSEL_VCC_gc ADC_REFSEL_INTVCC_gc
#endif

7
xmega/platform.txt

@ -76,3 +76,10 @@ tools.avrdude.bootloader.params.verbose=-v -v -v -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.ide.path}/hardware/arduino/avr/bootloaders/{bootloader.file}:i" -Ulock:w:{bootloader.lock_bits}:m
### dfu-programmer
tools.dfu_programmer.cmd.path={runtime.hardware.path}/tools/dfu-programmer.run.sh
tools.dfu_programmer.upload.params.verbose=--debug 10
tools.dfu_programmer.upload.params.quiet=--quiet
tools.dfu_programmer.upload.pattern="{cmd.path}" {build.mcu} flash {upload.verbose} "{build.path}/{build.project_name}.hex"

0
xmega/variants/x-a4u/pins_arduino.h → xmega/variants/xa4u/pins_arduino.h

0
xmega/variants/x-a4u/serial_init.inc → xmega/variants/xa4u/serial_init.inc

Loading…
Cancel
Save