aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--boards.txt597
-rw-r--r--bootloaders/atmega/ATmegaBOOT_168.c1057
-rw-r--r--bootloaders/atmega/ATmegaBOOT_168_atmega1280.hex245
-rw-r--r--bootloaders/atmega/ATmegaBOOT_168_atmega328.hex125
-rw-r--r--bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex124
-rw-r--r--bootloaders/atmega/ATmegaBOOT_168_diecimila.hex126
-rw-r--r--bootloaders/atmega/ATmegaBOOT_168_ng.hex110
-rw-r--r--bootloaders/atmega/ATmegaBOOT_168_pro_8MHz.hex126
-rwxr-xr-xbootloaders/atmega/Makefile238
-rw-r--r--bootloaders/atmega8/ATmegaBOOT-prod-firmware-2009-11-07.hex66
-rw-r--r--bootloaders/atmega8/ATmegaBOOT.c507
-rw-r--r--bootloaders/atmega8/ATmegaBOOT.hex62
-rw-r--r--bootloaders/atmega8/ATmegaBOOT.txt4
-rw-r--r--bootloaders/atmega8/Makefile88
-rw-r--r--bootloaders/bt/ATmegaBOOT_168.c1043
-rw-r--r--bootloaders/bt/ATmegaBOOT_168.hex121
-rw-r--r--bootloaders/bt/ATmegaBOOT_168_atmega328_bt.hex162
-rw-r--r--bootloaders/bt/Makefile108
-rw-r--r--bootloaders/gemma/README.md14
-rw-r--r--bootloaders/gemma/avrdude.conf14389
-rw-r--r--bootloaders/gemma/gemma_v1.hex182
-rw-r--r--bootloaders/gemma/usbconfig.h351
-rw-r--r--bootloaders/gemma/usbconfig.patch24
-rw-r--r--bootloaders/lilypad/LilyPadBOOT_168.hex117
-rw-r--r--bootloaders/lilypad/src/ATmegaBOOT.c977
-rw-r--r--bootloaders/lilypad/src/Makefile83
-rw-r--r--bootloaders/optiboot/Makefile450
-rw-r--r--bootloaders/optiboot/README.TXT81
-rw-r--r--bootloaders/optiboot/boot.h846
-rwxr-xr-xbootloaders/optiboot/makeall20
-rw-r--r--bootloaders/optiboot/omake2
-rw-r--r--bootloaders/optiboot/omake.bat1
-rw-r--r--bootloaders/optiboot/optiboot.c672
-rw-r--r--bootloaders/optiboot/optiboot_atmega168.hex35
-rw-r--r--bootloaders/optiboot/optiboot_atmega168.lst598
-rw-r--r--bootloaders/optiboot/optiboot_atmega328-Mini.hex33
-rw-r--r--bootloaders/optiboot/optiboot_atmega328.hex35
-rw-r--r--bootloaders/optiboot/optiboot_atmega328.lst598
-rw-r--r--bootloaders/optiboot/optiboot_atmega8.hex33
-rw-r--r--bootloaders/optiboot/optiboot_atmega8.lst604
-rw-r--r--bootloaders/optiboot/pin_defs.h80
-rw-r--r--bootloaders/optiboot/stk500.h39
-rw-r--r--bootloaders/stk500v2/License.txt280
-rw-r--r--bootloaders/stk500v2/Makefile587
-rw-r--r--bootloaders/stk500v2/Mega2560-prod-firmware-2011-06-29.hex513
-rw-r--r--bootloaders/stk500v2/STK500V2.pnproj1
-rw-r--r--bootloaders/stk500v2/STK500V2.pnps1
-rw-r--r--bootloaders/stk500v2/avr_cpunames.h189
-rw-r--r--bootloaders/stk500v2/avrinterruptnames.h1040
-rw-r--r--bootloaders/stk500v2/command.h114
-rw-r--r--bootloaders/stk500v2/stk500boot.c2122
-rw-r--r--bootloaders/stk500v2/stk500boot.ppg1
-rw-r--r--bootloaders/stk500v2/stk500boot_v2_mega2560.hex469
-rw-r--r--variants/eightanaloginputs/pins_arduino.h25
-rw-r--r--variants/ethernet/pins_arduino.h254
-rw-r--r--variants/gemma/pins_arduino.h140
-rw-r--r--variants/mega/pins_arduino.h413
-rw-r--r--variants/standard/pins_arduino.h254
58 files changed, 0 insertions, 31576 deletions
diff --git a/boards.txt b/boards.txt
index e2f3707..7fa74a5 100644
--- a/boards.txt
+++ b/boards.txt
@@ -46,239 +46,6 @@ yun.build.extra_flags={build.usb_flags}
##############################################################
-uno.name=Arduino/Genuino Uno
-
-uno.vid.0=0x2341
-uno.pid.0=0x0043
-uno.vid.1=0x2341
-uno.pid.1=0x0001
-uno.vid.2=0x2A03
-uno.pid.2=0x0043
-uno.vid.3=0x2341
-uno.pid.3=0x0243
-
-uno.upload.tool=avrdude
-uno.upload.protocol=arduino
-uno.upload.maximum_size=32256
-uno.upload.maximum_data_size=2048
-uno.upload.speed=115200
-
-uno.bootloader.tool=avrdude
-uno.bootloader.low_fuses=0xFF
-uno.bootloader.high_fuses=0xDE
-uno.bootloader.extended_fuses=0xFD
-uno.bootloader.unlock_bits=0x3F
-uno.bootloader.lock_bits=0x0F
-uno.bootloader.file=optiboot/optiboot_atmega328.hex
-
-uno.build.mcu=atmega328p
-uno.build.f_cpu=16000000L
-uno.build.board=AVR_UNO
-uno.build.core=arduino
-uno.build.variant=standard
-
-##############################################################
-
-diecimila.name=Arduino Duemilanove or Diecimila
-
-diecimila.upload.tool=avrdude
-diecimila.upload.protocol=arduino
-
-diecimila.bootloader.tool=avrdude
-diecimila.bootloader.low_fuses=0xFF
-diecimila.bootloader.unlock_bits=0x3F
-diecimila.bootloader.lock_bits=0x0F
-
-diecimila.build.f_cpu=16000000L
-diecimila.build.board=AVR_DUEMILANOVE
-diecimila.build.core=arduino
-diecimila.build.variant=standard
-
-## Arduino Duemilanove or Diecimila w/ ATmega328P
-## ----------------------------------------------
-diecimila.menu.cpu.atmega328=ATmega328P
-
-diecimila.menu.cpu.atmega328.upload.maximum_size=30720
-diecimila.menu.cpu.atmega328.upload.maximum_data_size=2048
-diecimila.menu.cpu.atmega328.upload.speed=57600
-
-diecimila.menu.cpu.atmega328.bootloader.high_fuses=0xDA
-diecimila.menu.cpu.atmega328.bootloader.extended_fuses=0xFD
-diecimila.menu.cpu.atmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex
-
-diecimila.menu.cpu.atmega328.build.mcu=atmega328p
-
-## Arduino Duemilanove or Diecimila w/ ATmega168
-## ---------------------------------------------
-diecimila.menu.cpu.atmega168=ATmega168
-
-diecimila.menu.cpu.atmega168.upload.maximum_size=14336
-diecimila.menu.cpu.atmega168.upload.maximum_data_size=1024
-diecimila.menu.cpu.atmega168.upload.speed=19200
-
-diecimila.menu.cpu.atmega168.bootloader.high_fuses=0xdd
-diecimila.menu.cpu.atmega168.bootloader.extended_fuses=0xF8
-diecimila.menu.cpu.atmega168.bootloader.file=atmega/ATmegaBOOT_168_diecimila.hex
-
-diecimila.menu.cpu.atmega168.build.mcu=atmega168
-
-##############################################################
-
-nano.name=Arduino Nano
-
-nano.upload.tool=avrdude
-nano.upload.protocol=arduino
-
-nano.bootloader.tool=avrdude
-nano.bootloader.unlock_bits=0x3F
-nano.bootloader.lock_bits=0x0F
-
-nano.build.f_cpu=16000000L
-nano.build.board=AVR_NANO
-nano.build.core=arduino
-nano.build.variant=eightanaloginputs
-
-## Arduino Nano w/ ATmega328P
-## --------------------------
-nano.menu.cpu.atmega328=ATmega328P
-
-nano.menu.cpu.atmega328.upload.maximum_size=30720
-nano.menu.cpu.atmega328.upload.maximum_data_size=2048
-nano.menu.cpu.atmega328.upload.speed=115200
-
-nano.menu.cpu.atmega328.bootloader.low_fuses=0xFF
-nano.menu.cpu.atmega328.bootloader.high_fuses=0xDA
-nano.menu.cpu.atmega328.bootloader.extended_fuses=0xFD
-nano.menu.cpu.atmega328.bootloader.file=optiboot/optiboot_atmega328.hex
-
-nano.menu.cpu.atmega328.build.mcu=atmega328p
-
-## Arduino Nano w/ ATmega328P (old bootloader)
-## --------------------------
-nano.menu.cpu.atmega328old=ATmega328P (Old Bootloader)
-
-nano.menu.cpu.atmega328old.upload.maximum_size=30720
-nano.menu.cpu.atmega328old.upload.maximum_data_size=2048
-nano.menu.cpu.atmega328old.upload.speed=57600
-
-nano.menu.cpu.atmega328old.bootloader.low_fuses=0xFF
-nano.menu.cpu.atmega328old.bootloader.high_fuses=0xDA
-nano.menu.cpu.atmega328old.bootloader.extended_fuses=0xFD
-nano.menu.cpu.atmega328old.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex
-
-nano.menu.cpu.atmega328old.build.mcu=atmega328p
-
-## Arduino Nano w/ ATmega168
-## -------------------------
-nano.menu.cpu.atmega168=ATmega168
-
-nano.menu.cpu.atmega168.upload.maximum_size=14336
-nano.menu.cpu.atmega168.upload.maximum_data_size=1024
-nano.menu.cpu.atmega168.upload.speed=19200
-
-nano.menu.cpu.atmega168.bootloader.low_fuses=0xff
-nano.menu.cpu.atmega168.bootloader.high_fuses=0xdd
-nano.menu.cpu.atmega168.bootloader.extended_fuses=0xF8
-nano.menu.cpu.atmega168.bootloader.file=atmega/ATmegaBOOT_168_diecimila.hex
-
-nano.menu.cpu.atmega168.build.mcu=atmega168
-
-##############################################################
-
-mega.name=Arduino/Genuino Mega or Mega 2560
-
-mega.vid.0=0x2341
-mega.pid.0=0x0010
-mega.vid.1=0x2341
-mega.pid.1=0x0042
-mega.vid.2=0x2A03
-mega.pid.2=0x0010
-mega.vid.3=0x2A03
-mega.pid.3=0x0042
-mega.vid.4=0x2341
-mega.pid.4=0x0210
-mega.vid.5=0x2341
-mega.pid.5=0x0242
-
-mega.upload.tool=avrdude
-mega.upload.maximum_data_size=8192
-
-mega.bootloader.tool=avrdude
-mega.bootloader.low_fuses=0xFF
-mega.bootloader.unlock_bits=0x3F
-mega.bootloader.lock_bits=0x0F
-
-mega.build.f_cpu=16000000L
-mega.build.core=arduino
-mega.build.variant=mega
-# default board may be overridden by the cpu menu
-mega.build.board=AVR_MEGA2560
-
-## Arduino/Genuino Mega w/ ATmega2560
-## -------------------------
-mega.menu.cpu.atmega2560=ATmega2560 (Mega 2560)
-
-mega.menu.cpu.atmega2560.upload.protocol=wiring
-mega.menu.cpu.atmega2560.upload.maximum_size=253952
-mega.menu.cpu.atmega2560.upload.speed=115200
-
-mega.menu.cpu.atmega2560.bootloader.high_fuses=0xD8
-mega.menu.cpu.atmega2560.bootloader.extended_fuses=0xFD
-mega.menu.cpu.atmega2560.bootloader.file=stk500v2/stk500boot_v2_mega2560.hex
-
-mega.menu.cpu.atmega2560.build.mcu=atmega2560
-mega.menu.cpu.atmega2560.build.board=AVR_MEGA2560
-
-## Arduino Mega w/ ATmega1280
-## -------------------------
-mega.menu.cpu.atmega1280=ATmega1280
-
-mega.menu.cpu.atmega1280.upload.protocol=arduino
-mega.menu.cpu.atmega1280.upload.maximum_size=126976
-mega.menu.cpu.atmega1280.upload.speed=57600
-
-mega.menu.cpu.atmega1280.bootloader.high_fuses=0xDA
-mega.menu.cpu.atmega1280.bootloader.extended_fuses=0xF5
-mega.menu.cpu.atmega1280.bootloader.file=atmega/ATmegaBOOT_168_atmega1280.hex
-
-mega.menu.cpu.atmega1280.build.mcu=atmega1280
-mega.menu.cpu.atmega1280.build.board=AVR_MEGA
-
-##############################################################
-
-megaADK.name=Arduino Mega ADK
-
-megaADK.vid.0=0x2341
-megaADK.pid.0=0x003f
-megaADK.vid.1=0x2341
-megaADK.pid.1=0x0044
-megaADK.vid.2=0x2A03
-megaADK.pid.2=0x003f
-megaADK.vid.3=0x2A03
-megaADK.pid.3=0x0044
-
-megaADK.upload.tool=avrdude
-megaADK.upload.protocol=wiring
-megaADK.upload.maximum_size=253952
-megaADK.upload.maximum_data_size=8192
-megaADK.upload.speed=115200
-
-megaADK.bootloader.tool=avrdude
-megaADK.bootloader.low_fuses=0xFF
-megaADK.bootloader.high_fuses=0xD8
-megaADK.bootloader.extended_fuses=0xFD
-megaADK.bootloader.file=stk500v2/stk500boot_v2_mega2560.hex
-megaADK.bootloader.unlock_bits=0x3F
-megaADK.bootloader.lock_bits=0x0F
-
-megaADK.build.mcu=atmega2560
-megaADK.build.f_cpu=16000000L
-megaADK.build.board=AVR_ADK
-megaADK.build.core=arduino
-megaADK.build.variant=mega
-
-##############################################################
-
leonardo.name=Arduino Leonardo
leonardo.vid.0=0x2341
leonardo.pid.0=0x0036
@@ -450,142 +217,6 @@ esplora.build.extra_flags={build.usb_flags}
##############################################################
-mini.name=Arduino Mini
-
-mini.upload.tool=avrdude
-mini.upload.protocol=arduino
-
-mini.bootloader.tool=avrdude
-mini.bootloader.low_fuses=0xff
-mini.bootloader.unlock_bits=0x3F
-mini.bootloader.lock_bits=0x0F
-
-mini.build.f_cpu=16000000L
-mini.build.board=AVR_MINI
-mini.build.core=arduino
-mini.build.variant=eightanaloginputs
-
-## Arduino Mini w/ ATmega328P
-## --------------------------
-mini.menu.cpu.atmega328=ATmega328P
-
-mini.menu.cpu.atmega328.upload.maximum_size=28672
-mini.menu.cpu.atmega328.upload.maximum_data_size=2048
-mini.menu.cpu.atmega328.upload.speed=115200
-
-mini.menu.cpu.atmega328.bootloader.high_fuses=0xd8
-mini.menu.cpu.atmega328.bootloader.extended_fuses=0xFD
-mini.menu.cpu.atmega328.bootloader.file=optiboot/optiboot_atmega328-Mini.hex
-
-mini.menu.cpu.atmega328.build.mcu=atmega328p
-
-## Arduino Mini w/ ATmega168
-## -------------------------
-mini.menu.cpu.atmega168=ATmega168
-
-mini.menu.cpu.atmega168.upload.maximum_size=14336
-mini.menu.cpu.atmega168.upload.maximum_data_size=1024
-mini.menu.cpu.atmega168.upload.speed=19200
-
-mini.menu.cpu.atmega168.bootloader.high_fuses=0xdd
-mini.menu.cpu.atmega168.bootloader.extended_fuses=0xF8
-mini.menu.cpu.atmega168.bootloader.file=atmega/ATmegaBOOT_168_ng.hex
-
-mini.menu.cpu.atmega168.build.mcu=atmega168
-
-##############################################################
-
-ethernet.name=Arduino Ethernet
-
-ethernet.upload.tool=avrdude
-ethernet.upload.protocol=arduino
-ethernet.upload.maximum_size=32256
-ethernet.upload.maximum_data_size=2048
-ethernet.upload.speed=115200
-
-ethernet.bootloader.tool=avrdude
-ethernet.bootloader.low_fuses=0xff
-ethernet.bootloader.high_fuses=0xde
-ethernet.bootloader.extended_fuses=0xFD
-ethernet.bootloader.file=optiboot/optiboot_atmega328.hex
-ethernet.bootloader.unlock_bits=0x3F
-ethernet.bootloader.lock_bits=0x0F
-
-ethernet.build.variant=ethernet
-ethernet.build.mcu=atmega328p
-ethernet.build.f_cpu=16000000L
-ethernet.build.board=AVR_ETHERNET
-ethernet.build.core=arduino
-
-##############################################################
-
-fio.name=Arduino Fio
-
-fio.upload.tool=avrdude
-fio.upload.protocol=arduino
-fio.upload.maximum_size=30720
-fio.upload.maximum_data_size=2048
-fio.upload.speed=57600
-
-fio.bootloader.tool=avrdude
-fio.bootloader.low_fuses=0xFF
-fio.bootloader.high_fuses=0xDA
-fio.bootloader.extended_fuses=0xFD
-fio.bootloader.file=atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex
-fio.bootloader.unlock_bits=0x3F
-fio.bootloader.lock_bits=0x0F
-
-fio.build.mcu=atmega328p
-fio.build.f_cpu=8000000L
-fio.build.board=AVR_FIO
-fio.build.core=arduino
-fio.build.variant=eightanaloginputs
-
-##############################################################
-
-bt.name=Arduino BT
-
-bt.upload.tool=avrdude
-bt.upload.protocol=arduino
-bt.upload.speed=19200
-bt.upload.disable_flushing=true
-
-bt.bootloader.tool=avrdude
-bt.bootloader.low_fuses=0xff
-bt.bootloader.unlock_bits=0x3F
-bt.bootloader.lock_bits=0x0F
-
-bt.build.f_cpu=16000000L
-bt.build.board=AVR_BT
-bt.build.core=arduino
-bt.build.variant=eightanaloginputs
-
-## Arduino BT w/ ATmega328P
-## ------------------------
-bt.menu.cpu.atmega328=ATmega328P
-bt.menu.cpu.atmega328.upload.maximum_size=28672
-bt.menu.cpu.atmega328.upload.maximum_data_size=2048
-
-bt.menu.cpu.atmega328.bootloader.high_fuses=0xd8
-bt.menu.cpu.atmega328.bootloader.extended_fuses=0xFD
-bt.menu.cpu.atmega328.bootloader.file=bt/ATmegaBOOT_168_atmega328_bt.hex
-
-bt.menu.cpu.atmega328.build.mcu=atmega328p
-
-## Arduino BT w/ ATmega168
-## -----------------------
-bt.menu.cpu.atmega168=ATmega168
-bt.menu.cpu.atmega168.upload.maximum_size=14336
-bt.menu.cpu.atmega168.upload.maximum_data_size=1024
-
-bt.menu.cpu.atmega168.bootloader.high_fuses=0xdd
-bt.menu.cpu.atmega168.bootloader.extended_fuses=0xF8
-bt.menu.cpu.atmega168.bootloader.file=bt/ATmegaBOOT_168.hex
-
-bt.menu.cpu.atmega168.build.mcu=atmega168
-
-##############################################################
-
LilyPadUSB.name=LilyPad Arduino USB
LilyPadUSB.vid.0=0x1B4F
LilyPadUSB.pid.0=0x9207
@@ -621,177 +252,6 @@ LilyPadUSB.build.extra_flags={build.usb_flags}
##############################################################
-lilypad.name=LilyPad Arduino
-
-lilypad.upload.tool=avrdude
-lilypad.upload.protocol=arduino
-
-lilypad.bootloader.tool=avrdude
-lilypad.bootloader.unlock_bits=0x3F
-lilypad.bootloader.lock_bits=0x0F
-
-lilypad.build.f_cpu=8000000L
-lilypad.build.board=AVR_LILYPAD
-lilypad.build.core=arduino
-lilypad.build.variant=standard
-
-## LilyPad Arduino w/ ATmega328P
-## -----------------------------
-lilypad.menu.cpu.atmega328=ATmega328P
-
-lilypad.menu.cpu.atmega328.upload.maximum_size=30720
-lilypad.menu.cpu.atmega328.upload.maximum_data_size=2048
-lilypad.menu.cpu.atmega328.upload.speed=57600
-
-lilypad.menu.cpu.atmega328.bootloader.low_fuses=0xFF
-lilypad.menu.cpu.atmega328.bootloader.high_fuses=0xDA
-lilypad.menu.cpu.atmega328.bootloader.extended_fuses=0xFD
-lilypad.menu.cpu.atmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex
-
-lilypad.menu.cpu.atmega328.build.mcu=atmega328p
-
-## LilyPad Arduino w/ ATmega168
-## ----------------------------
-lilypad.menu.cpu.atmega168=ATmega168
-
-lilypad.menu.cpu.atmega168.upload.maximum_size=14336
-lilypad.menu.cpu.atmega168.upload.maximum_data_size=1024
-lilypad.menu.cpu.atmega168.upload.speed=19200
-
-lilypad.menu.cpu.atmega168.bootloader.low_fuses=0xe2
-lilypad.menu.cpu.atmega168.bootloader.high_fuses=0xdd
-lilypad.menu.cpu.atmega168.bootloader.extended_fuses=0xF8
-lilypad.menu.cpu.atmega168.bootloader.file=lilypad/LilyPadBOOT_168.hex
-
-lilypad.menu.cpu.atmega168.build.mcu=atmega168
-
-##############################################################
-
-pro.name=Arduino Pro or Pro Mini
-
-pro.upload.tool=avrdude
-pro.upload.protocol=arduino
-
-pro.bootloader.tool=avrdude
-pro.bootloader.unlock_bits=0x3F
-pro.bootloader.lock_bits=0x0F
-
-pro.build.board=AVR_PRO
-pro.build.core=arduino
-pro.build.variant=eightanaloginputs
-
-## Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328P
-## --------------------------------------------------
-pro.menu.cpu.16MHzatmega328=ATmega328P (5V, 16 MHz)
-
-pro.menu.cpu.16MHzatmega328.upload.maximum_size=30720
-pro.menu.cpu.16MHzatmega328.upload.maximum_data_size=2048
-pro.menu.cpu.16MHzatmega328.upload.speed=57600
-
-pro.menu.cpu.16MHzatmega328.bootloader.low_fuses=0xFF
-pro.menu.cpu.16MHzatmega328.bootloader.high_fuses=0xDA
-pro.menu.cpu.16MHzatmega328.bootloader.extended_fuses=0xFD
-pro.menu.cpu.16MHzatmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex
-
-pro.menu.cpu.16MHzatmega328.build.mcu=atmega328p
-pro.menu.cpu.16MHzatmega328.build.f_cpu=16000000L
-
-## Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328P
-## ---------------------------------------------------
-pro.menu.cpu.8MHzatmega328=ATmega328P (3.3V, 8 MHz)
-
-pro.menu.cpu.8MHzatmega328.upload.maximum_size=30720
-pro.menu.cpu.8MHzatmega328.upload.maximum_data_size=2048
-pro.menu.cpu.8MHzatmega328.upload.speed=57600
-
-pro.menu.cpu.8MHzatmega328.bootloader.low_fuses=0xFF
-pro.menu.cpu.8MHzatmega328.bootloader.high_fuses=0xDA
-pro.menu.cpu.8MHzatmega328.bootloader.extended_fuses=0xFD
-pro.menu.cpu.8MHzatmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex
-
-pro.menu.cpu.8MHzatmega328.build.mcu=atmega328p
-pro.menu.cpu.8MHzatmega328.build.f_cpu=8000000L
-
-## Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega168
-## -------------------------------------------------
-pro.menu.cpu.16MHzatmega168=ATmega168 (5V, 16 MHz)
-
-pro.menu.cpu.16MHzatmega168.upload.maximum_size=14336
-pro.menu.cpu.16MHzatmega168.upload.maximum_data_size=1024
-pro.menu.cpu.16MHzatmega168.upload.speed=19200
-
-pro.menu.cpu.16MHzatmega168.bootloader.low_fuses=0xff
-pro.menu.cpu.16MHzatmega168.bootloader.high_fuses=0xdd
-pro.menu.cpu.16MHzatmega168.bootloader.extended_fuses=0xF8
-pro.menu.cpu.16MHzatmega168.bootloader.file=atmega/ATmegaBOOT_168_diecimila.hex
-
-pro.menu.cpu.16MHzatmega168.build.mcu=atmega168
-pro.menu.cpu.16MHzatmega168.build.f_cpu=16000000L
-
-## Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega168
-## --------------------------------------------------
-pro.menu.cpu.8MHzatmega168=ATmega168 (3.3V, 8 MHz)
-
-pro.menu.cpu.8MHzatmega168.upload.maximum_size=14336
-pro.menu.cpu.8MHzatmega168.upload.maximum_data_size=1024
-pro.menu.cpu.8MHzatmega168.upload.speed=19200
-
-pro.menu.cpu.8MHzatmega168.bootloader.low_fuses=0xc6
-pro.menu.cpu.8MHzatmega168.bootloader.high_fuses=0xdd
-pro.menu.cpu.8MHzatmega168.bootloader.extended_fuses=0xF8
-pro.menu.cpu.8MHzatmega168.bootloader.file=atmega/ATmegaBOOT_168_pro_8MHz.hex
-
-pro.menu.cpu.8MHzatmega168.build.mcu=atmega168
-pro.menu.cpu.8MHzatmega168.build.f_cpu=8000000L
-
-##############################################################
-
-atmegang.name=Arduino NG or older
-
-atmegang.upload.tool=avrdude
-atmegang.upload.protocol=arduino
-atmegang.upload.speed=19200
-
-atmegang.bootloader.tool=avrdude
-atmegang.bootloader.unlock_bits=0x3F
-atmegang.bootloader.lock_bits=0x0F
-
-atmegang.build.mcu=atmegang
-atmegang.build.f_cpu=16000000L
-atmegang.build.board=AVR_NG
-atmegang.build.core=arduino
-atmegang.build.variant=standard
-
-## Arduino NG or older w/ ATmega168
-## --------------------------------
-atmegang.menu.cpu.atmega168=ATmega168
-
-atmegang.menu.cpu.atmega168.upload.maximum_size=14336
-atmegang.menu.cpu.atmega168.upload.maximum_data_size=1024
-
-atmegang.menu.cpu.atmega168.bootloader.low_fuses=0xff
-atmegang.menu.cpu.atmega168.bootloader.high_fuses=0xdd
-atmegang.menu.cpu.atmega168.bootloader.extended_fuses=0xF8
-atmegang.menu.cpu.atmega168.bootloader.file=atmega/ATmegaBOOT_168_ng.hex
-
-atmegang.menu.cpu.atmega168.build.mcu=atmega168
-
-## Arduino NG or older w/ ATmega8
-## ------------------------------
-atmegang.menu.cpu.atmega8=ATmega8
-
-atmegang.menu.cpu.atmega8.upload.maximum_size=7168
-atmegang.menu.cpu.atmega8.upload.maximum_data_size=1024
-
-atmegang.menu.cpu.atmega8.bootloader.low_fuses=0xdf
-atmegang.menu.cpu.atmega8.bootloader.high_fuses=0xca
-atmegang.menu.cpu.atmega8.bootloader.extended_fuses=
-atmegang.menu.cpu.atmega8.bootloader.file=atmega8/ATmegaBOOT-prod-firmware-2009-11-07.hex
-
-atmegang.menu.cpu.atmega8.build.mcu=atmega8
-
-##############################################################
-
robotControl.name=Arduino Robot Control
robotControl.vid.0=0x2341
robotControl.pid.0=0x0038
@@ -870,30 +330,6 @@ robotMotor.build.extra_flags={build.usb_flags}
##############################################################
-gemma.vid.0=0x2341
-gemma.pid.0=0x0c9f
-
-gemma.name=Arduino Gemma
-
-gemma.bootloader.low_fuses=0xF1
-gemma.bootloader.high_fuses=0xD5
-gemma.bootloader.extended_fuses=0xFE
-gemma.bootloader.tool=avrdude
-gemma.bootloader.lock_bits=
-gemma.bootloader.unlock_bits=
-gemma.bootloader.file=gemma/gemma_v1.hex
-
-gemma.build.mcu=attiny85
-gemma.build.f_cpu=8000000L
-gemma.build.core=arduino
-gemma.build.variant=gemma
-gemma.build.board=AVR_GEMMA
-
-gemma.upload.tool=avrdude
-gemma.upload.maximum_size=5310
-
-##############################################################
-
# Adafruit Circuit Playground 32u4 w/Caterina Configuration
circuitplay32u4cat.name=Adafruit Circuit Playground
circuitplay32u4cat.bootloader.low_fuses=0xff
@@ -1033,36 +469,3 @@ one.build.board=AVR_LININO_ONE
one.build.core=arduino
one.build.variant=yun
one.build.extra_flags={build.usb_flags}
-
-##############################################################
-
-unowifi.name=Arduino Uno WiFi
-unowifi.vid.0=0x2A03
-unowifi.pid.0=0x0057
-
-unowifi.upload.tool=avrdude
-unowifi.upload.protocol=arduino
-unowifi.upload.maximum_size=32256
-unowifi.upload.maximum_data_size=2048
-unowifi.upload.speed=115200
-unowifi.upload.network.endpoint_upload=/pgm/upload
-unowifi.upload.network.endpoint_sync=/pgm/sync
-unowifi.upload.network.sync_return=204:SYNC
-unowifi.upload.network.endpoint_reset=/log/reset
-unowifi.upload.network.port=80
-
-unowifi.bootloader.tool=avrdude
-unowifi.bootloader.low_fuses=0xFF
-unowifi.bootloader.high_fuses=0xDE
-unowifi.bootloader.extended_fuses=0x05
-unowifi.bootloader.unlock_bits=0x3F
-unowifi.bootloader.lock_bits=0x0F
-unowifi.bootloader.file=optiboot/optiboot_atmega328.hex
-
-unowifi.build.mcu=atmega328p
-unowifi.build.f_cpu=16000000L
-unowifi.build.board=AVR_UNO_WIFI_DEV_ED
-unowifi.build.core=arduino
-unowifi.build.variant=standard
-unowifi.build.esp_ch_uart_br=19200
-unowifi.build.extra_flags=-DESP_CH_UART -DESP_CH_UART_BR={build.esp_ch_uart_br}
diff --git a/bootloaders/atmega/ATmegaBOOT_168.c b/bootloaders/atmega/ATmegaBOOT_168.c
deleted file mode 100644
index ff2c4e4..0000000
--- a/bootloaders/atmega/ATmegaBOOT_168.c
+++ /dev/null
@@ -1,1057 +0,0 @@
-/**********************************************************/
-/* Serial Bootloader for Atmel megaAVR Controllers */
-/* */
-/* tested with ATmega8, ATmega128 and ATmega168 */
-/* should work with other mega's, see code for details */
-/* */
-/* ATmegaBOOT.c */
-/* */
-/* */
-/* 20090308: integrated Mega changes into main bootloader */
-/* source by D. Mellis */
-/* 20080930: hacked for Arduino Mega (with the 1280 */
-/* processor, backwards compatible) */
-/* by D. Cuartielles */
-/* 20070626: hacked for Arduino Diecimila (which auto- */
-/* resets when a USB connection is made to it) */
-/* by D. Mellis */
-/* 20060802: hacked for Arduino by D. Cuartielles */
-/* based on a previous hack by D. Mellis */
-/* and D. Cuartielles */
-/* */
-/* Monitor and debug functions were added to the original */
-/* code by Dr. Erik Lins, chip45.com. (See below) */
-/* */
-/* Thanks to Karl Pitrich for fixing a bootloader pin */
-/* problem and more informative LED blinking! */
-/* */
-/* For the latest version see: */
-/* http://www.chip45.com/ */
-/* */
-/* ------------------------------------------------------ */
-/* */
-/* based on stk500boot.c */
-/* Copyright (c) 2003, Jason P. Kyle */
-/* All rights reserved. */
-/* see avr1.org for original file and information */
-/* */
-/* This program is free software; you can redistribute it */
-/* and/or modify it under the terms of the GNU General */
-/* Public License as published by the Free Software */
-/* Foundation; either version 2 of the License, or */
-/* (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will */
-/* be useful, but WITHOUT ANY WARRANTY; without even the */
-/* implied warranty of MERCHANTABILITY or FITNESS FOR A */
-/* PARTICULAR PURPOSE. See the GNU General Public */
-/* License for more details. */
-/* */
-/* You should have received a copy of the GNU General */
-/* Public License along with this program; if not, write */
-/* to the Free Software Foundation, Inc., */
-/* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-/* */
-/* Licence can be viewed at */
-/* http://www.fsf.org/licenses/gpl.txt */
-/* */
-/* Target = Atmel AVR m128,m64,m32,m16,m8,m162,m163,m169, */
-/* m8515,m8535. ATmega161 has a very small boot block so */
-/* isn't supported. */
-/* */
-/* Tested with m168 */
-/**********************************************************/
-
-
-/* some includes */
-#include <inttypes.h>
-#include <avr/io.h>
-#include <avr/pgmspace.h>
-#include <avr/interrupt.h>
-#include <avr/wdt.h>
-#include <util/delay.h>
-
-/* the current avr-libc eeprom functions do not support the ATmega168 */
-/* own eeprom write/read functions are used instead */
-#if !defined(__AVR_ATmega168__) || !defined(__AVR_ATmega328P__) || !defined(__AVR_ATmega328__)
-#include <avr/eeprom.h>
-#endif
-
-/* Use the F_CPU defined in Makefile */
-
-/* 20060803: hacked by DojoCorp */
-/* 20070626: hacked by David A. Mellis to decrease waiting time for auto-reset */
-/* set the waiting time for the bootloader */
-/* get this from the Makefile instead */
-/* #define MAX_TIME_COUNT (F_CPU>>4) */
-
-/* 20070707: hacked by David A. Mellis - after this many errors give up and launch application */
-#define MAX_ERROR_COUNT 5
-
-/* set the UART baud rate */
-/* 20060803: hacked by DojoCorp */
-//#define BAUD_RATE 115200
-#ifndef BAUD_RATE
-#define BAUD_RATE 19200
-#endif
-
-
-/* SW_MAJOR and MINOR needs to be updated from time to time to avoid warning message from AVR Studio */
-/* never allow AVR Studio to do an update !!!! */
-#define HW_VER 0x02
-#define SW_MAJOR 0x01
-#define SW_MINOR 0x10
-
-
-/* Adjust to suit whatever pin your hardware uses to enter the bootloader */
-/* ATmega128 has two UARTS so two pins are used to enter bootloader and select UART */
-/* ATmega1280 has four UARTS, but for Arduino Mega, we will only use RXD0 to get code */
-/* BL0... means UART0, BL1... means UART1 */
-#ifdef __AVR_ATmega128__
-#define BL_DDR DDRF
-#define BL_PORT PORTF
-#define BL_PIN PINF
-#define BL0 PINF7
-#define BL1 PINF6
-#elif defined __AVR_ATmega1280__
-/* we just don't do anything for the MEGA and enter bootloader on reset anyway*/
-#else
-/* other ATmegas have only one UART, so only one pin is defined to enter bootloader */
-#define BL_DDR DDRD
-#define BL_PORT PORTD
-#define BL_PIN PIND
-#define BL PIND6
-#endif
-
-
-/* onboard LED is used to indicate, that the bootloader was entered (3x flashing) */
-/* if monitor functions are included, LED goes on after monitor was entered */
-#if defined __AVR_ATmega128__ || defined __AVR_ATmega1280__
-/* Onboard LED is connected to pin PB7 (e.g. Crumb128, PROBOmega128, Savvy128, Arduino Mega) */
-#define LED_DDR DDRB
-#define LED_PORT PORTB
-#define LED_PIN PINB
-#define LED PINB7
-#else
-/* Onboard LED is connected to pin PB5 in Arduino NG, Diecimila, and Duomilanuove */
-/* other boards like e.g. Crumb8, Crumb168 are using PB2 */
-#define LED_DDR DDRB
-#define LED_PORT PORTB
-#define LED_PIN PINB
-#define LED PINB5
-#endif
-
-
-/* monitor functions will only be compiled when using ATmega128, due to bootblock size constraints */
-#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__)
-#define MONITOR 1
-#endif
-
-
-/* define various device id's */
-/* manufacturer byte is always the same */
-#define SIG1 0x1E // Yep, Atmel is the only manufacturer of AVR micros. Single source :(
-
-#if defined __AVR_ATmega1280__
-#define SIG2 0x97
-#define SIG3 0x03
-#define PAGE_SIZE 0x80U //128 words
-
-#elif defined __AVR_ATmega1281__
-#define SIG2 0x97
-#define SIG3 0x04
-#define PAGE_SIZE 0x80U //128 words
-
-#elif defined __AVR_ATmega128__
-#define SIG2 0x97
-#define SIG3 0x02
-#define PAGE_SIZE 0x80U //128 words
-
-#elif defined __AVR_ATmega64__
-#define SIG2 0x96
-#define SIG3 0x02
-#define PAGE_SIZE 0x80U //128 words
-
-#elif defined __AVR_ATmega32__
-#define SIG2 0x95
-#define SIG3 0x02
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega16__
-#define SIG2 0x94
-#define SIG3 0x03
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega8__
-#define SIG2 0x93
-#define SIG3 0x07
-#define PAGE_SIZE 0x20U //32 words
-
-#elif defined __AVR_ATmega88__
-#define SIG2 0x93
-#define SIG3 0x0a
-#define PAGE_SIZE 0x20U //32 words
-
-#elif defined __AVR_ATmega168__
-#define SIG2 0x94
-#define SIG3 0x06
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega328P__
-#define SIG2 0x95
-#define SIG3 0x0F
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega328__
-#define SIG2 0x95
-#define SIG3 0x14
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega162__
-#define SIG2 0x94
-#define SIG3 0x04
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega163__
-#define SIG2 0x94
-#define SIG3 0x02
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega169__
-#define SIG2 0x94
-#define SIG3 0x05
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega8515__
-#define SIG2 0x93
-#define SIG3 0x06
-#define PAGE_SIZE 0x20U //32 words
-
-#elif defined __AVR_ATmega8535__
-#define SIG2 0x93
-#define SIG3 0x08
-#define PAGE_SIZE 0x20U //32 words
-#endif
-
-
-/* function prototypes */
-void putch(char);
-char getch(void);
-void getNch(uint8_t);
-void byte_response(uint8_t);
-void nothing_response(void);
-char gethex(void);
-void puthex(char);
-void flash_led(uint8_t);
-
-/* some variables */
-union address_union {
- uint16_t word;
- uint8_t byte[2];
-} address;
-
-union length_union {
- uint16_t word;
- uint8_t byte[2];
-} length;
-
-struct flags_struct {
- unsigned eeprom : 1;
- unsigned rampz : 1;
-} flags;
-
-uint8_t buff[256];
-uint8_t address_high;
-
-uint8_t pagesz=0x80;
-
-uint8_t i;
-uint8_t bootuart = 0;
-
-uint8_t error_count = 0;
-
-void (*app_start)(void) = 0x0000;
-
-
-/* main program starts here */
-int main(void)
-{
- uint8_t ch,ch2;
- uint16_t w;
-
-#ifdef WATCHDOG_MODS
- ch = MCUSR;
- MCUSR = 0;
-
- WDTCSR |= _BV(WDCE) | _BV(WDE);
- WDTCSR = 0;
-
- // Check if the WDT was used to reset, in which case we dont bootload and skip straight to the code. woot.
- if (! (ch & _BV(EXTRF))) // if its a not an external reset...
- app_start(); // skip bootloader
-#else
- asm volatile("nop\n\t");
-#endif
-
- /* set pin direction for bootloader pin and enable pullup */
- /* for ATmega128, two pins need to be initialized */
-#ifdef __AVR_ATmega128__
- BL_DDR &= ~_BV(BL0);
- BL_DDR &= ~_BV(BL1);
- BL_PORT |= _BV(BL0);
- BL_PORT |= _BV(BL1);
-#else
- /* We run the bootloader regardless of the state of this pin. Thus, don't
- put it in a different state than the other pins. --DAM, 070709
- This also applies to Arduino Mega -- DC, 080930
- BL_DDR &= ~_BV(BL);
- BL_PORT |= _BV(BL);
- */
-#endif
-
-
-#ifdef __AVR_ATmega128__
- /* check which UART should be used for booting */
- if(bit_is_clear(BL_PIN, BL0)) {
- bootuart = 1;
- }
- else if(bit_is_clear(BL_PIN, BL1)) {
- bootuart = 2;
- }
-#endif
-
-#if defined __AVR_ATmega1280__
- /* the mega1280 chip has four serial ports ... we could eventually use any of them, or not? */
- /* however, we don't wanna confuse people, to avoid making a mess, we will stick to RXD0, TXD0 */
- bootuart = 1;
-#endif
-
- /* check if flash is programmed already, if not start bootloader anyway */
- if(pgm_read_byte_near(0x0000) != 0xFF) {
-
-#ifdef __AVR_ATmega128__
- /* no UART was selected, start application */
- if(!bootuart) {
- app_start();
- }
-#else
- /* check if bootloader pin is set low */
- /* we don't start this part neither for the m8, nor m168 */
- //if(bit_is_set(BL_PIN, BL)) {
- // app_start();
- // }
-#endif
- }
-
-#ifdef __AVR_ATmega128__
- /* no bootuart was selected, default to uart 0 */
- if(!bootuart) {
- bootuart = 1;
- }
-#endif
-
-
- /* initialize UART(s) depending on CPU defined */
-#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__)
- if(bootuart == 1) {
- UBRR0L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1);
- UBRR0H = (F_CPU/(BAUD_RATE*16L)-1) >> 8;
- UCSR0A = 0x00;
- UCSR0C = 0x06;
- UCSR0B = _BV(TXEN0)|_BV(RXEN0);
- }
- if(bootuart == 2) {
- UBRR1L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1);
- UBRR1H = (F_CPU/(BAUD_RATE*16L)-1) >> 8;
- UCSR1A = 0x00;
- UCSR1C = 0x06;
- UCSR1B = _BV(TXEN1)|_BV(RXEN1);
- }
-#elif defined __AVR_ATmega163__
- UBRR = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1);
- UBRRHI = (F_CPU/(BAUD_RATE*16L)-1) >> 8;
- UCSRA = 0x00;
- UCSRB = _BV(TXEN)|_BV(RXEN);
-#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined (__AVR_ATmega328__)
-
-#ifdef DOUBLE_SPEED
- UCSR0A = (1<<U2X0); //Double speed mode USART0
- UBRR0L = (uint8_t)(F_CPU/(BAUD_RATE*8L)-1);
- UBRR0H = (F_CPU/(BAUD_RATE*8L)-1) >> 8;
-#else
- UBRR0L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1);
- UBRR0H = (F_CPU/(BAUD_RATE*16L)-1) >> 8;
-#endif
-
- UCSR0B = (1<<RXEN0) | (1<<TXEN0);
- UCSR0C = (1<<UCSZ00) | (1<<UCSZ01);
-
- /* Enable internal pull-up resistor on pin D0 (RX), in order
- to supress line noise that prevents the bootloader from
- timing out (DAM: 20070509) */
- DDRD &= ~_BV(PIND0);
- PORTD |= _BV(PIND0);
-#elif defined __AVR_ATmega8__
- /* m8 */
- UBRRH = (((F_CPU/BAUD_RATE)/16)-1)>>8; // set baud rate
- UBRRL = (((F_CPU/BAUD_RATE)/16)-1);
- UCSRB = (1<<RXEN)|(1<<TXEN); // enable Rx & Tx
- UCSRC = (1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0); // config USART; 8N1
-#else
- /* m16,m32,m169,m8515,m8535 */
- UBRRL = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1);
- UBRRH = (F_CPU/(BAUD_RATE*16L)-1) >> 8;
- UCSRA = 0x00;
- UCSRC = 0x06;
- UCSRB = _BV(TXEN)|_BV(RXEN);
-#endif
-
-#if defined __AVR_ATmega1280__
- /* Enable internal pull-up resistor on pin D0 (RX), in order
- to supress line noise that prevents the bootloader from
- timing out (DAM: 20070509) */
- /* feature added to the Arduino Mega --DC: 080930 */
- DDRE &= ~_BV(PINE0);
- PORTE |= _BV(PINE0);
-#endif
-
-
- /* set LED pin as output */
- LED_DDR |= _BV(LED);
-
-
- /* flash onboard LED to signal entering of bootloader */
-#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__)
- // 4x for UART0, 5x for UART1
- flash_led(NUM_LED_FLASHES + bootuart);
-#else
- flash_led(NUM_LED_FLASHES);
-#endif
-
- /* 20050803: by DojoCorp, this is one of the parts provoking the
- system to stop listening, cancelled from the original */
- //putch('\0');
-
- /* forever loop */
- for (;;) {
-
- /* get character from UART */
- ch = getch();
-
- /* A bunch of if...else if... gives smaller code than switch...case ! */
-
- /* Hello is anyone home ? */
- if(ch=='0') {
- nothing_response();
- }
-
-
- /* Request programmer ID */
- /* Not using PROGMEM string due to boot block in m128 being beyond 64kB boundry */
- /* Would need to selectively manipulate RAMPZ, and it's only 9 characters anyway so who cares. */
- else if(ch=='1') {
- if (getch() == ' ') {
- putch(0x14);
- putch('A');
- putch('V');
- putch('R');
- putch(' ');
- putch('I');
- putch('S');
- putch('P');
- putch(0x10);
- } else {
- if (++error_count == MAX_ERROR_COUNT)
- app_start();
- }
- }
-
-
- /* AVR ISP/STK500 board commands DON'T CARE so default nothing_response */
- else if(ch=='@') {
- ch2 = getch();
- if (ch2>0x85) getch();
- nothing_response();
- }
-
-
- /* AVR ISP/STK500 board requests */
- else if(ch=='A') {
- ch2 = getch();
- if(ch2==0x80) byte_response(HW_VER); // Hardware version
- else if(ch2==0x81) byte_response(SW_MAJOR); // Software major version
- else if(ch2==0x82) byte_response(SW_MINOR); // Software minor version
- else if(ch2==0x98) byte_response(0x03); // Unknown but seems to be required by avr studio 3.56
- else byte_response(0x00); // Covers various unnecessary responses we don't care about
- }
-
-
- /* Device Parameters DON'T CARE, DEVICE IS FIXED */
- else if(ch=='B') {
- getNch(20);
- nothing_response();
- }
-
-
- /* Parallel programming stuff DON'T CARE */
- else if(ch=='E') {
- getNch(5);
- nothing_response();
- }
-
-
- /* P: Enter programming mode */
- /* R: Erase device, don't care as we will erase one page at a time anyway. */
- else if(ch=='P' || ch=='R') {
- nothing_response();
- }
-
-
- /* Leave programming mode */
- else if(ch=='Q') {
- nothing_response();
-#ifdef WATCHDOG_MODS
- // autoreset via watchdog (sneaky!)
- WDTCSR = _BV(WDE);
- while (1); // 16 ms
-#endif
- }
-
-
- /* Set address, little endian. EEPROM in bytes, FLASH in words */
- /* Perhaps extra address bytes may be added in future to support > 128kB FLASH. */
- /* This might explain why little endian was used here, big endian used everywhere else. */
- else if(ch=='U') {
- address.byte[0] = getch();
- address.byte[1] = getch();
- nothing_response();
- }
-
-
- /* Universal SPI programming command, disabled. Would be used for fuses and lock bits. */
- else if(ch=='V') {
- if (getch() == 0x30) {
- getch();
- ch = getch();
- getch();
- if (ch == 0) {
- byte_response(SIG1);
- } else if (ch == 1) {
- byte_response(SIG2);
- } else {
- byte_response(SIG3);
- }
- } else {
- getNch(3);
- byte_response(0x00);
- }
- }
-
-
- /* Write memory, length is big endian and is in bytes */
- else if(ch=='d') {
- length.byte[1] = getch();
- length.byte[0] = getch();
- flags.eeprom = 0;
- if (getch() == 'E') flags.eeprom = 1;
- for (w=0;w<length.word;w++) {
- buff[w] = getch(); // Store data in buffer, can't keep up with serial data stream whilst programming pages
- }
- if (getch() == ' ') {
- if (flags.eeprom) { //Write to EEPROM one byte at a time
- address.word <<= 1;
- for(w=0;w<length.word;w++) {
-#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__)
- while(EECR & (1<<EEPE));
- EEAR = (uint16_t)(void *)address.word;
- EEDR = buff[w];
- EECR |= (1<<EEMPE);
- EECR |= (1<<EEPE);
-#else
- eeprom_write_byte((void *)address.word,buff[w]);
-#endif
- address.word++;
- }
- }
- else { //Write to FLASH one page at a time
- if (address.byte[1]>127) address_high = 0x01; //Only possible with m128, m256 will need 3rd address byte. FIXME
- else address_high = 0x00;
-#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1281__)
- RAMPZ = address_high;
-#endif
- address.word = address.word << 1; //address * 2 -> byte location
- /* if ((length.byte[0] & 0x01) == 0x01) length.word++; //Even up an odd number of bytes */
- if ((length.byte[0] & 0x01)) length.word++; //Even up an odd number of bytes
- cli(); //Disable interrupts, just to be sure
-#if defined(EEPE)
- while(bit_is_set(EECR,EEPE)); //Wait for previous EEPROM writes to complete
-#else
- while(bit_is_set(EECR,EEWE)); //Wait for previous EEPROM writes to complete
-#endif
- asm volatile(
- "clr r17 \n\t" //page_word_count
- "lds r30,address \n\t" //Address of FLASH location (in bytes)
- "lds r31,address+1 \n\t"
- "ldi r28,lo8(buff) \n\t" //Start of buffer array in RAM
- "ldi r29,hi8(buff) \n\t"
- "lds r24,length \n\t" //Length of data to be written (in bytes)
- "lds r25,length+1 \n\t"
- "length_loop: \n\t" //Main loop, repeat for number of words in block
- "cpi r17,0x00 \n\t" //If page_word_count=0 then erase page
- "brne no_page_erase \n\t"
- "wait_spm1: \n\t"
- "lds r16,%0 \n\t" //Wait for previous spm to complete
- "andi r16,1 \n\t"
- "cpi r16,1 \n\t"
- "breq wait_spm1 \n\t"
- "ldi r16,0x03 \n\t" //Erase page pointed to by Z
- "sts %0,r16 \n\t"
- "spm \n\t"
-#ifdef __AVR_ATmega163__
- ".word 0xFFFF \n\t"
- "nop \n\t"
-#endif
- "wait_spm2: \n\t"
- "lds r16,%0 \n\t" //Wait for previous spm to complete
- "andi r16,1 \n\t"
- "cpi r16,1 \n\t"
- "breq wait_spm2 \n\t"
-
- "ldi r16,0x11 \n\t" //Re-enable RWW section
- "sts %0,r16 \n\t"
- "spm \n\t"
-#ifdef __AVR_ATmega163__
- ".word 0xFFFF \n\t"
- "nop \n\t"
-#endif
- "no_page_erase: \n\t"
- "ld r0,Y+ \n\t" //Write 2 bytes into page buffer
- "ld r1,Y+ \n\t"
-
- "wait_spm3: \n\t"
- "lds r16,%0 \n\t" //Wait for previous spm to complete
- "andi r16,1 \n\t"
- "cpi r16,1 \n\t"
- "breq wait_spm3 \n\t"
- "ldi r16,0x01 \n\t" //Load r0,r1 into FLASH page buffer
- "sts %0,r16 \n\t"
- "spm \n\t"
-
- "inc r17 \n\t" //page_word_count++
- "cpi r17,%1 \n\t"
- "brlo same_page \n\t" //Still same page in FLASH
- "write_page: \n\t"
- "clr r17 \n\t" //New page, write current one first
- "wait_spm4: \n\t"
- "lds r16,%0 \n\t" //Wait for previous spm to complete
- "andi r16,1 \n\t"
- "cpi r16,1 \n\t"
- "breq wait_spm4 \n\t"
-#ifdef __AVR_ATmega163__
- "andi r30,0x80 \n\t" // m163 requires Z6:Z1 to be zero during page write
-#endif
- "ldi r16,0x05 \n\t" //Write page pointed to by Z
- "sts %0,r16 \n\t"
- "spm \n\t"
-#ifdef __AVR_ATmega163__
- ".word 0xFFFF \n\t"
- "nop \n\t"
- "ori r30,0x7E \n\t" // recover Z6:Z1 state after page write (had to be zero during write)
-#endif
- "wait_spm5: \n\t"
- "lds r16,%0 \n\t" //Wait for previous spm to complete
- "andi r16,1 \n\t"
- "cpi r16,1 \n\t"
- "breq wait_spm5 \n\t"
- "ldi r16,0x11 \n\t" //Re-enable RWW section
- "sts %0,r16 \n\t"
- "spm \n\t"
-#ifdef __AVR_ATmega163__
- ".word 0xFFFF \n\t"
- "nop \n\t"
-#endif
- "same_page: \n\t"
- "adiw r30,2 \n\t" //Next word in FLASH
- "sbiw r24,2 \n\t" //length-2
- "breq final_write \n\t" //Finished
- "rjmp length_loop \n\t"
- "final_write: \n\t"
- "cpi r17,0 \n\t"
- "breq block_done \n\t"
- "adiw r24,2 \n\t" //length+2, fool above check on length after short page write
- "rjmp write_page \n\t"
- "block_done: \n\t"
- "clr __zero_reg__ \n\t" //restore zero register
-#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1281__)
- : "=m" (SPMCSR) : "M" (PAGE_SIZE) : "r0","r16","r17","r24","r25","r28","r29","r30","r31"
-#else
- : "=m" (SPMCR) : "M" (PAGE_SIZE) : "r0","r16","r17","r24","r25","r28","r29","r30","r31"
-#endif
- );
- /* Should really add a wait for RWW section to be enabled, don't actually need it since we never */
- /* exit the bootloader without a power cycle anyhow */
- }
- putch(0x14);
- putch(0x10);
- } else {
- if (++error_count == MAX_ERROR_COUNT)
- app_start();
- }
- }
-
-
- /* Read memory block mode, length is big endian. */
- else if(ch=='t') {
- length.byte[1] = getch();
- length.byte[0] = getch();
-#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__)
- if (address.word>0x7FFF) flags.rampz = 1; // No go with m256, FIXME
- else flags.rampz = 0;
-#endif
- address.word = address.word << 1; // address * 2 -> byte location
- if (getch() == 'E') flags.eeprom = 1;
- else flags.eeprom = 0;
- if (getch() == ' ') { // Command terminator
- putch(0x14);
- for (w=0;w < length.word;w++) { // Can handle odd and even lengths okay
- if (flags.eeprom) { // Byte access EEPROM read
-#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__)
- while(EECR & (1<<EEPE));
- EEAR = (uint16_t)(void *)address.word;
- EECR |= (1<<EERE);
- putch(EEDR);
-#else
- putch(eeprom_read_byte((void *)address.word));
-#endif
- address.word++;
- }
- else {
-
- if (!flags.rampz) putch(pgm_read_byte_near(address.word));
-#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__)
- else putch(pgm_read_byte_far(address.word + 0x10000));
- // Hmmmm, yuck FIXME when m256 arrvies
-#endif
- address.word++;
- }
- }
- putch(0x10);
- }
- }
-
-
- /* Get device signature bytes */
- else if(ch=='u') {
- if (getch() == ' ') {
- putch(0x14);
- putch(SIG1);
- putch(SIG2);
- putch(SIG3);
- putch(0x10);
- } else {
- if (++error_count == MAX_ERROR_COUNT)
- app_start();
- }
- }
-
-
- /* Read oscillator calibration byte */
- else if(ch=='v') {
- byte_response(0x00);
- }
-
-
-#if defined MONITOR
-
- /* here come the extended monitor commands by Erik Lins */
-
- /* check for three times exclamation mark pressed */
- else if(ch=='!') {
- ch = getch();
- if(ch=='!') {
- ch = getch();
- if(ch=='!') {
- PGM_P welcome = "";
-#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__)
- uint16_t extaddr;
-#endif
- uint8_t addrl, addrh;
-
-#ifdef CRUMB128
- welcome = "ATmegaBOOT / Crumb128 - (C) J.P.Kyle, E.Lins - 050815\n\r";
-#elif defined PROBOMEGA128
- welcome = "ATmegaBOOT / PROBOmega128 - (C) J.P.Kyle, E.Lins - 050815\n\r";
-#elif defined SAVVY128
- welcome = "ATmegaBOOT / Savvy128 - (C) J.P.Kyle, E.Lins - 050815\n\r";
-#elif defined __AVR_ATmega1280__
- welcome = "ATmegaBOOT / Arduino Mega - (C) Arduino LLC - 090930\n\r";
-#endif
-
- /* turn on LED */
- LED_DDR |= _BV(LED);
- LED_PORT &= ~_BV(LED);
-
- /* print a welcome message and command overview */
- for(i=0; welcome[i] != '\0'; ++i) {
- putch(welcome[i]);
- }
-
- /* test for valid commands */
- for(;;) {
- putch('\n');
- putch('\r');
- putch(':');
- putch(' ');
-
- ch = getch();
- putch(ch);
-
- /* toggle LED */
- if(ch == 't') {
- if(bit_is_set(LED_PIN,LED)) {
- LED_PORT &= ~_BV(LED);
- putch('1');
- } else {
- LED_PORT |= _BV(LED);
- putch('0');
- }
- }
-
- /* read byte from address */
- else if(ch == 'r') {
- ch = getch(); putch(ch);
- addrh = gethex();
- addrl = gethex();
- putch('=');
- ch = *(uint8_t *)((addrh << 8) + addrl);
- puthex(ch);
- }
-
- /* write a byte to address */
- else if(ch == 'w') {
- ch = getch(); putch(ch);
- addrh = gethex();
- addrl = gethex();
- ch = getch(); putch(ch);
- ch = gethex();
- *(uint8_t *)((addrh << 8) + addrl) = ch;
- }
-
- /* read from uart and echo back */
- else if(ch == 'u') {
- for(;;) {
- putch(getch());
- }
- }
-#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__)
- /* external bus loop */
- else if(ch == 'b') {
- putch('b');
- putch('u');
- putch('s');
- MCUCR = 0x80;
- XMCRA = 0;
- XMCRB = 0;
- extaddr = 0x1100;
- for(;;) {
- ch = *(volatile uint8_t *)extaddr;
- if(++extaddr == 0) {
- extaddr = 0x1100;
- }
- }
- }
-#endif
-
- else if(ch == 'j') {
- app_start();
- }
-
- } /* end of monitor functions */
-
- }
- }
- }
- /* end of monitor */
-#endif
- else if (++error_count == MAX_ERROR_COUNT) {
- app_start();
- }
- } /* end of forever loop */
-
-}
-
-
-char gethexnib(void) {
- char a;
- a = getch(); putch(a);
- if(a >= 'a') {
- return (a - 'a' + 0x0a);
- } else if(a >= '0') {
- return(a - '0');
- }
- return a;
-}
-
-
-char gethex(void) {
- return (gethexnib() << 4) + gethexnib();
-}
-
-
-void puthex(char ch) {
- char ah;
-
- ah = ch >> 4;
- if(ah >= 0x0a) {
- ah = ah - 0x0a + 'a';
- } else {
- ah += '0';
- }
-
- ch &= 0x0f;
- if(ch >= 0x0a) {
- ch = ch - 0x0a + 'a';
- } else {
- ch += '0';
- }
-
- putch(ah);
- putch(ch);
-}
-
-
-void putch(char ch)
-{
-#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__)
- if(bootuart == 1) {
- while (!(UCSR0A & _BV(UDRE0)));
- UDR0 = ch;
- }
- else if (bootuart == 2) {
- while (!(UCSR1A & _BV(UDRE1)));
- UDR1 = ch;
- }
-#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined (__AVR_ATmega328__)
- while (!(UCSR0A & _BV(UDRE0)));
- UDR0 = ch;
-#else
- /* m8,16,32,169,8515,8535,163 */
- while (!(UCSRA & _BV(UDRE)));
- UDR = ch;
-#endif
-}
-
-
-char getch(void)
-{
-#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__)
- uint32_t count = 0;
- if(bootuart == 1) {
- while(!(UCSR0A & _BV(RXC0))) {
- /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/
- /* HACKME:: here is a good place to count times*/
- count++;
- if (count > MAX_TIME_COUNT)
- app_start();
- }
-
- return UDR0;
- }
- else if(bootuart == 2) {
- while(!(UCSR1A & _BV(RXC1))) {
- /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/
- /* HACKME:: here is a good place to count times*/
- count++;
- if (count > MAX_TIME_COUNT)
- app_start();
- }
-
- return UDR1;
- }
- return 0;
-#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined (__AVR_ATmega328__)
- uint32_t count = 0;
- while(!(UCSR0A & _BV(RXC0))){
- /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/
- /* HACKME:: here is a good place to count times*/
- count++;
- if (count > MAX_TIME_COUNT)
- app_start();
- }
- return UDR0;
-#else
- /* m8,16,32,169,8515,8535,163 */
- uint32_t count = 0;
- while(!(UCSRA & _BV(RXC))){
- /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/
- /* HACKME:: here is a good place to count times*/
- count++;
- if (count > MAX_TIME_COUNT)
- app_start();
- }
- return UDR;
-#endif
-}
-
-
-void getNch(uint8_t count)
-{
- while(count--) {
-#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__)
- if(bootuart == 1) {
- while(!(UCSR0A & _BV(RXC0)));
- UDR0;
- }
- else if(bootuart == 2) {
- while(!(UCSR1A & _BV(RXC1)));
- UDR1;
- }
-#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined (__AVR_ATmega328__)
- getch();
-#else
- /* m8,16,32,169,8515,8535,163 */
- /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/
- //while(!(UCSRA & _BV(RXC)));
- //UDR;
- getch(); // need to handle time out
-#endif
- }
-}
-
-
-void byte_response(uint8_t val)
-{
- if (getch() == ' ') {
- putch(0x14);
- putch(val);
- putch(0x10);
- } else {
- if (++error_count == MAX_ERROR_COUNT)
- app_start();
- }
-}
-
-
-void nothing_response(void)
-{
- if (getch() == ' ') {
- putch(0x14);
- putch(0x10);
- } else {
- if (++error_count == MAX_ERROR_COUNT)
- app_start();
- }
-}
-
-void flash_led(uint8_t count)
-{
- while (count--) {
- LED_PORT |= _BV(LED);
- _delay_ms(100);
- LED_PORT &= ~_BV(LED);
- _delay_ms(100);
- }
-}
-
-
-/* end of file ATmegaBOOT.c */
diff --git a/bootloaders/atmega/ATmegaBOOT_168_atmega1280.hex b/bootloaders/atmega/ATmegaBOOT_168_atmega1280.hex
deleted file mode 100644
index f16e877..0000000
--- a/bootloaders/atmega/ATmegaBOOT_168_atmega1280.hex
+++ /dev/null
@@ -1,245 +0,0 @@
-:020000021000EC
-:10F000000C9472F80C9492F80C9492F80C9492F878
-:10F010000C9492F80C9492F80C9492F80C9492F848
-:10F020000C9492F80C9492F80C9492F80C9492F838
-:10F030000C9492F80C9492F80C9492F80C9492F828
-:10F040000C9492F80C9492F80C9492F80C9492F818
-:10F050000C9492F80C9492F80C9492F80C9492F808
-:10F060000C9492F80C9492F80C9492F80C9492F8F8
-:10F070000C9492F80C9492F80C9492F80C9492F8E8
-:10F080000C9492F80C9492F80C9492F80C9492F8D8
-:10F090000C9492F80C9492F80C9492F80C9492F8C8
-:10F0A0000C9492F80C9492F80C9492F80C9492F8B8
-:10F0B0000C9492F80C9492F80C9492F80C9492F8A8
-:10F0C0000C9492F80C9492F80C9492F80C9492F898
-:10F0D0000C9492F80C9492F80C9492F80C9492F888
-:10F0E0000C9492F811241FBECFEFD1E2DEBFCDBF4A
-:10F0F00012E0A0E0B2E0EEEDFEEF01E00BBF02C0D7
-:10F1000007900D92A833B107D9F71BBE13E0A8E30F
-:10F11000B2E001C01D92A334B107E1F70E9412FAD8
-:10F120000C946DFF0C9400F8982F959595959595F6
-:10F130009595905D8F708A301CF1282F295A809107
-:10F140003802813019F0823071F008958091C0004A
-:10F1500085FFFCCF9093C6008091C00085FFFCCF57
-:10F160002093C60008958091C80085FFFCCF90933E
-:10F17000CE008091C80085FFFCCF2093CE0008957B
-:10F18000282F205DDCCF982F80913802813019F034
-:10F19000823041F008958091C00085FFFCCF9093AC
-:10F1A000C60008958091C80085FFFCCF9093CE00E3
-:10F1B0000895EF92FF920F931F9380913802813050
-:10F1C00069F1823031F080E01F910F91FF90EF9054
-:10F1D0000895EE24FF2487018091C80087FD17C0A1
-:10F1E0000894E11CF11C011D111D81E4E81682E464
-:10F1F000F8068FE0080780E0180770F3E0913A0204
-:10F20000F0913B0209958091C80087FFE9CF80917A
-:10F21000CE001F910F91FF90EF900895EE24FF24F0
-:10F2200087018091C00087FD17C00894E11CF11C84
-:10F23000011D111D81E4E81682E4F8068FE008073D
-:10F2400080E0180770F3E0913A02F0913B020995D3
-:10F250008091C00087FFE9CF8091C6001F910F9178
-:10F26000FF90EF9008950E94D9F8982F809138026E
-:10F27000813049F0823091F091366CF490330CF08B
-:10F280009053892F08958091C00085FFFCCF909303
-:10F29000C60091369CF39755892F08958091C80038
-:10F2A00085FFFCCF9093CE00E7CF1F930E9433F9E8
-:10F2B000182F0E9433F91295107F810F1F91089526
-:10F2C000982F20913802992339F0213031F02230E3
-:10F2D00061F091509923C9F708958091C00087FF8C
-:10F2E000FCCF8091C6009150F5CF8091C80087FF78
-:10F2F000FCCF8091CE009150EDCF1F93182F0E942C
-:10F30000D9F8803249F0809139028F5F80933902B9
-:10F31000853091F11F910895809138028130B9F0C4
-:10F320008230C1F78091C80085FFFCCF84E18093D3
-:10F33000CE008091C80085FFFCCF1093CE00809155
-:10F34000C80085FFFCCF80E18093CE00E3CF8091A1
-:10F35000C00085FFFCCF84E18093C6008091C0008F
-:10F3600085FFFCCF1093C6008091C00085FFFCCFC5
-:10F3700080E18093C600CECFE0913A02F0913B024B
-:10F3800009951F9108950E94D9F8803241F080912B
-:10F3900039028F5F80933902853029F10895809179
-:10F3A0003802813089F08230C9F78091C80085FF2A
-:10F3B000FCCF84E18093CE008091C80085FFFCCF14
-:10F3C00080E18093CE0008958091C00085FFFCCF3E
-:10F3D00084E18093C6008091C00085FFFCCF80E16E
-:10F3E0008093C6000895E0913A02F0913B0209959E
-:10F3F000089540E951E08823A1F02F9A28EE33E0E8
-:10F40000FA013197F1F721503040D1F72F9828EECB
-:10F4100033E0FA013197F1F721503040D1F78150B4
-:10F4200061F708952F923F924F925F926F927F9271
-:10F430008F929F92AF92BF92CF92DF92EF92FF9204
-:10F440000F931F93CF93DF93000081E080933802E6
-:10F4500080E18093C4001092C5001092C00086E045
-:10F460008093C20088E18093C1006898709A279ABF
-:10F4700081E00E94F9F9E4E1EE2E7EE1D72E67E902
-:10F48000C62E53E0B52E40E1A42E9924939431E486
-:10F49000832E26E5722E92E5692E80E2582E09E42D
-:10F4A000402E13E5312EB0E52B2E0E94D9F8803383
-:10F4B000C9F1813309F452C0803409F4C8C08134E1
-:10F4C00009F4EAC0823489F1853409F4CAC0803570
-:10F4D00049F1823539F1813529F1853509F4ECC0DE
-:10F4E000863509F409C1843609F428C1843709F442
-:10F4F000ABC1853709F473C2863709F4D9C08132AC
-:10F5000009F4B7C2809139028F5F80933902853048
-:10F5100061F6E0913A02F0913B0209950E94D9F818
-:10F52000803339F60E94C3F9C0CF2091380293E1AD
-:10F5300005C0223061F09923A9F391502130C9F719
-:10F540008091C00087FFFCCF8091C600F4CF8091EE
-:10F55000C80087FFFCCF8091CE00EDCF0E94D9F884
-:10F56000803281F6809138028130D1F1823009F009
-:10F570009CCF8091C80085FFFCCFE092CE008091A7
-:10F58000C80085FFFCCF8092CE008091C80085FF27
-:10F59000FCCF7092CE008091C80085FFFCCF6092B6
-:10F5A000CE008091C80085FFFCCF5092CE008091A4
-:10F5B000C80085FFFCCF4092CE008091C80085FF37
-:10F5C000FCCF3092CE008091C80085FFFCCF209206
-:10F5D000CE008091C80085FFFCCFA092CE0065CF01
-:10F5E0008091C00085FFFCCFE092C6008091C000F2
-:10F5F00085FFFCCF8092C6008091C00085FFFCCFC4
-:10F600007092C6008091C00085FFFCCF6092C6005A
-:10F610008091C00085FFFCCF5092C6008091C00051
-:10F6200085FFFCCF4092C6008091C00085FFFCCFD3
-:10F630003092C6008091C00085FFFCCF2092C600AA
-:10F640008091C00085FFFCCFA092C6002ECF0E9403
-:10F65000D9F8863808F466CF0E94D9F80E94C3F919
-:10F6600024CF2091380294E0213041F0223069F01B
-:10F67000992309F457CF91502130C1F78091C000F0
-:10F6800087FFFCCF8091C600F3CF8091C80087FF31
-:10F69000FCCF8091CE00ECCF0E94D9F8803841F1A8
-:10F6A000813809F447C0823809F4CAC08839E1F0CA
-:10F6B00080E00E947DF9F9CE0E94D9F880933C0247
-:10F6C0000E94D9F880933D020E94C3F9EECE0E94B9
-:10F6D000D9F80E94D9F8182F0E94D9F8112309F4FB
-:10F6E0007EC2113009F40AC283E00E947DF9DDCEAA
-:10F6F00082E00E947DF9D9CE0E94D9F8803339F397
-:10F700002091380292E0213039F0223061F09923C3
-:10F7100079F291502130C9F78091C00087FFFCCF6A
-:10F720008091C600F4CF8091C80087FFFCCF809104
-:10F73000CE00EDCF81E00E947DF9B7CE0E94D9F8CE
-:10F7400080933F030E94D9F880933E038091420347
-:10F750008E7F809342030E94D9F8853409F4B3C1A7
-:10F7600080913E0390913F03892B89F000E010E0E7
-:10F770000E94D9F8F801E25CFD4F80830F5F1F4FB4
-:10F7800080913E0390913F030817190788F30E9468
-:10F79000D9F8803209F0B6CE8091420380FFB2C121
-:10F7A00040913C0250913D02440F551F50933D0241
-:10F7B00040933C0260913E0370913F0361157105D7
-:10F7C000F1F080E090E09A01280F391FFC01E25C23
-:10F7D000FD4FE081F999FECF1FBA32BD21BDE0BDDA
-:10F7E0000FB6F894FA9AF99A0FBE01968617970702
-:10F7F00050F3460F571F50933D0240933C028091B7
-:10F800003802813081F0823009F04FCE8091C800FB
-:10F8100085FFFCCFE092CE008091C80085FFFCCF31
-:10F82000A092CE0042CE8091C00085FFFCCFE09236
-:10F83000C6008091C00085FFFCCFA092C60035CEE7
-:10F8400080E10E947DF931CE0E94D9F880933F0378
-:10F850000E94D9F880933E0320913C0230913D02F2
-:10F8600037FD46C1809142038D7F80934203220F72
-:10F87000331F30933D0220933C020E94D9F8853417
-:10F8800009F430C1809142038E7F809342030E942D
-:10F89000D9F8803209F009CE60913802613009F45C
-:10F8A0006FC0623009F473C000913E0310913F03B2
-:10F8B0000115110509F440C080914203782F717041
-:10F8C000F82EF69481E0F82240913C0250913D02DE
-:10F8D00020E030E013C0FF2009F060C0FA019491ED
-:10F8E000613009F43BC0623009F441C0CA0101969D
-:10F8F0002F5F3F4FAC0120173107D0F4772359F326
-:10F90000F999FECF52BD41BDF89A90B56130F9F03A
-:10F91000623061F78091C80085FFFCCF9093CE00E4
-:10F92000CA0101962F5F3F4FAC012017310730F31A
-:10F9300090933D0280933C02613009F4CAC062306A
-:10F9400009F0B3CD8091C80085FFFCCF46CE8091F1
-:10F95000C00085FFFCCF9093C600C8CF8091C00047
-:10F9600085FDF9CF8091C00085FFF8CFF4CF80915D
-:10F97000C80085FDD3CF8091C80085FFF8CFCECFDA
-:10F980008091C00085FFFCCFE092C6008DCF8091B2
-:10F99000C80085FFFCCFE092CE0086CFCA01A0E070
-:10F9A000B0E080509040AF4FBF4FABBFFC0197918C
-:10F9B000613061F0623009F099CF8091C80085FD17
-:10F9C000ADCF8091C80085FFF8CFA8CF8091C0004F
-:10F9D00085FDC1CF8091C00085FFF8CFBCCF0E94CC
-:10F9E000D9F8803209F08ECD80913802813011F142
-:10F9F000823009F05ACD8091C80085FFFCCFE0929B
-:10FA0000CE008091C80085FFFCCFD092CE008091BF
-:10FA1000C80085FFFCCFC092CE008091C80085FF52
-:10FA2000FCCFB092CE008091C80085FFFCCFA092A1
-:10FA3000CE003BCD8091C00085FFFCCFE092C60098
-:10FA40008091C00085FFFCCFD092C6008091C0009D
-:10FA500085FFFCCFC092C6008091C00085FFFCCF1F
-:10FA6000B092C6008091C00085FFFCCFA092C60076
-:10FA70001CCD0E94D9F8813209F017CD0E94D9F827
-:10FA8000813209F012CD279A2F98109240032091CD
-:10FA90003802E1E491E00EC0223009F4A4C0909352
-:10FAA0004003E92FF0E0E050FE4FE0819F5FEE233E
-:10FAB00009F4A0C0213081F78091C00085FFFCCF00
-:10FAC000E093C600ECCF80914203816080934203B3
-:10FAD00047CE8091C00085FDB7CD8091C00085FFE5
-:10FAE000F8CFB2CD80914203816080934203CFCEA4
-:10FAF00080914203826080934203B9CE87E90E94DD
-:10FB00007DF9D3CC80913D028823880F880B892111
-:10FB1000809341038BBF80913C0290913D02880FFE
-:10FB2000991F90933D0280933C0280913E0380FF99
-:10FB300009C080913E0390913F03019690933F034B
-:10FB400080933E03F894F999FECF1127E0913C028F
-:10FB5000F0913D02CEE3D2E080913E0390913F03CD
-:10FB6000103091F40091570001700130D9F303E097
-:10FB700000935700E8950091570001700130D9F3C8
-:10FB800001E100935700E895099019900091570002
-:10FB900001700130D9F301E000935700E895139507
-:10FBA000103898F011270091570001700130D9F3F7
-:10FBB00005E000935700E89500915700017001306F
-:10FBC000D9F301E100935700E8953296029709F0C6
-:10FBD000C7CF103011F00296E5CF112410CE8EE180
-:10FBE0000E947DF962CC8091C80085FFFCCFE09334
-:10FBF000CE0055CF7AE0B72E6DE0A62E5AE3952EB3
-:10FC000040E2842E3DE3732E90E3692E81E3582E6B
-:10FC1000213009F442C0223009F45FC00E94D9F8B3
-:10FC2000982F20913802213089F1223009F44EC0FA
-:10FC3000943709F46BC0923709F405C1973709F47A
-:10FC40007BC0953799F0923609F4BDC09A3601F71A
-:10FC5000E0913A02F0913B02099520913802D8CF09
-:10FC60008091C00085FFFCCF9093C6000E94D9F818
-:10FC7000982F80913802813099F38230B9F78091C2
-:10FC8000C80085FFFCCF9093CE00F0CF8091C000DC
-:10FC900085FFFCCF9093C600CBCF8091C00085FF3D
-:10FCA000FCCFB092C6008091C00085FFFCCFA0922F
-:10FCB000C6008091C00085FFFCCF9092C600809165
-:10FCC000C00085FFFCCF8092C600A8CF8091C800FD
-:10FCD00085FFFCCF9093CE00ABCF8091C80085FF0D
-:10FCE000FCCFB092CE008091C80085FFFCCFA092DF
-:10FCF000CE008091C80085FFFCCF9092CE0080910D
-:10FD0000C80085FFFCCF8092CE0088CF1F9947C0E6
-:10FD10002F9A213051F0223009F07ACF8091C8001B
-:10FD200085FFFCCF6092CE0073CF8091C00085FF2D
-:10FD3000FCCF6092C6006CCF0E94D9F8982F8091BA
-:10FD400038028130F1F0823009F4ABC00E9455F9DD
-:10FD5000082F0E9455F9182F0E94D9F8982F8091EA
-:10FD600038028130A9F0823009F4A2C00E9455F90E
-:10FD7000D02ECC24F601E10FF11D808320913802B2
-:10FD800047CF8091C00085FFFCCF9093C600DECFA7
-:10FD90008091C00085FFFCCF9093C600E7CF2F98DD
-:10FDA000213051F0223009F033CF8091C80085FF17
-:10FDB000FCCF5092CE002CCF8091C00085FFFCCFAD
-:10FDC0005092C60025CF213041F1223081F080E8E9
-:10FDD00085BF109274001092750080E091E1FC01E3
-:10FDE000819180E091E13097D1F3CF01F8CF8091FC
-:10FDF000C80085FFFCCF82E68093CE008091C800CA
-:10FE000085FFFCCF85E78093CE008091C80085FFF9
-:10FE1000FCCF83E78093CE00DACF8091C00085FFCE
-:10FE2000FCCF82E68093C6008091C00085FFFCCFA6
-:10FE300085E78093C6008091C00085FFFCCF83E7F3
-:10FE40008093C600C4CF0E94D9F8982F80913802C1
-:10FE50008130C9F08230D1F10E9455F9182F0E94EB
-:10FE600055F9982F809138028130A1F0823039F114
-:10FE7000F12EEE24F701E90FF11D80810E9494F824
-:10FE800020913802C5CE8091C00085FFFCCF9093B1
-:10FE9000C600E2CF8091C00085FFFCCF7092C60003
-:10FEA000E7CF8091C80085FFFCCF9093CE004ECF66
-:10FEB0008091C80085FFFCCF9093CE0057CF8091F2
-:10FEC000C80085FFFCCF7092CE00D2CF8091C800D1
-:0EFED00085FFFCCF9093CE00BFCFF894FFCFFC
-:10FEDE0041546D656761424F4F54202F204172642B
-:10FEEE0075696E6F204D656761202D20284329208E
-:10FEFE0041726475696E6F204C4C43202D20303951
-:08FF0E00303933300A0D008088
-:040000031000F000F9
-:00000001FF
diff --git a/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex b/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex
deleted file mode 100644
index 43a8b30..0000000
--- a/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex
+++ /dev/null
@@ -1,125 +0,0 @@
-:107800000C94343C0C94513C0C94513C0C94513CE1
-:107810000C94513C0C94513C0C94513C0C94513CB4
-:107820000C94513C0C94513C0C94513C0C94513CA4
-:107830000C94513C0C94513C0C94513C0C94513C94
-:107840000C94513C0C94513C0C94513C0C94513C84
-:107850000C94513C0C94513C0C94513C0C94513C74
-:107860000C94513C0C94513C11241FBECFEFD8E036
-:10787000DEBFCDBF11E0A0E0B1E0ECE9FFE702C060
-:1078800005900D92A230B107D9F712E0A2E0B1E065
-:1078900001C01D92AD30B107E1F70E942D3D0C945F
-:1078A000CC3F0C94003C982F959595959595959582
-:1078B000905D8F708A307CF0282F295A8091C0000B
-:1078C00085FFFCCF9093C6008091C00085FFFCCF60
-:1078D0002093C6000895282F205DF0CF982F809127
-:1078E000C00085FFFCCF9093C6000895EF92FF92F1
-:1078F0000F931F93EE24FF2487018091C00087FD22
-:1079000017C00894E11CF11C011D111D81E4E8164B
-:1079100082E4F8068FE0080780E0180770F3E09132
-:107920000401F091050109958091C00087FFE9CF1E
-:107930008091C6001F910F91FF90EF9008950E94D3
-:10794000763C982F8091C00085FFFCCF9093C600B5
-:1079500091362CF490330CF09053892F089597555D
-:10796000892F08951F930E949F3C182F0E949F3CCF
-:107970001295107F810F1F9108951F93182F882350
-:1079800021F00E94763C1150E1F71F9108951F935A
-:10799000182F0E94763C803249F0809103018F5F5E
-:1079A000809303018530C1F01F9108958091C0003C
-:1079B00085FFFCCF84E18093C6008091C00085FFE5
-:1079C000FCCF1093C6008091C00085FFFCCF80E102
-:1079D0008093C6001F910895E0910401F091050184
-:1079E00009951F9108950E94763C803241F0809164
-:1079F00003018F5F80930301853081F008958091AA
-:107A0000C00085FFFCCF84E18093C6008091C00058
-:107A100085FFFCCF80E18093C6000895E0910401CA
-:107A2000F09105010995089540E951E08823A1F0FE
-:107A30002D9A28EE33E0FA013197F1F721503040CA
-:107A4000D1F72D9828EE33E0FA013197F1F7215064
-:107A50003040D1F7815061F708953F924F925F9285
-:107A60006F927F928F929F92AF92BF92CF92DF924E
-:107A7000EF92FF920F931F93CF93DF93000080E16B
-:107A80008093C4001092C50088E18093C10086E015
-:107A90008093C2005098589A259A81E00E94143D24
-:107AA00024E1F22E9EE1E92E85E9D82E0FE0C02ECA
-:107AB00010E1B12EAA24A394B1E49B2EA6E58A2E50
-:107AC000F2E57F2EE0E26E2E79E4572E63E5462E36
-:107AD00050E5352E0E94763C8033B1F18133B9F107
-:107AE000803409F46FC0813409F476C0823409F41B
-:107AF00085C0853409F488C0803531F1823521F1A3
-:107B0000813511F1853509F485C0863509F48DC0BC
-:107B1000843609F496C0843709F403C1853709F423
-:107B200072C1863709F466C0809103018F5F80932C
-:107B30000301853079F6E0910401F0910501099582
-:107B40000E94763C803351F60E94F33CC3CF0E94E2
-:107B5000763C803249F78091C00085FFFCCFF092DF
-:107B6000C6008091C00085FFFCCF9092C600809136
-:107B7000C00085FFFCCF8092C6008091C00085FFC9
-:107B8000FCCF7092C6008091C00085FFFCCF609250
-:107B9000C6008091C00085FFFCCF5092C600809146
-:107BA000C00085FFFCCF4092C6008091C00085FFD9
-:107BB000FCCF3092C6008091C00085FFFCCFB09210
-:107BC000C60088CF0E94763C863808F4BDCF0E945C
-:107BD000763C0E94F33C7ECF0E94763C803809F4CC
-:107BE0009CC0813809F40BC1823809F43CC1883942
-:107BF00009F48FC080E00E94C73C6CCF84E10E94F2
-:107C0000BD3C0E94F33C66CF85E00E94BD3C0E94D3
-:107C1000F33C60CF0E94763C809306010E94763C44
-:107C2000809307010E94F33C55CF0E94763C80333D
-:107C300009F41DC183E00E94BD3C80E00E94C73C66
-:107C400049CF0E94763C809309020E94763C809343
-:107C5000080280910C028E7F80930C020E94763C79
-:107C6000853409F415C18091080290910902892B8D
-:107C700089F000E010E00E94763CF801E85FFE4FDA
-:107C800080830F5F1F4F80910802909109020817AF
-:107C9000190788F30E94763C803209F045CF809125
-:107CA0000C0280FF01C16091060170910701660F0F
-:107CB000771F7093070160930601A0910802B091AD
-:107CC00009021097C9F0E8E0F1E09B01AD014E0F09
-:107CD0005F1FF999FECF32BD21BD819180BDFA9A17
-:107CE000F99A2F5F3F4FE417F50799F76A0F7B1F4B
-:107CF00070930701609306018091C00085FFFCCF5F
-:107D0000F092C6008091C00085FFFCCFB092C60003
-:107D1000E1CE83E00E94C73CDDCE82E00E94C73CFA
-:107D2000D9CE0E94763C809309020E94763C8093D3
-:107D300008028091060190910701880F991F909386
-:107D40000701809306010E94763C853409F4A6C0A1
-:107D500080910C028E7F80930C020E94763C8032D0
-:107D600009F0B8CE8091C00085FFFCCFF092C6002C
-:107D7000609108027091090261157105B9F140E046
-:107D800050E080910C02A82FA170B82FB27011C0E2
-:107D9000BB2309F45CC0E0910601F0910701319624
-:107DA000F0930701E09306014F5F5F4F46175707B7
-:107DB000E8F4AA2369F3F999FECF209106013091E6
-:107DC000070132BD21BDF89A90B58091C00085FFB2
-:107DD000FCCF9093C6002F5F3F4F30930701209355
-:107DE00006014F5F5F4F4617570718F38091C00099
-:107DF00085FDE5CE8091C00085FFF8CFE0CE81E023
-:107E00000E94C73C67CE0E94763C803209F08CCE3F
-:107E10008091C00085FFFCCFF092C6008091C00029
-:107E200085FFFCCFE092C6008091C00085FFFCCFAB
-:107E3000D092C6008091C00085FFFCCFC092C600E2
-:107E40008091C00085FFFCCFB092C60043CEE09188
-:107E50000601F091070194918091C00085FFFCCF4D
-:107E60009093C6009CCF80E10E94C73C33CE0E9415
-:107E7000763C0E94763C182F0E94763C112309F430
-:107E800083C0113009F484C08FE00E94C73C22CE29
-:107E900080910C02816080930C02E5CE80910C02EF
-:107EA000816080930C0259CF809107018823880F4D
-:107EB000880B8A2180930B02809106019091070123
-:107EC000880F991F90930701809306018091080203
-:107ED00080FF09C080910802909109020196909359
-:107EE000090280930802F894F999FECF1127E091D6
-:107EF0000601F0910701C8E0D1E08091080290915D
-:107F00000902103091F40091570001700130D9F34B
-:107F100003E000935700E89500915700017001308D
-:107F2000D9F301E100935700E89509901990009169
-:107F3000570001700130D9F301E000935700E89534
-:107F40001395103498F011270091570001700130FB
-:107F5000D9F305E000935700E895009157000170B0
-:107F60000130D9F301E100935700E895329602976A
-:107F700009F0C7CF103011F00296E5CF112480919F
-:107F8000C00085FFB9CEBCCE8EE10E94C73CA2CD19
-:0C7F900085E90E94C73C9ECDF894FFCF0D
-:027F9C00800063
-:040000030000780081
-:00000001FF
diff --git a/bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex b/bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex
deleted file mode 100644
index 9753e2e..0000000
--- a/bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex
+++ /dev/null
@@ -1,124 +0,0 @@
-:107800000C94343C0C94513C0C94513C0C94513CE1
-:107810000C94513C0C94513C0C94513C0C94513CB4
-:107820000C94513C0C94513C0C94513C0C94513CA4
-:107830000C94513C0C94513C0C94513C0C94513C94
-:107840000C94513C0C94513C0C94513C0C94513C84
-:107850000C94513C0C94513C0C94513C0C94513C74
-:107860000C94513C0C94513C11241FBECFEFD8E036
-:10787000DEBFCDBF11E0A0E0B1E0EAE8FFE702C063
-:1078800005900D92A230B107D9F712E0A2E0B1E065
-:1078900001C01D92AD30B107E1F70E942D3D0C945F
-:1078A000C33F0C94003C982F95959595959595958B
-:1078B000905D8F708A307CF0282F295A8091C0000B
-:1078C00085FFFCCF9093C6008091C00085FFFCCF60
-:1078D0002093C6000895282F205DF0CF982F809127
-:1078E000C00085FFFCCF9093C6000895EF92FF92F1
-:1078F0000F931F93EE24FF2487018091C00087FD22
-:1079000017C00894E11CF11C011D111D81E2E8164D
-:1079100081EAF80687E0080780E0180770F3E09135
-:107920000401F091050109958091C00087FFE9CF1E
-:107930008091C6001F910F91FF90EF9008950E94D3
-:10794000763C982F8091C00085FFFCCF9093C600B5
-:1079500091362CF490330CF09053892F089597555D
-:10796000892F08951F930E949F3C182F0E949F3CCF
-:107970001295107F810F1F9108951F93182F882350
-:1079800021F00E94763C1150E1F71F9108951F935A
-:10799000182F0E94763C803249F0809103018F5F5E
-:1079A000809303018530C1F01F9108958091C0003C
-:1079B00085FFFCCF84E18093C6008091C00085FFE5
-:1079C000FCCF1093C6008091C00085FFFCCF80E102
-:1079D0008093C6001F910895E0910401F091050184
-:1079E00009951F9108950E94763C803241F0809164
-:1079F00003018F5F80930301853081F008958091AA
-:107A0000C00085FFFCCF84E18093C6008091C00058
-:107A100085FFFCCF80E18093C6000895E0910401CA
-:107A2000F09105010995089548EC50E08823A1F0F4
-:107A30002D9A28EE33E0FA013197F1F721503040CA
-:107A4000D1F72D9828EE33E0FA013197F1F7215064
-:107A50003040D1F7815061F708953F924F925F9285
-:107A60006F927F928F929F92AF92BF92CF92DF924E
-:107A7000EF92FF920F931F93CF93DF93000082E06A
-:107A80008093C00080E18093C4001092C50088E11B
-:107A90008093C10086E08093C2005098589A259A3E
-:107AA00081E00E94143D24E1F22E9EE1E92E85E959
-:107AB000D82E0FE0C02E10E1B12EAA24A394B1E479
-:107AC0009B2EA6E58A2EF2E57F2EE0E26E2E79E46B
-:107AD000572E63E5462E50E5352E0E94763C8033C6
-:107AE000B1F18133B9F1803409F46FC0813409F404
-:107AF00076C0823409F485C0853409F488C08035A5
-:107B000031F1823521F1813511F1853509F485C0D6
-:107B1000863509F48DC0843609F496C0843709F49B
-:107B200003C1853709F472C1863709F466C08091B4
-:107B300003018F5F80930301853079F6E0910401A2
-:107B4000F091050109950E94763C803351F60E9420
-:107B5000F33CC3CF0E94763C803249F78091C0004D
-:107B600085FFFCCFF092C6008091C00085FFFCCF5E
-:107B70009092C6008091C00085FFFCCF8092C60025
-:107B80008091C00085FFFCCF7092C6008091C0003C
-:107B900085FFFCCF6092C6008091C00085FFFCCFBE
-:107BA0005092C6008091C00085FFFCCF4092C60075
-:107BB0008091C00085FFFCCF3092C6008091C0004C
-:107BC00085FFFCCFB092C60088CF0E94763C8638F5
-:107BD00008F4BDCF0E94763C0E94F33C7ECF0E9409
-:107BE000763C803809F49CC0813809F40BC1823896
-:107BF00009F430C1883909F48FC080E00E94C73C85
-:107C00006CCF84E10E94BD3C0E94F33C66CF85E0CE
-:107C10000E94BD3C0E94F33C60CF0E94763C809362
-:107C200006010E94763C809307010E94F33C55CFE9
-:107C30000E94763C803309F411C183E00E94BD3C70
-:107C400080E00E94C73C49CF0E94763C80930902A5
-:107C50000E94763C8093080280910C028E7F809374
-:107C60000C020E94763C853409F409C18091080217
-:107C700090910902892B89F000E010E00E94763C87
-:107C8000F801E85FFE4F80830F5F1F4F809108026D
-:107C9000909109020817190788F30E94763C8032F8
-:107CA00009F045CF80910C0280FFF5C0609106017C
-:107CB00070910701660F771F7093070160930601AB
-:107CC000A0910802B09109021097C9F0E8E0F1E034
-:107CD0009B01AD014E0F5F1FF999FECF32BD21BD53
-:107CE000819180BDFA9AF99A2F5F3F4FE417F5070B
-:107CF00099F76A0F7B1F70930701609306018091CB
-:107D0000C00085FFFCCFF092C6008091C00085FFC7
-:107D1000FCCFB092C600E1CE83E00E94C73CDDCE2E
-:107D200082E00E94C73CD9CE0E94763C8093090233
-:107D30000E94763C80930802809106019091070191
-:107D4000880F991F90930701809306010E94763C4B
-:107D5000853409F49AC080910C028E7F80930C02C6
-:107D60000E94763C803209F0B8CE8091C00085FF39
-:107D7000FCCFF092C600A0910802B09109021097C2
-:107D8000C1F180910C02082F0170182F1695117007
-:107D9000E0910601F0910701AF014F5F5F4FBA011B
-:107DA00020E030E00023B1F4112339F49491809164
-:107DB000C00085FFFCCF9093C6002F5F3F4FCB01E3
-:107DC0000196FA012A173B0780F4BC014F5F5F4F11
-:107DD000002351F3F999FECFF2BDE1BDF89A90B5B9
-:107DE0008091C00085FFFCCFE6CF709307016093C0
-:107DF00006018091C00085FDE5CE8091C00085FF21
-:107E0000F8CFE0CE81E00E94C73C67CE0E94763C6E
-:107E1000803209F08CCE8091C00085FFFCCFF092BB
-:107E2000C6008091C00085FFFCCFE092C600809123
-:107E3000C00085FFFCCFD092C6008091C00085FFB6
-:107E4000FCCFC092C6008091C00085FFFCCFB092ED
-:107E5000C60043CE80E10E94C73C3FCE0E94763CE4
-:107E60000E94763C182F0E94763C112309F483C0AF
-:107E7000113009F484C08FE00E94C73C2ECE80915F
-:107E80000C02816080930C02F1CE80910C02816023
-:107E900080930C0265CF809107018823880F880B9F
-:107EA0008A2180930B028091060190910701880F2F
-:107EB000991F90930701809306018091080280FF2B
-:107EC00009C08091080290910902019690930902DD
-:107ED00080930802F894F999FECF1127E0910601EA
-:107EE000F0910701C8E0D1E0809108029091090269
-:107EF000103091F40091570001700130D9F303E084
-:107F000000935700E8950091570001700130D9F3B4
-:107F100001E100935700E8950990199000915700EE
-:107F200001700130D9F301E000935700E8951395F3
-:107F3000103498F011270091570001700130D9F3E7
-:107F400005E000935700E89500915700017001305B
-:107F5000D9F301E100935700E8953296029709F0B2
-:107F6000C7CF103011F00296E5CF11248091C000E8
-:107F700085FFC5CEC8CE8EE10E94C73CAECD85E957
-:0A7F80000E94C73CAACDF894FFCF81
-:027F8A00800075
-:040000030000780081
-:00000001FF
diff --git a/bootloaders/atmega/ATmegaBOOT_168_diecimila.hex b/bootloaders/atmega/ATmegaBOOT_168_diecimila.hex
deleted file mode 100644
index feac9d2..0000000
--- a/bootloaders/atmega/ATmegaBOOT_168_diecimila.hex
+++ /dev/null
@@ -1,126 +0,0 @@
-:103800000C94341C0C94511C0C94511C0C94511CA1
-:103810000C94511C0C94511C0C94511C0C94511C74
-:103820000C94511C0C94511C0C94511C0C94511C64
-:103830000C94511C0C94511C0C94511C0C94511C54
-:103840000C94511C0C94511C0C94511C0C94511C44
-:103850000C94511C0C94511C0C94511C0C94511C34
-:103860000C94511C0C94511C11241FBECFEFD4E0BA
-:10387000DEBFCDBF11E0A0E0B1E0E4EAFFE302C0AB
-:1038800005900D92A230B107D9F712E0A2E0B1E0A5
-:1038900001C01D92AD30B107E1F70E94361D0C94B6
-:1038A000D01F0C94001C982F9595959595959595FE
-:1038B000905D8F708A307CF0282F295A8091C0004B
-:1038C00085FFFCCF9093C6008091C00085FFFCCFA0
-:1038D0002093C6000895282F205DF0CF982F809167
-:1038E000C00085FFFCCF9093C6000895EF92FF9231
-:1038F0000F931F93EE24FF2487018091C00087FD62
-:1039000017C00894E11CF11C011D111D81E4E8168B
-:1039100082E4F8068FE0080780E0180770F3E09172
-:103920000401F091050109958091C00087FFE9CF5E
-:103930008091C6001F910F91FF90EF9008950E9413
-:10394000761C982F8091C00085FFFCCF9093C60015
-:1039500091362CF490330CF09053892F089597559D
-:10396000892F08951F930E949F1C182F0E949F1C4F
-:103970001295107F810F1F910895882351F0982F81
-:1039800091508091C00087FFFCCF8091C6009923A1
-:10399000B9F708951F93182F0E94761C803249F0C2
-:1039A000809103018F5F809303018530C1F01F91E7
-:1039B00008958091C00085FFFCCF84E18093C6000C
-:1039C0008091C00085FFFCCF1093C6008091C0009D
-:1039D00085FFFCCF80E18093C6001F910895E091A0
-:1039E0000401F091050109951F9108950E94761C2C
-:1039F000803241F0809103018F5F80930301853015
-:103A000081F008958091C00085FFFCCF84E1809310
-:103A1000C6008091C00085FFFCCF80E18093C60086
-:103A20000895E0910401F09105010995089510921F
-:103A30000A028823D1F090E040E951E02D9A28EE67
-:103A400033E0FA013197F1F721503040D1F72D984A
-:103A500028EE33E0FA013197F1F721503040D1F7E9
-:103A60009F5F981758F380930A0208953F924F92F0
-:103A70005F926F927F928F929F92AF92BF92CF92FE
-:103A8000DF92EF92FF920F931F93CF93DF9300008B
-:103A900083E38093C4001092C50088E18093C10045
-:103AA00086E08093C2005098589A259A81E00E943F
-:103AB000171D44E1F42E3EE1E32E24E9D22E96E0D8
-:103AC000C92E80E1B82EAA24A39401E4902E16E515
-:103AD000812EB2E57B2EA0E26A2EF9E45F2EE3E5AB
-:103AE0004E2E70E5372E0E94761C8033B1F1813363
-:103AF00009F441C0803409F479C0813409F48CC0E0
-:103B0000823471F1853409F47BC0803531F182351E
-:103B100021F1813511F1853509F48DC0863509F41F
-:103B20009DC0843609F4AEC0843709F41BC18537C3
-:103B300009F485C1863709F47AC0809103018F5F4B
-:103B400080930301853079F6E0910401F09105013D
-:103B500009950E94761C803351F60E94F61CC3CF53
-:103B600093E18091C00087FFFCCF8091C60099232C
-:103B7000A1F39150F6CF0E94761C8032F1F680912D
-:103B8000C00085FFFCCFF092C6008091C00085FF89
-:103B9000FCCF9092C6008091C00085FFFCCF809240
-:103BA000C6008091C00085FFFCCF7092C600809156
-:103BB000C00085FFFCCF6092C6008091C00085FFE9
-:103BC000FCCF5092C6008091C00085FFFCCF409290
-:103BD000C6008091C00085FFFCCF3092C600809166
-:103BE000C00085FFFCCFB092C6007DCF0E94761C3E
-:103BF000863808F4B2CF0E94761C0E94F61C73CF60
-:103C000094E08091C00087FFFCCF8091C60099238B
-:103C100009F4A3CF9150F5CF0E94761C8038D1F0E3
-:103C2000813861F1823809F499C0883979F080E0EF
-:103C30000E94CA1C58CF0E94761C809306010E94E5
-:103C4000761C809307010E94F61C4DCF83E00E94F2
-:103C5000CA1C49CF82E00E94CA1C45CF0E94761C34
-:103C6000803309F486C192E08091C00087FFFCCFC9
-:103C70008091C6009923D9F29150F6CF81E00E943D
-:103C8000CA1C31CF0E94761C809309020E94761CC8
-:103C90008093080280910C028E7F80930C020E9418
-:103CA000761C853429F480910C02816080930C028B
-:103CB0008091080290910902892B89F000E010E0C0
-:103CC0000E94761CF801E85FFE4F80830F5F1F4F54
-:103CD00080910802909109020817190788F30E9441
-:103CE000761C803209F029CF80910C0280FFD1C070
-:103CF0004091060150910701440F551F5093070151
-:103D000040930601A0910802B09109021097C9F0F2
-:103D1000E8E0F1E09A01BD016E0F7F1FF999FECF37
-:103D200032BD21BD819180BDFA9AF99A2F5F3F4F34
-:103D3000E617F70799F74A0F5B1F50930701409367
-:103D400006018091C00085FFFCCFF092C6008091F3
-:103D5000C00085FFFCCFB092C600C5CE80E10E94B6
-:103D6000CA1CC1CE0E94761C809309020E94761C58
-:103D7000809308028091060190910701880F991F96
-:103D800090930701809306010E94761C853409F404
-:103D90007AC080910C028E7F80930C020E94761C68
-:103DA000803209F0A0CE8091C00085FFFCCFF09258
-:103DB000C600A0910802B09109021097B9F1809154
-:103DC0000C02182F1170082F0270E0910601F0917B
-:103DD00007019F012F5F3F4FB90140E050E01123E1
-:103DE000B1F4002339F494918091C00085FFFCCF99
-:103DF0009093C6004F5F5F4FCB010196F9014A17C0
-:103E00005B0780F4BC012F5F3F4F112351F3F999F9
-:103E1000FECFF2BDE1BDF89A90B58091C00085FF5C
-:103E2000FCCFE6CF70930701609306018091C0003C
-:103E300085FDD9CE8091C00085FFF8CFD4CE0E94F9
-:103E4000761C803209F079CE8091C00085FFFCCFCE
-:103E5000F092C6008091C00085FFFCCFE092C600C2
-:103E60008091C00085FFFCCFD092C6008091C00039
-:103E700085FFFCCFC092C6008091C00085FFFCCFBB
-:103E8000B092C60030CE80910C02816080930C020B
-:103E900085CF809107018823880F880B8A21809322
-:103EA0000B028091060190910701880F991F909352
-:103EB0000701809306018091080280FF09C080916C
-:103EC00008029091090201969093090280930802DA
-:103ED000F894F999FECF1127E0910601F0910701BE
-:103EE000C8E0D1E08091080290910902103091F46D
-:103EF0000091570001700130D9F303E0009357009F
-:103F0000E8950091570001700130D9F301E1009369
-:103F10005700E89509901990009157000170013001
-:103F2000D9F301E000935700E8951395103498F009
-:103F300011270091570001700130D9F305E000937B
-:103F40005700E8950091570001700130D9F301E165
-:103F500000935700E8953296029709F0C7CF1030CA
-:103F600011F00296E5CF11248091C00085FFE9CEC3
-:103F7000ECCE0E94761C0E94761C182F0E94761CA4
-:103F8000112351F0113021F086E00E94CA1CABCD04
-:103F900084E90E94CA1CA7CD8EE10E94CA1CA3CD51
-:043FA000F894FFCFC3
-:023FA40080009B
-:0400000300003800C1
-:00000001FF
diff --git a/bootloaders/atmega/ATmegaBOOT_168_ng.hex b/bootloaders/atmega/ATmegaBOOT_168_ng.hex
deleted file mode 100644
index 387091e..0000000
--- a/bootloaders/atmega/ATmegaBOOT_168_ng.hex
+++ /dev/null
@@ -1,110 +0,0 @@
-:103800000C94341C0C94511C0C94511C0C94511CA1
-:103810000C94511C0C94511C0C94511C0C94511C74
-:103820000C94511C0C94511C0C94511C0C94511C64
-:103830000C94511C0C94511C0C94511C0C94511C54
-:103840000C94511C0C94511C0C94511C0C94511C44
-:103850000C94511C0C94511C0C94511C0C94511C34
-:103860000C94511C0C94511C11241FBECFEFD4E0BA
-:10387000DEBFCDBF11E0A0E0B1E0E4EAFEE302C0AC
-:1038800005900D92A230B107D9F712E0A2E0B1E0A5
-:1038900001C01D92AD30B107E1F70E94ED1C0C9400
-:1038A000511F0C94001C482F10920A0280E08417CC
-:1038B000E0F4582F2D9A28EE33E080E991E001974B
-:1038C000F1F721503040C9F72D9828EE33E080E918
-:1038D00091E00197F1F721503040C9F7852F8F5FB4
-:1038E000582F841738F380930A020895EF92FF92BD
-:1038F0000F931F93EE24FF2487018091C00087FD62
-:1039000017C00894E11CF11C011D111D81E0E8168F
-:1039100082E1F8068AE7080780E0180770F3E09173
-:103920000201F091030109958091C00087FFE9CF62
-:103930008091C600992787FD90951F910F91FF9068
-:10394000EF900895982F8091C00085FFFCCF909351
-:10395000C60008950E94761C803271F080910401A7
-:103960008F5F80930401853009F00895E091020192
-:10397000F09103010995089584E10E94A21C80E161
-:103980000E94A21C0895CF93C82F0E94761C8032FB
-:1039900041F0809104018F5F80930401853081F4B0
-:1039A0000AC084E10E94A21C8C2F0E94A21C80E10C
-:1039B0000E94A21C05C0E0910201F091030109954B
-:1039C000CF910895CF93C82FC150CF3F21F00E94CF
-:1039D000761CC150E0F7CF910895CFEFD4E0DEBF61
-:1039E000CDBF000083E38093C4001092C50088E13E
-:1039F0008093C10086E08093C2005098589A259A1F
-:103A000083E00E94531C0E94761C8033B1F1813305
-:103A1000B9F1803409F455C0813409F45BC08234B3
-:103A200009F46DC0853409F470C0803531F18235F8
-:103A300021F1813511F1853509F46BC0863509F422
-:103A400073C0843609F47AC0843709F4CEC0853750
-:103A500009F429C1863709F44AC0809104018F5FB7
-:103A600080930401853079F6E0910201F091030121
-:103A700009950E94761C803351F60E94AA1CC3CF80
-:103A80000E94761CC82F803241F784E10E94A21C5C
-:103A900081E40E94A21C86E50E94A21C82E50E948D
-:103AA000A21C8C2F0E94A21C89E40E94A21C83E508
-:103AB0000E94A21C80E50E94A21C80E10E94A21C20
-:103AC000A2CF0E94761C8638C0F20E94761C0E940B
-:103AD000AA1C99CF0E94761C803809F486C18138CF
-:103AE00009F487C1823809F488C1883921F080E05F
-:103AF0000E94C31C88CF83E00E94C31C84CF84E152
-:103B00000E94E21C0E94AA1C7ECF85E00E94E21C5B
-:103B1000F9CF0E94761C809306010E94761C809348
-:103B200007010E94AA1C6FCF0E94761C803309F403
-:103B3000CAC083E00E94E21C80E0DACF0E94761CBB
-:103B4000809309020E94761C8093080280910C02E7
-:103B50008E7F80930C020E94761C853409F4C4C0C9
-:103B600000E010E0809108029091090218161906F1
-:103B700070F4C8E0D1E00E94761C89930F5F1F4F5C
-:103B8000809108029091090208171907A0F30E947A
-:103B9000761C803209F061CF80910C0280FFAEC0AC
-:103BA000E0910601F0910701EE0FFF1F00E010E029
-:103BB00020910802309109021216130680F4A8E041
-:103BC000B1E0F999FECFF2BDE1BD8D9180BDFA9AC9
-:103BD000F99A31960F5F1F4F0217130790F3F09376
-:103BE0000701E093060184E166CF0E94761C809372
-:103BF00009020E94761C8093080280910601909130
-:103C00000701880F991F90930701809306010E9476
-:103C1000761C853409F46EC080910C028E7F8093EF
-:103C20000C020E94761C803209F0EDCE84E10E94E5
-:103C3000A21C00E010E02091080230910902121647
-:103C4000130608F03ACFE0910601F0910701809148
-:103C50000C0280FF1FC0F999FECFF2BDE1BDF89ABA
-:103C600080B50E94A21CE0910601F09107013196F7
-:103C7000F0930701E09306012091080230910902B8
-:103C80000F5F1F4F0217130708F017CF80910C0228
-:103C900080FDE1CF869580FFB4C03196F093070197
-:103CA000E0930601EDCF0E94761C803209F0D5CE5C
-:103CB00084E10E94A21C8EE10E94A21C84E90E9461
-:103CC000A21C86E0F8CE0E94761C0E94761CC82FAB
-:103CD0000E94761CCC2309F47CC0C13009F47DC05D
-:103CE00086E00E94C31C8FCE80910C02816080937D
-:103CF0000C0236CF80910C02816091CF8091070138
-:103D000087FD6FC010920B02809106019091070110
-:103D1000880F991F909307018093060180910802F4
-:103D200080FF09C08091080290910902019690934A
-:103D3000090280930802F894F999FECF1127E091C7
-:103D40000601F0910701C8E0D1E08091080290914E
-:103D50000902103091F40091570001700130D9F33D
-:103D600003E000935700E89500915700017001307F
-:103D7000D9F301E100935700E8950990199000915B
-:103D8000570001700130D9F301E000935700E89526
-:103D90001395103498F011270091570001700130ED
-:103DA000D9F305E000935700E895009157000170A2
-:103DB0000130D9F301E100935700E895329602975C
-:103DC00009F0C7CF103011F00296E5CF112484E13D
-:103DD00072CE8EE10E94C31C16CE84E90E94C31CE1
-:103DE00012CE81E080930B028FCF82E00E94C31C31
-:103DF0000ACE81E00E94C31C06CE80E10E94C31C53
-:103E000002CE84910E94A21C2091080230910902E6
-:103E1000E0910601F091070140CFCF930E94761CFC
-:103E2000C82F0E94A21CC13614F0C75503C0C0336E
-:103E30000CF0C0538C2F992787FD9095CF91089552
-:103E40000F931F930E940D1F082F112707FD109538
-:103E500002951295107F1027007F10270E940D1FDA
-:103E6000800F992787FD90951F910F910895CF930B
-:103E7000C82F85958595859585958A3034F0895A22
-:103E8000CF70CA3034F0C95A05C0805DCF70CA30D7
-:103E9000D4F7C05D0E94A21C8C2F0E94A21CCF915F
-:043EA0000895FFCFB3
-:023EA40080009C
-:0400000300003800C1
-:00000001FF
diff --git a/bootloaders/atmega/ATmegaBOOT_168_pro_8MHz.hex b/bootloaders/atmega/ATmegaBOOT_168_pro_8MHz.hex
deleted file mode 100644
index 994e478..0000000
--- a/bootloaders/atmega/ATmegaBOOT_168_pro_8MHz.hex
+++ /dev/null
@@ -1,126 +0,0 @@
-:103800000C94341C0C94511C0C94511C0C94511CA1
-:103810000C94511C0C94511C0C94511C0C94511C74
-:103820000C94511C0C94511C0C94511C0C94511C64
-:103830000C94511C0C94511C0C94511C0C94511C54
-:103840000C94511C0C94511C0C94511C0C94511C44
-:103850000C94511C0C94511C0C94511C0C94511C34
-:103860000C94511C0C94511C11241FBECFEFD4E0BA
-:10387000DEBFCDBF11E0A0E0B1E0EEEAFFE302C0A1
-:1038800005900D92A230B107D9F712E0A2E0B1E0A5
-:1038900001C01D92AD30B107E1F70E94331D0C94B9
-:1038A000D51F0C94001C982F9595959595959595F9
-:1038B000905D8F708A307CF0282F295A8091C0004B
-:1038C00085FFFCCF9093C6008091C00085FFFCCFA0
-:1038D0002093C6000895282F205DF0CF982F809167
-:1038E000C00085FFFCCF9093C6000895EF92FF9231
-:1038F0000F931F93EE24FF2487018091C00087FD62
-:1039000017C00894E11CF11C011D111D81E2E8168D
-:1039100081EAF80687E0080780E0180770F3E09175
-:103920000401F091050109958091C00087FFE9CF5E
-:103930008091C6001F910F91FF90EF9008950E9413
-:10394000761C982F8091C00085FFFCCF9093C60015
-:1039500091362CF490330CF09053892F089597559D
-:10396000892F08951F930E949F1C182F0E949F1C4F
-:103970001295107F810F1F9108951F93182F882390
-:1039800021F00E94761C1150E1F71F9108951F93BA
-:10399000182F0E94761C803249F0809103018F5FBE
-:1039A000809303018530C1F01F9108958091C0007C
-:1039B00085FFFCCF84E18093C6008091C00085FF25
-:1039C000FCCF1093C6008091C00085FFFCCF80E142
-:1039D0008093C6001F910895E0910401F0910501C4
-:1039E00009951F9108950E94761C803241F08091C4
-:1039F00003018F5F80930301853081F008958091EA
-:103A0000C00085FFFCCF84E18093C6008091C00098
-:103A100085FFFCCF80E18093C6000895E09104010A
-:103A2000F09105010995089510920A028823D1F0BA
-:103A300090E048EC50E02D9A28EE33E0FA013197FF
-:103A4000F1F721503040D1F72D9828EE33E0FA01FC
-:103A50003197F1F721503040D1F79F5F981758F315
-:103A600080930A0208953F924F925F926F927F92E5
-:103A70008F929F92AF92BF92CF92DF92EF92FF927E
-:103A80000F931F93CF93DF9394B714BE8091600080
-:103A90008861809360001092600091FF0CC289E100
-:103AA0008093C4001092C50088E18093C10086E035
-:103AB0008093C2005098589A259A81E00E94141D64
-:103AC00044E1F42E3EE1E32E24E9D22E96E0C92E05
-:103AD00080E1B82EAA24A39401E4902E16E5812E4D
-:103AE000B2E57B2EA0E26A2EF9E45F2EE3E54E2ECE
-:103AF00070E5372E0E94761C8033B9F18133C1F115
-:103B0000803409F470C0813409F477C0823409F438
-:103B100086C0853409F489C0803539F1823529F1B0
-:103B2000813509F4AFC1853509F485C0863509F4BE
-:103B30008DC0843609F435C1843709F4C1C0853796
-:103B400009F490C0863709F466C0809103018F5F45
-:103B500080930301853071F6E0910401F091050135
-:103B600009950E94761C803349F60E94F31CC2CF4F
-:103B70000E94761C803249F78091C00085FFFCCFFF
-:103B8000F092C6008091C00085FFFCCF9092C600E5
-:103B90008091C00085FFFCCF8092C6008091C0005C
-:103BA00085FFFCCF7092C6008091C00085FFFCCFDE
-:103BB0006092C6008091C00085FFFCCF5092C60085
-:103BC0008091C00085FFFCCF4092C6008091C0006C
-:103BD00085FFFCCF3092C6008091C00085FFFCCFEE
-:103BE000B092C60087CF0E94761C863808F4BDCFFD
-:103BF0000E94761C0E94F31C7DCF0E94761C8038A8
-:103C000009F45AC0813809F453C0823809F440C11C
-:103C1000883909F449C080E00E94C71C6BCF84E159
-:103C20000E94BD1C0E94F31C65CF85E00E94BD1C54
-:103C30000E94F31C5FCF0E94761C809306010E94B5
-:103C4000761C809307010E94F31C54CF0E94761CBF
-:103C5000803309F421C183E00E94BD1C80E00E94F2
-:103C6000C71C48CF0E94761C803209F06ECF80912D
-:103C7000C00085FFFCCFF092C6008091C00085FF98
-:103C8000FCCFE092C6008091C00085FFFCCFD092AF
-:103C9000C6008091C00085FFFCCFC092C600809115
-:103CA000C00085FFFCCF9CCF83E00E94C71C22CFC1
-:103CB00081E00E94C71C1ECF82E00E94C71C1ACF61
-:103CC0000E94761C809309020E94761C8093080251
-:103CD0008091060190910701880F991F9093070129
-:103CE000809306010E94761C853409F4C5C080913A
-:103CF0000C028E7F80930C020E94761C803209F0A9
-:103D0000F9CE8091C00085FFFCCFF092C600609193
-:103D10000802709109026115710591F140E050E0CF
-:103D200080910C02A82FA170B82FB27010C0BB23D5
-:103D300061F1E0910601F09107013196F0930701DE
-:103D4000E09306014F5F5F4F46175707C8F4AA2359
-:103D500071F3F999FECF209106013091070132BD30
-:103D600021BDF89A90B58091C00085FFFCCF90935B
-:103D7000C6002F5F3F4F3093070120930601E2CF2B
-:103D80008091C00085FFFCCF2BCFE0910601F09120
-:103D9000070194918091C00085FFFCCF9093C600ED
-:103DA000CCCF0E94761C809309020E94761C8093DF
-:103DB000080280910C028E7F80930C020E94761C78
-:103DC000853429F480910C02816080930C028091EB
-:103DD000080290910902892B89F000E010E00E940E
-:103DE000761CF801E85FFE4F80830F5F1F4F8091C4
-:103DF0000802909109020817190788F30E94761C9F
-:103E0000803209F0A2CE80910C0280FF62C0409106
-:103E1000060150910701440F551F5093070140932D
-:103E20000601609108027091090261157105C9F0DF
-:103E3000E8E0F1E09A01DB01AE0FBF1FF999FECF78
-:103E400032BD21BD819180BDFA9AF99A2F5F3F4F13
-:103E5000EA17FB0799F7460F571F50930701409346
-:103E600006018091C00085FFFCCFF092C6008091D2
-:103E7000C00085FFFCCFB4CE80910C02816080939E
-:103E80000C023ACF0E94F31C88E080936000FFCFC1
-:103E900080E10E94C71C2ECE0E94761C0E94761CD8
-:103EA000182F0E94761C112381F0113051F086E00A
-:103EB0000E94C71C1FCEE0910401F09105010995F5
-:103EC000EECD84E90E94C71C15CE8EE10E94C71C6E
-:103ED00011CE809107018823880F880B8A21809357
-:103EE0000B028091060190910701880F991F909312
-:103EF0000701809306018091080280FF09C080912C
-:103F00000802909109020196909309028093080299
-:103F1000F894F999FECF1127E0910601F09107017D
-:103F2000C8E0D1E08091080290910902103091F42C
-:103F30000091570001700130D9F303E0009357005E
-:103F4000E8950091570001700130D9F301E1009329
-:103F50005700E895099019900091570001700130C1
-:103F6000D9F301E000935700E8951395103498F0C9
-:103F700011270091570001700130D9F305E000933B
-:103F80005700E8950091570001700130D9F301E125
-:103F900000935700E8953296029709F0C7CF10308A
-:0E3FA00011F00296E5CF11245CCFF894FFCF0C
-:023FAE00800091
-:0400000300003800C1
-:00000001FF
diff --git a/bootloaders/atmega/Makefile b/bootloaders/atmega/Makefile
deleted file mode 100755
index efe92e6..0000000
--- a/bootloaders/atmega/Makefile
+++ /dev/null
@@ -1,238 +0,0 @@
-# Makefile for ATmegaBOOT
-# E.Lins, 18.7.2005
-#
-# Instructions
-#
-# To make bootloader .hex file:
-# make diecimila
-# make lilypad
-# make ng
-# etc...
-#
-# To burn bootloader .hex file:
-# make diecimila_isp
-# make lilypad_isp
-# make ng_isp
-# etc...
-
-# program name should not be changed...
-PROGRAM = ATmegaBOOT_168
-
-# enter the parameters for the avrdude isp tool
-ISPTOOL = stk500v2
-ISPPORT = usb
-ISPSPEED = -b 115200
-
-MCU_TARGET = atmega168
-LDSECTION = --section-start=.text=0x3800
-
-# the efuse should really be 0xf8; since, however, only the lower
-# three bits of that byte are used on the atmega168, avrdude gets
-# confused if you specify 1's for the higher bits, see:
-# http://tinker.it/now/2007/02/24/the-tale-of-avrdude-atmega168-and-extended-bits-fuses/
-#
-# similarly, the lock bits should be 0xff instead of 0x3f (to
-# unlock the bootloader section) and 0xcf instead of 0x0f (to
-# lock it), but since the high two bits of the lock byte are
-# unused, avrdude would get confused.
-
-ISPFUSES = avrdude -c $(ISPTOOL) -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
--e -u -U lock:w:0x3f:m -U efuse:w:0x$(EFUSE):m -U hfuse:w:0x$(HFUSE):m -U lfuse:w:0x$(LFUSE):m
-ISPFLASH = avrdude -c $(ISPTOOL) -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
--U flash:w:$(PROGRAM)_$(TARGET).hex -U lock:w:0x0f:m
-
-STK500 = "C:\Program Files\Atmel\AVR Tools\STK500\Stk500.exe"
-STK500-1 = $(STK500) -e -d$(MCU_TARGET) -pf -vf -if$(PROGRAM)_$(TARGET).hex \
--lFF -LFF -f$(HFUSE)$(LFUSE) -EF8 -ms -q -cUSB -I200kHz -s -wt
-STK500-2 = $(STK500) -d$(MCU_TARGET) -ms -q -lCF -LCF -cUSB -I200kHz -s -wt
-
-
-OBJ = $(PROGRAM).o
-OPTIMIZE = -Os
-
-DEFS =
-LIBS =
-
-CC = avr-gcc
-
-# Override is only needed by avr-lib build system.
-
-override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS)
-override LDFLAGS = -Wl,$(LDSECTION)
-#override LDFLAGS = -Wl,-Map,$(PROGRAM).map,$(LDSECTION)
-
-OBJCOPY = avr-objcopy
-OBJDUMP = avr-objdump
-
-all:
-
-lilypad: TARGET = lilypad
-lilypad: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>1' '-DNUM_LED_FLASHES=3'
-lilypad: AVR_FREQ = 8000000L
-lilypad: $(PROGRAM)_lilypad.hex
-
-lilypad_isp: lilypad
-lilypad_isp: TARGET = lilypad
-lilypad_isp: HFUSE = DD
-lilypad_isp: LFUSE = E2
-lilypad_isp: EFUSE = 00
-lilypad_isp: isp
-
-lilypad_resonator: TARGET = lilypad_resonator
-lilypad_resonator: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=3'
-lilypad_resonator: AVR_FREQ = 8000000L
-lilypad_resonator: $(PROGRAM)_lilypad_resonator.hex
-
-lilypad_resonator_isp: lilypad_resonator
-lilypad_resonator_isp: TARGET = lilypad_resonator
-lilypad_resonator_isp: HFUSE = DD
-lilypad_resonator_isp: LFUSE = C6
-lilypad_resonator_isp: EFUSE = 00
-lilypad_resonator_isp: isp
-
-pro8: TARGET = pro_8MHz
-pro8: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' '-DWATCHDOG_MODS'
-pro8: AVR_FREQ = 8000000L
-pro8: $(PROGRAM)_pro_8MHz.hex
-
-pro8_isp: pro8
-pro8_isp: TARGET = pro_8MHz
-pro8_isp: HFUSE = DD
-pro8_isp: LFUSE = C6
-pro8_isp: EFUSE = 00
-pro8_isp: isp
-
-pro16: TARGET = pro_16MHz
-pro16: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' '-DWATCHDOG_MODS'
-pro16: AVR_FREQ = 16000000L
-pro16: $(PROGRAM)_pro_16MHz.hex
-
-pro16_isp: pro16
-pro16_isp: TARGET = pro_16MHz
-pro16_isp: HFUSE = DD
-pro16_isp: LFUSE = C6
-pro16_isp: EFUSE = 00
-pro16_isp: isp
-
-pro20: TARGET = pro_20mhz
-pro20: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' '-DWATCHDOG_MODS'
-pro20: AVR_FREQ = 20000000L
-pro20: $(PROGRAM)_pro_20mhz.hex
-
-pro20_isp: pro20
-pro20_isp: TARGET = pro_20mhz
-pro20_isp: HFUSE = DD
-pro20_isp: LFUSE = C6
-pro20_isp: EFUSE = 00
-pro20_isp: isp
-
-diecimila: TARGET = diecimila
-diecimila: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1'
-diecimila: AVR_FREQ = 16000000L
-diecimila: $(PROGRAM)_diecimila.hex
-
-diecimila_isp: diecimila
-diecimila_isp: TARGET = diecimila
-diecimila_isp: HFUSE = DD
-diecimila_isp: LFUSE = FF
-diecimila_isp: EFUSE = 00
-diecimila_isp: isp
-
-ng: TARGET = ng
-ng: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>1' '-DNUM_LED_FLASHES=3'
-ng: AVR_FREQ = 16000000L
-ng: $(PROGRAM)_ng.hex
-
-ng_isp: ng
-ng_isp: TARGET = ng
-ng_isp: HFUSE = DD
-ng_isp: LFUSE = FF
-ng_isp: EFUSE = 00
-ng_isp: isp
-
-atmega328: TARGET = atmega328
-atmega328: MCU_TARGET = atmega328p
-atmega328: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' -DBAUD_RATE=57600
-atmega328: AVR_FREQ = 16000000L
-atmega328: LDSECTION = --section-start=.text=0x7800
-atmega328: $(PROGRAM)_atmega328.hex
-
-atmega328_isp: atmega328
-atmega328_isp: TARGET = atmega328
-atmega328_isp: MCU_TARGET = atmega328p
-atmega328_isp: HFUSE = DA
-atmega328_isp: LFUSE = FF
-atmega328_isp: EFUSE = 05
-atmega328_isp: isp
-
-atmega328_notp: TARGET = atmega328_notp
-atmega328_notp: MCU_TARGET = atmega328
-atmega328_notp: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' -DBAUD_RATE=57600
-atmega328_notp: AVR_FREQ = 16000000L
-atmega328_notp: LDSECTION = --section-start=.text=0x7800
-atmega328_notp: $(PROGRAM)_atmega328_notp.hex
-
-atmega328_notp_isp: atmega328_notp
-atmega328_notp_isp: TARGET = atmega328
-atmega328_notp_isp: MCU_TARGET = atmega328
-atmega328_notp_isp: HFUSE = DA
-atmega328_notp_isp: LFUSE = FF
-atmega328_notp_isp: EFUSE = 05
-atmega328_notp_isp: isp
-
-atmega328_pro8: TARGET = atmega328_pro_8MHz
-atmega328_pro8: MCU_TARGET = atmega328p
-atmega328_pro8: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' -DBAUD_RATE=57600 -DDOUBLE_SPEED
-atmega328_pro8: AVR_FREQ = 8000000L
-atmega328_pro8: LDSECTION = --section-start=.text=0x7800
-atmega328_pro8: $(PROGRAM)_atmega328_pro_8MHz.hex
-
-atmega328_pro8_isp: atmega328_pro8
-atmega328_pro8_isp: TARGET = atmega328_pro_8MHz
-atmega328_pro8_isp: MCU_TARGET = atmega328p
-atmega328_pro8_isp: HFUSE = DA
-atmega328_pro8_isp: LFUSE = FF
-atmega328_pro8_isp: EFUSE = 05
-atmega328_pro8_isp: isp
-
-mega: TARGET = atmega1280
-mega: MCU_TARGET = atmega1280
-mega: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=0' -DBAUD_RATE=57600
-mega: AVR_FREQ = 16000000L
-mega: LDSECTION = --section-start=.text=0x1F000
-mega: $(PROGRAM)_atmega1280.hex
-
-mega_isp: mega
-mega_isp: TARGET = atmega1280
-mega_isp: MCU_TARGET = atmega1280
-mega_isp: HFUSE = DA
-mega_isp: LFUSE = FF
-mega_isp: EFUSE = F5
-mega_isp: isp
-
-isp: $(TARGET)
- $(ISPFUSES)
- $(ISPFLASH)
-
-isp-stk500: $(PROGRAM)_$(TARGET).hex
- $(STK500-1)
- $(STK500-2)
-
-%.elf: $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-clean:
- rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex
-
-%.lst: %.elf
- $(OBJDUMP) -h -S $< > $@
-
-%.hex: %.elf
- $(OBJCOPY) -j .text -j .data -O ihex $< $@
-
-%.srec: %.elf
- $(OBJCOPY) -j .text -j .data -O srec $< $@
-
-%.bin: %.elf
- $(OBJCOPY) -j .text -j .data -O binary $< $@
-
diff --git a/bootloaders/atmega8/ATmegaBOOT-prod-firmware-2009-11-07.hex b/bootloaders/atmega8/ATmegaBOOT-prod-firmware-2009-11-07.hex
deleted file mode 100644
index 6190d48..0000000
--- a/bootloaders/atmega8/ATmegaBOOT-prod-firmware-2009-11-07.hex
+++ /dev/null
@@ -1,66 +0,0 @@
-:101C000012C02BC02AC029C028C027C026C025C0AA
-:101C100024C023C022C021C020C01FC01EC01DC0C0
-:101C20001CC01BC01AC011241FBECFE5D4E0DEBF0C
-:101C3000CDBF10E0A0E6B0E0E8EEFFE102C0059005
-:101C40000D92A236B107D9F711E0A2E6B0E001C0CB
-:101C50001D92AA36B107E1F74FC0D2CFEF92FF92A3
-:101C60000F931F93EE24FF24870113C00894E11CF7
-:101C7000F11C011D111D81E0E81682E1F8068AE7DA
-:101C8000080780E0180728F0E0916200F0916300F7
-:101C900009955F9BEBCF8CB1992787FD90951F919C
-:101CA0000F91FF90EF9008955D9BFECF8CB9089542
-:101CB000D5DF803221F484E1F7DF80E1F5DF08959C
-:101CC0001F93182FCBDF803231F484E1EDDF812FB9
-:101CD000EBDF80E1E9DF1F9108951F93CF93DF933E
-:101CE000182FC0E0D0E002C0B9DF2196C117E0F3A1
-:101CF000DF91CF911F910895CFE5D4E0DEBFCDBF36
-:101D0000000010BC83E389B988E18AB986E880BD08
-:101D1000BD9A1092680130E2E0E0F0E02FE088B375
-:101D2000832788BBCF010197F1F7215027FFF7CF19
-:101D300020E12093680192DF803381F1813399F4AF
-:101D40008DDF8032C1F784E1AFDF81E4ADDF86E56E
-:101D5000ABDF82E5A9DF80E2A7DF89E4A5DF83E5C9
-:101D6000A3DF80E5C7C0803429F478DF8638B0F07F
-:101D700075DF14C0813471F471DF803811F482E0B2
-:101D80001DC1813811F481E019C1823809F015C1F3
-:101D900082E114C1823421F484E19FDF89DFCBCF5B
-:101DA000853411F485E0F9CF8035C1F38135B1F385
-:101DB0008235A1F3853539F451DF809364004EDF1D
-:101DC00080936500EBCF863519F484E086DFF5C09B
-:101DD000843609F093C042DF809367013FDF809330
-:101DE0006601809169018E7F8093690137DF8534B8
-:101DF00029F480916901816080936901C0E0D0E09D
-:101E000006E610E005C02ADFF80181938F012196D4
-:101E10008091660190916701C817D907A0F31EDF72
-:101E2000803209F088CF8091690180FF1FC020E0D7
-:101E300030E0E6E6F0E012C0A0916400B0916500E9
-:101E40008191082EC5D08091640090916500019623
-:101E500090936500809364002F5F3F4F80916601EF
-:101E6000909167012817390738F343C0F894E19936
-:101E7000FECF1127E0916400F0916500EE0FFF1F87
-:101E8000C6E6D0E0809166019091670180FF01C0B5
-:101E90000196103051F422D003E000935700E895EA
-:101EA0001DD001E100935700E8950990199016D0D4
-:101EB00001E000935700E8951395103258F0112770
-:101EC0000DD005E000935700E89508D001E100939C
-:101ED0005700E8953296029739F0DBCF0091570012
-:101EE00001700130D9F30895103011F00296E7CF58
-:101EF000112484E1D9DE80E1D7DE1DCF843709F0DB
-:101F00004BC0ACDE80936701A9DE80936601A6DE3C
-:101F100090916901853421F49160909369010DC01D
-:101F20009E7F909369018091640090916500880F75
-:101F3000991F909365008093640090DE803209F0D1
-:101F4000FACE84E1B1DEC0E0D0E01EC0809169012C
-:101F500080FF07C0A0916400B091650031D0802D52
-:101F600008C081FD07C0E0916400F0916500E49134
-:101F70008E2F9ADE80916400909165000196909377
-:101F800065008093640021968091660190916701BD
-:101F9000C817D907D8F2AFCF853761F45FDE80323A
-:101FA00009F0C9CE84E180DE8EE17EDE83E97CDE4D
-:101FB00087E0A0CF863709F0BECE80E081DEBBCEC1
-:101FC000E199FECFBFBBAEBBE09A11960DB208956A
-:101FD000E199FECFBFBBAEBB0DBA11960FB6F89418
-:081FE000E29AE19A0FBE089598
-:021FE800800077
-:0400000300001C00DD
-:00000001FF
diff --git a/bootloaders/atmega8/ATmegaBOOT.c b/bootloaders/atmega8/ATmegaBOOT.c
deleted file mode 100644
index 8c8d22a..0000000
--- a/bootloaders/atmega8/ATmegaBOOT.c
+++ /dev/null
@@ -1,507 +0,0 @@
-/**********************************************************/
-/* Serial Bootloader for Atmel mega8 AVR Controller */
-/* */
-/* ATmegaBOOT.c */
-/* */
-/* Copyright (c) 2003, Jason P. Kyle */
-/* */
-/* Hacked by DojoCorp - ZGZ - MMX - IVR */
-/* Hacked by David A. Mellis */
-/* */
-/* This program is free software; you can redistribute it */
-/* and/or modify it under the terms of the GNU General */
-/* Public License as published by the Free Software */
-/* Foundation; either version 2 of the License, or */
-/* (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will */
-/* be useful, but WITHOUT ANY WARRANTY; without even the */
-/* implied warranty of MERCHANTABILITY or FITNESS FOR A */
-/* PARTICULAR PURPOSE. See the GNU General Public */
-/* License for more details. */
-/* */
-/* You should have received a copy of the GNU General */
-/* Public License along with this program; if not, write */
-/* to the Free Software Foundation, Inc., */
-/* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-/* */
-/* Licence can be viewed at */
-/* http://www.fsf.org/licenses/gpl.txt */
-/* */
-/* Target = Atmel AVR m8 */
-/**********************************************************/
-
-#include <inttypes.h>
-#include <avr/io.h>
-#include <avr/pgmspace.h>
-#include <avr/eeprom.h>
-#include <avr/interrupt.h>
-#include <util/delay.h>
-
-//#define F_CPU 16000000
-
-/* We, Malmoitians, like slow interaction
- * therefore the slow baud rate ;-)
- */
-//#define BAUD_RATE 9600
-
-/* 6.000.000 is more or less 8 seconds at the
- * speed configured here
- */
-//#define MAX_TIME_COUNT 6000000
-#define MAX_TIME_COUNT (F_CPU>>1)
-///#define MAX_TIME_COUNT_MORATORY 1600000
-
-/* SW_MAJOR and MINOR needs to be updated from time to time to avoid warning message from AVR Studio */
-#define HW_VER 0x02
-#define SW_MAJOR 0x01
-#define SW_MINOR 0x12
-
-// AVR-GCC compiler compatibility
-// avr-gcc compiler v3.1.x and older doesn't support outb() and inb()
-// if necessary, convert outb and inb to outp and inp
-#ifndef outb
- #define outb(sfr,val) (_SFR_BYTE(sfr) = (val))
-#endif
-#ifndef inb
- #define inb(sfr) _SFR_BYTE(sfr)
-#endif
-
-/* defines for future compatibility */
-#ifndef cbi
- #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
-#endif
-#ifndef sbi
- #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
-#endif
-
-/* Adjust to suit whatever pin your hardware uses to enter the bootloader */
-#define eeprom_rb(addr) eeprom_read_byte ((uint8_t *)(addr))
-#define eeprom_rw(addr) eeprom_read_word ((uint16_t *)(addr))
-#define eeprom_wb(addr, val) eeprom_write_byte ((uint8_t *)(addr), (uint8_t)(val))
-
-/* Onboard LED is connected to pin PB5 */
-#define LED_DDR DDRB
-#define LED_PORT PORTB
-#define LED_PIN PINB
-#define LED PINB5
-
-
-#define SIG1 0x1E // Yep, Atmel is the only manufacturer of AVR micros. Single source :(
-#define SIG2 0x93
-#define SIG3 0x07
-#define PAGE_SIZE 0x20U //32 words
-
-
-void putch(char);
-char getch(void);
-void getNch(uint8_t);
-void byte_response(uint8_t);
-void nothing_response(void);
-
-union address_union {
- uint16_t word;
- uint8_t byte[2];
-} address;
-
-union length_union {
- uint16_t word;
- uint8_t byte[2];
-} length;
-
-struct flags_struct {
- unsigned eeprom : 1;
- unsigned rampz : 1;
-} flags;
-
-uint8_t buff[256];
-//uint8_t address_high;
-
-uint8_t pagesz=0x80;
-
-uint8_t i;
-//uint8_t bootuart0=0,bootuart1=0;
-
-
-void (*app_start)(void) = 0x0000;
-
-int main(void)
-{
- uint8_t ch,ch2;
- uint16_t w;
-
- //cbi(BL_DDR,BL);
- //sbi(BL_PORT,BL);
-
- asm volatile("nop\n\t");
-
- /* check if flash is programmed already, if not start bootloader anyway */
- //if(pgm_read_byte_near(0x0000) != 0xFF) {
-
- /* check if bootloader pin is set low */
- //if(bit_is_set(BL_PIN,BL)) app_start();
- //}
-
- /* initialize UART(s) depending on CPU defined */
- /* m8 */
- UBRRH = (((F_CPU/BAUD_RATE)/16)-1)>>8; // set baud rate
- UBRRL = (((F_CPU/BAUD_RATE)/16)-1);
- UCSRB = (1<<RXEN)|(1<<TXEN); // enable Rx & Tx
- UCSRC = (1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0); // config USART; 8N1
-
- //UBRRL = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1);
- //UBRRH = (F_CPU/(BAUD_RATE*16L)-1) >> 8;
- //UCSRA = 0x00;
- //UCSRC = 0x86;
- //UCSRB = _BV(TXEN)|_BV(RXEN);
-
-
- /* this was giving uisp problems, so I removed it; without it, the boot
- works on with uisp and avrdude on the mac (at least). */
- //putch('\0');
-
- //uint32_t l;
- //uint32_t time_count;
- //time_count=0;
-
- /* set LED pin as output */
- sbi(LED_DDR,LED);
- for (i = 0; i < 16; i++) {
- outb(LED_PORT, inb(LED_PORT) ^ _BV(LED));
- _delay_loop_2(0);
- }
-
- //for (l=0; l<40000000; l++)
- //outb(LED_PORT, inb(LED_PORT) ^= _BV(LED));
-
- /* flash onboard LED three times to signal entering of bootloader */
- //for(i=0; i<3; ++i) {
- //for(l=0; l<40000000; ++l);
- //sbi(LED_PORT,LED);
- //for(l=0; l<40000000; ++l);
- //cbi(LED_PORT,LED);
- //}
-
- /* see comment at previous call to putch() */
- //putch('\0'); // this line is needed for the synchronization of the programmer
-
- /* forever */
- for (;;) {
- //if((inb(UCSRA) & _BV(RXC))){
- /* get character from UART */
- ch = getch();
-
- /* A bunch of if...else if... gives smaller code than switch...case ! */
-
- /* Hello is anyone home ? */
- if(ch=='0') {
- nothing_response();
- }
-
- /* Request programmer ID */
- /* Not using PROGMEM string due to boot block in m128 being beyond 64kB boundry */
- /* Would need to selectively manipulate RAMPZ, and it's only 9 characters anyway so who cares. */
- else if(ch=='1') {
- if (getch() == ' ') {
- putch(0x14);
- putch('A');
- putch('V');
- putch('R');
- putch(' ');
- putch('I');
- putch('S');
- putch('P');
- putch(0x10);
- }
- }
-
- /* AVR ISP/STK500 board commands DON'T CARE so default nothing_response */
- else if(ch=='@') {
- ch2 = getch();
- if (ch2>0x85) getch();
- nothing_response();
- }
-
- /* AVR ISP/STK500 board requests */
- else if(ch=='A') {
- ch2 = getch();
- if(ch2==0x80) byte_response(HW_VER); // Hardware version
- else if(ch2==0x81) byte_response(SW_MAJOR); // Software major version
- else if(ch2==0x82) byte_response(SW_MINOR); // Software minor version
- //else if(ch2==0x98) byte_response(0x03); // Unknown but seems to be required by avr studio 3.56
- else byte_response(0x00); // Covers various unnecessary responses we don't care about
- }
-
- /* Device Parameters DON'T CARE, DEVICE IS FIXED */
- else if(ch=='B') {
- getNch(20);
- nothing_response();
- }
-
- /* Parallel programming stuff DON'T CARE */
- else if(ch=='E') {
- getNch(5);
- nothing_response();
- }
-
- /* Enter programming mode */
- else if(ch=='P') {
- nothing_response();
- // FIXME: modified only here by DojoCorp, Mumbai, India, 20050626
- //time_count=0; // exted the delay once entered prog.mode
- }
-
- /* Leave programming mode */
- else if(ch=='Q') {
- nothing_response();
- //time_count=MAX_TIME_COUNT_MORATORY; // once the programming is done,
- // we should start the application
- // but uisp has problems with this,
- // therefore we just change the times
- // and give the programmer 1 sec to react
- }
-
- /* Erase device, don't care as we will erase one page at a time anyway. */
- else if(ch=='R') {
- nothing_response();
- }
-
- /* Set address, little endian. EEPROM in bytes, FLASH in words */
- /* Perhaps extra address bytes may be added in future to support > 128kB FLASH. */
- /* This might explain why little endian was used here, big endian used everywhere else. */
- else if(ch=='U') {
- address.byte[0] = getch();
- address.byte[1] = getch();
- nothing_response();
- }
-
- /* Universal SPI programming command, disabled. Would be used for fuses and lock bits. */
- else if(ch=='V') {
- getNch(4);
- byte_response(0x00);
- }
-
- /* Write memory, length is big endian and is in bytes */
- else if(ch=='d') {
- length.byte[1] = getch();
- length.byte[0] = getch();
- flags.eeprom = 0;
- if (getch() == 'E') flags.eeprom = 1;
- for (w=0;w<length.word;w++) {
- buff[w] = getch(); // Store data in buffer, can't keep up with serial data stream whilst programming pages
- }
- if (getch() == ' ') {
- if (flags.eeprom) { //Write to EEPROM one byte at a time
- for(w=0;w<length.word;w++) {
- eeprom_wb(address.word,buff[w]);
- address.word++;
- }
- } else { //Write to FLASH one page at a time
- //if (address.byte[1]>127) address_high = 0x01; //Only possible with m128, m256 will need 3rd address byte. FIXME
- //else address_high = 0x00;
-
- //address.word = address.word << 1; //address * 2 -> byte location
- //if ((length.byte[0] & 0x01)) length.word++; //Even up an odd number of bytes
- cli(); //Disable interrupts, just to be sure
- while(bit_is_set(EECR,EEWE)); //Wait for previous EEPROM writes to complete
- asm volatile(
- "clr r17 \n\t" //page_word_count
- "lds r30,address \n\t" //Address of FLASH location (in words)
- "lds r31,address+1 \n\t"
- "lsl r30 \n\t" //address * 2 -> byte location
- "rol r31 \n\t"
- "ldi r28,lo8(buff) \n\t" //Start of buffer array in RAM
- "ldi r29,hi8(buff) \n\t"
- "lds r24,length \n\t" //Length of data to be written (in bytes)
- "lds r25,length+1 \n\t"
- "sbrs r24,0 \n\t" //Even up an odd number of bytes
- "rjmp length_loop \n\t"
- "adiw r24,1 \n\t"
- "length_loop: \n\t" //Main loop, repeat for number of words in block
- "cpi r17,0x00 \n\t" //If page_word_count=0 then erase page
- "brne no_page_erase \n\t"
- "rcall wait_spm \n\t"
-// "wait_spm1: \n\t"
-// "lds r16,%0 \n\t" //Wait for previous spm to complete
-// "andi r16,1 \n\t"
-// "cpi r16,1 \n\t"
-// "breq wait_spm1 \n\t"
- "ldi r16,0x03 \n\t" //Erase page pointed to by Z
- "sts %0,r16 \n\t"
- "spm \n\t"
- "rcall wait_spm \n\t"
-// "wait_spm2: \n\t"
-// "lds r16,%0 \n\t" //Wait for previous spm to complete
-// "andi r16,1 \n\t"
-// "cpi r16,1 \n\t"
-// "breq wait_spm2 \n\t"
- "ldi r16,0x11 \n\t" //Re-enable RWW section
- "sts %0,r16 \n\t"
- "spm \n\t"
- "no_page_erase: \n\t"
- "ld r0,Y+ \n\t" //Write 2 bytes into page buffer
- "ld r1,Y+ \n\t"
-
- "rcall wait_spm \n\t"
-// "wait_spm3: \n\t"
-// "lds r16,%0 \n\t" //Wait for previous spm to complete
-// "andi r16,1 \n\t"
-// "cpi r16,1 \n\t"
-// "breq wait_spm3 \n\t"
- "ldi r16,0x01 \n\t" //Load r0,r1 into FLASH page buffer
- "sts %0,r16 \n\t"
- "spm \n\t"
-
- "inc r17 \n\t" //page_word_count++
- "cpi r17,%1 \n\t"
- "brlo same_page \n\t" //Still same page in FLASH
- "write_page: \n\t"
- "clr r17 \n\t" //New page, write current one first
- "rcall wait_spm \n\t"
-// "wait_spm4: \n\t"
-// "lds r16,%0 \n\t" //Wait for previous spm to complete
-// "andi r16,1 \n\t"
-// "cpi r16,1 \n\t"
-// "breq wait_spm4 \n\t"
- "ldi r16,0x05 \n\t" //Write page pointed to by Z
- "sts %0,r16 \n\t"
- "spm \n\t"
- "rcall wait_spm \n\t"
-// "wait_spm5: \n\t"
-// "lds r16,%0 \n\t" //Wait for previous spm to complete
-// "andi r16,1 \n\t"
-// "cpi r16,1 \n\t"
-// "breq wait_spm5 \n\t"
- "ldi r16,0x11 \n\t" //Re-enable RWW section
- "sts %0,r16 \n\t"
- "spm \n\t"
- "same_page: \n\t"
- "adiw r30,2 \n\t" //Next word in FLASH
- "sbiw r24,2 \n\t" //length-2
- "breq final_write \n\t" //Finished
- "rjmp length_loop \n\t"
-
- "wait_spm: \n\t"
- "lds r16,%0 \n\t" //Wait for previous spm to complete
- "andi r16,1 \n\t"
- "cpi r16,1 \n\t"
- "breq wait_spm \n\t"
- "ret \n\t"
-
- "final_write: \n\t"
- "cpi r17,0 \n\t"
- "breq block_done \n\t"
- "adiw r24,2 \n\t" //length+2, fool above check on length after short page write
- "rjmp write_page \n\t"
- "block_done: \n\t"
- "clr __zero_reg__ \n\t" //restore zero register
- : "=m" (SPMCR) : "M" (PAGE_SIZE) : "r0","r16","r17","r24","r25","r28","r29","r30","r31");
-
- /* Should really add a wait for RWW section to be enabled, don't actually need it since we never */
- /* exit the bootloader without a power cycle anyhow */
- }
- putch(0x14);
- putch(0x10);
- }
- }
-
- /* Read memory block mode, length is big endian. */
- else if(ch=='t') {
- length.byte[1] = getch();
- length.byte[0] = getch();
- if (getch() == 'E') flags.eeprom = 1;
- else {
- flags.eeprom = 0;
- address.word = address.word << 1; // address * 2 -> byte location
- }
- if (getch() == ' ') { // Command terminator
- putch(0x14);
- for (w=0;w < length.word;w++) { // Can handle odd and even lengths okay
- if (flags.eeprom) { // Byte access EEPROM read
- putch(eeprom_rb(address.word));
- address.word++;
- } else {
- if (!flags.rampz) putch(pgm_read_byte_near(address.word));
- address.word++;
- }
- }
- putch(0x10);
- }
- }
-
- /* Get device signature bytes */
- else if(ch=='u') {
- if (getch() == ' ') {
- putch(0x14);
- putch(SIG1);
- putch(SIG2);
- putch(SIG3);
- putch(0x10);
- }
- }
-
- /* Read oscillator calibration byte */
- else if(ch=='v') {
- byte_response(0x00);
- }
-// } else {
-// time_count++;
-// if (time_count>=MAX_TIME_COUNT) {
-// app_start();
-// }
-// }
- } /* end of forever loop */
-}
-
-void putch(char ch)
-{
- /* m8 */
- while (!(inb(UCSRA) & _BV(UDRE)));
- outb(UDR,ch);
-}
-
-char getch(void)
-{
- /* m8 */
- uint32_t count = 0;
- while(!(inb(UCSRA) & _BV(RXC))) {
- /* HACKME:: here is a good place to count times*/
- count++;
- if (count > MAX_TIME_COUNT)
- app_start();
- }
- return (inb(UDR));
-}
-
-void getNch(uint8_t count)
-{
- uint8_t i;
- for(i=0;i<count;i++) {
- /* m8 */
- //while(!(inb(UCSRA) & _BV(RXC)));
- //inb(UDR);
- getch(); // need to handle time out
- }
-}
-
-void byte_response(uint8_t val)
-{
- if (getch() == ' ') {
- putch(0x14);
- putch(val);
- putch(0x10);
- }
-}
-
-void nothing_response(void)
-{
- if (getch() == ' ') {
- putch(0x14);
- putch(0x10);
- }
-}
-
-/* end of file ATmegaBOOT.c */
-
-
-
diff --git a/bootloaders/atmega8/ATmegaBOOT.hex b/bootloaders/atmega8/ATmegaBOOT.hex
deleted file mode 100644
index 9182267..0000000
--- a/bootloaders/atmega8/ATmegaBOOT.hex
+++ /dev/null
@@ -1,62 +0,0 @@
-:101C000012C02CC02BC02AC029C028C027C026C0A3
-:101C100025C024C023C022C021C020C01FC01EC0B8
-:101C20001DC01CC01BC011241FBECFE5D4E0DEBF09
-:101C3000CDBF10E0A0E6B0E0E6EAFFE102C005900B
-:101C40000D92A236B107D9F711E0A2E6B0E001C0CB
-:101C50001D92AA36B107E1F72BD0A3C1D1CF5D9B6E
-:101C6000FECF8CB908955F9BFECF8CB108950F9382
-:101C70001F93082F10E002C0F6DF1F5F1017E0F37C
-:101C80001F910F9108951F93182FEDDF803231F4CB
-:101C900084E1E5DF812FE3DF80E1E1DF1F9108953B
-:101CA000E2DF803221F484E1DADF80E1D8DF0895D9
-:101CB0000F931F93CF93DF93000010BC83E389B988
-:101CC00088E18AB986E880BDBD9A1092680120E05B
-:101CD00030E240E050E007C088B3832788BBCA01E8
-:101CE0000197F1F72F5F2031B8F320936801BBDF34
-:101CF000803381F1813399F4B6DF8032C1F784E11A
-:101D0000AEDF81E4ACDF86E5AADF82E5A8DF80E212
-:101D1000A6DF89E4A4DF83E5A2DF80E523C1803468
-:101D200029F4A1DF8638B0F09EDF14C0813471F44D
-:101D30009ADF803811F482E01DC1813811F481E00E
-:101D400019C1823809F015C182E114C1823421F42D
-:101D500084E18DDFA5DFCBCF853411F485E0F9CFA9
-:101D60008035C1F38135B1F38235A1F3853539F47E
-:101D70007ADF8093640077DF80936500EBCF863550
-:101D800019F484E074DFF5C0843609F090C06BDF8D
-:101D90008093670168DF80936601809169018E7F7F
-:101DA0008093690160DF853429F480916901816045
-:101DB0008093690100E010E007C055DFF801EA599F
-:101DC000FF4F80830F5F1F4F8091660190916701E5
-:101DD0000817190790F347DF803209F088CF809108
-:101DE000690180FF1FC000E010E014C0F801EA594B
-:101DF000FF4F80916400909165006081C5D0809113
-:101E00006400909165000196909365008093640052
-:101E10000F5F1F4F809166019091670108171907A6
-:101E200028F343C0F894E199FECF1127E0916400B4
-:101E3000F0916500EE0FFF1FC6E6D0E080916601CD
-:101E40009091670180FF01C00196103051F422D0BB
-:101E500003E000935700E8951DD001E1009357007F
-:101E6000E8950990199016D001E000935700E89585
-:101E70001395103258F011270DD005E0009357004C
-:101E8000E89508D001E100935700E8953296029753
-:101E900039F0DBCF0091570001700130D9F308957C
-:101EA000103011F00296E7CF112484E15BC0843733
-:101EB00009F04BC0D8DE80936701D5DE80936601C0
-:101EC000D2DE90916901853421F49160909369018B
-:101ED0000DC09E7F90936901809164009091650090
-:101EE000880F991F9093650080936400BCDE803258
-:101EF00009F0FDCE84E1B3DE00E010E01EC0809169
-:101F0000690180FF06C0809164009091650034D023
-:101F100008C081FD07C0E0916400F0916500E49184
-:101F20008E2F9DDE809164009091650001969093C4
-:101F30006500809364000F5F1F4F80916601909150
-:101F4000670108171907D8F20EC0853779F48BDEC0
-:101F5000803209F0CCCE84E182DE8EE180DE83E93E
-:101F60007EDE87E07CDE80E17ADEC1CE863709F056
-:101F7000BECE80E088DEBBCEE199FECF9FBB8EBB9C
-:101F8000E09A99278DB30895262FE199FECF9FBB44
-:101F90008EBB2DBB0FB6F894E29AE19A0FBE019664
-:061FA0000895F894FFCF44
-:021FA6008000B9
-:0400000300001C00DD
-:00000001FF
diff --git a/bootloaders/atmega8/ATmegaBOOT.txt b/bootloaders/atmega8/ATmegaBOOT.txt
deleted file mode 100644
index b0e19b3..0000000
--- a/bootloaders/atmega8/ATmegaBOOT.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Configured with: ../src/configure -v --enable-languages=c,c++ --prefix=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --disable-libssp --build=i686-linux-gnu --host=i686-linux-gnu --target=avr
-Thread model: single
-gcc version 4.3.5 (GCC)
-
diff --git a/bootloaders/atmega8/Makefile b/bootloaders/atmega8/Makefile
deleted file mode 100644
index 9202b52..0000000
--- a/bootloaders/atmega8/Makefile
+++ /dev/null
@@ -1,88 +0,0 @@
-# Makefile for ATmegaBOOT
-# E.Lins, 2004-10-14
-
-# program name should not be changed...
-PROGRAM = ATmegaBOOT
-
-PRODUCT=atmega8
-
-# enter the parameters for the UISP isp tool
-ISPPARAMS = -dprog=stk500 -dserial=$(SERIAL) -dspeed=115200
-
-
-#DIRAVR = /usr/local/avr
-DIRAVRBIN = $(DIRAVR)/bin
-DIRAVRUTILS = $(DIRAVR)/utils/bin
-DIRINC = $(DIRAVR)/include
-DIRLIB = $(DIRAVR)/avr/lib
-
-
-MCU_TARGET = atmega8
-LDSECTION = --section-start=.text=0x1c00
-FUSE_L = 0xdf
-FUSE_H = 0xca
-ISPFUSES = $(DIRAVRBIN)/uisp -dpart=ATmega8 $(ISPPARAMS) --wr_fuse_l=$(FUSE_L) --wr_fuse_h=$(FUSE_H)
-ISPFLASH = $(DIRAVRBIN)/uisp -dpart=ATmega8 $(ISPPARAMS) --erase --upload if=$(PROGRAM).hex -v
-
-
-OBJ = $(PROGRAM).o
-OPTIMIZE = -Os -funsigned-char -funsigned-bitfields -fno-inline-small-functions
-
-DEFS = -DF_CPU=16000000 -DBAUD_RATE=19200
-LIBS =
-
-CC = $(DIRAVRBIN)/avr-gcc
-
-
-# Override is only needed by avr-lib build system.
-
-override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -D$(PRODUCT) $(DEFS) -I$(DIRINC)
-override LDFLAGS = -Wl,-Map,$(PROGRAM).map,$(LDSECTION)
-
-OBJCOPY = $(DIRAVRBIN)/avr-objcopy
-OBJDUMP = $(DIRAVRBIN)/avr-objdump
-SIZE = $(DIRAVRBIN)/avr-size
-
-all: $(PROGRAM).elf lst text asm size
-
-isp: $(PROGRAM).hex
- $(ISPFUSES)
- $(ISPFLASH)
-
-$(PROGRAM).elf: $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-clean:
- rm -rf *.s
- rm -rf *.o *.elf
- rm -rf *.lst *.map
-
-asm: $(PROGRAM).s
-
-%.s: %.c
- $(CC) -S $(CFLAGS) -g1 $^
-
-lst: $(PROGRAM).lst
-
-%.lst: %.elf
- $(OBJDUMP) -h -S $< > $@
-
-size: $(PROGRAM).hex
- $(SIZE) $^
-
-# Rules for building the .text rom images
-
-text: hex bin srec
-
-hex: $(PROGRAM).hex
-bin: $(PROGRAM).bin
-srec: $(PROGRAM).srec
-
-%.hex: %.elf
- $(OBJCOPY) -j .text -j .data -O ihex $< $@
-
-%.srec: %.elf
- $(OBJCOPY) -j .text -j .data -O srec $< $@
-
-%.bin: %.elf
- $(OBJCOPY) -j .text -j .data -O binary $< $@
diff --git a/bootloaders/bt/ATmegaBOOT_168.c b/bootloaders/bt/ATmegaBOOT_168.c
deleted file mode 100644
index d477e7a..0000000
--- a/bootloaders/bt/ATmegaBOOT_168.c
+++ /dev/null
@@ -1,1043 +0,0 @@
-/**********************************************************/
-/* Serial Bootloader for Atmel megaAVR Controllers */
-/* */
-/* tested with ATmega8, ATmega128 and ATmega168 */
-/* should work with other mega's, see code for details */
-/* */
-/* ATmegaBOOT.c */
-/* */
-/* build: 050815 */
-/* date : 15.08.2005 */
-/* */
-/* 20060802: hacked for Arduino by D. Cuartielles */
-/* based on a previous hack by D. Mellis */
-/* and D. Cuartielles */
-/* */
-/* Monitor and debug functions were added to the original */
-/* code by Dr. Erik Lins, chip45.com. (See below) */
-/* */
-/* Thanks to Karl Pitrich for fixing a bootloader pin */
-/* problem and more informative LED blinking! */
-/* */
-/* For the latest version see: */
-/* http://www.chip45.com/ */
-/* */
-/* ------------------------------------------------------ */
-/* */
-/* based on stk500boot.c */
-/* Copyright (c) 2003, Jason P. Kyle */
-/* All rights reserved. */
-/* see avr1.org for original file and information */
-/* */
-/* This program is free software; you can redistribute it */
-/* and/or modify it under the terms of the GNU General */
-/* Public License as published by the Free Software */
-/* Foundation; either version 2 of the License, or */
-/* (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will */
-/* be useful, but WITHOUT ANY WARRANTY; without even the */
-/* implied warranty of MERCHANTABILITY or FITNESS FOR A */
-/* PARTICULAR PURPOSE. See the GNU General Public */
-/* License for more details. */
-/* */
-/* You should have received a copy of the GNU General */
-/* Public License along with this program; if not, write */
-/* to the Free Software Foundation, Inc., */
-/* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-/* */
-/* Licence can be viewed at */
-/* http://www.fsf.org/licenses/gpl.txt */
-/* */
-/* Target = Atmel AVR m128,m64,m32,m16,m8,m162,m163,m169, */
-/* m8515,m8535. ATmega161 has a very small boot block so */
-/* isn't supported. */
-/* */
-/* Tested with m128,m8,m163 - feel free to let me know */
-/* how/if it works for you. */
-/* */
-/**********************************************************/
-
-
-/* some includes */
-#include <inttypes.h>
-#include <avr/io.h>
-#include <avr/pgmspace.h>
-#include <avr/interrupt.h>
-#include <avr/wdt.h>
-
-
-#define set_output(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
-#define set_input(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
-
-
-#define high(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
-#define low(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
-
-
-
-
-/* the current avr-libc eeprom functions do not support the ATmega168 */
-/* own eeprom write/read functions are used instead */
-#if !defined(__AVR_ATmega168__) || !defined(__AVR_ATmega328P__) || !defined(__AVR_ATmega328__)
-#include <avr/eeprom.h>
-#endif
-
-/* define F_CPU according to AVR_FREQ set in Makefile */
-/* Is there a better way to pass such a parameter from Makefile to source code ? */
-
-#define F_CPU 16000000L
-
-#include <util/delay.h>
-
-
-/* 20060803: hacked by DojoCorp */
-/* set the waiting time for the bootloader */
-#define MAX_TIME_COUNT (F_CPU>>1)
-
-/* set the UART baud rate */
-/* 20060803: hacked by DojoCorp */
-#define BAUD_RATE 115200
-
-
-/* SW_MAJOR and MINOR needs to be updated from time to time to avoid warning message from AVR Studio */
-/* never allow AVR Studio to do an update !!!! */
-#define HW_VER 0x02
-#define SW_MAJOR 0x01
-#define SW_MINOR 0x0f
-
-
-/* Adjust to suit whatever pin your hardware uses to enter the bootloader */
-/* ATmega128 has two UARTS so two pins are used to enter bootloader and select UART */
-/* BL0... means UART0, BL1... means UART1 */
-#ifdef __AVR_ATmega128__
-#define BL_DDR DDRF
-#define BL_PORT PORTF
-#define BL_PIN PINF
-#define BL0 PINF7
-#define BL1 PINF6
-#else
-/* other ATmegas have only one UART, so only one pin is defined to enter bootloader */
-#define BL_DDR DDRD
-#define BL_PORT PORTD
-#define BL_PIN PIND
-#define BL PIND6
-#endif
-
-
-/* onboard LED is used to indicate, that the bootloader was entered (3x flashing) */
-/* if monitor functions are included, LED goes on after monitor was entered */
-#ifdef __AVR_ATmega128__
-/* Onboard LED is connected to pin PB7 (e.g. Crumb128, PROBOmega128, Savvy128) */
-#define LED_DDR DDRB
-#define LED_PORT PORTB
-#define LED_PIN PINB
-#define LED PINB7
-#else
-/* Onboard LED is connected to pin PB2 (e.g. Crumb8, Crumb168) */
-#define LED_DDR DDRB
-#define LED_PORT PORTB
-#define LED_PIN PINB
-/* 20060803: hacked by DojoCorp, LED pin is B5 in Arduino */
-/* #define LED PINB2 */
-#define LED PINB5
-#endif
-
-
-/* monitor functions will only be compiled when using ATmega128, due to bootblock size constraints */
-#ifdef __AVR_ATmega128__
-#define MONITOR
-#endif
-
-
-/* define various device id's */
-/* manufacturer byte is always the same */
-#define SIG1 0x1E // Yep, Atmel is the only manufacturer of AVR micros. Single source :(
-
-#if defined __AVR_ATmega128__
-#define SIG2 0x97
-#define SIG3 0x02
-#define PAGE_SIZE 0x80U //128 words
-
-#elif defined __AVR_ATmega64__
-#define SIG2 0x96
-#define SIG3 0x02
-#define PAGE_SIZE 0x80U //128 words
-
-#elif defined __AVR_ATmega32__
-#define SIG2 0x95
-#define SIG3 0x02
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega16__
-#define SIG2 0x94
-#define SIG3 0x03
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega8__
-#define SIG2 0x93
-#define SIG3 0x07
-#define PAGE_SIZE 0x20U //32 words
-
-#elif defined __AVR_ATmega88__
-#define SIG2 0x93
-#define SIG3 0x0a
-#define PAGE_SIZE 0x20U //32 words
-
-#elif defined __AVR_ATmega168__
-#define SIG2 0x94
-#define SIG3 0x06
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega328P__
-#define SIG2 0x95
-#define SIG3 0x0F
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega328__
-#define SIG2 0x95
-#define SIG3 0x14
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega162__
-#define SIG2 0x94
-#define SIG3 0x04
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega163__
-#define SIG2 0x94
-#define SIG3 0x02
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega169__
-#define SIG2 0x94
-#define SIG3 0x05
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega8515__
-#define SIG2 0x93
-#define SIG3 0x06
-#define PAGE_SIZE 0x20U //32 words
-
-#elif defined __AVR_ATmega8535__
-#define SIG2 0x93
-#define SIG3 0x08
-#define PAGE_SIZE 0x20U //32 words
-#endif
-
-
-/* function prototypes */
-void putch(char);
-char getch(void);
-void getNch(uint8_t);
-void byte_response(uint8_t);
-void nothing_response(void);
-char gethex(void);
-void puthex(char);
-void flash_led(uint8_t);
-
-/* some variables */
-union address_union {
- uint16_t word;
- uint8_t byte[2];
-} address;
-
-union length_union {
- uint16_t word;
- uint8_t byte[2];
-} length;
-
-struct flags_struct {
- unsigned eeprom : 1;
- unsigned rampz : 1;
-} flags;
-
-uint8_t buff[256];
-uint8_t address_high;
-
-uint8_t pagesz=0x80;
-
-uint8_t i;
-uint8_t bootuart = 0;
-
-void (*app_start)(void) = 0x0000;
-
-
-/* main program starts here */
-int main(void)
-{
- uint8_t ch,ch2;
- uint16_t w;
-
- asm volatile("nop\n\t");
-
- /* set pin direction for bootloader pin and enable pullup */
- /* for ATmega128, two pins need to be initialized */
-#ifdef __AVR_ATmega128__
- BL_DDR &= ~_BV(BL0);
- BL_DDR &= ~_BV(BL1);
- BL_PORT |= _BV(BL0);
- BL_PORT |= _BV(BL1);
-#else
- BL_DDR &= ~_BV(BL);
- BL_PORT |= _BV(BL);
-#endif
-
-
-#ifdef __AVR_ATmega128__
- /* check which UART should be used for booting */
- if(bit_is_clear(BL_PIN, BL0)) {
- bootuart = 1;
- }
- else if(bit_is_clear(BL_PIN, BL1)) {
- bootuart = 2;
- }
-#endif
-
- /* check if flash is programmed already, if not start bootloader anyway */
- if(pgm_read_byte_near(0x0000) != 0xFF) {
-
-#ifdef __AVR_ATmega128__
- /* no UART was selected, start application */
- if(!bootuart) {
- app_start();
- }
-#else
- /* check if bootloader pin is set low */
- /* we don't start this part neither for the m8, nor m168 */
- //if(bit_is_set(BL_PIN, BL)) {
- // app_start();
- // }
-#endif
- }
-
-#ifdef __AVR_ATmega128__
- /* no bootuart was selected, default to uart 0 */
- if(!bootuart) {
- bootuart = 1;
- }
-#endif
-
-
- /* initialize UART(s) depending on CPU defined */
-#ifdef __AVR_ATmega128__
- if(bootuart == 1) {
- UBRR0L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1);
- UBRR0H = (F_CPU/(BAUD_RATE*16L)-1) >> 8;
- UCSR0A = 0x00;
- UCSR0C = 0x06;
- UCSR0B = _BV(TXEN0)|_BV(RXEN0);
- }
- if(bootuart == 2) {
- UBRR1L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1);
- UBRR1H = (F_CPU/(BAUD_RATE*16L)-1) >> 8;
- UCSR1A = 0x00;
- UCSR1C = 0x06;
- UCSR1B = _BV(TXEN1)|_BV(RXEN1);
- }
-#elif defined __AVR_ATmega163__
- UBRR = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1);
- UBRRHI = (F_CPU/(BAUD_RATE*16L)-1) >> 8;
- UCSRA = 0x00;
- UCSRB = _BV(TXEN)|_BV(RXEN);
-#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__)
-
- UBRR0H = ((F_CPU / 16 + BAUD_RATE / 2) / BAUD_RATE - 1) >> 8;
- UBRR0L = ((F_CPU / 16 + BAUD_RATE / 2) / BAUD_RATE - 1);
-
-
- //UBRR0L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1);
- //UBRR0H = (F_CPU/(BAUD_RATE*16L)-1) >> 8;
- UCSR0B = (1<<RXEN0) | (1<<TXEN0);
- UCSR0C = (1<<UCSZ00) | (1<<UCSZ01);
-#elif defined __AVR_ATmega8__
- /* m8 */
- UBRRH = (((F_CPU/BAUD_RATE)/16)-1)>>8; // set baud rate
- UBRRL = (((F_CPU/BAUD_RATE)/16)-1);
- UCSRB = (1<<RXEN)|(1<<TXEN); // enable Rx & Tx
- UCSRC = (1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0); // config USART; 8N1
-#else
- /* m16,m32,m169,m8515,m8535 */
- UBRRL = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1);
- UBRRH = (F_CPU/(BAUD_RATE*16L)-1) >> 8;
- UCSRA = 0x00;
- UCSRC = 0x06;
- UCSRB = _BV(TXEN)|_BV(RXEN);
-#endif
-
- /* set LED pin as output */
- LED_DDR |= _BV(LED);
-
-
-
- set_output(DDRD,PIND7);
- high(PORTD,PD7);
- for (i = 0; i < 16; i++) {
-
- _delay_loop_2(0);
- }
-
-
- low(PORTD,PD7);
-
-
- /* flash onboard LED to signal entering of bootloader */
-#ifdef __AVR_ATmega128__
- // 4x for UART0, 5x for UART1
- flash_led(3 + bootuart);
-#else
- flash_led(3);
-#endif
-
- /* 20050803: by DojoCorp, this is one of the parts provoking the
- system to stop listening, cancelled from the original */
- //putch('\0');
-
-
- //message("SET BT PAGEMODE 3 2000 1");
-putch('S');
-putch('E');
-putch('T');
-putch(' ');
-putch('B');
-putch('T');
-putch(' ');
-putch('P');
-putch('A');
-putch('G');
-putch('E');
-putch('M');
-putch('O');
-putch('D');
-putch('E');
-putch(' ');
-putch('3');
-putch(' ');
-putch('2');
-putch('0');
-putch('0');
-putch('0');
-putch(' ');
-putch('1');
-putch(0x0D);
-
-
- //put_s("SET BT ROLE 0 f 7d00");
- putch('S');
- putch('E');
- putch('T');
- putch(' ');
- putch('B');
- putch('T');
- putch(' ');
- putch('R');
- putch('O');
- putch('L');
- putch('E');
- putch(' ');
- putch('0');
- putch(' ');
- putch('f');
- putch(' ');
- putch('7');
- putch('d');
- putch('0');
- putch('0');
- putch(0x0D);
-
-
-
-
-
-
- /* forever loop */
- for (;;) {
-
- /* get character from UART */
- ch = getch();
-
- /* A bunch of if...else if... gives smaller code than switch...case ! */
-
- /* Hello is anyone home ? */
- if(ch=='0') {
- nothing_response();
- }
-
-
- /* Request programmer ID */
- /* Not using PROGMEM string due to boot block in m128 being beyond 64kB boundry */
- /* Would need to selectively manipulate RAMPZ, and it's only 9 characters anyway so who cares. */
- else if(ch=='1') {
- if (getch() == ' ') {
- putch(0x14);
- putch('A');
- putch('V');
- putch('R');
- putch(' ');
- putch('I');
- putch('S');
- putch('P');
- putch(0x10);
- }
- }
-
-
- /* AVR ISP/STK500 board commands DON'T CARE so default nothing_response */
- else if(ch=='@') {
- ch2 = getch();
- if (ch2>0x85) getch();
- nothing_response();
- }
-
-
- /* AVR ISP/STK500 board requests */
- else if(ch=='A') {
- ch2 = getch();
- if(ch2==0x80) byte_response(HW_VER); // Hardware version
- else if(ch2==0x81) byte_response(SW_MAJOR); // Software major version
- else if(ch2==0x82) byte_response(SW_MINOR); // Software minor version
- else if(ch2==0x98) byte_response(0x03); // Unknown but seems to be required by avr studio 3.56
- else byte_response(0x00); // Covers various unnecessary responses we don't care about
- }
-
-
- /* Device Parameters DON'T CARE, DEVICE IS FIXED */
- else if(ch=='B') {
- getNch(20);
- nothing_response();
- }
-
-
- /* Parallel programming stuff DON'T CARE */
- else if(ch=='E') {
- getNch(5);
- nothing_response();
- }
-
-
- /* Enter programming mode */
- else if(ch=='P') {
- nothing_response();
- }
-
-
- /* Leave programming mode */
- else if(ch=='Q') {
- nothing_response();
- }
-
-
- /* Erase device, don't care as we will erase one page at a time anyway. */
- else if(ch=='R') {
- nothing_response();
- }
-
-
- /* Set address, little endian. EEPROM in bytes, FLASH in words */
- /* Perhaps extra address bytes may be added in future to support > 128kB FLASH. */
- /* This might explain why little endian was used here, big endian used everywhere else. */
- else if(ch=='U') {
- address.byte[0] = getch();
- address.byte[1] = getch();
- nothing_response();
- }
-
-
- /* Universal SPI programming command, disabled. Would be used for fuses and lock bits. */
- else if(ch=='V') {
- getNch(4);
- byte_response(0x00);
- }
-
-
- /* Write memory, length is big endian and is in bytes */
- else if(ch=='d') {
- length.byte[1] = getch();
- length.byte[0] = getch();
- flags.eeprom = 0;
- if (getch() == 'E') flags.eeprom = 1;
- for (w=0;w<length.word;w++) {
- buff[w] = getch(); // Store data in buffer, can't keep up with serial data stream whilst programming pages
- }
- if (getch() == ' ') {
- if (flags.eeprom) { //Write to EEPROM one byte at a time
- for(w=0;w<length.word;w++) {
-#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__)
- while(EECR & (1<<EEPE));
- EEAR = (uint16_t)(void *)address.word;
- EEDR = buff[w];
- EECR |= (1<<EEMPE);
- EECR |= (1<<EEPE);
-#else
- eeprom_write_byte((void *)address.word,buff[w]);
-#endif
- address.word++;
- }
- }
- else { //Write to FLASH one page at a time
- if (address.byte[1]>127) address_high = 0x01; //Only possible with m128, m256 will need 3rd address byte. FIXME
- else address_high = 0x00;
-#ifdef __AVR_ATmega128__
- RAMPZ = address_high;
-#endif
- address.word = address.word << 1; //address * 2 -> byte location
- /* if ((length.byte[0] & 0x01) == 0x01) length.word++; //Even up an odd number of bytes */
- if ((length.byte[0] & 0x01)) length.word++; //Even up an odd number of bytes
- cli(); //Disable interrupts, just to be sure
- // HACKME: EEPE used to be EEWE
- while(bit_is_set(EECR,EEPE)); //Wait for previous EEPROM writes to complete
- asm volatile(
- "clr r17 \n\t" //page_word_count
- "lds r30,address \n\t" //Address of FLASH location (in bytes)
- "lds r31,address+1 \n\t"
- "ldi r28,lo8(buff) \n\t" //Start of buffer array in RAM
- "ldi r29,hi8(buff) \n\t"
- "lds r24,length \n\t" //Length of data to be written (in bytes)
- "lds r25,length+1 \n\t"
- "length_loop: \n\t" //Main loop, repeat for number of words in block
- "cpi r17,0x00 \n\t" //If page_word_count=0 then erase page
- "brne no_page_erase \n\t"
- "wait_spm1: \n\t"
- "lds r16,%0 \n\t" //Wait for previous spm to complete
- "andi r16,1 \n\t"
- "cpi r16,1 \n\t"
- "breq wait_spm1 \n\t"
- "ldi r16,0x03 \n\t" //Erase page pointed to by Z
- "sts %0,r16 \n\t"
- "spm \n\t"
-#ifdef __AVR_ATmega163__
- ".word 0xFFFF \n\t"
- "nop \n\t"
-#endif
- "wait_spm2: \n\t"
- "lds r16,%0 \n\t" //Wait for previous spm to complete
- "andi r16,1 \n\t"
- "cpi r16,1 \n\t"
- "breq wait_spm2 \n\t"
-
- "ldi r16,0x11 \n\t" //Re-enable RWW section
- "sts %0,r16 \n\t"
- "spm \n\t"
-#ifdef __AVR_ATmega163__
- ".word 0xFFFF \n\t"
- "nop \n\t"
-#endif
- "no_page_erase: \n\t"
- "ld r0,Y+ \n\t" //Write 2 bytes into page buffer
- "ld r1,Y+ \n\t"
-
- "wait_spm3: \n\t"
- "lds r16,%0 \n\t" //Wait for previous spm to complete
- "andi r16,1 \n\t"
- "cpi r16,1 \n\t"
- "breq wait_spm3 \n\t"
- "ldi r16,0x01 \n\t" //Load r0,r1 into FLASH page buffer
- "sts %0,r16 \n\t"
- "spm \n\t"
-
- "inc r17 \n\t" //page_word_count++
- "cpi r17,%1 \n\t"
- "brlo same_page \n\t" //Still same page in FLASH
- "write_page: \n\t"
- "clr r17 \n\t" //New page, write current one first
- "wait_spm4: \n\t"
- "lds r16,%0 \n\t" //Wait for previous spm to complete
- "andi r16,1 \n\t"
- "cpi r16,1 \n\t"
- "breq wait_spm4 \n\t"
-#ifdef __AVR_ATmega163__
- "andi r30,0x80 \n\t" // m163 requires Z6:Z1 to be zero during page write
-#endif
- "ldi r16,0x05 \n\t" //Write page pointed to by Z
- "sts %0,r16 \n\t"
- "spm \n\t"
-#ifdef __AVR_ATmega163__
- ".word 0xFFFF \n\t"
- "nop \n\t"
- "ori r30,0x7E \n\t" // recover Z6:Z1 state after page write (had to be zero during write)
-#endif
- "wait_spm5: \n\t"
- "lds r16,%0 \n\t" //Wait for previous spm to complete
- "andi r16,1 \n\t"
- "cpi r16,1 \n\t"
- "breq wait_spm5 \n\t"
- "ldi r16,0x11 \n\t" //Re-enable RWW section
- "sts %0,r16 \n\t"
- "spm \n\t"
-#ifdef __AVR_ATmega163__
- ".word 0xFFFF \n\t"
- "nop \n\t"
-#endif
- "same_page: \n\t"
- "adiw r30,2 \n\t" //Next word in FLASH
- "sbiw r24,2 \n\t" //length-2
- "breq final_write \n\t" //Finished
- "rjmp length_loop \n\t"
- "final_write: \n\t"
- "cpi r17,0 \n\t"
- "breq block_done \n\t"
- "adiw r24,2 \n\t" //length+2, fool above check on length after short page write
- "rjmp write_page \n\t"
- "block_done: \n\t"
- "clr __zero_reg__ \n\t" //restore zero register
-#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega_328__)
- : "=m" (SPMCSR) : "M" (PAGE_SIZE) : "r0","r16","r17","r24","r25","r28","r29","r30","r31"
-#else
- : "=m" (SPMCR) : "M" (PAGE_SIZE) : "r0","r16","r17","r24","r25","r28","r29","r30","r31"
-#endif
- );
- /* Should really add a wait for RWW section to be enabled, don't actually need it since we never */
- /* exit the bootloader without a power cycle anyhow */
- }
- putch(0x14);
- putch(0x10);
- }
- }
-
-
- /* Read memory block mode, length is big endian. */
- else if(ch=='t') {
- length.byte[1] = getch();
- length.byte[0] = getch();
-#if defined __AVR_ATmega128__
- if (address.word>0x7FFF) flags.rampz = 1; // No go with m256, FIXME
- else flags.rampz = 0;
-#endif
- if (getch() == 'E') flags.eeprom = 1;
- else {
- flags.eeprom = 0;
- address.word = address.word << 1; // address * 2 -> byte location
- }
- if (getch() == ' ') { // Command terminator
- putch(0x14);
- for (w=0;w < length.word;w++) { // Can handle odd and even lengths okay
- if (flags.eeprom) { // Byte access EEPROM read
-#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__)
- while(EECR & (1<<EEPE));
- EEAR = (uint16_t)(void *)address.word;
- EECR |= (1<<EERE);
- putch(EEDR);
-#else
- putch(eeprom_read_byte((void *)address.word));
-#endif
- address.word++;
- }
- else {
-
- if (!flags.rampz) putch(pgm_read_byte_near(address.word));
-#if defined __AVR_ATmega128__
- else putch(pgm_read_byte_far(address.word + 0x10000));
- // Hmmmm, yuck FIXME when m256 arrvies
-#endif
- address.word++;
- }
- }
- putch(0x10);
- }
- }
-
-
- /* Get device signature bytes */
- else if(ch=='u') {
- if (getch() == ' ') {
- putch(0x14);
- putch(SIG1);
- putch(SIG2);
- putch(SIG3);
- putch(0x10);
- }
- }
-
-
- /* Read oscillator calibration byte */
- else if(ch=='v') {
- byte_response(0x00);
- }
-
-
-#ifdef MONITOR
-
- /* here come the extended monitor commands by Erik Lins */
-
- /* check for three times exclamation mark pressed */
- else if(ch=='!') {
- ch = getch();
- if(ch=='!') {
- ch = getch();
- if(ch=='!') {
-
-#ifdef __AVR_ATmega128__
- uint16_t extaddr;
-#endif
- uint8_t addrl, addrh;
-
-#ifdef CRUMB128
- PGM_P welcome = {"ATmegaBOOT / Crumb128 - (C) J.P.Kyle, E.Lins - 050815\n\r"};
-#elif defined PROBOMEGA128
- PGM_P welcome = {"ATmegaBOOT / PROBOmega128 - (C) J.P.Kyle, E.Lins - 050815\n\r"};
-#elif defined SAVVY128
- PGM_P welcome = {"ATmegaBOOT / Savvy128 - (C) J.P.Kyle, E.Lins - 050815\n\r"};
-#endif
-
- /* turn on LED */
- LED_DDR |= _BV(LED);
- LED_PORT &= ~_BV(LED);
-
- /* print a welcome message and command overview */
- for(i=0; welcome[i] != '\0'; ++i) {
- putch(welcome[i]);
- }
-
- /* test for valid commands */
- for(;;) {
- putch('\n');
- putch('\r');
- putch(':');
- putch(' ');
-
- ch = getch();
- putch(ch);
-
- /* toggle LED */
- if(ch == 't') {
- if(bit_is_set(LED_PIN,LED)) {
- LED_PORT &= ~_BV(LED);
- putch('1');
- } else {
- LED_PORT |= _BV(LED);
- putch('0');
- }
-
- }
-
- /* read byte from address */
- else if(ch == 'r') {
- ch = getch(); putch(ch);
- addrh = gethex();
- addrl = gethex();
- putch('=');
- ch = *(uint8_t *)((addrh << 8) + addrl);
- puthex(ch);
- }
-
- /* write a byte to address */
- else if(ch == 'w') {
- ch = getch(); putch(ch);
- addrh = gethex();
- addrl = gethex();
- ch = getch(); putch(ch);
- ch = gethex();
- *(uint8_t *)((addrh << 8) + addrl) = ch;
-
- }
-
- /* read from uart and echo back */
- else if(ch == 'u') {
- for(;;) {
- putch(getch());
- }
- }
-#ifdef __AVR_ATmega128__
- /* external bus loop */
- else if(ch == 'b') {
- putch('b');
- putch('u');
- putch('s');
- MCUCR = 0x80;
- XMCRA = 0;
- XMCRB = 0;
- extaddr = 0x1100;
- for(;;) {
- ch = *(volatile uint8_t *)extaddr;
- if(++extaddr == 0) {
- extaddr = 0x1100;
- }
- }
- }
-#endif
-
- else if(ch == 'j') {
- app_start();
- }
-
- }
- /* end of monitor functions */
-
- }
- }
- }
- /* end of monitor */
-#endif
-
-
- }
- /* end of forever loop */
-
-}
-
-
-char gethex(void) {
- char ah,al;
-
- ah = getch(); putch(ah);
- al = getch(); putch(al);
- if(ah >= 'a') {
- ah = ah - 'a' + 0x0a;
- } else if(ah >= '0') {
- ah -= '0';
- }
- if(al >= 'a') {
- al = al - 'a' + 0x0a;
- } else if(al >= '0') {
- al -= '0';
- }
- return (ah << 4) + al;
-}
-
-
-void puthex(char ch) {
- char ah,al;
-
- ah = (ch & 0xf0) >> 4;
- if(ah >= 0x0a) {
- ah = ah - 0x0a + 'a';
- } else {
- ah += '0';
- }
- al = (ch & 0x0f);
- if(al >= 0x0a) {
- al = al - 0x0a + 'a';
- } else {
- al += '0';
- }
- putch(ah);
- putch(al);
-}
-
-
-void putch(char ch)
-{
-#ifdef __AVR_ATmega128__
- if(bootuart == 1) {
- while (!(UCSR0A & _BV(UDRE0)));
- UDR0 = ch;
- }
- else if (bootuart == 2) {
- while (!(UCSR1A & _BV(UDRE1)));
- UDR1 = ch;
- }
-#elif defined (__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__)
- while (!(UCSR0A & _BV(UDRE0)));
- UDR0 = ch;
-#else
- /* m8,16,32,169,8515,8535,163 */
- while (!(UCSRA & _BV(UDRE)));
- UDR = ch;
-#endif
-}
-
-
-char getch(void)
-{
-#ifdef __AVR_ATmega128__
- if(bootuart == 1) {
- while(!(UCSR0A & _BV(RXC0)));
- return UDR0;
- }
- else if(bootuart == 2) {
- while(!(UCSR1A & _BV(RXC1)));
- return UDR1;
- }
- return 0;
-#elif defined (__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__)
- uint32_t count = 0;
- while(!(UCSR0A & _BV(RXC0))){
- /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/
- /* HACKME:: here is a good place to count times*/
- count++;
- if (count > MAX_TIME_COUNT)
- app_start();
- }
- return UDR0;
-#else
- /* m8,16,32,169,8515,8535,163 */
- uint32_t count = 0;
- while(!(UCSRA & _BV(RXC))){
- /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/
- /* HACKME:: here is a good place to count times*/
- count++;
- if (count > MAX_TIME_COUNT)
- app_start();
- }
- return UDR;
-#endif
-}
-
-
-void getNch(uint8_t count)
-{
- uint8_t i;
- for(i=0;i<count;i++) {
-#ifdef __AVR_ATmega128__
- if(bootuart == 1) {
- while(!(UCSR0A & _BV(RXC0)));
- UDR0;
- }
- else if(bootuart == 2) {
- while(!(UCSR1A & _BV(RXC1)));
- UDR1;
- }
-#elif (defined __AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__)
- while(!(UCSR0A & _BV(RXC0)));
- UDR0;
-#else
- /* m8,16,32,169,8515,8535,163 */
- /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/
- //while(!(UCSRA & _BV(RXC)));
- //UDR;
- uint8_t i;
- for(i=0;i<count;i++) {
- getch(); // need to handle time out
- }
-#endif
- }
-}
-
-
-void byte_response(uint8_t val)
-{
- if (getch() == ' ') {
- putch(0x14);
- putch(val);
- putch(0x10);
- }
-}
-
-
-void nothing_response(void)
-{
- if (getch() == ' ') {
- putch(0x14);
- putch(0x10);
- }
-}
-
-void flash_led(uint8_t count)
-{
- /* flash onboard LED three times to signal entering of bootloader */
- uint32_t l;
-
- if (count == 0) {
- count = 3;
- }
-
- for (i = 0; i < count; ++i) {
- LED_PORT |= _BV(LED);
- for(l = 0; l < (2 * F_CPU); ++l);
- LED_PORT &= ~_BV(LED);
- for(l = 0; l < (F_CPU / 5); ++l);
- }
-}
-
-
-/* end of file ATmegaBOOT.c */
diff --git a/bootloaders/bt/ATmegaBOOT_168.hex b/bootloaders/bt/ATmegaBOOT_168.hex
deleted file mode 100644
index 036ae54..0000000
--- a/bootloaders/bt/ATmegaBOOT_168.hex
+++ /dev/null
@@ -1,121 +0,0 @@
-:103800000C94341C0C944F1C0C944F1C0C944F1CA7
-:103810000C944F1C0C944F1C0C944F1C0C944F1C7C
-:103820000C944F1C0C944F1C0C944F1C0C944F1C6C
-:103830000C944F1C0C944F1C0C944F1C0C944F1C5C
-:103840000C944F1C0C944F1C0C944F1C0C944F1C4C
-:103850000C944F1C0C944F1C0C944F1C0C944F1C3C
-:103860000C944F1C0C944F1C11241FBECFEFD4E0BE
-:10387000DEBFCDBF11E0A0E0B1E0E0E6FFE302C0B3
-:1038800005900D92A230B107D9F712E0A2E0B1E0A5
-:1038900001C01D92AC30B107E1F70C94D61C0C941A
-:1038A000001C882309F483E01092090290E0981725
-:1038B000F0F4692F2D9A2FEF37E448EE51E02253B0
-:1038C00030404040504057FFFACF2D982FEF33ED56
-:1038D00040E350E0225330404040504057FFFACF81
-:1038E000962F9F5F692F981728F3909309020895E8
-:1038F000982F8091C00085FFFCCF9093C60008955B
-:10390000EF92FF920F931F93EE24FF248701809183
-:10391000C00087FD17C00894E11CF11C011D111D9A
-:1039200081E0E81682E1F8068AE7080780E01807D8
-:1039300070F3E0910201F091030109958091C000BC
-:1039400087FFE9CF8091C600992787FD90951F9149
-:103950000F91FF90EF9008950E94801C803209F033
-:10396000089584E10E94781C80E10E94781C0895EB
-:10397000CF93C82F0E94801C803249F484E10E94BA
-:10398000781C8C2F0E94781C80E10E94781CCF91BB
-:103990000895282F90E007C08091C0008823E4F7A5
-:1039A0008091C6009F5F9217B8F30895CFEFD4E0DF
-:1039B000DEBFCDBF000056985E9A1092C50088E029
-:1039C0008093C40088E18093C10086E08093C200A8
-:1039D000259A579A5F9A109209022FE080E090E0B2
-:1039E0000197F1F7215027FFF9CF20E12093090239
-:1039F0005F9883E00E94511C83E50E94781C85E457
-:103A00000E94781C84E50E94781C80E20E94781C49
-:103A100082E40E94781C84E50E94781C80E20E9467
-:103A2000781C80E50E94781C81E40E94781C87E461
-:103A30000E94781C85E40E94781C8DE40E94781C0A
-:103A40008FE40E94781C84E40E94781C85E40E9424
-:103A5000781C80E20E94781C83E30E94781C80E23C
-:103A60000E94781C82E30E94781C80E30E94781CEC
-:103A700080E30E94781C80E30E94781C80E20E9410
-:103A8000781C81E30E94781C8DE00E94781C83E5FD
-:103A90000E94781C85E40E94781C84E50E94781CB2
-:103AA00080E20E94781C82E40E94781C84E50E94D7
-:103AB000781C80E20E94781C82E50E94781C8FE4CA
-:103AC0000E94781C8CE40E94781C85E40E94781C7B
-:103AD00080E20E94781C80E30E94781C80E20E94B1
-:103AE000781C86E60E94781C80E20E94781C87E39E
-:103AF0000E94781C84E60E94781C80E30E94781C57
-:103B000080E30E94781C8DE00E94781C0E94801C3B
-:103B1000803361F1813369F1803409F449C0813423
-:103B200009F44FC0823409F45DC0853409F460C0E3
-:103B30008035E1F08135D1F08235C1F0853509F469
-:103B40005BC0863509F463C0843609F465C08437E8
-:103B500009F4B9C0853709F414C18637B9F680E095
-:103B60000E94B81C0E94801C8033A1F60E94AC1CED
-:103B7000CDCF0E94801CC82F803241F684E10E9484
-:103B8000781C81E40E94781C86E50E94781C82E5FE
-:103B90000E94781C8C2F0E94781C89E40E94781C5B
-:103BA00083E50E94781C80E50E94781C80E1ACCF00
-:103BB0000E94801C8638D0F20E94801C0E94AC1C9F
-:103BC000A5CF0E94801C803809F4EDC0813809F42B
-:103BD000EEC0823809F4EFC0883909F683E00E940C
-:103BE000B81CC0CF84E10E94C91C0E94AC1C8ECFBF
-:103BF00085E00E94C91CF9CF0E94801C80930501BA
-:103C00000E94801C809306010E94AC1C7FCF84E040
-:103C10000E94C91C80E0A4CF0E94801C80930802EF
-:103C20000E94801C8093070280910B028E7F8093FC
-:103C30000B020E94801C853409F4C1C000E010E032
-:103C400080910702909108021816190670F4C7E0D7
-:103C5000D1E00E94801C89930F5F1F4F8091070263
-:103C60009091080208171907A0F30E94801C803267
-:103C700009F04CCF80910B0280FFADC000E010E056
-:103C8000209107023091080212161306C0F4E09149
-:103C90000501F0910601A7E0B1E0F999FECFF2BD70
-:103CA000E1BD8D9180BDFA9AF99A31960F5F1F4F51
-:103CB0000217130790F3F0930601E093050184E1E6
-:103CC0000E94781C73CF0E94801C809308020E947F
-:103CD000801C809307020E94801C853409F475C003
-:103CE00080910B028E7F80930B0280910501909151
-:103CF0000601880F991F90930601809305010E9489
-:103D0000801C803209F002CF84E10E94781C00E020
-:103D100010E020910702309108021216130608F0F5
-:103D200045CFE0910501F091060180910B0280FFE3
-:103D30001FC0F999FECFF2BDE1BDF89A80B50E948F
-:103D4000781CE0910501F09106013196F09306018F
-:103D5000E093050120910702309108020F5F1F4F89
-:103D60000217130708F022CF80910B0280FDE1CFEC
-:103D7000869580FF9BC03196F0930601E093050184
-:103D8000EDCF0E94801C803209F0C0CE84E10E94F9
-:103D9000781C8EE10E94781C84E90E94781C86E0E1
-:103DA0000E94781C03CF82E00E94B81CDBCE81E029
-:103DB0000E94B81CD7CE8FE00E94B81CD3CE809151
-:103DC0000B02816080930B0239CF80910B028160DE
-:103DD00080930B0294CF8091060187FD73C01092EF
-:103DE0000A028091050190910601880F991F909316
-:103DF0000601809305018091070280FF09C0809130
-:103E0000070290910802019690930802809307029E
-:103E1000F894F999FECF1127E0910501F091060180
-:103E2000C7E0D1E08091070290910802103091F430
-:103E30000091570001700130D9F303E0009357005F
-:103E4000E8950091570001700130D9F301E100932A
-:103E50005700E895099019900091570001700130C2
-:103E6000D9F301E000935700E8951395103498F0CA
-:103E700011270091570001700130D9F305E000933C
-:103E80005700E8950091570001700130D9F301E126
-:103E900000935700E8953296029709F0C7CF10308B
-:103EA00011F00296E5CF112484E10ACF84910E949B
-:103EB000781C2091070230910802E0910501F091F1
-:103EC000060159CF81E080930A028BCF1F93CF93D5
-:103ED0000E94801CC82F0E94781C0E94801C182FF2
-:103EE0000E94781CC1362CF0C75511363CF017558E
-:103EF00008C0C033D4F3C0531136CCF710330CF0E4
-:103F00001053C295C07FC10F8C2F992787FD9095C4
-:103F1000CF911F910895CF93282F992787FD9095D2
-:103F2000807F9070959587959595879595958795C0
-:103F3000959587958A303CF0895AC22FCF70CA3048
-:103F40003CF0C95A06C0805DC22FCF70CA30CCF792
-:103F5000C05D0E94781C8C2F0E94781CCF91089520
-:023F60008000DF
-:0400000300003800C1
-:00000001FF
diff --git a/bootloaders/bt/ATmegaBOOT_168_atmega328_bt.hex b/bootloaders/bt/ATmegaBOOT_168_atmega328_bt.hex
deleted file mode 100644
index a50c7c3..0000000
--- a/bootloaders/bt/ATmegaBOOT_168_atmega328_bt.hex
+++ /dev/null
@@ -1,162 +0,0 @@
-:107000000C9434380C9451380C9451380C945138F9
-:107010000C9451380C9451380C9451380C945138CC
-:107020000C9451380C9451380C9451380C945138BC
-:107030000C9451380C9451380C9451380C945138AC
-:107040000C9451380C9451380C9451380C9451389C
-:107050000C9451380C9451380C9451380C9451388C
-:107060000C9451380C94513811241FBECFEFD8E046
-:10707000DEBFCDBF11E0A0E0B1E0E4EEF9E702C071
-:1070800005900D92A230B107D9F712E0A2E0B1E06D
-:1070900001C01D92AC30B107E1F70E942D390C946C
-:1070A000F03C0C940038282F992787FD9095807F1D
-:1070B00090709595879595958795959587959595D4
-:1070C00087958A30C4F0382F395A822F8F708A30D2
-:1070D0007CF0982F995A8091C00085FFFCCF3093A7
-:1070E000C6008091C00085FFFCCF9093C600089534
-:1070F000982F905DF0CF382F305DE7CF982F80919B
-:10710000C00085FFFCCF9093C6000895EF92FF92D8
-:107110000F931F93EE24FF2487018091C00087FD09
-:1071200017C00894E11CF11C011D111D81E0E81637
-:1071300082E1F8068AE7080780E0180770F3E0911B
-:107140000301F091040109958091C00087FFE9CF08
-:107150008091C6001F910F91FF90EF9008951F93AB
-:107160000E948638182F8091C00085FFFCCF1093B5
-:10717000C6000E948638982F8091C00085FFFCCF02
-:107180009093C600113664F01755913674F490331D
-:107190000CF090531295107F892F810F1F91089545
-:1071A00010339CF31053913694F397551295107F3A
-:1071B000892F810F1F910895282F882351F090E087
-:1071C0008091C00087FFFCCF8091C6009F5F92171F
-:1071D000B8F308951F93182F0E948638803211F05B
-:1071E0001F9108958091C00085FFFCCF84E18093BA
-:1071F000C6008091C00085FFFCCF1093C60080912F
-:10720000C00085FFFCCF80E18093C6001F910895E8
-:107210000E948638803209F008958091C00085FF71
-:10722000FCCF84E18093C6008091C00085FFFCCF35
-:1072300080E18093C6000895882359F010920902D6
-:1072400090E02D9A2D989F5F9817D8F3909309029C
-:1072500008951092090283E0F3CF3F924F925F921C
-:107260006F927F928F929F92AF92BF92CF92DF9256
-:10727000EF92FF920F931F93CF93DF9300005698E6
-:107280005E9A1092C50088E08093C40088E18093E4
-:10729000C10086E08093C200259A579A5F9A21E048
-:1072A00040E050E0CA010197F1F72F5F2131D1F79B
-:1072B00080E1809309025F9883E00E941C398091ED
-:1072C000C00085FFFCCF83E58093C6008091C0009D
-:1072D00085FFFCCF85E48093C6008091C00085FFC8
-:1072E000FCCF84E58093C6008091C00085FFFCCF71
-:1072F00080E28093C6008091C00085FFFCCF82E4CD
-:107300008093C6008091C00085FFFCCF84E5809308
-:10731000C6008091C00085FFFCCF80E28093C6004C
-:107320008091C00085FFFCCF80E58093C6008091EE
-:10733000C00085FFFCCF81E48093C6008091C0002F
-:1073400085FFFCCF87E48093C6008091C00085FF55
-:10735000FCCF85E48093C6008091C00085FFFCCF00
-:107360008DE48093C6008091C00085FFFCCF8FE440
-:107370008093C6008091C00085FFFCCF84E4809399
-:10738000C6008091C00085FFFCCF85E48093C600D5
-:107390008091C00085FFFCCF80E28093C600809181
-:1073A000C00085FFFCCF83E38093C6008091C000BE
-:1073B00085FFFCCF80E28093C6008091C00085FFEE
-:1073C000FCCF82E38093C6008091C00085FFFCCF94
-:1073D00080E38093C6008091C00085FFFCCF80E3EE
-:1073E0008093C6008091C00085FFFCCF80E380932E
-:1073F000C6008091C00085FFFCCF80E28093C6006C
-:107400008091C00085FFFCCF81E38093C60080910E
-:10741000C00085FFFCCF8DE08093C6008091C00046
-:1074200085FFFCCF83E58093C6008091C00085FF77
-:10743000FCCF85E48093C6008091C00085FFFCCF1F
-:1074400084E58093C6008091C00085FFFCCF80E278
-:107450008093C6008091C00085FFFCCF82E48093BA
-:10746000C6008091C00085FFFCCF84E58093C600F4
-:107470008091C00085FFFCCF80E28093C6008091A0
-:10748000C00085FFFCCF82E58093C6008091C000DC
-:1074900085FFFCCF8FE48093C6008091C00085FFFC
-:1074A000FCCF8CE48093C6008091C00085FFFCCFA8
-:1074B00085E48093C6008091C00085FFFCCF80E208
-:1074C0008093C6008091C00085FFFCCF80E380934D
-:1074D000C6008091C00085FFFCCF80E28093C6008B
-:1074E0008091C00085FFFCCF86E68093C600809126
-:1074F000C00085FFFCCF80E28093C6008091C00071
-:1075000085FFFCCF87E38093C6008091C00085FF94
-:10751000FCCF84E68093C6008091C00085FFFCCF3D
-:1075200080E38093C6008091C00085FFFCCF80E39C
-:107530008093C6008091C00085FFFCCF8DE08093D2
-:10754000C60034E1F32E2EE1E22E95E9D92E8FE02C
-:10755000C82E00E1B02EAA24A39411E4912EB6E522
-:107560008B2EA2E57A2EF0E26F2EE9E45E2E73E513
-:10757000472E60E5362E0E948638803359F18133DC
-:10758000C9F1803409F472C0813409F486C08234B0
-:1075900021F1853409F474C08035E1F08135D1F0F2
-:1075A0008235C1F0853509F497C0863509F486C067
-:1075B000843609F4A0C0843709F40BC1853709F477
-:1075C00075C18637C1F680E00E94EA380E9486388D
-:1075D0008033A9F60E940839CECF90E08091C00098
-:1075E00087FFFCCF8091C6009F5F9431B9F70E945E
-:1075F0000839C1CF0E948638803209F0BCCF809113
-:10760000C00085FFFCCFF092C6008091C00085FFCE
-:10761000FCCF9092C6008091C00085FFFCCF809285
-:10762000C6008091C00085FFFCCF7092C60080919B
-:10763000C00085FFFCCF6092C6008091C00085FF2E
-:10764000FCCF5092C6008091C00085FFFCCF4092D5
-:10765000C6008091C00085FFFCCF3092C6008091AB
-:10766000C00085FFFCCFB092C60085CF0E9486384F
-:10767000863808F4AFCF0E9486380E9408397BCF45
-:1076800090E08091C00087FFFCCF8091C6009F5F93
-:107690009530B9F70E9408396ECF0E94863880383D
-:1076A00031F1813809F48DC0823809F48EC08839EF
-:1076B00009F089CF83E00E94EA385DCF90E08091A5
-:1076C000C00087FFFCCF8091C6009F5F9430B9F760
-:1076D00080E00E94EA387ACF0E94863880930501C4
-:1076E0000E948638809306010E94083944CF82E0C8
-:1076F0000E94EA3840CF0E948638809308020E9498
-:1077000086388093070280910B028E7F80930B0254
-:107710000E948638853429F480910B028160809321
-:107720000B028091070290910802892B89F000E0FA
-:1077300010E00E948638F801E95FFE4F80830F5FFA
-:107740001F4F80910702909108020817190788F3CC
-:107750000E948638803209F00ECF80910B0280FFA4
-:10776000CFC0A0910702B09108021097E9F0609194
-:10777000050170910601E7E0F1E09B01AD014E0FBC
-:107780005F1FF999FECF32BD21BD819180BDFA9A6C
-:10779000F99A2F5F3F4FE417F50799F76A0F7B1FA0
-:1077A00070930601609305018091C00085FFFCCFB6
-:1077B000F092C6008091C00085FFFCCFB092C60059
-:1077C000DACE81E00E94EA38D6CE8FE00E94EA3815
-:1077D000D2CE0E948638809308020E948638809319
-:1077E00007020E948638853409F484C080910B0218
-:1077F0008E7F80930B028091050190910601880F86
-:10780000991F90930601809305010E94863880326B
-:1078100009F0B1CE8091C00085FFFCCFF092C60088
-:10782000A0910702B09108021097B9F180910B0264
-:10783000182F1170082F0270E0910501F0910601D8
-:107840009F012F5F3F4FB90140E050E01123B1F499
-:10785000002339F494918091C00085FFFCCF909370
-:10786000C6004F5F5F4FCB010196F9014A175B07D6
-:1078700080F4BC012F5F3F4F112351F3F999FECFE4
-:10788000F2BDE1BDF89A90B58091C00085FFFCCFB4
-:10789000E6CF70930601609305018091C00085FDDD
-:1078A000E2CE8091C00085FFF8CFDDCE0E94863801
-:1078B000803209F060CE8091C00085FFFCCFF0924D
-:1078C000C6008091C00085FFFCCFE092C600809189
-:1078D000C00085FFFCCFD092C6008091C00085FF1C
-:1078E000FCCFC092C6008091C00085FFFCCFB09253
-:1078F000C60041CE80910B02816080930B0285CF40
-:10790000809106018823880F880B8A2180930A02C0
-:107910008091050190910601880F991F90930601AF
-:10792000809305018091070280FF09C080910702C2
-:107930009091080201969093080280930702F894B0
-:10794000F999FECF1127E0910501F0910601C7E0FA
-:10795000D1E08091070290910802103091F40091DB
-:10796000570001700130D9F303E000935700E89508
-:107970000091570001700130D9F301E100935700E5
-:10798000E895099019900091570001700130D9F3E2
-:1079900001E000935700E8951395103498F01127F3
-:1079A0000091570001700130D9F305E000935700B2
-:1079B000E8950091570001700130D9F301E100937F
-:1079C0005700E8953296029709F0C7CF103011F0B2
-:1079D0000296E5CF11248091C00085FFE5CEE8CE68
-:0479E000F894FFCF49
-:0279E400800021
-:040000030000700089
-:00000001FF
diff --git a/bootloaders/bt/Makefile b/bootloaders/bt/Makefile
deleted file mode 100644
index 6fe213e..0000000
--- a/bootloaders/bt/Makefile
+++ /dev/null
@@ -1,108 +0,0 @@
-# Makefile for ATmegaBOOT
-# E.Lins, 18.7.2005
-#
-# Instructions
-#
-# To make bootloader .hex file:
-# make diecimila
-# make lilypad
-# make ng
-# etc...
-#
-# To burn bootloader .hex file:
-# make diecimila_isp
-# make lilypad_isp
-# make ng_isp
-# etc...
-
-# program name should not be changed...
-PROGRAM = ATmegaBOOT_168
-
-# enter the parameters for the avrdude isp tool
-ISPTOOL = stk500v2
-ISPPORT = usb
-ISPSPEED = -b 115200
-
-MCU_TARGET = atmega168
-LDSECTION = --section-start=.text=0x3800
-
-# the efuse should really be 0xf8; since, however, only the lower
-# three bits of that byte are used on the atmega168, avrdude gets
-# confused if you specify 1's for the higher bits, see:
-# http://tinker.it/now/2007/02/24/the-tale-of-avrdude-atmega168-and-extended-bits-fuses/
-#
-# similarly, the lock bits should be 0xff instead of 0x3f (to
-# unlock the bootloader section) and 0xcf instead of 0x0f (to
-# lock it), but since the high two bits of the lock byte are
-# unused, avrdude would get confused.
-
-ISPFUSES = avrdude -c $(ISPTOOL) -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
--e -u -U lock:w:0x3f:m -U efuse:w:0x$(EFUSE):m -U hfuse:w:0x$(HFUSE):m -U lfuse:w:0x$(LFUSE):m
-ISPFLASH = avrdude -c $(ISPTOOL) -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
--U flash:w:$(PROGRAM)_$(TARGET).hex -U lock:w:0x0f:m
-
-STK500 = "C:\Program Files\Atmel\AVR Tools\STK500\Stk500.exe"
-STK500-1 = $(STK500) -e -d$(MCU_TARGET) -pf -vf -if$(PROGRAM)_$(TARGET).hex \
--lFF -LFF -f$(HFUSE)$(LFUSE) -EF8 -ms -q -cUSB -I200kHz -s -wt
-STK500-2 = $(STK500) -d$(MCU_TARGET) -ms -q -lCF -LCF -cUSB -I200kHz -s -wt
-
-
-OBJ = $(PROGRAM).o
-OPTIMIZE = -O2
-
-DEFS =
-LIBS =
-
-CC = avr-gcc
-
-# Override is only needed by avr-lib build system.
-
-override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS)
-override LDFLAGS = -Wl,$(LDSECTION)
-#override LDFLAGS = -Wl,-Map,$(PROGRAM).map,$(LDSECTION)
-
-OBJCOPY = avr-objcopy
-OBJDUMP = avr-objdump
-
-all:
-
-atmega328_bt: TARGET = atmega328_bt
-atmega328_bt: MCU_TARGET = atmega328p
-atmega328_bt: AVR_FREQ = 16000000L
-atmega328_bt: LDSECTION = --section-start=.text=0x7000
-atmega328_bt: $(PROGRAM)_atmega328_bt.hex
-
-atmega328_bt_isp: atmega328_bt
-atmega328_bt_isp: TARGET = atmega328_bt
-atmega328_bt_isp: MCU_TARGET = atmega328p
-atmega328_bt_isp: HFUSE = D8
-atmega328_bt_isp: LFUSE = FF
-atmega328_bt_isp: EFUSE = 05
-atmega328_bt_isp: isp
-
-isp: $(TARGET)
- $(ISPFUSES)
- $(ISPFLASH)
-
-isp-stk500: $(PROGRAM)_$(TARGET).hex
- $(STK500-1)
- $(STK500-2)
-
-%.elf: $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-clean:
- rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex
-
-%.lst: %.elf
- $(OBJDUMP) -h -S $< > $@
-
-%.hex: %.elf
- $(OBJCOPY) -j .text -j .data -O ihex $< $@
-
-%.srec: %.elf
- $(OBJCOPY) -j .text -j .data -O srec $< $@
-
-%.bin: %.elf
- $(OBJCOPY) -j .text -j .data -O binary $< $@
-
diff --git a/bootloaders/gemma/README.md b/bootloaders/gemma/README.md
deleted file mode 100644
index 2653e48..0000000
--- a/bootloaders/gemma/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-Arduino Gemma Bootloader
-========================
-
-The Arduino Gemma Bootloader is based on the Adafruit Trinket/Gemma Bootloader. In the Arduino Gemma bootloader the USB VID&PID, the Manufacturer name and the Device name parameters are changed.
-
-The source code of the bootloader of the version used at the compile time can be found at the following link: https://github.com/adafruit/Adafruit-Trinket-Gemma-Bootloader/tree/3bc1bb561273535d4d493518a233a3a1fccf6b76
-
-The *'usbconfig.h'* and the *'usbconfig.patch'* files are provided if you want to recompile the bootloader.
-You only need to replace the original *'usbconfig.h'* file with this one or patch it with the provided patch file.
-
-**Please note: you cannot use the Arduino USB VID/PID for your own non-Gemma products or projects. Purchase a USB VID for yourself at** http://www.usb.org/developers/vendor/
-
-
-
diff --git a/bootloaders/gemma/avrdude.conf b/bootloaders/gemma/avrdude.conf
deleted file mode 100644
index 2e1aebb..0000000
--- a/bootloaders/gemma/avrdude.conf
+++ /dev/null
@@ -1,14389 +0,0 @@
-# AVRDUDE Configuration File
-#
-# This file contains configuration data used by AVRDUDE which describes
-# the programming hardware pinouts and also provides part definitions.
-# AVRDUDE's "-C" command line option specifies the location of the
-# configuration file. The "-c" option names the programmer configuration
-# which must match one of the entry's "id" parameter. The "-p" option
-# identifies which part AVRDUDE is going to be programming and must match
-# one of the parts' "id" parameter.
-#
-# Possible entry formats are:
-#
-# programmer
-# parent <id> # optional parent
-# id = <id1> [, <id2> [, <id3>] ...] ; # <idN> are quoted strings
-# desc = <description> ; # quoted string
-# type = <type>; # programmer type, quoted string
-# # supported programmer types can be listed by "-c ?type"
-# connection_type = parallel | serial | usb
-# baudrate = <num> ; # baudrate for avr910-programmer
-# vcc = <num1> [, <num2> ... ] ; # pin number(s)
-# buff = <num1> [, <num2> ... ] ; # pin number(s)
-# reset = <num> ; # pin number
-# sck = <num> ; # pin number
-# mosi = <num> ; # pin number
-# miso = <num> ; # pin number
-# errled = <num> ; # pin number
-# rdyled = <num> ; # pin number
-# pgmled = <num> ; # pin number
-# vfyled = <num> ; # pin number
-# usbvid = <hexnum>; # USB VID (Vendor ID)
-# usbpid = <hexnum>; # USB PID (Product ID)
-# usbdev = <interface>; # USB interface or other device info
-# usbvendor = <vendorname>; # USB Vendor Name
-# usbproduct = <productname>; # USB Product Name
-# usbsn = <serialno>; # USB Serial Number
-#
-# To invert a bit, use = ~ <num>, the spaces are important.
-# For a pin list all pins must be inverted.
-# A single pin can be specified as usual = ~ <num>, for lists
-# specify it as follows = ~ ( <num> [, <num2> ... ] ) .
-# ;
-#
-# part
-# id = <id> ; # quoted string
-# desc = <description> ; # quoted string
-# has_jtag = <yes/no> ; # part has JTAG i/f
-# has_debugwire = <yes/no> ; # part has debugWire i/f
-# has_pdi = <yes/no> ; # part has PDI i/f
-# has_tpi = <yes/no> ; # part has TPI i/f
-# devicecode = <num> ; # deprecated, use stk500_devcode
-# stk500_devcode = <num> ; # numeric
-# avr910_devcode = <num> ; # numeric
-# signature = <num> <num> <num> ; # signature bytes
-# chip_erase_delay = <num> ; # micro-seconds
-# reset = dedicated | io;
-# retry_pulse = reset | sck;
-# pgm_enable = <instruction format> ;
-# chip_erase = <instruction format> ;
-# chip_erase_delay = <num> ; # chip erase delay (us)
-# # STK500 parameters (parallel programming IO lines)
-# pagel = <num> ; # pin name in hex, i.e., 0xD7
-# bs2 = <num> ; # pin name in hex, i.e., 0xA0
-# serial = <yes/no> ; # can use serial downloading
-# parallel = <yes/no/pseudo>; # can use par. programming
-# # STK500v2 parameters, to be taken from Atmel's XML files
-# timeout = <num> ;
-# stabdelay = <num> ;
-# cmdexedelay = <num> ;
-# synchloops = <num> ;
-# bytedelay = <num> ;
-# pollvalue = <num> ;
-# pollindex = <num> ;
-# predelay = <num> ;
-# postdelay = <num> ;
-# pollmethod = <num> ;
-# mode = <num> ;
-# delay = <num> ;
-# blocksize = <num> ;
-# readsize = <num> ;
-# hvspcmdexedelay = <num> ;
-# # STK500v2 HV programming parameters, from XML
-# pp_controlstack = <num>, <num>, ...; # PP only
-# hvsp_controlstack = <num>, <num>, ...; # HVSP only
-# hventerstabdelay = <num>;
-# progmodedelay = <num>; # PP only
-# latchcycles = <num>;
-# togglevtg = <num>;
-# poweroffdelay = <num>;
-# resetdelayms = <num>;
-# resetdelayus = <num>;
-# hvleavestabdelay = <num>;
-# resetdelay = <num>;
-# synchcycles = <num>; # HVSP only
-# chiperasepulsewidth = <num>; # PP only
-# chiperasepolltimeout = <num>;
-# chiperasetime = <num>; # HVSP only
-# programfusepulsewidth = <num>; # PP only
-# programfusepolltimeout = <num>;
-# programlockpulsewidth = <num>; # PP only
-# programlockpolltimeout = <num>;
-# # JTAG ICE mkII parameters, also from XML files
-# allowfullpagebitstream = <yes/no> ;
-# enablepageprogramming = <yes/no> ;
-# idr = <num> ; # IO addr of IDR (OCD) reg.
-# rampz = <num> ; # IO addr of RAMPZ reg.
-# spmcr = <num> ; # mem addr of SPMC[S]R reg.
-# eecr = <num> ; # mem addr of EECR reg.
-# # (only when != 0x3c)
-# is_at90s1200 = <yes/no> ; # AT90S1200 part
-# is_avr32 = <yes/no> ; # AVR32 part
-#
-# memory <memtype>
-# paged = <yes/no> ; # yes / no
-# size = <num> ; # bytes
-# page_size = <num> ; # bytes
-# num_pages = <num> ; # numeric
-# min_write_delay = <num> ; # micro-seconds
-# max_write_delay = <num> ; # micro-seconds
-# readback_p1 = <num> ; # byte value
-# readback_p2 = <num> ; # byte value
-# pwroff_after_write = <yes/no> ; # yes / no
-# read = <instruction format> ;
-# write = <instruction format> ;
-# read_lo = <instruction format> ;
-# read_hi = <instruction format> ;
-# write_lo = <instruction format> ;
-# write_hi = <instruction format> ;
-# loadpage_lo = <instruction format> ;
-# loadpage_hi = <instruction format> ;
-# writepage = <instruction format> ;
-# ;
-# ;
-#
-# If any of the above parameters are not specified, the default value
-# of 0 is used for numerics or the empty string ("") for string
-# values. If a required parameter is left empty, AVRDUDE will
-# complain.
-#
-# Parts can also inherit parameters from previously defined parts
-# using the following syntax. In this case specified integer and
-# string values override parameter values from the parent part. New
-# memory definitions are added to the definitions inherited from the
-# parent.
-#
-# part parent <id> # quoted string
-# id = <id> ; # quoted string
-# <any set of other parameters from the list above>
-# ;
-#
-# NOTES:
-# * 'devicecode' is the device code used by the STK500 (see codes
-# listed below)
-# * Not all memory types will implement all instructions.
-# * AVR Fuse bits and Lock bits are implemented as a type of memory.
-# * Example memory types are:
-# "flash", "eeprom", "fuse", "lfuse" (low fuse), "hfuse" (high
-# fuse), "signature", "calibration", "lock"
-# * The memory type specified on the avrdude command line must match
-# one of the memory types defined for the specified chip.
-# * The pwroff_after_write flag causes avrdude to attempt to
-# power the device off and back on after an unsuccessful write to
-# the affected memory area if VCC programmer pins are defined. If
-# VCC pins are not defined for the programmer, a message
-# indicating that the device needs a power-cycle is printed out.
-# This flag was added to work around a problem with the
-# at90s4433/2333's; see the at90s4433 errata at:
-#
-# http://www.atmel.com/dyn/resources/prod_documents/doc1280.pdf
-#
-# INSTRUCTION FORMATS
-#
-# Instruction formats are specified as a comma seperated list of
-# string values containing information (bit specifiers) about each
-# of the 32 bits of the instruction. Bit specifiers may be one of
-# the following formats:
-#
-# '1' = the bit is always set on input as well as output
-#
-# '0' = the bit is always clear on input as well as output
-#
-# 'x' = the bit is ignored on input and output
-#
-# 'a' = the bit is an address bit, the bit-number matches this bit
-# specifier's position within the current instruction byte
-#
-# 'aN' = the bit is the Nth address bit, bit-number = N, i.e., a12
-# is address bit 12 on input, a0 is address bit 0.
-#
-# 'i' = the bit is an input data bit
-#
-# 'o' = the bit is an output data bit
-#
-# Each instruction must be composed of 32 bit specifiers. The
-# instruction specification closely follows the instruction data
-# provided in Atmel's data sheets for their parts.
-#
-# See below for some examples.
-#
-#
-# The following are STK500 part device codes to use for the
-# "devicecode" field of the part. These came from Atmel's software
-# section avr061.zip which accompanies the application note
-# AVR061 available from:
-#
-# http://www.atmel.com/dyn/resources/prod_documents/doc2525.pdf
-#
-
-#define ATTINY10 0x10 /* the _old_ one that never existed! */
-#define ATTINY11 0x11
-#define ATTINY12 0x12
-#define ATTINY15 0x13
-#define ATTINY13 0x14
-
-#define ATTINY22 0x20
-#define ATTINY26 0x21
-#define ATTINY28 0x22
-#define ATTINY2313 0x23
-
-#define AT90S1200 0x33
-
-#define AT90S2313 0x40
-#define AT90S2323 0x41
-#define AT90S2333 0x42
-#define AT90S2343 0x43
-
-#define AT90S4414 0x50
-#define AT90S4433 0x51
-#define AT90S4434 0x52
-#define ATMEGA48 0x59
-
-#define AT90S8515 0x60
-#define AT90S8535 0x61
-#define AT90C8534 0x62
-#define ATMEGA8515 0x63
-#define ATMEGA8535 0x64
-
-#define ATMEGA8 0x70
-#define ATMEGA88 0x73
-#define ATMEGA168 0x86
-
-#define ATMEGA161 0x80
-#define ATMEGA163 0x81
-#define ATMEGA16 0x82
-#define ATMEGA162 0x83
-#define ATMEGA169 0x84
-
-#define ATMEGA323 0x90
-#define ATMEGA32 0x91
-
-#define ATMEGA64 0xA0
-
-#define ATMEGA103 0xB1
-#define ATMEGA128 0xB2
-#define AT90CAN128 0xB3
-#define AT90CAN64 0xB3
-#define AT90CAN32 0xB3
-
-#define AT86RF401 0xD0
-
-#define AT89START 0xE0
-#define AT89S51 0xE0
-#define AT89S52 0xE1
-
-# The following table lists the devices in the original AVR910
-# appnote:
-# |Device |Signature | Code |
-# +-------+----------+------+
-# |tiny12 | 1E 90 05 | 0x55 |
-# |tiny15 | 1E 90 06 | 0x56 |
-# | | | |
-# | S1200 | 1E 90 01 | 0x13 |
-# | | | |
-# | S2313 | 1E 91 01 | 0x20 |
-# | S2323 | 1E 91 02 | 0x48 |
-# | S2333 | 1E 91 05 | 0x34 |
-# | S2343 | 1E 91 03 | 0x4C |
-# | | | |
-# | S4414 | 1E 92 01 | 0x28 |
-# | S4433 | 1E 92 03 | 0x30 |
-# | S4434 | 1E 92 02 | 0x6C |
-# | | | |
-# | S8515 | 1E 93 01 | 0x38 |
-# | S8535 | 1E 93 03 | 0x68 |
-# | | | |
-# |mega32 | 1E 95 01 | 0x72 |
-# |mega83 | 1E 93 05 | 0x65 |
-# |mega103| 1E 97 01 | 0x41 |
-# |mega161| 1E 94 01 | 0x60 |
-# |mega163| 1E 94 02 | 0x64 |
-
-# Appnote AVR109 also has a table of AVR910 device codes, which
-# lists:
-# dev avr910 signature
-# ATmega8 0x77 0x1E 0x93 0x07
-# ATmega8515 0x3B 0x1E 0x93 0x06
-# ATmega8535 0x6A 0x1E 0x93 0x08
-# ATmega16 0x75 0x1E 0x94 0x03
-# ATmega162 0x63 0x1E 0x94 0x04
-# ATmega163 0x66 0x1E 0x94 0x02
-# ATmega169 0x79 0x1E 0x94 0x05
-# ATmega32 0x7F 0x1E 0x95 0x02
-# ATmega323 0x73 0x1E 0x95 0x01
-# ATmega64 0x46 0x1E 0x96 0x02
-# ATmega128 0x44 0x1E 0x97 0x02
-#
-# These codes refer to "BOOT" device codes which are apparently
-# different than standard device codes, for whatever reasons
-# (often one above the standard code).
-
-# There are several extended versions of AVR910 implementations around
-# in the Internet. These add the following codes (only devices that
-# actually exist are listed):
-
-# ATmega8515 0x3A
-# ATmega128 0x43
-# ATmega64 0x45
-# ATtiny26 0x5E
-# ATmega8535 0x69
-# ATmega32 0x72
-# ATmega16 0x74
-# ATmega8 0x76
-# ATmega169 0x78
-
-#
-# Overall avrdude defaults; suitable for ~/.avrduderc
-#
-default_parallel = "/dev/parport0";
-default_serial = "/dev/ttyS0";
-# default_bitclock = 2.5;
-
-# Turn off safemode by default
-#default_safemode = no;
-
-
-#
-# PROGRAMMER DEFINITIONS
-#
-
-# http://wiring.org.co/
-# Basically STK500v2 protocol, with some glue to trigger the
-# bootloader.
-programmer
- id = "wiring";
- desc = "Wiring";
- type = "wiring";
- connection_type = serial;
-;
-
-programmer
- id = "arduino";
- desc = "Arduino";
- type = "arduino";
- connection_type = serial;
-;
-# this will interface with the chips on these programmers:
-#
-# http://real.kiev.ua/old/avreal/en/adapters
-# http://www.amontec.com/jtagkey.shtml, jtagkey-tiny.shtml
-# http://www.olimex.com/dev/arm-usb-ocd.html, arm-usb-tiny.html
-# http://www.ethernut.de/en/hardware/turtelizer/index.html
-# http://elk.informatik.fh-augsburg.de/hhweb/doc/openocd/usbjtag/usbjtag.html
-# http://dangerousprototypes.com/docs/FT2232_breakout_board
-# http://www.ftdichip.com/Products/Modules/DLPModules.htm,DLP-2232*,DLP-USB1232H
-# http://flashrom.org/FT2232SPI_Programmer
-#
-# The drivers will look for a specific device and use the first one found.
-# If you have mulitple devices, then look for unique information (like SN)
-# And fill that in here.
-#
-# Note that the pin numbers for the main ISP signals (reset, sck,
-# mosi, miso) are fixed and cannot be changed, since they must match
-# the way the Multi-Protocol Synchronous Serial Engine (MPSSE) of
-# these FTDI ICs has been designed.
-
-programmer
- id = "avrftdi";
- desc = "FT2232D based generic programmer";
- type = "avrftdi";
- connection_type = usb;
- usbvid = 0x0403;
- usbpid = 0x6010;
- usbvendor = "";
- usbproduct = "";
- usbdev = "A";
- usbsn = "";
-#ISP-signals - lower ADBUS-Nibble (default)
- reset = 3;
- sck = 0;
- mosi = 1;
- miso = 2;
-#LED SIGNALs - higher ADBUS-Nibble
-# errled = 4;
-# rdyled = 5;
-# pgmled = 6;
-# vfyled = 7;
-#Buffer Signal - ACBUS - Nibble
-# buff = 8;
-;
-# This is an implementation of the above with a buffer IC (74AC244) and
-# 4 LEDs directly attached, all active low.
-programmer
- id = "2232HIO";
- desc = "FT2232H based generic programmer";
- type = "avrftdi";
- connection_type = usb;
- usbvid = 0x0403;
-# Note: This PID is reserved for generic H devices and
-# should be programmed into the EEPROM
-# usbpid = 0x8A48;
- usbpid = 0x6010;
- usbdev = "A";
- usbvendor = "";
- usbproduct = "";
- usbsn = "";
-#ISP-signals
- reset = 3;
- sck = 0;
- mosi = 1;
- miso = 2;
- buff = ~4;
-#LED SIGNALs
- errled = ~ 11;
- rdyled = ~ 14;
- pgmled = ~ 13;
- vfyled = ~ 12;
-;
-
-#The FT4232H can be treated as FT2232H, but it has a different USB
-#device ID of 0x6011.
-programmer parent "avrftdi"
- id = "4232h";
- desc = "FT4232H based generic programmer";
- usbpid = 0x6011;
-;
-
-programmer
- id = "jtagkey";
- desc = "Amontec JTAGKey, JTAGKey-Tiny and JTAGKey2";
- type = "avrftdi";
- connection_type = usb;
- usbvid = 0x0403;
-# Note: This PID is used in all JTAGKey variants
- usbpid = 0xCFF8;
- usbdev = "A";
- usbvendor = "";
- usbproduct = "";
- usbsn = "";
-#ISP-signals => 20 - Pin connector on JTAGKey
- reset = 3; # TMS 7 violet
- sck = 0; # TCK 9 white
- mosi = 1; # TDI 5 green
- miso = 2; # TDO 13 orange
- buff = ~4;
-# VTG VREF 1 brown with red tip
-# GND GND 20 black
-# The colors are on the 20 pin breakout cable
-# from Amontec
-;
-
-# On the adapter you can read "O-Link". On the PCB is printed "OpenJTAG v3.1"
-# You can find it as "OpenJTAG ARM JTAG USB" in the internet.
-# (But there are also several projects called Open JTAG, eg.
-# http://www.openjtag.org, which are completely different.)
-# http://www.100ask.net/shop/english.html (website seems to be outdated)
-# http://item.taobao.com/item.htm?id=1559277013
-# http://www.micro4you.com/store/openjtag-arm-jtag-usb.html (schematics!)
-# some other sources which call it O-Link
-# http://www.andahammer.com/olink/
-# http://www.developmentboard.net/31-o-link-debugger.html
-# http://armwerks.com/catalog/o-link-debugger-copy/
-# or just have a look at ebay ...
-# It is basically the same entry as jtagkey with different usb ids.
-programmer parent "jtagkey"
- id = "o-link";
- desc = "O-Link, OpenJTAG from www.100ask.net";
- usbvid = 0x1457;
- usbpid = 0x5118;
- usbvendor = "www.100ask.net";
- usbproduct = "USB<=>JTAG&RS232";
-;
-
-# http://wiki.openmoko.org/wiki/Debug_Board_v3
-programmer
- id = "openmoko";
- desc = "Openmoko debug board (v3)";
- type = "avrftdi";
- usbvid = 0x1457;
- usbpid = 0x5118;
- usbdev = "A";
- usbvendor = "";
- usbproduct = "";
- usbsn = "";
- reset = 3; # TMS 7
- sck = 0; # TCK 9
- mosi = 1; # TDI 5
- miso = 2; # TDO 13
-;
-
-# Only Rev. A boards.
-# Schematic and user manual: http://www.cs.put.poznan.pl/wswitala/download/pdf/811EVBK.pdf
-programmer
- id = "lm3s811";
- desc = "Luminary Micro LM3S811 Eval Board (Rev. A)";
- type = "avrftdi";
- connection_type = usb;
- usbvid = 0x0403;
- usbpid = 0xbcd9;
- usbvendor = "LMI";
- usbproduct = "LM3S811 Evaluation Board";
- usbdev = "A";
- usbsn = "";
-#ISP-signals - lower ACBUS-Nibble (default)
- reset = 3;
- sck = 0;
- mosi = 1;
- miso = 2;
-# Enable correct buffers
- buff = 7;
-;
-
-programmer
- id = "avrisp";
- desc = "Atmel AVR ISP";
- type = "stk500";
- connection_type = serial;
-;
-
-programmer
- id = "avrispv2";
- desc = "Atmel AVR ISP V2";
- type = "stk500v2";
- connection_type = serial;
-;
-
-programmer
- id = "avrispmkII";
- desc = "Atmel AVR ISP mkII";
- type = "stk500v2";
- connection_type = usb;
-;
-
-programmer parent "avrispmkII"
- id = "avrisp2";
-;
-
-programmer
- id = "buspirate";
- desc = "The Bus Pirate";
- type = "buspirate";
- connection_type = serial;
-;
-
-programmer
- id = "buspirate_bb";
- desc = "The Bus Pirate (bitbang interface, supports TPI)";
- type = "buspirate_bb";
- connection_type = serial;
- # pins are bits in bitbang byte (numbers are 87654321)
- # 1|POWER|PULLUP|AUX|MOSI|CLK|MISO|CS
- reset = 1;
- sck = 3;
- mosi = 4;
- miso = 2;
- #vcc = 7; This is internally set independent of this setting.
-;
-
-# This is supposed to be the "default" STK500 entry.
-# Attempts to select the correct firmware version
-# by probing for it. Better use one of the entries
-# below instead.
-programmer
- id = "stk500";
- desc = "Atmel STK500";
- type = "stk500generic";
- connection_type = serial;
-;
-
-programmer
- id = "stk500v1";
- desc = "Atmel STK500 Version 1.x firmware";
- type = "stk500";
- connection_type = serial;
-;
-
-programmer
- id = "mib510";
- desc = "Crossbow MIB510 programming board";
- type = "stk500";
- connection_type = serial;
-;
-
-programmer
- id = "stk500v2";
- desc = "Atmel STK500 Version 2.x firmware";
- type = "stk500v2";
- connection_type = serial;
-;
-
-programmer
- id = "stk500pp";
- desc = "Atmel STK500 V2 in parallel programming mode";
- type = "stk500pp";
- connection_type = serial;
-;
-
-programmer
- id = "stk500hvsp";
- desc = "Atmel STK500 V2 in high-voltage serial programming mode";
- type = "stk500hvsp";
- connection_type = serial;
-;
-
-programmer
- id = "stk600";
- desc = "Atmel STK600";
- type = "stk600";
- connection_type = usb;
-;
-
-programmer
- id = "stk600pp";
- desc = "Atmel STK600 in parallel programming mode";
- type = "stk600pp";
- connection_type = usb;
-;
-
-programmer
- id = "stk600hvsp";
- desc = "Atmel STK600 in high-voltage serial programming mode";
- type = "stk600hvsp";
- connection_type = usb;
-;
-
-programmer
- id = "avr910";
- desc = "Atmel Low Cost Serial Programmer";
- type = "avr910";
- connection_type = serial;
-;
-
-programmer
- id = "ft245r";
- desc = "FT245R Synchronous BitBang";
- type = "ftdi_syncbb";
- connection_type = usb;
- miso = 1; # D1
- sck = 0; # D0
- mosi = 2; # D2
- reset = 4; # D4
-;
-
-programmer
- id = "ft232r";
- desc = "FT232R Synchronous BitBang";
- type = "ftdi_syncbb";
- connection_type = usb;
- miso = 1; # RxD
- sck = 0; # RTS
- mosi = 2; # TxD
- reset = 4; # DTR
-;
-
-# see http://www.bitwizard.nl/wiki/index.php/FTDI_ATmega
-programmer
- id = "bwmega";
- desc = "BitWizard ftdi_atmega builtin programmer";
- type = "ftdi_syncbb";
- connection_type = usb;
- miso = 5; # DSR
- sck = 6; # DCD
- mosi = 3; # CTS
- reset = 7; # RI
-;
-
-# see http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html
-# Note: pins are numbered from 1!
-programmer
- id = "arduino-ft232r";
- desc = "Arduino: FT232R connected to ISP";
- type = "ftdi_syncbb";
- connection_type = usb;
- miso = 3; # CTS X3(1)
- sck = 5; # DSR X3(2)
- mosi = 6; # DCD X3(3)
- reset = 7; # RI X3(4)
-;
-
-# website mentioned above uses this id
-programmer parent "arduino-ft232r"
- id = "diecimila";
- desc = "alias for arduino-ft232r";
-;
-
-programmer
- id = "usbasp";
- desc = "USBasp, http://www.fischl.de/usbasp/";
- type = "usbasp";
- connection_type = usb;
- usbvid = 0x16C0; # VOTI
- usbpid = 0x05DC; # Obdev's free shared PID
- usbvendor = "www.fischl.de";
- usbproduct = "USBasp";
-
- # following variants are autodetected for id "usbasp"
-
- # original usbasp from fischl.de
- # see above "usbasp"
-
- # old usbasp from fischl.de
- #usbvid = 0x03EB; # ATMEL
- #usbpid = 0xC7B4; # (unoffical) USBasp
- #usbvendor = "www.fischl.de";
- #usbproduct = "USBasp";
-
- # NIBObee (only if -P nibobee is given on command line)
- # see below "nibobee"
-;
-
-programmer
- id = "nibobee";
- desc = "NIBObee";
- type = "usbasp";
- connection_type = usb;
- usbvid = 0x16C0; # VOTI
- usbpid = 0x092F; # NIBObee PID
- usbvendor = "www.nicai-systems.com";
- usbproduct = "NIBObee";
-;
-
-programmer
- id = "usbasp-clone";
- desc = "Any usbasp clone with correct VID/PID";
- type = "usbasp";
- connection_type = usb;
- usbvid = 0x16C0; # VOTI
- usbpid = 0x05DC; # Obdev's free shared PID
- #usbvendor = "";
- #usbproduct = "";
-;
-
-programmer
- id = "usbtiny";
- desc = "USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/";
- type = "usbtiny";
- connection_type = usb;
- usbvid = 0x1781;
- usbpid = 0x0c9f;
-;
-
-programmer
- id = "arduinogemma";
- desc = "Arduino Gemma. Based on USBtiny";
- type = "usbtiny";
- connection_type = usb;
- usbvid = 0x2341;
- usbpid = 0x0c9f;
-;
-
-programmer
- id = "arduinoisp";
- desc = " ";
- type = "usbtiny";
- connection_type = usb;
- usbvid = 0x2341;
- usbpid = 0x0049;
-;
-
-programmer
- id = "butterfly";
- desc = "Atmel Butterfly Development Board";
- type = "butterfly";
- connection_type = serial;
-;
-
-programmer
- id = "avr109";
- desc = "Atmel AppNote AVR109 Boot Loader";
- type = "butterfly";
- connection_type = serial;
-;
-
-programmer
- id = "avr911";
- desc = "Atmel AppNote AVR911 AVROSP";
- type = "butterfly";
- connection_type = serial;
-;
-
-# suggested in http://forum.mikrokopter.de/topic-post48317.html
-programmer
- id = "mkbutterfly";
- desc = "Mikrokopter.de Butterfly";
- type = "butterfly_mk";
- connection_type = serial;
-;
-
-programmer parent "mkbutterfly"
- id = "butterfly_mk";
-;
-
-programmer
- id = "jtagmkI";
- desc = "Atmel JTAG ICE (mkI)";
- baudrate = 115200; # default is 115200
- type = "jtagmki";
- connection_type = serial;
-;
-
-# easier to type
-programmer parent "jtagmkI"
- id = "jtag1";
-;
-
-# easier to type
-programmer parent "jtag1"
- id = "jtag1slow";
- baudrate = 19200;
-;
-
-# The JTAG ICE mkII has both, serial and USB connectivity. As it is
-# mostly used through USB these days (AVR Studio 5 only supporting it
-# that way), we make connection_type = usb the default. Users are
-# still free to use a serial port with the -P option.
-
-programmer
- id = "jtagmkII";
- desc = "Atmel JTAG ICE mkII";
- baudrate = 19200; # default is 19200
- type = "jtagmkii";
- connection_type = usb;
-;
-
-# easier to type
-programmer parent "jtagmkII"
- id = "jtag2slow";
-;
-
-# JTAG ICE mkII @ 115200 Bd
-programmer parent "jtag2slow"
- id = "jtag2fast";
- baudrate = 115200;
-;
-
-# make the fast one the default, people will love that
-programmer parent "jtag2fast"
- id = "jtag2";
-;
-
-# JTAG ICE mkII in ISP mode
-programmer
- id = "jtag2isp";
- desc = "Atmel JTAG ICE mkII in ISP mode";
- baudrate = 115200;
- type = "jtagmkii_isp";
- connection_type = usb;
-;
-
-# JTAG ICE mkII in debugWire mode
-programmer
- id = "jtag2dw";
- desc = "Atmel JTAG ICE mkII in debugWire mode";
- baudrate = 115200;
- type = "jtagmkii_dw";
- connection_type = usb;
-;
-
-# JTAG ICE mkII in AVR32 mode
-programmer
- id = "jtagmkII_avr32";
- desc = "Atmel JTAG ICE mkII im AVR32 mode";
- baudrate = 115200;
- type = "jtagmkii_avr32";
- connection_type = usb;
-;
-
-# JTAG ICE mkII in AVR32 mode
-programmer
- id = "jtag2avr32";
- desc = "Atmel JTAG ICE mkII im AVR32 mode";
- baudrate = 115200;
- type = "jtagmkii_avr32";
- connection_type = usb;
-;
-
-# JTAG ICE mkII in PDI mode
-programmer
- id = "jtag2pdi";
- desc = "Atmel JTAG ICE mkII PDI mode";
- baudrate = 115200;
- type = "jtagmkii_pdi";
- connection_type = usb;
-;
-
-# AVR Dragon in JTAG mode
-programmer
- id = "dragon_jtag";
- desc = "Atmel AVR Dragon in JTAG mode";
- baudrate = 115200;
- type = "dragon_jtag";
- connection_type = usb;
-;
-
-# AVR Dragon in ISP mode
-programmer
- id = "dragon_isp";
- desc = "Atmel AVR Dragon in ISP mode";
- baudrate = 115200;
- type = "dragon_isp";
- connection_type = usb;
-;
-
-# AVR Dragon in PP mode
-programmer
- id = "dragon_pp";
- desc = "Atmel AVR Dragon in PP mode";
- baudrate = 115200;
- type = "dragon_pp";
- connection_type = usb;
-;
-
-# AVR Dragon in HVSP mode
-programmer
- id = "dragon_hvsp";
- desc = "Atmel AVR Dragon in HVSP mode";
- baudrate = 115200;
- type = "dragon_hvsp";
- connection_type = usb;
-;
-
-# AVR Dragon in debugWire mode
-programmer
- id = "dragon_dw";
- desc = "Atmel AVR Dragon in debugWire mode";
- baudrate = 115200;
- type = "dragon_dw";
- connection_type = usb;
-;
-
-# AVR Dragon in PDI mode
-programmer
- id = "dragon_pdi";
- desc = "Atmel AVR Dragon in PDI mode";
- baudrate = 115200;
- type = "dragon_pdi";
- connection_type = usb;
-;
-
-programmer
- id = "jtag3";
- desc = "Atmel AVR JTAGICE3 in JTAG mode";
- type = "jtagice3";
- connection_type = usb;
-;
-
-programmer
- id = "jtag3pdi";
- desc = "Atmel AVR JTAGICE3 in PDI mode";
- type = "jtagice3_pdi";
- connection_type = usb;
-;
-
-programmer
- id = "jtag3dw";
- desc = "Atmel AVR JTAGICE3 in debugWIRE mode";
- type = "jtagice3_dw";
- connection_type = usb;
-;
-
-programmer
- id = "jtag3isp";
- desc = "Atmel AVR JTAGICE3 in ISP mode";
- type = "jtagice3_isp";
- connection_type = usb;
-;
-
-
-programmer
- id = "pavr";
- desc = "Jason Kyle's pAVR Serial Programmer";
- type = "avr910";
- connection_type = serial;
-;
-
-programmer
- id = "pickit2";
- desc = "MicroChip's PICkit2 Programmer";
- type = "pickit2";
- connection_type = usb;
-;
-
-# Parallel port programmers.
-
-programmer
- id = "bsd";
- desc = "Brian Dean's Programmer, http://www.bsdhome.com/avrdude/";
- type = "par";
- connection_type = parallel;
- vcc = 2, 3, 4, 5;
- reset = 7;
- sck = 8;
- mosi = 9;
- miso = 10;
-;
-
-programmer
- id = "stk200";
- desc = "STK200";
- type = "par";
- connection_type = parallel;
- buff = 4, 5;
- sck = 6;
- mosi = 7;
- reset = 9;
- miso = 10;
-;
-
-# The programming dongle used by the popular Ponyprog
-# utility. It is almost similar to the STK200 one,
-# except that there is a LED indicating that the
-# programming is currently in progress.
-
-programmer parent "stk200"
- id = "pony-stk200";
- desc = "Pony Prog STK200";
- pgmled = 8;
-;
-
-programmer
- id = "dt006";
- desc = "Dontronics DT006";
- type = "par";
- connection_type = parallel;
- reset = 4;
- sck = 5;
- mosi = 2;
- miso = 11;
-;
-
-programmer parent "dt006"
- id = "bascom";
- desc = "Bascom SAMPLE programming cable";
-;
-
-programmer
- id = "alf";
- desc = "Nightshade ALF-PgmAVR, http://nightshade.homeip.net/";
- type = "par";
- connection_type = parallel;
- vcc = 2, 3, 4, 5;
- buff = 6;
- reset = 7;
- sck = 8;
- mosi = 9;
- miso = 10;
- errled = 1;
- rdyled = 14;
- pgmled = 16;
- vfyled = 17;
-;
-
-programmer
- id = "sp12";
- desc = "Steve Bolt's Programmer";
- type = "par";
- connection_type = parallel;
- vcc = 4,5,6,7,8;
- reset = 3;
- sck = 2;
- mosi = 9;
- miso = 11;
-;
-
-programmer
- id = "picoweb";
- desc = "Picoweb Programming Cable, http://www.picoweb.net/";
- type = "par";
- connection_type = parallel;
- reset = 2;
- sck = 3;
- mosi = 4;
- miso = 13;
-;
-
-programmer
- id = "abcmini";
- desc = "ABCmini Board, aka Dick Smith HOTCHIP";
- type = "par";
- connection_type = parallel;
- reset = 4;
- sck = 3;
- mosi = 2;
- miso = 10;
-;
-
-programmer
- id = "futurlec";
- desc = "Futurlec.com programming cable.";
- type = "par";
- connection_type = parallel;
- reset = 3;
- sck = 2;
- mosi = 1;
- miso = 10;
-;
-
-
-# From the contributor of the "xil" jtag cable:
-# The "vcc" definition isn't really vcc (the cable gets its power from
-# the programming circuit) but is necessary to switch one of the
-# buffer lines (trying to add it to the "buff" lines doesn't work in
-# avrdude versions before 5.5j).
-# With this, TMS connects to RESET, TDI to MOSI, TDO to MISO and TCK
-# to SCK (plus vcc/gnd of course)
-programmer
- id = "xil";
- desc = "Xilinx JTAG cable";
- type = "par";
- connection_type = parallel;
- mosi = 2;
- sck = 3;
- reset = 4;
- buff = 5;
- miso = 13;
- vcc = 6;
-;
-
-
-programmer
- id = "dapa";
- desc = "Direct AVR Parallel Access cable";
- type = "par";
- connection_type = parallel;
- vcc = 3;
- reset = 16;
- sck = 1;
- mosi = 2;
- miso = 11;
-;
-
-programmer
- id = "atisp";
- desc = "AT-ISP V1.1 programming cable for AVR-SDK1 from <http://micro-research.co.th/> micro-research.co.th";
- type = "par";
- connection_type = parallel;
- reset = ~6;
- sck = ~8;
- mosi = ~7;
- miso = ~10;
-;
-
-programmer
- id = "ere-isp-avr";
- desc = "ERE ISP-AVR <http://www.ere.co.th/download/sch050713.pdf>";
- type = "par";
- connection_type = parallel;
- reset = ~4;
- sck = 3;
- mosi = 2;
- miso = 10;
-;
-
-programmer
- id = "blaster";
- desc = "Altera ByteBlaster";
- type = "par";
- connection_type = parallel;
- sck = 2;
- miso = 11;
- reset = 3;
- mosi = 8;
- buff = 14;
-;
-
-# It is almost same as pony-stk200, except vcc on pin 5 to auto
-# disconnect port (download on http://electropol.free.fr/spip/spip.php?article27)
-programmer parent "pony-stk200"
- id = "frank-stk200";
- desc = "Frank STK200";
- buff = ; # delete buff pin assignment
- vcc = 5;
-;
-
-# The AT98ISP Cable is a simple parallel dongle for AT89 family.
-# http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2877
-programmer
- id = "89isp";
- desc = "Atmel at89isp cable";
- type = "par";
- connection_type = parallel;
- reset = 17;
- sck = 1;
- mosi = 2;
- miso = 10;
-;
-
-
-#This programmer bitbangs GPIO lines using the Linux sysfs GPIO interface
-#
-#To enable it set the configuration below to match the GPIO lines connected to the
-#relevant ISP header pins and uncomment the entry definition. In case you don't
-#have the required permissions to edit this system wide config file put the
-#entry in a separate <your name>.conf file and use it with -C+<your name>.conf
-#on the command line.
-#
-#To check if your avrdude build has support for the linuxgpio programmer compiled in,
-#use -c?type on the command line and look for linuxgpio in the list. If it's not available
-#you need pass the --enable-linuxgpio=yes option to configure and recompile avrdude.
-#
-#programmer
-# id = "linuxgpio";
-# desc = "Use the Linux sysfs interface to bitbang GPIO lines";
-# type = "linuxgpio";
-# reset = ?;
-# sck = ?;
-# mosi = ?;
-# miso = ?;
-#;
-
-#This programmer bitbangs GPIO lines using the Linux sysfs GPIO interface and direct
-#GPIO memory registers read/write.
-#
-#To enable it set the configuration below to match the GPIO lines connected to the
-#relevant ISP header pins and uncomment the entry definition. In case you don't
-#have the required permissions to edit this system wide config file put the
-#entry in a separate <your name>.conf file and use it with -C+<your name>.conf
-#on the command line.
-#
-#To check if your avrdude build has support for the arduinotre programmer compiled in,
-#use -c?type on the command line and look for arduinotre in the list. If it's not available
-#you need pass the --enable-arduinotre=yes option to configure and recompile avrdude.
-#
-#programmer
-# id = "arduinotre";
-# desc = "Arduino TRE bitbanging using GPIO registers";
-# type = "arduinotre";
-# reset = ~65;
-# sck = 49;
-# mosi = 48;
-# miso = 61;
-#;
-
-# some ultra cheap programmers use bitbanging on the
-# serialport.
-#
-# PC - DB9 - Pins for RS232:
-#
-# GND 5 -- |O
-# | O| <- 9 RI
-# DTR 4 <- |O |
-# | O| <- 8 CTS
-# TXD 3 <- |O |
-# | O| -> 7 RTS
-# RXD 2 -> |O |
-# | O| <- 6 DSR
-# DCD 1 -> |O
-#
-# Using RXD is currently not supported.
-# Using RI is not supported under Win32 but is supported under Posix.
-
-# serial ponyprog design (dasa2 in uisp)
-# reset=!txd sck=rts mosi=dtr miso=cts
-
-programmer
- id = "ponyser";
- desc = "design ponyprog serial, reset=!txd sck=rts mosi=dtr miso=cts";
- type = "serbb";
- connection_type = serial;
- reset = ~3;
- sck = 7;
- mosi = 4;
- miso = 8;
-;
-
-# Same as above, different name
-# reset=!txd sck=rts mosi=dtr miso=cts
-
-programmer parent "ponyser"
- id = "siprog";
- desc = "Lancos SI-Prog <http://www.lancos.com/siprogsch.html>";
-;
-
-# unknown (dasa in uisp)
-# reset=rts sck=dtr mosi=txd miso=cts
-
-programmer
- id = "dasa";
- desc = "serial port banging, reset=rts sck=dtr mosi=txd miso=cts";
- type = "serbb";
- connection_type = serial;
- reset = 7;
- sck = 4;
- mosi = 3;
- miso = 8;
-;
-
-# unknown (dasa3 in uisp)
-# reset=!dtr sck=rts mosi=txd miso=cts
-
-programmer
- id = "dasa3";
- desc = "serial port banging, reset=!dtr sck=rts mosi=txd miso=cts";
- type = "serbb";
- connection_type = serial;
- reset = ~4;
- sck = 7;
- mosi = 3;
- miso = 8;
-;
-
-# C2N232i (jumper configuration "auto")
-# reset=dtr sck=!rts mosi=!txd miso=!cts
-
-programmer
- id = "c2n232i";
- desc = "serial port banging, reset=dtr sck=!rts mosi=!txd miso=!cts";
- type = "serbb";
- connection_type = serial;
- reset = 4;
- sck = ~7;
- mosi = ~3;
- miso = ~8;
-;
-
-#
-# PART DEFINITIONS
-#
-
-#------------------------------------------------------------
-# ATtiny11
-#------------------------------------------------------------
-
-# This is an HVSP-only device.
-
-part
- id = "t11";
- desc = "ATtiny11";
- stk500_devcode = 0x11;
- signature = 0x1e 0x90 0x04;
- chip_erase_delay = 20000;
-
- timeout = 200;
- hvsp_controlstack =
- 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
- 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
- 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
- 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- hvspcmdexedelay = 0;
- synchcycles = 6;
- latchcycles = 1;
- togglevtg = 1;
- poweroffdelay = 25;
- resetdelayms = 0;
- resetdelayus = 50;
- hvleavestabdelay = 100;
- resetdelay = 25;
- chiperasepolltimeout = 40;
- chiperasetime = 0;
- programfusepolltimeout = 25;
- programlockpolltimeout = 25;
-
- memory "eeprom"
- size = 64;
- blocksize = 64;
- readsize = 256;
- delay = 5;
- ;
-
- memory "flash"
- size = 1024;
- blocksize = 128;
- readsize = 256;
- delay = 3;
- ;
-
- memory "signature"
- size = 3;
- ;
-
- memory "lock"
- size = 1;
- ;
-
- memory "calibration"
- size = 1;
- ;
-
- memory "fuse"
- size = 1;
- ;
-;
-
-#------------------------------------------------------------
-# ATtiny12
-#------------------------------------------------------------
-
-part
- id = "t12";
- desc = "ATtiny12";
- stk500_devcode = 0x12;
- avr910_devcode = 0x55;
- signature = 0x1e 0x90 0x05;
- chip_erase_delay = 20000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- hvsp_controlstack =
- 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
- 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
- 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
- 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
- hventerstabdelay = 100;
- hvspcmdexedelay = 0;
- synchcycles = 6;
- latchcycles = 1;
- togglevtg = 1;
- poweroffdelay = 25;
- resetdelayms = 0;
- resetdelayus = 50;
- hvleavestabdelay = 100;
- resetdelay = 25;
- chiperasepolltimeout = 40;
- chiperasetime = 0;
- programfusepolltimeout = 25;
- programlockpolltimeout = 25;
-
- memory "eeprom"
- size = 64;
- min_write_delay = 9000;
- max_write_delay = 20000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = "1 0 1 0 0 0 0 0 x x x x x x x x",
- "x x a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 x x x x x x x x",
- "x x a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- mode = 0x04;
- delay = 8;
- blocksize = 64;
- readsize = 256;
- ;
-
- memory "flash"
- size = 1024;
- min_write_delay = 4500;
- max_write_delay = 20000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " x x x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x x x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- write_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- mode = 0x04;
- delay = 5;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 a1 a0 o o o o o o o o";
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 x x x x x x x x",
- "x x x x x x x x x x x x x o o x";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
- "x x x x x x x x x x x x x x x x";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
- memory "fuse"
- size = 1;
- read = "0 1 0 1 0 0 0 0 x x x x x x x x",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x",
- "x x x x x x x x i i i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-;
-
-#------------------------------------------------------------
-# ATtiny13
-#------------------------------------------------------------
-
-part
- id = "t13";
- desc = "ATtiny13";
- has_debugwire = yes;
- flash_instr = 0xB4, 0x0E, 0x1E;
- eeprom_instr = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
- 0xBC, 0x0E, 0xB4, 0x0E, 0xBA, 0x0D, 0xBB, 0xBC,
- 0x99, 0xE1, 0xBB, 0xAC;
- stk500_devcode = 0x14;
- signature = 0x1e 0x90 0x07;
- chip_erase_delay = 4000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- hvsp_controlstack =
- 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
- 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
- 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
- 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- hvspcmdexedelay = 0;
- synchcycles = 6;
- latchcycles = 1;
- togglevtg = 1;
- poweroffdelay = 25;
- resetdelayms = 0;
- resetdelayus = 90;
- hvleavestabdelay = 100;
- resetdelay = 25;
- chiperasepolltimeout = 40;
- chiperasetime = 0;
- programfusepolltimeout = 25;
- programlockpolltimeout = 25;
-
- ocdrev = 0;
-
- memory "eeprom"
- size = 64;
- page_size = 4;
- min_write_delay = 4000;
- max_write_delay = 4000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
- "x x a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
- "x x a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x x",
- " x x a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 5;
- blocksize = 4;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 1024;
- page_size = 32;
- num_pages = 32;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 0 0 0 0 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 0 0 0 0 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x x x x a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x x x x a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 0 0 0 0 a8",
- " a7 a6 a5 a4 x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 32;
- readsize = 256;
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
-
- memory "lock"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- ;
-
- memory "calibration"
- size = 2;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 a0 o o o o o o o o";
- ;
-
- memory "lfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- ;
-
- memory "hfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- ;
-
-;
-
-
-#------------------------------------------------------------
-# ATtiny15
-#------------------------------------------------------------
-
-part
- id = "t15";
- desc = "ATtiny15";
- stk500_devcode = 0x13;
- avr910_devcode = 0x56;
- signature = 0x1e 0x90 0x06;
- chip_erase_delay = 8200;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- hvsp_controlstack =
- 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
- 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
- 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
- 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
- hventerstabdelay = 100;
- hvspcmdexedelay = 5;
- synchcycles = 6;
- latchcycles = 16;
- togglevtg = 1;
- poweroffdelay = 25;
- resetdelayms = 0;
- resetdelayus = 50;
- hvleavestabdelay = 100;
- resetdelay = 25;
- chiperasepolltimeout = 40;
- chiperasetime = 0;
- programfusepolltimeout = 25;
- programlockpolltimeout = 25;
-
- memory "eeprom"
- size = 64;
- min_write_delay = 8200;
- max_write_delay = 8200;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = "1 0 1 0 0 0 0 0 x x x x x x x x",
- "x x a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 x x x x x x x x",
- "x x a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- mode = 0x04;
- delay = 10;
- blocksize = 64;
- readsize = 256;
- ;
-
- memory "flash"
- size = 1024;
- min_write_delay = 4100;
- max_write_delay = 4100;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " x x x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x x x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- write_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- mode = 0x04;
- delay = 5;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 a1 a0 o o o o o o o o";
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 x x x x x x x x",
- "x x x x x x x x x x x x x o o x";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
- "x x x x x x x x x x x x x x x x";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
- memory "fuse"
- size = 1;
- read = "0 1 0 1 0 0 0 0 x x x x x x x x",
- "x x x x x x x x o o o o x x o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x",
- "x x x x x x x x i i i i 1 1 i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-;
-
-#------------------------------------------------------------
-# AT90s1200
-#------------------------------------------------------------
-
-part
- id = "1200";
- desc = "AT90S1200";
- is_at90s1200 = yes;
- stk500_devcode = 0x33;
- avr910_devcode = 0x13;
- signature = 0x1e 0x90 0x01;
- pagel = 0xd7;
- bs2 = 0xa0;
- chip_erase_delay = 20000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 1;
- bytedelay = 0;
- pollindex = 0;
- pollvalue = 0xFF;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 0;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 15;
- chiperasepolltimeout = 0;
- programfusepulsewidth = 2;
- programfusepolltimeout = 0;
- programlockpulsewidth = 0;
- programlockpolltimeout = 1;
-
- memory "eeprom"
- size = 64;
- min_write_delay = 4000;
- max_write_delay = 9000;
- readback_p1 = 0x00;
- readback_p2 = 0xff;
- read = "1 0 1 0 0 0 0 0 x x x x x x x x",
- "x x a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 x x x x x x x x",
- "x x a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- mode = 0x04;
- delay = 20;
- blocksize = 32;
- readsize = 256;
- ;
- memory "flash"
- size = 1024;
- min_write_delay = 4000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " x x x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x x x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- write_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- mode = 0x02;
- delay = 15;
- blocksize = 128;
- readsize = 256;
- ;
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "fuse"
- size = 1;
- ;
- memory "lock"
- size = 1;
- min_write_delay = 9000;
- max_write_delay = 20000;
- write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
- "x x x x x x x x x x x x x x x x";
- ;
- ;
-
-#------------------------------------------------------------
-# AT90s4414
-#------------------------------------------------------------
-
-part
- id = "4414";
- desc = "AT90S4414";
- stk500_devcode = 0x50;
- avr910_devcode = 0x28;
- signature = 0x1e 0x92 0x01;
- chip_erase_delay = 20000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 0;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 15;
- chiperasepolltimeout = 0;
- programfusepulsewidth = 2;
- programfusepolltimeout = 0;
- programlockpulsewidth = 0;
- programlockpolltimeout = 1;
-
- memory "eeprom"
- size = 256;
- min_write_delay = 9000;
- max_write_delay = 20000;
- readback_p1 = 0x80;
- readback_p2 = 0x7f;
- read = " 1 0 1 0 0 0 0 0 x x x x x x x a8",
- "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0 x x x x x x x a8",
- "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- mode = 0x04;
- delay = 12;
- blocksize = 64;
- readsize = 256;
- ;
- memory "flash"
- size = 4096;
- min_write_delay = 9000;
- max_write_delay = 20000;
- readback_p1 = 0x7f;
- readback_p2 = 0x7f;
- read_lo = " 0 0 1 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write_lo = " 0 1 0 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- write_hi = " 0 1 0 0 1 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- mode = 0x04;
- delay = 12;
- blocksize = 64;
- readsize = 256;
- ;
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "fuse"
- size = 1;
- ;
- memory "lock"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
- "x x x x x x x x x x x x x x x x";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
- ;
-
-#------------------------------------------------------------
-# AT90s2313
-#------------------------------------------------------------
-
-part
- id = "2313";
- desc = "AT90S2313";
- stk500_devcode = 0x40;
- avr910_devcode = 0x20;
- signature = 0x1e 0x91 0x01;
- chip_erase_delay = 20000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 0;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 15;
- chiperasepolltimeout = 0;
- programfusepulsewidth = 2;
- programfusepolltimeout = 0;
- programlockpulsewidth = 0;
- programlockpolltimeout = 1;
-
- memory "eeprom"
- size = 128;
- min_write_delay = 4000;
- max_write_delay = 9000;
- readback_p1 = 0x80;
- readback_p2 = 0x7f;
- read = "1 0 1 0 0 0 0 0 x x x x x x x x",
- "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 x x x x x x x x",
- "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- mode = 0x04;
- delay = 12;
- blocksize = 64;
- readsize = 256;
- ;
- memory "flash"
- size = 2048;
- min_write_delay = 4000;
- max_write_delay = 9000;
- readback_p1 = 0x7f;
- readback_p2 = 0x7f;
- read_lo = " 0 0 1 0 0 0 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- write_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- mode = 0x04;
- delay = 12;
- blocksize = 128;
- readsize = 256;
- ;
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "fuse"
- size = 1;
- ;
- memory "lock"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 1 1 x x i i x",
- "x x x x x x x x x x x x x x x x";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
- ;
-
-#------------------------------------------------------------
-# AT90s2333
-#------------------------------------------------------------
-
-part
- id = "2333";
-##### WARNING: No XML file for device 'AT90S2333'! #####
- desc = "AT90S2333";
- stk500_devcode = 0x42;
- avr910_devcode = 0x34;
- signature = 0x1e 0x91 0x05;
- chip_erase_delay = 20000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 0;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 15;
- chiperasepolltimeout = 0;
- programfusepulsewidth = 2;
- programfusepolltimeout = 0;
- programlockpulsewidth = 0;
- programlockpolltimeout = 1;
-
- memory "eeprom"
- size = 128;
- min_write_delay = 9000;
- max_write_delay = 20000;
- readback_p1 = 0x00;
- readback_p2 = 0xff;
- read = "1 0 1 0 0 0 0 0 x x x x x x x x",
- "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 x x x x x x x x",
- "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- mode = 0x04;
- delay = 12;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "flash"
- size = 2048;
- min_write_delay = 9000;
- max_write_delay = 20000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- write_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- mode = 0x04;
- delay = 12;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "fuse"
- size = 1;
- min_write_delay = 9000;
- max_write_delay = 20000;
- pwroff_after_write = yes;
- read = "0 1 0 1 0 0 0 0 x x x x x x x x",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i",
- "x x x x x x x x x x x x x x x x";
- ;
- memory "lock"
- size = 1;
- min_write_delay = 9000;
- max_write_delay = 20000;
- read = "0 1 0 1 1 0 0 0 x x x x x x x x",
- "x x x x x x x x x x x x x o o x";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
- "x x x x x x x x x x x x x x x x";
- ;
- ;
-
-
-#------------------------------------------------------------
-# AT90s2343 (also AT90s2323 and ATtiny22)
-#------------------------------------------------------------
-
-part
- id = "2343";
- desc = "AT90S2343";
- stk500_devcode = 0x43;
- avr910_devcode = 0x4c;
- signature = 0x1e 0x91 0x03;
- chip_erase_delay = 18000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- hvsp_controlstack =
- 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
- 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
- 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
- 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
- hventerstabdelay = 100;
- hvspcmdexedelay = 0;
- synchcycles = 6;
- latchcycles = 1;
- togglevtg = 0;
- poweroffdelay = 25;
- resetdelayms = 0;
- resetdelayus = 50;
- hvleavestabdelay = 100;
- resetdelay = 25;
- chiperasepolltimeout = 40;
- chiperasetime = 0;
- programfusepolltimeout = 25;
- programlockpolltimeout = 25;
-
- memory "eeprom"
- size = 128;
- min_write_delay = 9000;
- max_write_delay = 20000;
- readback_p1 = 0x00;
- readback_p2 = 0xff;
- read = "1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0",
- "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0",
- "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- mode = 0x04;
- delay = 12;
- blocksize = 64;
- readsize = 256;
- ;
- memory "flash"
- size = 2048;
- min_write_delay = 9000;
- max_write_delay = 20000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- write_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- mode = 0x04;
- delay = 12;
- blocksize = 128;
- readsize = 128;
- ;
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "fuse"
- size = 1;
- min_write_delay = 9000;
- max_write_delay = 20000;
- read = "0 1 0 1 1 0 0 0 x x x x x x x x",
- "x x x x x x x x o o o x x x x o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 i",
- "x x x x x x x x x x x x x x x x";
- ;
- memory "lock"
- size = 1;
- min_write_delay = 9000;
- max_write_delay = 20000;
- read = "0 1 0 1 1 0 0 0 x x x x x x x x",
- "x x x x x x x x o o o x x x x o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
- "x x x x x x x x x x x x x x x x";
- ;
- ;
-
-
-#------------------------------------------------------------
-# AT90s4433
-#------------------------------------------------------------
-
-part
- id = "4433";
- desc = "AT90S4433";
- stk500_devcode = 0x51;
- avr910_devcode = 0x30;
- signature = 0x1e 0x92 0x03;
- chip_erase_delay = 20000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 0;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 15;
- chiperasepolltimeout = 0;
- programfusepulsewidth = 2;
- programfusepolltimeout = 0;
- programlockpulsewidth = 0;
- programlockpolltimeout = 1;
-
- memory "eeprom"
- size = 256;
- min_write_delay = 9000;
- max_write_delay = 20000;
- readback_p1 = 0x00;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0 x x x x x x x x",
- "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0 x x x x x x x x",
- "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- mode = 0x04;
- delay = 12;
- blocksize = 128;
- readsize = 256;
- ;
- memory "flash"
- size = 4096;
- min_write_delay = 9000;
- max_write_delay = 20000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " x x x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x x x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- write_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- mode = 0x04;
- delay = 12;
- blocksize = 128;
- readsize = 256;
- ;
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "fuse"
- size = 1;
- min_write_delay = 9000;
- max_write_delay = 20000;
- pwroff_after_write = yes;
- read = "0 1 0 1 0 0 0 0 x x x x x x x x",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i",
- "x x x x x x x x x x x x x x x x";
- ;
- memory "lock"
- size = 1;
- min_write_delay = 9000;
- max_write_delay = 20000;
- read = "0 1 0 1 1 0 0 0 x x x x x x x x",
- "x x x x x x x x x x x x x o o x";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
- "x x x x x x x x x x x x x x x x";
- ;
- ;
-
-#------------------------------------------------------------
-# AT90s4434
-#------------------------------------------------------------
-
-part
- id = "4434";
-##### WARNING: No XML file for device 'AT90S4434'! #####
- desc = "AT90S4434";
- stk500_devcode = 0x52;
- avr910_devcode = 0x6c;
- signature = 0x1e 0x92 0x02;
- chip_erase_delay = 20000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
-
- memory "eeprom"
- size = 256;
- min_write_delay = 9000;
- max_write_delay = 20000;
- readback_p1 = 0x00;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0 x x x x x x x x",
- "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0 x x x x x x x x",
- "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
- ;
- memory "flash"
- size = 4096;
- min_write_delay = 9000;
- max_write_delay = 20000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " x x x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x x x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- write_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
- ;
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "fuse"
- size = 1;
- min_write_delay = 9000;
- max_write_delay = 20000;
- read = "0 1 0 1 0 0 0 0 x x x x x x x x",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i",
- "x x x x x x x x x x x x x x x x";
- ;
- memory "lock"
- size = 1;
- min_write_delay = 9000;
- max_write_delay = 20000;
- read = "0 1 0 1 1 0 0 0 x x x x x x x x",
- "x x x x x x x x x x x x x o o x";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
- "x x x x x x x x x x x x x x x x";
- ;
- ;
-
-#------------------------------------------------------------
-# AT90s8515
-#------------------------------------------------------------
-
-part
- id = "8515";
- desc = "AT90S8515";
- stk500_devcode = 0x60;
- avr910_devcode = 0x38;
- signature = 0x1e 0x93 0x01;
- chip_erase_delay = 20000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 0;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- resetdelay = 15;
- chiperasepulsewidth = 15;
- chiperasepolltimeout = 0;
- programfusepulsewidth = 2;
- programfusepolltimeout = 0;
- programlockpulsewidth = 0;
- programlockpolltimeout = 1;
-
- memory "eeprom"
- size = 512;
- min_write_delay = 4000;
- max_write_delay = 9000;
- readback_p1 = 0x80;
- readback_p2 = 0x7f;
- read = " 1 0 1 0 0 0 0 0 x x x x x x x a8",
- "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0 x x x x x x x a8",
- "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- mode = 0x04;
- delay = 12;
- blocksize = 128;
- readsize = 256;
- ;
- memory "flash"
- size = 8192;
- min_write_delay = 4000;
- max_write_delay = 9000;
- readback_p1 = 0x7f;
- readback_p2 = 0x7f;
- read_lo = " 0 0 1 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write_lo = " 0 1 0 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- write_hi = " 0 1 0 0 1 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- mode = 0x04;
- delay = 12;
- blocksize = 128;
- readsize = 256;
- ;
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "fuse"
- size = 1;
- ;
- memory "lock"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
- "x x x x x x x x x x x x x x x x";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
- ;
-
-#------------------------------------------------------------
-# AT90s8535
-#------------------------------------------------------------
-
-part
- id = "8535";
- desc = "AT90S8535";
- stk500_devcode = 0x61;
- avr910_devcode = 0x68;
- signature = 0x1e 0x93 0x03;
- chip_erase_delay = 20000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 0;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 15;
- chiperasepolltimeout = 0;
- programfusepulsewidth = 2;
- programfusepolltimeout = 0;
- programlockpulsewidth = 0;
- programlockpolltimeout = 1;
-
- memory "eeprom"
- size = 512;
- min_write_delay = 9000;
- max_write_delay = 20000;
- readback_p1 = 0x00;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0 x x x x x x x a8",
- "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0 x x x x x x x a8",
- "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- mode = 0x04;
- delay = 12;
- blocksize = 128;
- readsize = 256;
- ;
- memory "flash"
- size = 8192;
- min_write_delay = 9000;
- max_write_delay = 20000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write_lo = " 0 1 0 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- write_hi = " 0 1 0 0 1 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- mode = 0x04;
- delay = 12;
- blocksize = 128;
- readsize = 256;
- ;
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "fuse"
- size = 1;
- read = "0 1 0 1 1 0 0 0 x x x x x x x x",
- "x x x x x x x x x x x x x x x o";
- write = "1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 i",
- "x x x x x x x x x x x x x x x x";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 x x x x x x x x",
- "x x x x x x x x o o x x x x x x";
- write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
- "x x x x x x x x x x x x x x x x";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega103
-#------------------------------------------------------------
-
-part
- id = "m103";
- desc = "ATmega103";
- stk500_devcode = 0xB1;
- avr910_devcode = 0x41;
- signature = 0x1e 0x97 0x01;
- chip_erase_delay = 112000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x8E, 0x9E, 0x2E, 0x3E, 0xAE, 0xBE,
- 0x4E, 0x5E, 0xCE, 0xDE, 0x6E, 0x7E, 0xEE, 0xDE,
- 0x66, 0x76, 0xE6, 0xF6, 0x6A, 0x7A, 0xEA, 0x7A,
- 0x7F, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 0;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 15;
- chiperasepolltimeout = 0;
- programfusepulsewidth = 2;
- programfusepolltimeout = 0;
- programlockpulsewidth = 0;
- programlockpolltimeout = 10;
-
- memory "eeprom"
- size = 4096;
- min_write_delay = 4000;
- max_write_delay = 9000;
- readback_p1 = 0x80;
- readback_p2 = 0x7f;
- read = " 1 0 1 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- mode = 0x04;
- delay = 12;
- blocksize = 64;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 131072;
- page_size = 256;
- num_pages = 512;
- min_write_delay = 22000;
- max_write_delay = 56000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 x x x x x x x",
- " x x x x x x x x";
-
- mode = 0x11;
- delay = 70;
- blocksize = 256;
- readsize = 256;
- ;
-
- memory "fuse"
- size = 1;
- read = "0 1 0 1 0 0 0 0 x x x x x x x x",
- "x x x x x x x x x x o x o 1 o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 1 i 1 i i",
- "x x x x x x x x x x x x x x x x";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 x x x x x x x x",
- "x x x x x x x x x x x x x o o x";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
- "x x x x x x x x x x x x x x x x";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-
-#------------------------------------------------------------
-# ATmega64
-#------------------------------------------------------------
-
-part
- id = "m64";
- desc = "ATmega64";
- has_jtag = yes;
- stk500_devcode = 0xA0;
- avr910_devcode = 0x45;
- signature = 0x1e 0x96 0x02;
- chip_erase_delay = 9000;
- pagel = 0xD7;
- bs2 = 0xA0;
- reset = dedicated;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 6;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x22;
- spmcr = 0x68;
- allowfullpagebitstream = yes;
-
- ocdrev = 2;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 8; /* for parallel programming */
- size = 2048;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- mode = 0x04;
- delay = 20;
- blocksize = 64;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 65536;
- page_size = 256;
- num_pages = 256;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " x a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " x a14 a13 a12 a11 a10 a9 a8",
- " a7 x x x x x x x",
- " x x x x x x x x";
-
- mode = 0x21;
- delay = 6;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x x i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 4;
- read = "0 0 1 1 1 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 a1 a0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-
-
-
-#------------------------------------------------------------
-# ATmega128
-#------------------------------------------------------------
-
-part
- id = "m128";
- desc = "ATmega128";
- has_jtag = yes;
- stk500_devcode = 0xB2;
- avr910_devcode = 0x43;
- signature = 0x1e 0x97 0x02;
- chip_erase_delay = 9000;
- pagel = 0xD7;
- bs2 = 0xA0;
- reset = dedicated;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 6;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x22;
- spmcr = 0x68;
- rampz = 0x3b;
- allowfullpagebitstream = yes;
-
- ocdrev = 1;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 8; /* for parallel programming */
- size = 4096;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- mode = 0x04;
- delay = 12;
- blocksize = 64;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 131072;
- page_size = 256;
- num_pages = 512;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 x x x x x x x",
- " x x x x x x x x";
-
- mode = 0x21;
- delay = 6;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x x i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 4;
- read = "0 0 1 1 1 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 a1 a0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# AT90CAN128
-#------------------------------------------------------------
-
-part
- id = "c128";
- desc = "AT90CAN128";
- has_jtag = yes;
- stk500_devcode = 0xB3;
-# avr910_devcode = 0x43;
- signature = 0x1e 0x97 0x81;
- chip_erase_delay = 9000;
- pagel = 0xD7;
- bs2 = 0xA0;
- reset = dedicated;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 6;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
- rampz = 0x3b;
- eecr = 0x3f;
- allowfullpagebitstream = no;
-
- ocdrev = 3;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 8; /* for parallel programming */
- size = 4096;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 0 x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 0 x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 0 0 0",
- " x x x x x x x x";
-
-
- mode = 0x41;
- delay = 20;
- blocksize = 8;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 131072;
- page_size = 256;
- num_pages = 512;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 x x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 256;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# AT90CAN64
-#------------------------------------------------------------
-
-part
- id = "c64";
- desc = "AT90CAN64";
- has_jtag = yes;
- stk500_devcode = 0xB3;
-# avr910_devcode = 0x43;
- signature = 0x1e 0x96 0x81;
- chip_erase_delay = 9000;
- pagel = 0xD7;
- bs2 = 0xA0;
- reset = dedicated;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 6;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
- rampz = 0x3b;
- eecr = 0x3f;
- allowfullpagebitstream = no;
-
- ocdrev = 3;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 8; /* for parallel programming */
- size = 2048;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 0 x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 0 x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 0 0 0",
- " x x x x x x x x";
-
-
- mode = 0x41;
- delay = 20;
- blocksize = 8;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 65536;
- page_size = 256;
- num_pages = 256;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 x x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 256;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# AT90CAN32
-#------------------------------------------------------------
-
-part
- id = "c32";
- desc = "AT90CAN32";
- has_jtag = yes;
- stk500_devcode = 0xB3;
-# avr910_devcode = 0x43;
- signature = 0x1e 0x95 0x81;
- chip_erase_delay = 9000;
- pagel = 0xD7;
- bs2 = 0xA0;
- reset = dedicated;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 6;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
- rampz = 0x3b;
- eecr = 0x3f;
- allowfullpagebitstream = no;
-
- ocdrev = 3;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 8; /* for parallel programming */
- size = 1024;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 0 x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 0 x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x a9 a8",
- " a7 a6 a5 a4 a3 0 0 0",
- " x x x x x x x x";
-
-
- mode = 0x41;
- delay = 20;
- blocksize = 8;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 32768;
- page_size = 256;
- num_pages = 128;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 x x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 256;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-
-#------------------------------------------------------------
-# ATmega16
-#------------------------------------------------------------
-
-part
- id = "m16";
- desc = "ATmega16";
- has_jtag = yes;
- stk500_devcode = 0x82;
- avr910_devcode = 0x74;
- signature = 0x1e 0x94 0x03;
- pagel = 0xd7;
- bs2 = 0xa0;
- chip_erase_delay = 9000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 100;
- latchcycles = 6;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- resetdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
- allowfullpagebitstream = yes;
-
- ocdrev = 2;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 4; /* for parallel programming */
- size = 512;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x04;
- delay = 10;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 16384;
- page_size = 128;
- num_pages = 128;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 a13 a12 a11 a10 a9 a8",
- " a7 a6 x x x x x x",
- " x x x x x x x x";
-
- mode = 0x21;
- delay = 6;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lfuse"
- size = 1;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "calibration"
- size = 4;
-
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 a1 a0 o o o o o o o o";
- ;
- ;
-
-
-#------------------------------------------------------------
-# ATmega164P
-#------------------------------------------------------------
-
-# close to ATmega16
-
-part parent "m16"
- id = "m164p";
- desc = "ATmega164P";
- signature = 0x1e 0x94 0x0a;
-
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- allowfullpagebitstream = no;
- chip_erase_delay = 55000;
-
- ocdrev = 3;
- ;
-
-
-#------------------------------------------------------------
-# ATmega324P
-#------------------------------------------------------------
-
-# similar to ATmega164P
-
-part
- id = "m324p";
- desc = "ATmega324P";
- has_jtag = yes;
- stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one
- avr910_devcode = 0x74;
- signature = 0x1e 0x95 0x08;
- pagel = 0xd7;
- bs2 = 0xa0;
- chip_erase_delay = 55000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
- allowfullpagebitstream = no;
-
- ocdrev = 3;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 4; /* for parallel programming */
- size = 1024;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 10;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 32768;
- page_size = 128;
- num_pages = 256;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 x x x x x x",
- " x x x x x x x x";
-
- mode = 0x21;
- delay = 6;
- blocksize = 256;
- readsize = 256;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lfuse"
- size = 1;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x 1 1 1 1 1 i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
-
- memory "calibration"
- size = 1;
-
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
- ;
-
-
-#------------------------------------------------------------
-# ATmega324PA
-#------------------------------------------------------------
-
-# similar to ATmega324P
-
-part parent "m324p"
- id = "m324pa";
- desc = "ATmega324PA";
- signature = 0x1e 0x95 0x11;
-
- ocdrev = 3;
- ;
-
-
-#------------------------------------------------------------
-# ATmega644
-#------------------------------------------------------------
-
-# similar to ATmega164
-
-part
- id = "m644";
- desc = "ATmega644";
- has_jtag = yes;
- stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one
- avr910_devcode = 0x74;
- signature = 0x1e 0x96 0x09;
- pagel = 0xd7;
- bs2 = 0xa0;
- chip_erase_delay = 55000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 6;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
- allowfullpagebitstream = no;
-
- ocdrev = 3;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 8; /* for parallel programming */
- size = 2048;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 0 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 10;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 65536;
- page_size = 256;
- num_pages = 256;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 x x x x x x x",
- " x x x x x x x x";
-
- mode = 0x21;
- delay = 6;
- blocksize = 256;
- readsize = 256;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lfuse"
- size = 1;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x 1 1 1 1 1 i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
-
- memory "calibration"
- size = 1;
-
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega644P
-#------------------------------------------------------------
-
-# similar to ATmega164p
-
-part parent "m644"
- id = "m644p";
- desc = "ATmega644P";
- signature = 0x1e 0x96 0x0a;
-
- ocdrev = 3;
- ;
-
-
-
-#------------------------------------------------------------
-# ATmega1284P
-#------------------------------------------------------------
-
-# similar to ATmega164p
-
-part
- id = "m1284p";
- desc = "ATmega1284P";
- has_jtag = yes;
- stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one
- avr910_devcode = 0x74;
- signature = 0x1e 0x97 0x05;
- pagel = 0xd7;
- bs2 = 0xa0;
- chip_erase_delay = 55000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 6;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
- allowfullpagebitstream = no;
-
- ocdrev = 3;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 8; /* for parallel programming */
- size = 4096;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 0 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 10;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 131072;
- page_size = 256;
- num_pages = 512;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 x x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 10;
- blocksize = 256;
- readsize = 256;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lfuse"
- size = 1;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x 1 1 1 1 1 i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
-
- memory "calibration"
- size = 1;
-
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
- ;
-
-
-
-#------------------------------------------------------------
-# ATmega162
-#------------------------------------------------------------
-
-part
- id = "m162";
- desc = "ATmega162";
- has_jtag = yes;
- stk500_devcode = 0x83;
- avr910_devcode = 0x63;
- signature = 0x1e 0x94 0x04;
- chip_erase_delay = 9000;
- pagel = 0xd7;
- bs2 = 0xa0;
-
- idr = 0x04;
- spmcr = 0x57;
- allowfullpagebitstream = yes;
-
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- ocdrev = 2;
-
- memory "flash"
- paged = yes;
- size = 16384;
- page_size = 128;
- num_pages = 128;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
-
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 a13 a12 a11 a10 a9 a8",
- " a7 a6 x x x x x x",
- " x x x x x x x x";
- mode = 0x41;
- delay = 10;
- blocksize = 128;
- readsize = 256;
-
- ;
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 6;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 4; /* for parallel programming */
- size = 512;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
-
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 20;
- blocksize = 4;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- min_write_delay = 16000;
- max_write_delay = 16000;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "hfuse"
- size = 1;
- min_write_delay = 16000;
- max_write_delay = 16000;
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "efuse"
- size = 1;
- min_write_delay = 16000;
- max_write_delay = 16000;
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x 1 1 1 1 1 i i i";
- ;
-
- memory "lock"
- size = 1;
- min_write_delay = 16000;
- max_write_delay = 16000;
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- ;
-
- memory "signature"
- size = 3;
-
- read = "0 0 1 1 0 0 0 0 0 0 x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
-
- memory "calibration"
- size = 1;
-
- read = "0 0 1 1 1 0 0 0 0 0 x x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-;
-
-
-
-#------------------------------------------------------------
-# ATmega163
-#------------------------------------------------------------
-
-part
- id = "m163";
- desc = "ATmega163";
- stk500_devcode = 0x81;
- avr910_devcode = 0x64;
- signature = 0x1e 0x94 0x02;
- chip_erase_delay = 32000;
- pagel = 0xd7;
- bs2 = 0xa0;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 0;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 30;
- programfusepulsewidth = 0;
- programfusepolltimeout = 2;
- programlockpulsewidth = 0;
- programlockpolltimeout = 2;
-
-
- memory "eeprom"
- size = 512;
- min_write_delay = 4000;
- max_write_delay = 4000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " x x x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " x x x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
- mode = 0x41;
- delay = 20;
- blocksize = 4;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 16384;
- page_size = 128;
- num_pages = 128;
- min_write_delay = 16000;
- max_write_delay = 16000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " x x x a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x x x a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " x x x a12 a11 a10 a9 a8",
- " a7 a6 x x x x x x",
- " x x x x x x x x";
-
- mode = 0x11;
- delay = 20;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- min_write_delay = 2000;
- max_write_delay = 2000;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o x x o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i 1 1 i i i i";
- ;
-
- memory "hfuse"
- size = 1;
- min_write_delay = 2000;
- max_write_delay = 2000;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x x x x x 1 o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x 1 1 1 1 1 i i i";
- ;
-
- memory "lock"
- size = 1;
- min_write_delay = 2000;
- max_write_delay = 2000;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x 0 x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega169
-#------------------------------------------------------------
-
-part
- id = "m169";
- desc = "ATmega169";
- has_jtag = yes;
- stk500_devcode = 0x85;
- avr910_devcode = 0x78;
- signature = 0x1e 0x94 0x05;
- chip_erase_delay = 9000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
-
- ocdrev = 2;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 4; /* for parallel programming */
- size = 512;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " x x x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " x x x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x a8",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 20;
- blocksize = 4;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 16384;
- page_size = 128;
- num_pages = 128;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " x x x a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x x x a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " x x x a12 a11 a10 a9 a8",
- " a7 a6 x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- min_write_delay = 2000;
- max_write_delay = 2000;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "hfuse"
- size = 1;
- min_write_delay = 2000;
- max_write_delay = 2000;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- ;
-
- memory "lock"
- size = 1;
- min_write_delay = 2000;
- max_write_delay = 2000;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega329
-#------------------------------------------------------------
-
-part
- id = "m329";
- desc = "ATmega329";
- has_jtag = yes;
-# stk500_devcode = 0x85; # no STK500 support, only STK500v2
-# avr910_devcode = 0x?; # try the ATmega169 one:
- avr910_devcode = 0x75;
- signature = 0x1e 0x95 0x03;
- chip_erase_delay = 9000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
-
- ocdrev = 3;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 4; /* for parallel programming */
- size = 1024;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 20;
- blocksize = 8;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 32768;
- page_size = 128;
- num_pages = 256;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " x a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " x x x a12 a11 a10 a9 a8",
- " a7 a6 x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 256;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "hfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "efuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x i i i";
- ;
-
- memory "lock"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega329P
-#------------------------------------------------------------
-# Identical to ATmega329 except of the signature
-
-part parent "m329"
- id = "m329p";
- desc = "ATmega329P";
- signature = 0x1e 0x95 0x0b;
-
- ocdrev = 3;
- ;
-
-#------------------------------------------------------------
-# ATmega3290
-#------------------------------------------------------------
-
-# identical to ATmega329
-
-part parent "m329"
- id = "m3290";
- desc = "ATmega3290";
- signature = 0x1e 0x95 0x04;
-
- ocdrev = 3;
- ;
-
-#------------------------------------------------------------
-# ATmega3290P
-#------------------------------------------------------------
-
-# identical to ATmega3290 except of the signature
-
-part parent "m3290"
- id = "m3290p";
- desc = "ATmega3290P";
- signature = 0x1e 0x95 0x0c;
-
- ocdrev = 3;
- ;
-
-#------------------------------------------------------------
-# ATmega649
-#------------------------------------------------------------
-
-part
- id = "m649";
- desc = "ATmega649";
- has_jtag = yes;
-# stk500_devcode = 0x85; # no STK500 support, only STK500v2
-# avr910_devcode = 0x?; # try the ATmega169 one:
- avr910_devcode = 0x75;
- signature = 0x1e 0x96 0x03;
- chip_erase_delay = 9000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
-
- ocdrev = 3;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 8; /* for parallel programming */
- size = 2048;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " x x x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " x x x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 0 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 20;
- blocksize = 8;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 65536;
- page_size = 256;
- num_pages = 256;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " x x x a12 a11 a10 a9 a8",
- " a7 x x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 256;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "hfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "efuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x i i i";
- ;
-
- memory "lock"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega6490
-#------------------------------------------------------------
-
-# identical to ATmega649
-
-part parent "m649"
- id = "m6490";
- desc = "ATmega6490";
- signature = 0x1e 0x96 0x04;
-
- ocdrev = 3;
- ;
-
-#------------------------------------------------------------
-# ATmega32
-#------------------------------------------------------------
-
-part
- id = "m32";
- desc = "ATmega32";
- has_jtag = yes;
- stk500_devcode = 0x91;
- avr910_devcode = 0x72;
- signature = 0x1e 0x95 0x02;
- chip_erase_delay = 9000;
- pagel = 0xd7;
- bs2 = 0xa0;
- reset = dedicated;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 6;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
- allowfullpagebitstream = yes;
-
- ocdrev = 2;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 4; /* for parallel programming */
- size = 1024;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x04;
- delay = 10;
- blocksize = 64;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 32768;
- page_size = 128;
- num_pages = 256;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 a13 a12 a11 a10 a9 a8",
- " a7 a6 x x x x x x",
- " x x x x x x x x";
-
- mode = 0x21;
- delay = 6;
- blocksize = 64;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- min_write_delay = 2000;
- max_write_delay = 2000;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "hfuse"
- size = 1;
- min_write_delay = 2000;
- max_write_delay = 2000;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "lock"
- size = 1;
- min_write_delay = 2000;
- max_write_delay = 2000;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
-
- memory "calibration"
- size = 4;
- read = "0 0 1 1 1 0 0 0 0 0 x x x x x x",
- "0 0 0 0 0 0 a1 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega161
-#------------------------------------------------------------
-
-part
- id = "m161";
- desc = "ATmega161";
- stk500_devcode = 0x80;
- avr910_devcode = 0x60;
- signature = 0x1e 0x94 0x01;
- chip_erase_delay = 28000;
- pagel = 0xd7;
- bs2 = 0xa0;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 0;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 30;
- programfusepulsewidth = 0;
- programfusepolltimeout = 2;
- programlockpulsewidth = 0;
- programlockpolltimeout = 2;
-
- memory "eeprom"
- size = 512;
- min_write_delay = 3400;
- max_write_delay = 3400;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " x x x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " x x x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- mode = 0x04;
- delay = 5;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 16384;
- page_size = 128;
- num_pages = 128;
- min_write_delay = 14000;
- max_write_delay = 14000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " x x x a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x x x a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " x x x a12 a11 a10 a9 a8",
- " a7 a6 x x x x x x",
- " x x x x x x x x";
-
- mode = 0x21;
- delay = 16;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "fuse"
- size = 1;
- min_write_delay = 2000;
- max_write_delay = 2000;
- read = "0 1 0 1 0 0 0 0 x x x x x x x x",
- "x x x x x x x x x o x o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x",
- "x x x x x x x x 1 i 1 i i i i i";
- ;
-
- memory "lock"
- size = 1;
- min_write_delay = 2000;
- max_write_delay = 2000;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- ;
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-
-#------------------------------------------------------------
-# ATmega8
-#------------------------------------------------------------
-
-part
- id = "m8";
- desc = "ATmega8";
- stk500_devcode = 0x70;
- avr910_devcode = 0x76;
- signature = 0x1e 0x93 0x07;
- pagel = 0xd7;
- bs2 = 0xc2;
- chip_erase_delay = 10000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 2;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- resetdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- memory "eeprom"
- size = 512;
- page_size = 4;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- mode = 0x04;
- delay = 20;
- blocksize = 128;
- readsize = 256;
- ;
- memory "flash"
- paged = yes;
- size = 8192;
- page_size = 64;
- num_pages = 128;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0x00;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 0 x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 0 x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 x x x x x",
- " x x x x x x x x";
-
- mode = 0x21;
- delay = 10;
- blocksize = 64;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- min_write_delay = 2000;
- max_write_delay = 2000;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "hfuse"
- size = 1;
- min_write_delay = 2000;
- max_write_delay = 2000;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "lock"
- size = 1;
- min_write_delay = 2000;
- max_write_delay = 2000;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- ;
-
- memory "calibration"
- size = 4;
- read = "0 0 1 1 1 0 0 0 0 0 x x x x x x",
- "0 0 0 0 0 0 a1 a0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-
-
-#------------------------------------------------------------
-# ATmega8515
-#------------------------------------------------------------
-
-part
- id = "m8515";
- desc = "ATmega8515";
- stk500_devcode = 0x63;
- avr910_devcode = 0x3A;
- signature = 0x1e 0x93 0x06;
- chip_erase_delay = 9000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 6;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- memory "eeprom"
- size = 512;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- mode = 0x04;
- delay = 20;
- blocksize = 128;
- readsize = 256;
- ;
- memory "flash"
- paged = yes;
- size = 8192;
- page_size = 64;
- num_pages = 128;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 0 x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 0 x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 x x x x x",
- " x x x x x x x x";
-
- mode = 0x21;
- delay = 6;
- blocksize = 64;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "hfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "lock"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- ;
-
- memory "calibration"
- size = 4;
- read = "0 0 1 1 1 0 0 0 0 0 x x x x x x",
- "0 0 0 0 0 0 a1 a0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-
-
-
-#------------------------------------------------------------
-# ATmega8535
-#------------------------------------------------------------
-
-part
- id = "m8535";
- desc = "ATmega8535";
- stk500_devcode = 0x64;
- avr910_devcode = 0x69;
- signature = 0x1e 0x93 0x08;
- pagel = 0xd7;
- bs2 = 0xa0;
- chip_erase_delay = 9000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 6;
- togglevtg = 0;
- poweroffdelay = 0;
- resetdelayms = 0;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- memory "eeprom"
- size = 512;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 x x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- mode = 0x04;
- delay = 20;
- blocksize = 128;
- readsize = 256;
- ;
- memory "flash"
- paged = yes;
- size = 8192;
- page_size = 64;
- num_pages = 128;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 0 x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 0 x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 x x x x x",
- " x x x x x x x x";
-
- mode = 0x21;
- delay = 6;
- blocksize = 64;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- min_write_delay = 2000;
- max_write_delay = 2000;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "hfuse"
- size = 1;
- min_write_delay = 2000;
- max_write_delay = 2000;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "lock"
- size = 1;
- min_write_delay = 2000;
- max_write_delay = 2000;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- ;
-
- memory "calibration"
- size = 4;
- read = "0 0 1 1 1 0 0 0 0 0 x x x x x x",
- "0 0 0 0 0 0 a1 a0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-
-#------------------------------------------------------------
-# ATtiny26
-#------------------------------------------------------------
-
-part
- id = "t26";
- desc = "ATtiny26";
- stk500_devcode = 0x21;
- avr910_devcode = 0x5e;
- signature = 0x1e 0x91 0x09;
- pagel = 0xb3;
- bs2 = 0xb2;
- chip_erase_delay = 9000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
- 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
- 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
- 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 2;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- memory "eeprom"
- size = 128;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = "1 0 1 0 0 0 0 0 x x x x x x x x",
- "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 x x x x x x x x",
- "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- mode = 0x04;
- delay = 10;
- blocksize = 64;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 2048;
- page_size = 32;
- num_pages = 64;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x x x x a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x x x x a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 x x x x",
- " x x x x x x x x";
-
- mode = 0x21;
- delay = 6;
- blocksize = 16;
- readsize = 256;
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 a1 a0 o o o o o o o o";
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 x x x x x x x x",
- "x x x x x x x x x x x x x x o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i",
- "x x x x x x x x x x x x x x x x";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x x x x i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x x x x o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 4;
- read = "0 0 1 1 1 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 a1 a0 o o o o o o o o";
- ;
-
-;
-
-
-#------------------------------------------------------------
-# ATtiny261
-#------------------------------------------------------------
-# Close to ATtiny26
-
-part
- id = "t261";
- desc = "ATtiny261";
- has_debugwire = yes;
- flash_instr = 0xB4, 0x00, 0x10;
- eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
- 0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC,
- 0x99, 0xE1, 0xBB, 0xAC;
-# stk500_devcode = 0x21;
-# avr910_devcode = 0x5e;
- signature = 0x1e 0x91 0x0c;
- pagel = 0xb3;
- bs2 = 0xb2;
- chip_erase_delay = 4000;
-
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
- 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
- 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
- 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 2;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- ocdrev = 1;
-
- memory "eeprom"
- paged = no;
- size = 128;
- page_size = 4;
- num_pages = 32;
- min_write_delay = 4000;
- max_write_delay = 4000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
-
- read = "1 0 1 0 0 0 0 0 x x x x x x x x",
- "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 x x x x x x x x",
- "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x x",
- " x a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 10;
- blocksize = 4;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 2048;
- page_size = 32;
- num_pages = 64;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
-
- read_lo = " 0 0 1 0 0 0 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x x x x a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x x x x a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " x x x x x x a9 a8",
- " a7 a6 a5 a4 x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 32;
- readsize = 256;
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 a1 a0 o o o o o o o o";
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 x x x x x x x x",
- "x x x x x x x x x x x x x x o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i",
- "x x x x x x x x x x x x x x x x";
- min_write_delay = 4500;
- max_write_delay = 4500;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 4500;
- max_write_delay = 4500;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 4500;
- max_write_delay = 4500;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x x x i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x x x x x x x x o";
- min_write_delay = 4500;
- max_write_delay = 4500;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
-;
-
-
-#------------------------------------------------------------
-# ATtiny461
-#------------------------------------------------------------
-# Close to ATtiny261
-
-part
- id = "t461";
- desc = "ATtiny461";
- has_debugwire = yes;
- flash_instr = 0xB4, 0x00, 0x10;
- eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
- 0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC,
- 0x99, 0xE1, 0xBB, 0xAC;
-# stk500_devcode = 0x21;
-# avr910_devcode = 0x5e;
- signature = 0x1e 0x92 0x08;
- pagel = 0xb3;
- bs2 = 0xb2;
- chip_erase_delay = 4000;
-
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
- 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
- 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
- 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 2;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- ocdrev = 1;
-
- memory "eeprom"
- paged = no;
- size = 256;
- page_size = 4;
- num_pages = 64;
- min_write_delay = 4000;
- max_write_delay = 4000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
-
- read = " 1 0 1 0 0 0 0 0 x x x x x x x x",
- "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0 x x x x x x x x",
- "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x x",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 10;
- blocksize = 4;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 4096;
- page_size = 64;
- num_pages = 64;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
-
- read_lo = " 0 0 1 0 0 0 0 0",
- " x x x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x x x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " x x x x x a10 a9 a8",
- " a7 a6 a5 x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 64;
- readsize = 256;
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 a1 a0 o o o o o o o o";
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 x x x x x x x x",
- "x x x x x x x x x x x x x x o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i",
- "x x x x x x x x x x x x x x x x";
- min_write_delay = 4500;
- max_write_delay = 4500;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 4500;
- max_write_delay = 4500;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 4500;
- max_write_delay = 4500;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x x x i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x x x x x x x x o";
- min_write_delay = 4500;
- max_write_delay = 4500;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
-;
-
-
-#------------------------------------------------------------
-# ATtiny861
-#------------------------------------------------------------
-# Close to ATtiny461
-
-part
- id = "t861";
- desc = "ATtiny861";
- has_debugwire = yes;
- flash_instr = 0xB4, 0x00, 0x10;
- eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
- 0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC,
- 0x99, 0xE1, 0xBB, 0xAC;
-# stk500_devcode = 0x21;
-# avr910_devcode = 0x5e;
- signature = 0x1e 0x93 0x0d;
- pagel = 0xb3;
- bs2 = 0xb2;
- chip_erase_delay = 4000;
-
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 0;
-
- pp_controlstack =
- 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
- 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
- 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
- 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 2;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- ocdrev = 1;
-
- memory "eeprom"
- paged = no;
- size = 512;
- num_pages = 128;
- page_size = 4;
- min_write_delay = 4000;
- max_write_delay = 4000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
-
- read = " 1 0 1 0 0 0 0 0 x x x x x x x a8",
- "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0 x x x x x x x a8",
- "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x a8",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 10;
- blocksize = 4;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 8192;
- page_size = 64;
- num_pages = 128;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
-
- read_lo = " 0 0 1 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 64;
- readsize = 256;
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 a1 a0 o o o o o o o o";
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 x x x x x x x x",
- "x x x x x x x x x x x x x x o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i",
- "x x x x x x x x x x x x x x x x";
- min_write_delay = 4500;
- max_write_delay = 4500;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 4500;
- max_write_delay = 4500;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 4500;
- max_write_delay = 4500;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x x x i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x x x x x x x x o";
- min_write_delay = 4500;
- max_write_delay = 4500;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
-;
-
-
-#------------------------------------------------------------
-# ATmega48
-#------------------------------------------------------------
-
-part
- id = "m48";
- desc = "ATmega48";
- has_debugwire = yes;
- flash_instr = 0xB6, 0x01, 0x11;
- eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
- 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
- 0x99, 0xF9, 0xBB, 0xAF;
- stk500_devcode = 0x59;
-# avr910_devcode = 0x;
- signature = 0x1e 0x92 0x05;
- pagel = 0xd7;
- bs2 = 0xc2;
- chip_erase_delay = 45000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- resetdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- ocdrev = 1;
-
- memory "eeprom"
- paged = no;
- page_size = 4;
- size = 256;
- min_write_delay = 3600;
- max_write_delay = 3600;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x x",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 20;
- blocksize = 4;
- readsize = 256;
- ;
- memory "flash"
- paged = yes;
- size = 4096;
- page_size = 64;
- num_pages = 64;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 0 0 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 0 0 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 0 0 a10 a9 a8",
- " a7 a6 a5 x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 64;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "hfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "efuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x x x x x x x x o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x x x i";
- ;
-
- memory "lock"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega48P
-#------------------------------------------------------------
-
-part parent "m48"
- id = "m48p";
- desc = "ATmega48P";
- signature = 0x1e 0x92 0x0a;
-
- ocdrev = 1;
- ;
-
-#------------------------------------------------------------
-# ATmega88
-#------------------------------------------------------------
-
-part
- id = "m88";
- desc = "ATmega88";
- has_debugwire = yes;
- flash_instr = 0xB6, 0x01, 0x11;
- eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
- 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
- 0x99, 0xF9, 0xBB, 0xAF;
- stk500_devcode = 0x73;
-# avr910_devcode = 0x;
- signature = 0x1e 0x93 0x0a;
- pagel = 0xd7;
- bs2 = 0xc2;
- chip_erase_delay = 9000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- resetdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- ocdrev = 1;
-
- memory "eeprom"
- paged = no;
- page_size = 4;
- size = 512;
- min_write_delay = 3600;
- max_write_delay = 3600;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 0 x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 0 x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x a8",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 20;
- blocksize = 4;
- readsize = 256;
- ;
- memory "flash"
- paged = yes;
- size = 8192;
- page_size = 64;
- num_pages = 128;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 64;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "hfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "efuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x x x x x x o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x i i i";
- ;
-
- memory "lock"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega88P
-#------------------------------------------------------------
-
-part parent "m88"
- id = "m88p";
- desc = "ATmega88P";
- signature = 0x1e 0x93 0x0f;
-
- ocdrev = 1;
- ;
-
-#------------------------------------------------------------
-# ATmega168
-#------------------------------------------------------------
-
-part
- id = "m168";
- desc = "ATmega168";
- has_debugwire = yes;
- flash_instr = 0xB6, 0x01, 0x11;
- eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
- 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
- 0x99, 0xF9, 0xBB, 0xAF;
- stk500_devcode = 0x86;
- # avr910_devcode = 0x;
- signature = 0x1e 0x94 0x06;
- pagel = 0xd7;
- bs2 = 0xc2;
- chip_erase_delay = 9000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- resetdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- ocdrev = 1;
-
- memory "eeprom"
- paged = no;
- page_size = 4;
- size = 512;
- min_write_delay = 3600;
- max_write_delay = 3600;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 0 x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 0 x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x a8",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 20;
- blocksize = 4;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 16384;
- page_size = 128;
- num_pages = 128;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 a12 a11 a10 a9 a8",
- " a7 a6 x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 128;
- readsize = 256;
-
- ;
-
- memory "lfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "hfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "efuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x x x x x x o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x i i i";
- ;
-
- memory "lock"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
-;
-
-#------------------------------------------------------------
-# ATmega168P
-#------------------------------------------------------------
-
-part parent "m168"
- id = "m168p";
- desc = "ATmega168P";
- signature = 0x1e 0x94 0x0b;
-
- ocdrev = 1;
-;
-
-#------------------------------------------------------------
-# ATtiny88
-#------------------------------------------------------------
-
-part
- id = "t88";
- desc = "ATtiny88";
- has_debugwire = yes;
- flash_instr = 0xB6, 0x01, 0x11;
- eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
- 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
- 0x99, 0xF9, 0xBB, 0xAF;
- stk500_devcode = 0x73;
-# avr910_devcode = 0x;
- signature = 0x1e 0x93 0x11;
- pagel = 0xd7;
- bs2 = 0xc2;
- chip_erase_delay = 9000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- resetdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- ocdrev = 1;
-
- memory "eeprom"
- paged = no;
- page_size = 4;
- size = 64;
- min_write_delay = 3600;
- max_write_delay = 3600;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x x",
- " x a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 20;
- blocksize = 4;
- readsize = 64;
- ;
- memory "flash"
- paged = yes;
- size = 8192;
- page_size = 64;
- num_pages = 128;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 64;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "hfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "efuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x x x x x x o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x x x i";
- ;
-
- memory "lock"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega328
-#------------------------------------------------------------
-
-part
- id = "m328";
- desc = "ATmega328";
- has_debugwire = yes;
- flash_instr = 0xB6, 0x01, 0x11;
- eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
- 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
- 0x99, 0xF9, 0xBB, 0xAF;
- stk500_devcode = 0x86;
- # avr910_devcode = 0x;
- signature = 0x1e 0x95 0x14;
- pagel = 0xd7;
- bs2 = 0xc2;
- chip_erase_delay = 9000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- resetdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- ocdrev = 1;
-
- memory "eeprom"
- paged = no;
- page_size = 4;
- size = 1024;
- min_write_delay = 3600;
- max_write_delay = 3600;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 0 x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 0 x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x a9 a8",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 20;
- blocksize = 4;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 32768;
- page_size = 128;
- num_pages = 256;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 a13 a12 a11 a10 a9 a8",
- " a7 a6 x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 128;
- readsize = 256;
-
- ;
-
- memory "lfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "hfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "efuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x x x x x x o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x i i i";
- ;
-
- memory "lock"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
-;
-
-part parent "m328"
- id = "m328p";
- desc = "ATmega328P";
- signature = 0x1e 0x95 0x0F;
-
- ocdrev = 1;
-;
-
-#------------------------------------------------------------
-# ATtiny2313
-#------------------------------------------------------------
-
-part
- id = "t2313";
- desc = "ATtiny2313";
- has_debugwire = yes;
- flash_instr = 0xB2, 0x0F, 0x1F;
- eeprom_instr = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
- 0xBA, 0x0F, 0xB2, 0x0F, 0xBA, 0x0D, 0xBB, 0xBC,
- 0x99, 0xE1, 0xBB, 0xAC;
- stk500_devcode = 0x23;
-## Use the ATtiny26 devcode:
- avr910_devcode = 0x5e;
- signature = 0x1e 0x91 0x0a;
- pagel = 0xD4;
- bs2 = 0xD6;
- reset = io;
- chip_erase_delay = 9000;
-
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E,
- 0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E,
- 0x26, 0x36, 0x66, 0x76, 0x2A, 0x3A, 0x6A, 0x7A,
- 0x2E, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- ocdrev = 0;
-
- memory "eeprom"
- size = 128;
- paged = no;
- page_size = 4;
- min_write_delay = 4000;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
- "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
- "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x x",
- " x a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 4;
- readsize = 256;
- ;
- memory "flash"
- paged = yes;
- size = 2048;
- page_size = 32;
- num_pages = 64;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 0 0 0 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 0 0 0 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
-# The information in the data sheet of April/2004 is wrong, this works:
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x x x x a3 a2 a1 a0",
- " i i i i i i i i";
-
-# The information in the data sheet of April/2004 is wrong, this works:
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x x x x a3 a2 a1 a0",
- " i i i i i i i i";
-
-# The information in the data sheet of April/2004 is wrong, this works:
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 0 0 0 a9 a8",
- " a7 a6 a5 a4 x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 32;
- readsize = 256;
- ;
-# ATtiny2313 has Signature Bytes: 0x1E 0x91 0x0A.
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "lock"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x x x i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-# The Tiny2313 has calibration data for both 4 MHz and 8 MHz.
-# The information in the data sheet of April/2004 is wrong, this works:
-
- memory "calibration"
- size = 2;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATtiny4313
-#------------------------------------------------------------
-
-part
- id = "t4313";
- desc = "ATtiny4313";
- has_debugwire = yes;
- flash_instr = 0xB2, 0x0F, 0x1F;
- eeprom_instr = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
- 0xBA, 0x0F, 0xB2, 0x0F, 0xBA, 0x0D, 0xBB, 0xBC,
- 0x99, 0xE1, 0xBB, 0xAC;
- stk500_devcode = 0x23;
-## Use the ATtiny26 devcode:
- avr910_devcode = 0x5e;
- signature = 0x1e 0x92 0x0d;
- pagel = 0xD4;
- bs2 = 0xD6;
- reset = io;
- chip_erase_delay = 9000;
-
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E,
- 0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E,
- 0x26, 0x36, 0x66, 0x76, 0x2A, 0x3A, 0x6A, 0x7A,
- 0x2E, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- ocdrev = 0;
-
- memory "eeprom"
- size = 256;
- paged = no;
- page_size = 4;
- min_write_delay = 4000;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
- "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
- "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x x",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 4;
- readsize = 256;
- ;
- memory "flash"
- paged = yes;
- size = 4096;
- page_size = 64;
- num_pages = 64;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 0 0 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 0 0 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 0 0 a10 a9 a8",
- " a7 a6 a5 x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 32;
- readsize = 256;
- ;
-# ATtiny4313 has Signature Bytes: 0x1E 0x92 0x0D.
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "lock"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x x x i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 2;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# AT90PWM2
-#------------------------------------------------------------
-
-part
- id = "pwm2";
- desc = "AT90PWM2";
- has_debugwire = yes;
- flash_instr = 0xB6, 0x01, 0x11;
- eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
- 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
- 0x99, 0xF9, 0xBB, 0xAF;
- stk500_devcode = 0x65;
-## avr910_devcode = ?;
- signature = 0x1e 0x93 0x81;
- pagel = 0xD8;
- bs2 = 0xE2;
- reset = io;
- chip_erase_delay = 9000;
-
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- memory "eeprom"
- size = 512;
- paged = no;
- page_size = 4;
- min_write_delay = 4000;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8",
- "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8",
- "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x x",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 4;
- readsize = 256;
- ;
- memory "flash"
- paged = yes;
- size = 8192;
- page_size = 64;
- num_pages = 128;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 64;
- readsize = 256;
- ;
-# AT90PWM2 has Signature Bytes: 0x1E 0x93 0x81.
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "lock"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# AT90PWM3
-#------------------------------------------------------------
-
-# Completely identical to AT90PWM2 (including the signature!)
-
-part parent "pwm2"
- id = "pwm3";
- desc = "AT90PWM3";
- ;
-
-#------------------------------------------------------------
-# AT90PWM2B
-#------------------------------------------------------------
-# Same as AT90PWM2 but different signature.
-
-part parent "pwm2"
- id = "pwm2b";
- desc = "AT90PWM2B";
- signature = 0x1e 0x93 0x83;
-
- ocdrev = 1;
- ;
-
-#------------------------------------------------------------
-# AT90PWM3B
-#------------------------------------------------------------
-
-# Completely identical to AT90PWM2B (including the signature!)
-
-part parent "pwm2b"
- id = "pwm3b";
- desc = "AT90PWM3B";
-
- ocdrev = 1;
- ;
-
-#------------------------------------------------------------
-# AT90PWM316
-#------------------------------------------------------------
-
-# Similar to AT90PWM3B, but with 16 kiB flash, 512 B EEPROM, and 1024 B SRAM.
-
-part parent "pwm3b"
- id = "pwm316";
- desc = "AT90PWM316";
- signature = 0x1e 0x94 0x83;
-
- ocdrev = 1;
-
- memory "flash"
- paged = yes;
- size = 16384;
- page_size = 128;
- num_pages = 128;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 a13 a12 a11 a10 a9 a8",
- " a7 a6 x x x x x x",
- " x x x x x x x x";
-
- mode = 0x21;
- delay = 6;
- blocksize = 128;
- readsize = 256;
- ;
- ;
-
-#------------------------------------------------------------
-# ATtiny25
-#------------------------------------------------------------
-
-part
- id = "t25";
- desc = "ATtiny25";
- has_debugwire = yes;
- flash_instr = 0xB4, 0x02, 0x12;
- eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
- 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
- 0x99, 0xE1, 0xBB, 0xAC;
-## no STK500 devcode in XML file, use the ATtiny45 one
- stk500_devcode = 0x14;
-## avr910_devcode = ?;
-## Try the AT90S2313 devcode:
- avr910_devcode = 0x20;
- signature = 0x1e 0x91 0x08;
- reset = io;
- chip_erase_delay = 4500;
-
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- hvsp_controlstack =
- 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
- 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
- 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
- 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
- hventerstabdelay = 100;
- hvspcmdexedelay = 0;
- synchcycles = 6;
- latchcycles = 1;
- togglevtg = 1;
- poweroffdelay = 25;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 100;
- resetdelay = 25;
- chiperasepolltimeout = 40;
- chiperasetime = 0;
- programfusepolltimeout = 25;
- programlockpolltimeout = 25;
-
- ocdrev = 1;
-
- memory "eeprom"
- size = 128;
- paged = no;
- page_size = 4;
- min_write_delay = 4000;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
- "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
- "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x x",
- " x a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 4;
- readsize = 256;
- ;
- memory "flash"
- paged = yes;
- size = 2048;
- page_size = 32;
- num_pages = 64;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 0 0 0 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 0 0 0 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x x x x a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x x x x a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 0 0 0 a9 a8",
- " a7 a6 a5 a4 x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 32;
- readsize = 256;
- ;
-# ATtiny25 has Signature Bytes: 0x1E 0x91 0x08.
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "lock"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x x x i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 2;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATtiny45
-#------------------------------------------------------------
-
-part
- id = "t45";
- desc = "ATtiny45";
- has_debugwire = yes;
- flash_instr = 0xB4, 0x02, 0x12;
- eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
- 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
- 0x99, 0xE1, 0xBB, 0xAC;
- stk500_devcode = 0x14;
-## avr910_devcode = ?;
-## Try the AT90S2313 devcode:
- avr910_devcode = 0x20;
- signature = 0x1e 0x92 0x06;
- reset = io;
- chip_erase_delay = 4500;
-
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- hvsp_controlstack =
- 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
- 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
- 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
- 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- hvspcmdexedelay = 0;
- synchcycles = 6;
- latchcycles = 1;
- togglevtg = 1;
- poweroffdelay = 25;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 100;
- resetdelay = 25;
- chiperasepolltimeout = 40;
- chiperasetime = 0;
- programfusepolltimeout = 25;
- programlockpolltimeout = 25;
-
- ocdrev = 1;
-
- memory "eeprom"
- size = 256;
- page_size = 4;
- min_write_delay = 4000;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
- "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
- "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x x",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 4;
- readsize = 256;
- ;
- memory "flash"
- paged = yes;
- size = 4096;
- page_size = 64;
- num_pages = 64;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 0 0 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 0 0 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 0 0 a10 a9 a8",
- " a7 a6 a5 x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 32;
- readsize = 256;
- ;
-# ATtiny45 has Signature Bytes: 0x1E 0x92 0x08. (Data sheet 2586C-AVR-06/05 (doc2586.pdf) indicates otherwise!)
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "lock"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x x x i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 2;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATtiny85
-#------------------------------------------------------------
-
-part
- id = "t85";
- desc = "ATtiny85";
- has_debugwire = yes;
- flash_instr = 0xB4, 0x02, 0x12;
- eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
- 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
- 0x99, 0xE1, 0xBB, 0xAC;
-## no STK500 devcode in XML file, use the ATtiny45 one
- stk500_devcode = 0x14;
-## avr910_devcode = ?;
-## Try the AT90S2313 devcode:
- avr910_devcode = 0x20;
- signature = 0x1e 0x93 0x0b;
- reset = io;
- chip_erase_delay = 400000;
-
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- hvsp_controlstack =
- 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
- 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
- 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
- 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
- hventerstabdelay = 100;
- hvspcmdexedelay = 0;
- synchcycles = 6;
- latchcycles = 1;
- togglevtg = 1;
- poweroffdelay = 25;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 100;
- resetdelay = 25;
- chiperasepolltimeout = 40;
- chiperasetime = 0;
- programfusepolltimeout = 25;
- programlockpolltimeout = 25;
-
- ocdrev = 1;
-
- memory "eeprom"
- size = 512;
- paged = no;
- page_size = 4;
- min_write_delay = 4000;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8",
- "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8",
- "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x a8",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 12;
- blocksize = 4;
- readsize = 256;
- ;
- memory "flash"
- paged = yes;
- size = 8192;
- page_size = 64;
- num_pages = 128;
- min_write_delay = 30000;
- max_write_delay = 30000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 32;
- readsize = 256;
- ;
-# ATtiny85 has Signature Bytes: 0x1E 0x93 0x08.
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "lock"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x x x i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 2;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega640
-#------------------------------------------------------------
-# Almost same as ATmega1280, except for different memory sizes
-
-part
- id = "m640";
- desc = "ATmega640";
- signature = 0x1e 0x96 0x08;
- has_jtag = yes;
-# stk500_devcode = 0xB2;
-# avr910_devcode = 0x43;
- chip_erase_delay = 9000;
- pagel = 0xD7;
- bs2 = 0xA0;
- reset = dedicated;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
- rampz = 0x3b;
- allowfullpagebitstream = no;
-
- ocdrev = 3;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 8; /* for parallel programming */
- size = 4096;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read = " 1 0 1 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 0 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 10;
- blocksize = 8;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 65536;
- page_size = 256;
- num_pages = 256;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 a14 a13 a12 a11 a10 a9 a8",
- " a7 x x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 10;
- blocksize = 256;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega1280
-#------------------------------------------------------------
-
-part
- id = "m1280";
- desc = "ATmega1280";
- signature = 0x1e 0x97 0x03;
- has_jtag = yes;
-# stk500_devcode = 0xB2;
-# avr910_devcode = 0x43;
- chip_erase_delay = 9000;
- pagel = 0xD7;
- bs2 = 0xA0;
- reset = dedicated;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
- rampz = 0x3b;
- allowfullpagebitstream = no;
-
- ocdrev = 3;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 8; /* for parallel programming */
- size = 4096;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read = " 1 0 1 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 0 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 10;
- blocksize = 8;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 131072;
- page_size = 256;
- num_pages = 512;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read_lo = " 0 0 1 0 0 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 x x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 10;
- blocksize = 256;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega1281
-#------------------------------------------------------------
-# Identical to ATmega1280
-
-part parent "m1280"
- id = "m1281";
- desc = "ATmega1281";
- signature = 0x1e 0x97 0x04;
-
- ocdrev = 3;
- ;
-
-#------------------------------------------------------------
-# ATmega2560
-#------------------------------------------------------------
-
-part
- id = "m2560";
- desc = "ATmega2560";
- signature = 0x1e 0x98 0x01;
- has_jtag = yes;
-# stk500_devcode = 0xB2;
-# avr910_devcode = 0x43;
- chip_erase_delay = 9000;
- pagel = 0xD7;
- bs2 = 0xA0;
- reset = dedicated;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
- rampz = 0x3b;
- allowfullpagebitstream = no;
-
- ocdrev = 4;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 8; /* for parallel programming */
- size = 4096;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read = " 1 0 1 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 0 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 10;
- blocksize = 8;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 262144;
- page_size = 256;
- num_pages = 1024;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read_lo = " 0 0 1 0 0 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 x x x x x x x",
- " x x x x x x x x";
-
- load_ext_addr = " 0 1 0 0 1 1 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 0 a16",
- " 0 0 0 0 0 0 0 0";
-
- mode = 0x41;
- delay = 10;
- blocksize = 256;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega2561
-#------------------------------------------------------------
-
-part parent "m2560"
- id = "m2561";
- desc = "ATmega2561";
- signature = 0x1e 0x98 0x02;
-
- ocdrev = 4;
- ;
-
-#------------------------------------------------------------
-# ATmega128RFA1
-#------------------------------------------------------------
-# Identical to ATmega2561 but half the ROM
-
-part parent "m2561"
- id = "m128rfa1";
- desc = "ATmega128RFA1";
- signature = 0x1e 0xa7 0x01;
- chip_erase_delay = 55000;
- bs2 = 0xE2;
-
- ocdrev = 3;
-
- memory "flash"
- paged = yes;
- size = 131072;
- page_size = 256;
- num_pages = 512;
- min_write_delay = 50000;
- max_write_delay = 50000;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read_lo = " 0 0 1 0 0 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 x x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 20;
- blocksize = 256;
- readsize = 256;
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega256RFR2
-#------------------------------------------------------------
-
-part parent "m2561"
- id = "m256rfr2";
- desc = "ATmega256RFR2";
- signature = 0x1e 0xa8 0x02;
- chip_erase_delay = 55000;
- bs2 = 0xE2;
-
-
- ocdrev = 4;
- ;
-
-#------------------------------------------------------------
-# ATmega128RFR2
-#------------------------------------------------------------
-
-part parent "m128rfa1"
- id = "m128rfr2";
- desc = "ATmega128RFR2";
- signature = 0x1e 0xa7 0x02;
-
-
- ocdrev = 3;
- ;
-
-#------------------------------------------------------------
-# ATmega64RFR2
-#------------------------------------------------------------
-
-part parent "m128rfa1"
- id = "m64rfr2";
- desc = "ATmega64RFR2";
- signature = 0x1e 0xa6 0x02;
-
-
- ocdrev = 3;
-
- memory "flash"
- paged = yes;
- size = 65536;
- page_size = 256;
- num_pages = 256;
- min_write_delay = 50000;
- max_write_delay = 50000;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 a14 a13 a12 a11 a10 a9 a8",
- " a7 x x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 20;
- blocksize = 256;
- readsize = 256;
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega2564RFR2
-#------------------------------------------------------------
-
-part parent "m256rfr2"
- id = "m2564rfr2";
- desc = "ATmega2564RFR2";
- signature = 0x1e 0xa8 0x03;
- ;
-
-#------------------------------------------------------------
-# ATmega1284RFR2
-#------------------------------------------------------------
-
-part parent "m128rfr2"
- id = "m1284rfr2";
- desc = "ATmega1284RFR2";
- signature = 0x1e 0xa7 0x03;
- ;
-
-#------------------------------------------------------------
-# ATmega644RFR2
-#------------------------------------------------------------
-
-part parent "m64rfr2"
- id = "m644rfr2";
- desc = "ATmega644RFR2";
- signature = 0x1e 0xa6 0x03;
- ;
-
-#------------------------------------------------------------
-# ATtiny24
-#------------------------------------------------------------
-
-part
- id = "t24";
- desc = "ATtiny24";
- has_debugwire = yes;
- flash_instr = 0xB4, 0x07, 0x17;
- eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
- 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC,
- 0x99, 0xE1, 0xBB, 0xAC;
-## no STK500 devcode in XML file, use the ATtiny45 one
- stk500_devcode = 0x14;
-## avr910_devcode = ?;
-## Try the AT90S2313 devcode:
- avr910_devcode = 0x20;
- signature = 0x1e 0x91 0x0b;
- reset = io;
- chip_erase_delay = 4500;
-
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- hvsp_controlstack =
- 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
- 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
- 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
- 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F;
- hventerstabdelay = 100;
- hvspcmdexedelay = 0;
- synchcycles = 6;
- latchcycles = 1;
- togglevtg = 1;
- poweroffdelay = 25;
- resetdelayms = 0;
- resetdelayus = 70;
- hvleavestabdelay = 100;
- resetdelay = 25;
- chiperasepolltimeout = 40;
- chiperasetime = 0;
- programfusepolltimeout = 25;
- programlockpolltimeout = 25;
-
- ocdrev = 1;
-
- memory "eeprom"
- size = 128;
- paged = no;
- page_size = 4;
- min_write_delay = 4000;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
- "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
- "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x x",
- " x a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 4;
- readsize = 256;
- ;
- memory "flash"
- paged = yes;
- size = 2048;
- page_size = 32;
- num_pages = 64;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 0 0 0 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 0 0 0 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x x x x a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x x x x a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 0 0 0 a9 a8",
- " a7 a6 a5 a4 x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 32;
- readsize = 256;
- ;
-# ATtiny24 has Signature Bytes: 0x1E 0x91 0x0B.
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "lock"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x x x x x x x i i";
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x x x i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATtiny44
-#------------------------------------------------------------
-
-part
- id = "t44";
- desc = "ATtiny44";
- has_debugwire = yes;
- flash_instr = 0xB4, 0x07, 0x17;
- eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
- 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC,
- 0x99, 0xE1, 0xBB, 0xAC;
-## no STK500 devcode in XML file, use the ATtiny45 one
- stk500_devcode = 0x14;
-## avr910_devcode = ?;
-## Try the AT90S2313 devcode:
- avr910_devcode = 0x20;
- signature = 0x1e 0x92 0x07;
- reset = io;
- chip_erase_delay = 4500;
-
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- hvsp_controlstack =
- 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
- 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
- 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
- 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F;
- hventerstabdelay = 100;
- hvspcmdexedelay = 0;
- synchcycles = 6;
- latchcycles = 1;
- togglevtg = 1;
- poweroffdelay = 25;
- resetdelayms = 0;
- resetdelayus = 70;
- hvleavestabdelay = 100;
- resetdelay = 25;
- chiperasepolltimeout = 40;
- chiperasetime = 0;
- programfusepolltimeout = 25;
- programlockpolltimeout = 25;
-
- ocdrev = 1;
-
- memory "eeprom"
- size = 256;
- paged = no;
- page_size = 4;
- min_write_delay = 4000;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
- "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
- "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x x",
- " x a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 4;
- readsize = 256;
- ;
- memory "flash"
- paged = yes;
- size = 4096;
- page_size = 64;
- num_pages = 64;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 0 0 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 0 0 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 0 0 a10 a9 a8",
- " a7 a6 a5 x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 32;
- readsize = 256;
- ;
-# ATtiny44 has Signature Bytes: 0x1E 0x92 0x07.
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "lock"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x x x x x x x i i";
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x x x i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATtiny84
-#------------------------------------------------------------
-
-part
- id = "t84";
- desc = "ATtiny84";
- has_debugwire = yes;
- flash_instr = 0xB4, 0x07, 0x17;
- eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
- 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC,
- 0x99, 0xE1, 0xBB, 0xAC;
-## no STK500 devcode in XML file, use the ATtiny45 one
- stk500_devcode = 0x14;
-## avr910_devcode = ?;
-## Try the AT90S2313 devcode:
- avr910_devcode = 0x20;
- signature = 0x1e 0x93 0x0c;
- reset = io;
- chip_erase_delay = 4500;
-
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- hvsp_controlstack =
- 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
- 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
- 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
- 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F;
- hventerstabdelay = 100;
- hvspcmdexedelay = 0;
- synchcycles = 6;
- latchcycles = 1;
- togglevtg = 1;
- poweroffdelay = 25;
- resetdelayms = 0;
- resetdelayus = 70;
- hvleavestabdelay = 100;
- resetdelay = 25;
- chiperasepolltimeout = 40;
- chiperasetime = 0;
- programfusepolltimeout = 25;
- programlockpolltimeout = 25;
-
- ocdrev = 1;
-
- memory "eeprom"
- size = 512;
- paged = no;
- page_size = 4;
- min_write_delay = 4000;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8",
- "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8",
- "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x x",
- " x a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 4;
- readsize = 256;
- ;
- memory "flash"
- paged = yes;
- size = 8192;
- page_size = 64;
- num_pages = 128;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 32;
- readsize = 256;
- ;
-# ATtiny84 has Signature Bytes: 0x1E 0x93 0x0C.
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
-
- memory "lock"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x x x x x x x i i";
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x x x i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATtiny43U
-#------------------------------------------------------------
-
-part
- id = "t43u";
- desc = "ATtiny43u";
- has_debugwire = yes;
- flash_instr = 0xB4, 0x07, 0x17;
- eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
- 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC,
- 0x99, 0xE1, 0xBB, 0xAC;
- stk500_devcode = 0x14;
-## avr910_devcode = ?;
-## Try the AT90S2313 devcode:
- avr910_devcode = 0x20;
- signature = 0x1e 0x92 0x0C;
- reset = io;
- chip_erase_delay = 1000;
-
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
- pp_controlstack = 0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E, 0x4E, 0x5E,
- 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E, 0x06, 0x16, 0x46, 0x56,
- 0x0A, 0x1A, 0x4A, 0x5A, 0x1E, 0x7C, 0x00, 0x01, 0x00, 0x00,
- 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- hvspcmdexedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 20;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- resetdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
- memory "eeprom"
- size = 64;
- paged = yes;
- page_size = 4;
- num_pages = 16;
- min_write_delay = 4000;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
- "0 0 a4 a3 a2 a1 a0 o o o o o o o o";
-
- write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
- "0 0 a5 a4 a3 a2 a1 a0 i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x x",
- " 0 0 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 5;
- blocksize = 4;
- readsize = 256;
- ;
- memory "flash"
- paged = yes;
- size = 4096;
- page_size = 64;
- num_pages = 64;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
-
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 0 0 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 0 0 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x x x a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 0 0 a10 a9 a8",
- " a7 a6 a5 x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 10;
- blocksize = 64;
- readsize = 256;
- ;
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- memory "lock"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 4500;
- max_write_delay = 4500;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 4500;
- max_write_delay = 4500;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 4500;
- max_write_delay = 4500;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x x x x i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 4500;
- max_write_delay = 4500;
- ;
-
- memory "calibration"
- size = 2;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 a0 o o o o o o o o";
- ;
-;
-
-#------------------------------------------------------------
-# ATmega32u4
-#------------------------------------------------------------
-
-part
- id = "m32u4";
- desc = "ATmega32U4";
- signature = 0x1e 0x95 0x87;
- has_jtag = yes;
-# stk500_devcode = 0xB2;
-# avr910_devcode = 0x43;
- chip_erase_delay = 9000;
- pagel = 0xD7;
- bs2 = 0xA0;
- reset = dedicated;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
- rampz = 0x3b;
- allowfullpagebitstream = no;
-
- ocdrev = 3;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 4; /* for parallel programming */
- size = 1024;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read = " 1 0 1 0 0 0 0 0",
- " x x x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " x x x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 0 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 20;
- blocksize = 4;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 32768;
- page_size = 128;
- num_pages = 256;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# AT90USB646
-#------------------------------------------------------------
-
-part
- id = "usb646";
- desc = "AT90USB646";
- signature = 0x1e 0x96 0x82;
- has_jtag = yes;
-# stk500_devcode = 0xB2;
-# avr910_devcode = 0x43;
- chip_erase_delay = 9000;
- pagel = 0xD7;
- bs2 = 0xA0;
- reset = dedicated;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
- rampz = 0x3b;
- allowfullpagebitstream = no;
-
- ocdrev = 3;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 8; /* for parallel programming */
- size = 2048;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read = " 1 0 1 0 0 0 0 0",
- " x x x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " x x x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 0 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 10;
- blocksize = 8;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 65536;
- page_size = 256;
- num_pages = 256;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 a14 a13 a12 a11 a10 a9 a8",
- " a7 x x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 256;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# AT90USB647
-#------------------------------------------------------------
-# identical to AT90USB646
-
-part parent "usb646"
- id = "usb647";
- desc = "AT90USB647";
- signature = 0x1e 0x96 0x82;
-
- ocdrev = 3;
- ;
-
-#------------------------------------------------------------
-# AT90USB1286
-#------------------------------------------------------------
-
-part
- id = "usb1286";
- desc = "AT90USB1286";
- signature = 0x1e 0x97 0x82;
- has_jtag = yes;
-# stk500_devcode = 0xB2;
-# avr910_devcode = 0x43;
- chip_erase_delay = 9000;
- pagel = 0xD7;
- bs2 = 0xA0;
- reset = dedicated;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
- rampz = 0x3b;
- allowfullpagebitstream = no;
-
- ocdrev = 3;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 8; /* for parallel programming */
- size = 4096;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read = " 1 0 1 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " x x x x a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x a10 a9 a8",
- " a7 a6 a5 a4 a3 0 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 10;
- blocksize = 8;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 131072;
- page_size = 256;
- num_pages = 512;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read_lo = " 0 0 1 0 0 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 x x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 256;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x x i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 x x x x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 x x x x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# AT90USB1287
-#------------------------------------------------------------
-# identical to AT90USB1286
-
-part parent "usb1286"
- id = "usb1287";
- desc = "AT90USB1287";
- signature = 0x1e 0x97 0x82;
-
- ocdrev = 3;
- ;
-
-#------------------------------------------------------------
-# AT90USB162
-#------------------------------------------------------------
-
-part
- id = "usb162";
- desc = "AT90USB162";
- has_jtag = no;
- has_debugwire = yes;
- signature = 0x1e 0x94 0x82;
- chip_erase_delay = 9000;
- reset = io;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
- pagel = 0xD7;
- bs2 = 0xC6;
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- ocdrev = 1;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 4; /* for parallel programming */
- size = 512;
- num_pages = 128;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 20;
- blocksize = 4;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 16384;
- page_size = 128;
- num_pages = 128;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read_lo = " 0 0 1 0 0 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# AT90USB82
-#------------------------------------------------------------
-# Changes against AT90USB162 (beside IDs)
-# memory "flash"
-# size = 8192;
-# num_pages = 64;
-
-part
- id = "usb82";
- desc = "AT90USB82";
- has_jtag = no;
- has_debugwire = yes;
- signature = 0x1e 0x93 0x82;
- chip_erase_delay = 9000;
- reset = io;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
- pagel = 0xD7;
- bs2 = 0xC6;
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- ocdrev = 1;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 4; /* for parallel programming */
- size = 512;
- num_pages = 128;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 20;
- blocksize = 4;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 8192;
- page_size = 128;
- num_pages = 64;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read_lo = " 0 0 1 0 0 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega32U2
-#------------------------------------------------------------
-# Changes against AT90USB162 (beside IDs)
-# memory "flash"
-# size = 32768;
-# num_pages = 256;
-# memory "eeprom"
-# size = 1024;
-# num_pages = 256;
-part
- id = "m32u2";
- desc = "ATmega32U2";
- has_jtag = no;
- has_debugwire = yes;
- signature = 0x1e 0x95 0x8a;
- chip_erase_delay = 9000;
- reset = io;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
- pagel = 0xD7;
- bs2 = 0xC6;
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- ocdrev = 1;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 4; /* for parallel programming */
- size = 1024;
- num_pages = 256;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 20;
- blocksize = 4;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 32768;
- page_size = 128;
- num_pages = 256;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read_lo = " 0 0 1 0 0 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-#------------------------------------------------------------
-# ATmega16U2
-#------------------------------------------------------------
-# Changes against ATmega32U2 (beside IDs)
-# memory "flash"
-# size = 16384;
-# num_pages = 128;
-# memory "eeprom"
-# size = 512;
-# num_pages = 128;
-part
- id = "m16u2";
- desc = "ATmega16U2";
- has_jtag = no;
- has_debugwire = yes;
- signature = 0x1e 0x94 0x89;
- chip_erase_delay = 9000;
- reset = io;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
- pagel = 0xD7;
- bs2 = 0xC6;
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- ocdrev = 1;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 4; /* for parallel programming */
- size = 512;
- num_pages = 128;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 20;
- blocksize = 4;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 16384;
- page_size = 128;
- num_pages = 128;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read_lo = " 0 0 1 0 0 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega8U2
-#------------------------------------------------------------
-# Changes against ATmega16U2 (beside IDs)
-# memory "flash"
-# size = 8192;
-# page_size = 64;
-# blocksize = 64;
-
-part
- id = "m8u2";
- desc = "ATmega8U2";
- has_jtag = no;
- has_debugwire = yes;
- signature = 0x1e 0x93 0x89;
- chip_erase_delay = 9000;
- reset = io;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
- pagel = 0xD7;
- bs2 = 0xC6;
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- ocdrev = 1;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 4; /* for parallel programming */
- size = 512;
- num_pages = 128;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 0 0 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 20;
- blocksize = 4;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 8192;
- page_size = 64;
- num_pages = 128;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0x00;
- readback_p2 = 0x00;
- read_lo = " 0 0 1 0 0 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " x x x x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- "a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 64;
- readsize = 256;
- ;
-
- memory "lfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x i i i i i i i i";
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
- ;
-#------------------------------------------------------------
-# ATmega325
-#------------------------------------------------------------
-
-part
- id = "m325";
- desc = "ATmega325";
- signature = 0x1e 0x95 0x05;
- has_jtag = yes;
-# stk500_devcode = 0x??; # No STK500v1 support?
-# avr910_devcode = 0x??; # Try the ATmega16 one
- avr910_devcode = 0x74;
- pagel = 0xd7;
- bs2 = 0xa0;
- chip_erase_delay = 9000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
- allowfullpagebitstream = no;
-
- ocdrev = 3;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 4; /* for parallel programming */
- size = 1024;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 0 0 0 0 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 0 0 0 0 a9 a8",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 10;
- blocksize = 4;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 32768;
- page_size = 128;
- num_pages = 256;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 0 0 0 0 0",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 0 0 0 0 0",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 10;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0",
- "0 0 0 0 0 0 0 0 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lfuse"
- size = 1;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "0 0 0 0 0 0 0 0 i i i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "0 0 0 0 0 0 0 0 i i i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "0 0 0 0 0 0 a1 a0 o o o o o o o o";
- ;
-
- memory "calibration"
- size = 1;
-
- read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega645
-#------------------------------------------------------------
-
-part
- id = "m645";
- desc = "ATmega645";
- signature = 0x1E 0x96 0x05;
- has_jtag = yes;
-# stk500_devcode = 0x??; # No STK500v1 support?
-# avr910_devcode = 0x??; # Try the ATmega16 one
- avr910_devcode = 0x74;
- pagel = 0xd7;
- bs2 = 0xa0;
- chip_erase_delay = 9000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
- "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
- 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
- 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
- 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 5;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- idr = 0x31;
- spmcr = 0x57;
- allowfullpagebitstream = no;
-
- ocdrev = 3;
-
- memory "eeprom"
- paged = no; /* leave this "no" */
- page_size = 8; /* for parallel programming */
- size = 2048;
- min_write_delay = 9000;
- max_write_delay = 9000;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 0 0 0 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 0 0 0 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 0 0 0 a10 a9 a8",
- " a7 a6 a5 a4 a3 0 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 10;
- blocksize = 8;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 65536;
- page_size = 256;
- num_pages = 256;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 0 0 0 0 0",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 0 0 0 0 0",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " a15 a14 a13 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " 0 0 0 0 0 0 0 0";
-
- mode = 0x41;
- delay = 10;
- blocksize = 128;
- readsize = 256;
- ;
-
- memory "lock"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0",
- "0 0 0 0 0 0 0 0 1 1 i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "lfuse"
- size = 1;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "0 0 0 0 0 0 0 0 i i i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "hfuse"
- size = 1;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "0 0 0 0 0 0 0 0 i i i i i i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "efuse"
- size = 1;
-
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i";
- min_write_delay = 9000;
- max_write_delay = 9000;
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "0 0 0 0 0 0 a1 a0 o o o o o o o o";
- ;
-
- memory "calibration"
- size = 1;
-
- read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
- ;
-
-#------------------------------------------------------------
-# ATmega3250
-#------------------------------------------------------------
-
-part parent "m325"
- id = "m3250";
- desc = "ATmega3250";
- signature = 0x1E 0x95 0x06;
-
- ocdrev = 3;
- ;
-
-#------------------------------------------------------------
-# ATmega6450
-#------------------------------------------------------------
-
-part parent "m645"
- id = "m6450";
- desc = "ATmega6450";
- signature = 0x1E 0x96 0x06;
-
- ocdrev = 3;
- ;
-
-#------------------------------------------------------------
-# AVR XMEGA family common values
-#------------------------------------------------------------
-
-part
- id = ".xmega";
- desc = "AVR XMEGA family common values";
- has_pdi = yes;
- nvm_base = 0x01c0;
- mcu_base = 0x0090;
-
- memory "signature"
- size = 3;
- offset = 0x1000090;
- ;
-
- memory "prodsig"
- size = 0x32;
- offset = 0x8e0200;
- page_size = 0x32;
- readsize = 0x32;
- ;
-
- memory "fuse1"
- size = 1;
- offset = 0x8f0021;
- ;
-
- memory "fuse2"
- size = 1;
- offset = 0x8f0022;
- ;
-
- memory "fuse4"
- size = 1;
- offset = 0x8f0024;
- ;
-
- memory "fuse5"
- size = 1;
- offset = 0x8f0025;
- ;
-
- memory "lock"
- size = 1;
- offset = 0x8f0027;
- ;
-
- memory "data"
- # SRAM, only used to supply the offset
- offset = 0x1000000;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega16A4U
-#------------------------------------------------------------
-
-part parent ".xmega"
- id = "x16a4u";
- desc = "ATxmega16A4U";
- signature = 0x1e 0x94 0x41;
-
- memory "eeprom"
- size = 0x400;
- offset = 0x8c0000;
- page_size = 0x20;
- readsize = 0x100;
- ;
-
- memory "application"
- size = 0x4000;
- offset = 0x800000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "apptable"
- size = 0x1000;
- offset = 0x803000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "boot"
- size = 0x1000;
- offset = 0x804000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "flash"
- size = 0x5000;
- offset = 0x800000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "usersig"
- size = 0x100;
- offset = 0x8e0400;
- page_size = 0x100;
- readsize = 0x100;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega16C4
-#------------------------------------------------------------
-
-part parent "x16a4u"
- id = "x16c4";
- desc = "ATxmega16C4";
- signature = 0x1e 0x95 0x44;
-;
-
-#------------------------------------------------------------
-# ATxmega16D4
-#------------------------------------------------------------
-
-part parent "x16a4u"
- id = "x16d4";
- desc = "ATxmega16D4";
- signature = 0x1e 0x94 0x42;
-;
-
-#------------------------------------------------------------
-# ATxmega16A4
-#------------------------------------------------------------
-
-part parent "x16a4u"
- id = "x16a4";
- desc = "ATxmega16A4";
- signature = 0x1e 0x94 0x41;
- has_jtag = yes;
-
- memory "fuse0"
- size = 1;
- offset = 0x8f0020;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega32A4U
-#------------------------------------------------------------
-
-part parent ".xmega"
- id = "x32a4u";
- desc = "ATxmega32A4U";
- signature = 0x1e 0x95 0x41;
-
- memory "eeprom"
- size = 0x400;
- offset = 0x8c0000;
- page_size = 0x20;
- readsize = 0x100;
- ;
-
- memory "application"
- size = 0x8000;
- offset = 0x800000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "apptable"
- size = 0x1000;
- offset = 0x807000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "boot"
- size = 0x1000;
- offset = 0x808000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "flash"
- size = 0x9000;
- offset = 0x800000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "usersig"
- size = 0x100;
- offset = 0x8e0400;
- page_size = 0x100;
- readsize = 0x100;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega32C4
-#------------------------------------------------------------
-
-part parent "x32a4u"
- id = "x32c4";
- desc = "ATxmega32C4";
- signature = 0x1e 0x94 0x43;
-;
-
-#------------------------------------------------------------
-# ATxmega32D4
-#------------------------------------------------------------
-
-part parent "x32a4u"
- id = "x32d4";
- desc = "ATxmega32D4";
- signature = 0x1e 0x95 0x42;
-;
-
-#------------------------------------------------------------
-# ATxmega32A4
-#------------------------------------------------------------
-
-part parent "x32a4u"
- id = "x32a4";
- desc = "ATxmega32A4";
- signature = 0x1e 0x95 0x41;
- has_jtag = yes;
-
- memory "fuse0"
- size = 1;
- offset = 0x8f0020;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega64A4U
-#------------------------------------------------------------
-
-part parent ".xmega"
- id = "x64a4u";
- desc = "ATxmega64A4U";
- signature = 0x1e 0x96 0x46;
-
- memory "eeprom"
- size = 0x800;
- offset = 0x8c0000;
- page_size = 0x20;
- readsize = 0x100;
- ;
-
- memory "application"
- size = 0x10000;
- offset = 0x800000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "apptable"
- size = 0x1000;
- offset = 0x80f000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "boot"
- size = 0x1000;
- offset = 0x810000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "flash"
- size = 0x11000;
- offset = 0x800000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "usersig"
- size = 0x100;
- offset = 0x8e0400;
- page_size = 0x100;
- readsize = 0x100;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega64C3
-#------------------------------------------------------------
-
-part parent "x64a4u"
- id = "x64c3";
- desc = "ATxmega64C3";
- signature = 0x1e 0x96 0x49;
-;
-
-#------------------------------------------------------------
-# ATxmega64D3
-#------------------------------------------------------------
-
-part parent "x64a4u"
- id = "x64d3";
- desc = "ATxmega64D3";
- signature = 0x1e 0x96 0x4a;
-;
-
-#------------------------------------------------------------
-# ATxmega64D4
-#------------------------------------------------------------
-
-part parent "x64a4u"
- id = "x64d4";
- desc = "ATxmega64D4";
- signature = 0x1e 0x96 0x47;
-;
-
-#------------------------------------------------------------
-# ATxmega64A1
-#------------------------------------------------------------
-
-part parent "x64a4u"
- id = "x64a1";
- desc = "ATxmega64A1";
- signature = 0x1e 0x96 0x4e;
- has_jtag = yes;
-
- memory "fuse0"
- size = 1;
- offset = 0x8f0020;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega64A1U
-#------------------------------------------------------------
-
-part parent "x64a1"
- id = "x64a1u";
- desc = "ATxmega64A1U";
- signature = 0x1e 0x96 0x4e;
-;
-
-#------------------------------------------------------------
-# ATxmega64A3
-#------------------------------------------------------------
-
-part parent "x64a1"
- id = "x64a3";
- desc = "ATxmega64A3";
- signature = 0x1e 0x96 0x42;
-;
-
-#------------------------------------------------------------
-# ATxmega64A3U
-#------------------------------------------------------------
-
-part parent "x64a1"
- id = "x64a3u";
- desc = "ATxmega64A3U";
- signature = 0x1e 0x96 0x42;
-;
-
-#------------------------------------------------------------
-# ATxmega64A4
-#------------------------------------------------------------
-
-part parent "x64a1"
- id = "x64a4";
- desc = "ATxmega64A4";
- signature = 0x1e 0x96 0x46;
-;
-
-#------------------------------------------------------------
-# ATxmega64B1
-#------------------------------------------------------------
-
-part parent "x64a1"
- id = "x64b1";
- desc = "ATxmega64B1";
- signature = 0x1e 0x96 0x52;
-;
-
-#------------------------------------------------------------
-# ATxmega64B3
-#------------------------------------------------------------
-
-part parent "x64a1"
- id = "x64b3";
- desc = "ATxmega64B3";
- signature = 0x1e 0x96 0x51;
-;
-
-#------------------------------------------------------------
-# ATxmega128C3
-#------------------------------------------------------------
-
-part parent ".xmega"
- id = "x128c3";
- desc = "ATxmega128C3";
- signature = 0x1e 0x97 0x52;
-
- memory "eeprom"
- size = 0x800;
- offset = 0x8c0000;
- page_size = 0x20;
- readsize = 0x100;
- ;
-
- memory "application"
- size = 0x20000;
- offset = 0x800000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "apptable"
- size = 0x2000;
- offset = 0x81e000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "boot"
- size = 0x2000;
- offset = 0x820000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "flash"
- size = 0x22000;
- offset = 0x800000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "usersig"
- size = 0x200;
- offset = 0x8e0400;
- page_size = 0x200;
- readsize = 0x100;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega128D3
-#------------------------------------------------------------
-
-part parent "x128c3"
- id = "x128d3";
- desc = "ATxmega128D3";
- signature = 0x1e 0x97 0x48;
-;
-
-#------------------------------------------------------------
-# ATxmega128D4
-#------------------------------------------------------------
-
-part parent "x128c3"
- id = "x128d4";
- desc = "ATxmega128D4";
- signature = 0x1e 0x97 0x47;
-;
-
-#------------------------------------------------------------
-# ATxmega128A1
-#------------------------------------------------------------
-
-part parent "x128c3"
- id = "x128a1";
- desc = "ATxmega128A1";
- signature = 0x1e 0x97 0x4c;
- has_jtag = yes;
-
- memory "fuse0"
- size = 1;
- offset = 0x8f0020;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega128A1 revision D
-#------------------------------------------------------------
-
-part parent "x128a1"
- id = "x128a1d";
- desc = "ATxmega128A1revD";
- signature = 0x1e 0x97 0x41;
-;
-
-#------------------------------------------------------------
-# ATxmega128A1U
-#------------------------------------------------------------
-
-part parent "x128a1"
- id = "x128a1u";
- desc = "ATxmega128A1U";
- signature = 0x1e 0x97 0x4c;
-;
-
-#------------------------------------------------------------
-# ATxmega128A3
-#------------------------------------------------------------
-
-part parent "x128a1"
- id = "x128a3";
- desc = "ATxmega128A3";
- signature = 0x1e 0x97 0x42;
-;
-
-#------------------------------------------------------------
-# ATxmega128A3U
-#------------------------------------------------------------
-
-part parent "x128a1"
- id = "x128a3u";
- desc = "ATxmega128A3U";
- signature = 0x1e 0x97 0x42;
-;
-
-#------------------------------------------------------------
-# ATxmega128A4
-#------------------------------------------------------------
-
-part parent ".xmega"
- id = "x128a4";
- desc = "ATxmega128A4";
- signature = 0x1e 0x97 0x46;
- has_jtag = yes;
-
- memory "eeprom"
- size = 0x800;
- offset = 0x8c0000;
- page_size = 0x20;
- readsize = 0x100;
- ;
-
- memory "application"
- size = 0x20000;
- offset = 0x800000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "apptable"
- size = 0x1000;
- offset = 0x81f000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "boot"
- size = 0x2000;
- offset = 0x820000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "flash"
- size = 0x22000;
- offset = 0x800000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "usersig"
- size = 0x200;
- offset = 0x8e0400;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "fuse0"
- size = 1;
- offset = 0x8f0020;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega128A4U
-#------------------------------------------------------------
-
-part parent ".xmega"
- id = "x128a4u";
- desc = "ATxmega128A4U";
- signature = 0x1e 0x97 0x46;
-
- memory "eeprom"
- size = 0x800;
- offset = 0x8c0000;
- page_size = 0x20;
- readsize = 0x100;
- ;
-
- memory "application"
- size = 0x20000;
- offset = 0x800000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "apptable"
- size = 0x1000;
- offset = 0x81f000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "boot"
- size = 0x2000;
- offset = 0x820000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "flash"
- size = 0x22000;
- offset = 0x800000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "usersig"
- size = 0x100;
- offset = 0x8e0400;
- page_size = 0x100;
- readsize = 0x100;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega128B1
-#------------------------------------------------------------
-
-part parent ".xmega"
- id = "x128b1";
- desc = "ATxmega128B1";
- signature = 0x1e 0x97 0x4d;
- has_jtag = yes;
-
- memory "eeprom"
- size = 0x800;
- offset = 0x8c0000;
- page_size = 0x20;
- readsize = 0x100;
- ;
-
- memory "application"
- size = 0x20000;
- offset = 0x800000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "apptable"
- size = 0x2000;
- offset = 0x81e000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "boot"
- size = 0x2000;
- offset = 0x820000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "flash"
- size = 0x22000;
- offset = 0x800000;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "usersig"
- size = 0x100;
- offset = 0x8e0400;
- page_size = 0x100;
- readsize = 0x100;
- ;
-
- memory "fuse0"
- size = 1;
- offset = 0x8f0020;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega128B3
-#------------------------------------------------------------
-
-part parent "x128b1"
- id = "x128b3";
- desc = "ATxmega128B3";
- signature = 0x1e 0x97 0x4b;
-;
-
-#------------------------------------------------------------
-# ATxmega192C3
-#------------------------------------------------------------
-
-part parent ".xmega"
- id = "x192c3";
- desc = "ATxmega192C3";
- signature = 0x1e 0x97 0x51;
-
- memory "eeprom"
- size = 0x800;
- offset = 0x8c0000;
- page_size = 0x20;
- readsize = 0x100;
- ;
-
- memory "application"
- size = 0x30000;
- offset = 0x800000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "apptable"
- size = 0x2000;
- offset = 0x82e000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "boot"
- size = 0x2000;
- offset = 0x830000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "flash"
- size = 0x32000;
- offset = 0x800000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "usersig"
- size = 0x200;
- offset = 0x8e0400;
- page_size = 0x200;
- readsize = 0x100;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega192D3
-#------------------------------------------------------------
-
-part parent "x192c3"
- id = "x192d3";
- desc = "ATxmega192D3";
- signature = 0x1e 0x97 0x49;
-;
-
-#------------------------------------------------------------
-# ATxmega192A1
-#------------------------------------------------------------
-
-part parent "x192c3"
- id = "x192a1";
- desc = "ATxmega192A1";
- signature = 0x1e 0x97 0x4e;
- has_jtag = yes;
-
- memory "fuse0"
- size = 1;
- offset = 0x8f0020;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega192A3
-#------------------------------------------------------------
-
-part parent "x192a1"
- id = "x192a3";
- desc = "ATxmega192A3";
- signature = 0x1e 0x97 0x44;
-;
-
-#------------------------------------------------------------
-# ATxmega192A3U
-#------------------------------------------------------------
-
-part parent "x192a1"
- id = "x192a3u";
- desc = "ATxmega192A3U";
- signature = 0x1e 0x97 0x44;
-;
-
-#------------------------------------------------------------
-# ATxmega256C3
-#------------------------------------------------------------
-
-part parent ".xmega"
- id = "x256c3";
- desc = "ATxmega256C3";
- signature = 0x1e 0x98 0x46;
-
- memory "eeprom"
- size = 0x1000;
- offset = 0x8c0000;
- page_size = 0x20;
- readsize = 0x100;
- ;
-
- memory "application"
- size = 0x40000;
- offset = 0x800000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "apptable"
- size = 0x2000;
- offset = 0x83e000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "boot"
- size = 0x2000;
- offset = 0x840000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "flash"
- size = 0x42000;
- offset = 0x800000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "usersig"
- size = 0x200;
- offset = 0x8e0400;
- page_size = 0x200;
- readsize = 0x100;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega256D3
-#------------------------------------------------------------
-
-part parent "x256c3"
- id = "x256d3";
- desc = "ATxmega256D3";
- signature = 0x1e 0x98 0x44;
-;
-
-#------------------------------------------------------------
-# ATxmega256A1
-#------------------------------------------------------------
-
-part parent "x256c3"
- id = "x256a1";
- desc = "ATxmega256A1";
- signature = 0x1e 0x98 0x46;
- has_jtag = yes;
-
- memory "fuse0"
- size = 1;
- offset = 0x8f0020;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega256A3
-#------------------------------------------------------------
-
-part parent "x256a1"
- id = "x256a3";
- desc = "ATxmega256A3";
- signature = 0x1e 0x98 0x42;
-;
-
-#------------------------------------------------------------
-# ATxmega256A3U
-#------------------------------------------------------------
-
-part parent "x256a1"
- id = "x256a3u";
- desc = "ATxmega256A3U";
- signature = 0x1e 0x98 0x42;
-;
-
-#------------------------------------------------------------
-# ATxmega256A3B
-#------------------------------------------------------------
-
-part parent "x256a1"
- id = "x256a3b";
- desc = "ATxmega256A3B";
- signature = 0x1e 0x98 0x43;
-;
-
-#------------------------------------------------------------
-# ATxmega256A3BU
-#------------------------------------------------------------
-
-part parent "x256a1"
- id = "x256a3bu";
- desc = "ATxmega256A3BU";
- signature = 0x1e 0x98 0x43;
-;
-
-#------------------------------------------------------------
-# ATxmega384C3
-#------------------------------------------------------------
-
-part parent ".xmega"
- id = "x384c3";
- desc = "ATxmega384C3";
- signature = 0x1e 0x98 0x45;
-
- memory "eeprom"
- size = 0x1000;
- offset = 0x8c0000;
- page_size = 0x20;
- readsize = 0x100;
- ;
-
- memory "application"
- size = 0x60000;
- offset = 0x800000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "apptable"
- size = 0x2000;
- offset = 0x85e000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "boot"
- size = 0x2000;
- offset = 0x860000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "flash"
- size = 0x62000;
- offset = 0x800000;
- page_size = 0x200;
- readsize = 0x100;
- ;
-
- memory "usersig"
- size = 0x200;
- offset = 0x8e0400;
- page_size = 0x200;
- readsize = 0x100;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega384D3
-#------------------------------------------------------------
-
-part parent "x384c3"
- id = "x384d3";
- desc = "ATxmega384D3";
- signature = 0x1e 0x98 0x47;
-;
-
-#------------------------------------------------------------
-# ATxmega8E5
-#------------------------------------------------------------
-
-part parent ".xmega"
- id = "x8e5";
- desc = "ATxmega8E5";
- signature = 0x1e 0x93 0x41;
-
- memory "eeprom"
- size = 0x0200;
- offset = 0x08c0000;
- page_size = 0x20;
- readsize = 0x100;
- ;
-
- memory "application"
- size = 0x2000;
- offset = 0x0800000;
- page_size = 0x80;
- readsize = 0x100;
- ;
-
- memory "apptable"
- size = 0x800;
- offset = 0x00801800;
- page_size = 0x80;
- readsize = 0x100;
- ;
-
- memory "boot"
- size = 0x800;
- offset = 0x00804000;
- page_size = 0x80;
- readsize = 0x100;
- ;
-
- memory "flash"
- size = 0x2800;
- offset = 0x0800000;
- page_size = 0x80;
- readsize = 0x100;
- ;
-
- memory "usersig"
- size = 0x80;
- offset = 0x8e0400;
- page_size = 0x80;
- readsize = 0x100;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega16E5
-#------------------------------------------------------------
-
-part parent ".xmega"
- id = "x16e5";
- desc = "ATxmega16E5";
- signature = 0x1e 0x94 0x45;
-
- memory "eeprom"
- size = 0x0200;
- offset = 0x08c0000;
- page_size = 0x20;
- readsize = 0x100;
- ;
-
- memory "application"
- size = 0x4000;
- offset = 0x0800000;
- page_size = 0x80;
- readsize = 0x100;
- ;
-
- memory "apptable"
- size = 0x1000;
- offset = 0x00803000;
- page_size = 0x80;
- readsize = 0x100;
- ;
-
- memory "boot"
- size = 0x1000;
- offset = 0x00804000;
- page_size = 0x80;
- readsize = 0x100;
- ;
-
- memory "flash"
- size = 0x5000;
- offset = 0x0800000;
- page_size = 0x80;
- readsize = 0x100;
- ;
-
- memory "usersig"
- size = 0x80;
- offset = 0x8e0400;
- page_size = 0x80;
- readsize = 0x100;
- ;
-;
-
-#------------------------------------------------------------
-# ATxmega32E5
-#------------------------------------------------------------
-
-part parent ".xmega"
- id = "x32e5";
- desc = "ATxmega32E5";
- signature = 0x1e 0x95 0x4c;
-
- memory "eeprom"
- size = 0x0400;
- offset = 0x08c0000;
- page_size = 0x20;
- readsize = 0x100;
- ;
-
- memory "application"
- size = 0x8000;
- offset = 0x0800000;
- page_size = 0x80;
- readsize = 0x100;
- ;
-
- memory "apptable"
- size = 0x1000;
- offset = 0x00807000;
- page_size = 0x80;
- readsize = 0x100;
- ;
-
- memory "boot"
- size = 0x1000;
- offset = 0x00804000;
- page_size = 0x80;
- readsize = 0x100;
- ;
-
- memory "flash"
- size = 0x9000;
- offset = 0x0800000;
- page_size = 0x80;
- readsize = 0x100;
- ;
-
- memory "usersig"
- size = 0x80;
- offset = 0x8e0400;
- page_size = 0x80;
- readsize = 0x100;
- ;
-;
-
-#------------------------------------------------------------
-# AVR32UC3A0512
-#------------------------------------------------------------
-
-part
- id = "uc3a0512";
- desc = "AT32UC3A0512";
- signature = 0xED 0xC0 0x3F;
- has_jtag = yes;
- is_avr32 = yes;
-
- memory "flash"
- paged = yes;
- page_size = 512; # bytes
- readsize = 512; # bytes
- num_pages = 1024; # could be set dynamicly
- size = 0x00080000; # could be set dynamicly
- offset = 0x80000000;
- ;
-;
-
-part parent "uc3a0512"
- id = "ucr2";
- desc = "deprecated, use 'uc3a0512'";
-;
-
-#------------------------------------------------------------
-# ATtiny1634.
-#------------------------------------------------------------
-
-part
- id = "t1634";
- desc = "ATtiny1634";
- has_debugwire = yes;
- flash_instr = 0xB6, 0x01, 0x11;
- eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
- 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
- 0x99, 0xF9, 0xBB, 0xAF;
- stk500_devcode = 0x86;
- # avr910_devcode = 0x;
- signature = 0x1e 0x94 0x12;
- pagel = 0xB3;
- bs2 = 0xB1;
- reset = io;
- chip_erase_delay = 9000;
- pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
- "x x x x x x x x x x x x x x x x";
-
- chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
- "x x x x x x x x x x x x x x x x";
-
- timeout = 200;
- stabdelay = 100;
- cmdexedelay = 25;
- synchloops = 32;
- bytedelay = 0;
- pollindex = 3;
- pollvalue = 0x53;
- predelay = 1;
- postdelay = 1;
- pollmethod = 1;
-
- pp_controlstack =
- 0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E,
- 0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E,
- 0x26, 0x36, 0x66, 0x76, 0x2A, 0x3A, 0x6A, 0x7A,
- 0x2E, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
- hventerstabdelay = 100;
- progmodedelay = 0;
- latchcycles = 0;
- togglevtg = 1;
- poweroffdelay = 15;
- resetdelayms = 1;
- resetdelayus = 0;
- hvleavestabdelay = 15;
- resetdelay = 15;
- chiperasepulsewidth = 0;
- chiperasepolltimeout = 10;
- programfusepulsewidth = 0;
- programfusepolltimeout = 5;
- programlockpulsewidth = 0;
- programlockpolltimeout = 5;
-
- memory "eeprom"
- paged = no;
- page_size = 4;
- size = 256;
- min_write_delay = 3600;
- max_write_delay = 3600;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read = " 1 0 1 0 0 0 0 0",
- " 0 0 0 x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- write = " 1 1 0 0 0 0 0 0",
- " 0 0 0 x x x x a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_lo = " 1 1 0 0 0 0 0 1",
- " 0 0 0 0 0 0 0 0",
- " 0 0 0 0 0 0 a1 a0",
- " i i i i i i i i";
-
- writepage = " 1 1 0 0 0 0 1 0",
- " 0 0 x x x x x a8",
- " a7 a6 a5 a4 a3 a2 0 0",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 5;
- blocksize = 4;
- readsize = 256;
- ;
-
- memory "flash"
- paged = yes;
- size = 16384;
- page_size = 32;
- num_pages = 512;
- min_write_delay = 4500;
- max_write_delay = 4500;
- readback_p1 = 0xff;
- readback_p2 = 0xff;
- read_lo = " 0 0 1 0 0 0 0 0",
- " 0 0 0 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- read_hi = " 0 0 1 0 1 0 0 0",
- " 0 0 0 a12 a11 a10 a9 a8",
- " a7 a6 a5 a4 a3 a2 a1 a0",
- " o o o o o o o o";
-
- loadpage_lo = " 0 1 0 0 0 0 0 0",
- " 0 0 0 x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- loadpage_hi = " 0 1 0 0 1 0 0 0",
- " 0 0 0 x x x x x",
- " x x a5 a4 a3 a2 a1 a0",
- " i i i i i i i i";
-
- writepage = " 0 1 0 0 1 1 0 0",
- " 0 0 0 a12 a11 a10 a9 a8",
- " a7 a6 x x x x x x",
- " x x x x x x x x";
-
- mode = 0x41;
- delay = 6;
- blocksize = 128;
- readsize = 256;
-
- ;
-
- memory "lfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "hfuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x o o o o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
- "x x x x x x x x i i i i i i i i";
- ;
-
- memory "efuse"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
- "x x x x x x x x x x x o o o o o";
-
- write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
- "x x x x x x x x x x x i i i i i";
- ;
-
- memory "lock"
- size = 1;
- min_write_delay = 4500;
- max_write_delay = 4500;
- read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
- "x x x x x x x x x x x x x x o o";
-
- write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
- "x x x x x x x x 1 1 1 1 1 1 i i";
- ;
-
- memory "calibration"
- size = 1;
- read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
- "0 0 0 0 0 0 0 0 o o o o o o o o";
- ;
-
- memory "signature"
- size = 3;
- read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
- "x x x x x x a1 a0 o o o o o o o o";
- ;
-;
-
-#------------------------------------------------------------
-# Common values for reduced core tinys (4/5/9/10/20/40)
-#------------------------------------------------------------
-
-part
- id = ".reduced_core_tiny";
- desc = "Common values for reduced core tinys";
- has_tpi = yes;
-
- memory "signature"
- size = 3;
- offset = 0x3fc0;
- page_size = 16;
- ;
-
- memory "fuse"
- size = 1;
- offset = 0x3f40;
- page_size = 16;
- blocksize = 4;
- ;
-
- memory "calibration"
- size = 1;
- offset = 0x3f80;
- page_size = 16;
- ;
-
- memory "lockbits"
- size = 1;
- offset = 0x3f00;
- page_size = 16;
- ;
-;
-
-#------------------------------------------------------------
-# ATtiny4
-#------------------------------------------------------------
-
-part parent ".reduced_core_tiny"
- id = "t4";
- desc = "ATtiny4";
- signature = 0x1e 0x8f 0x0a;
-
- memory "flash"
- size = 512;
- offset = 0x4000;
- page_size = 16;
- blocksize = 128;
- ;
-;
-
-#------------------------------------------------------------
-# ATtiny5
-#------------------------------------------------------------
-
-part parent "t4"
- id = "t5";
- desc = "ATtiny5";
- signature = 0x1e 0x8f 0x09;
-;
-
-#------------------------------------------------------------
-# ATtiny9
-#------------------------------------------------------------
-
-part parent ".reduced_core_tiny"
- id = "t9";
- desc = "ATtiny9";
- signature = 0x1e 0x90 0x08;
-
- memory "flash"
- size = 1024;
- offset = 0x4000;
- page_size = 16;
- blocksize = 128;
- ;
-;
-
-#------------------------------------------------------------
-# ATtiny10
-#------------------------------------------------------------
-
-part parent "t9"
- id = "t10";
- desc = "ATtiny10";
- signature = 0x1e 0x90 0x03;
-;
-
-#------------------------------------------------------------
-# ATtiny20
-#------------------------------------------------------------
-
-part parent ".reduced_core_tiny"
- id = "t20";
- desc = "ATtiny20";
- signature = 0x1e 0x91 0x0F;
-
- memory "flash"
- size = 2048;
- offset = 0x4000;
- page_size = 16;
- blocksize = 128;
- ;
-;
-
-#------------------------------------------------------------
-# ATtiny40
-#------------------------------------------------------------
-
-part parent ".reduced_core_tiny"
- id = "t40";
- desc = "ATtiny40";
- signature = 0x1e 0x92 0x0E;
-
- memory "flash"
- size = 4096;
- offset = 0x4000;
- page_size = 64;
- blocksize = 128;
- ;
-;
-
-#------------------------------------------------------------
-# ATmega406
-#------------------------------------------------------------
-
-part
- id = "m406";
- desc = "ATMEGA406";
- has_jtag = yes;
- signature = 0x1e 0x95 0x07;
-
- # STK500 parameters (parallel programming IO lines)
- pagel = 0xa7;
- bs2 = 0xa0;
- serial = no;
- parallel = yes;
-
- # STK500v2 HV programming parameters, from XML
- pp_controlstack = 0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
- 0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
- 0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
- 0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-
- # JTAG ICE mkII parameters, also from XML files
- allowfullpagebitstream = no;
- enablepageprogramming = yes;
- idr = 0x51;
- rampz = 0x00;
- spmcr = 0x57;
- eecr = 0x3f;
-
- memory "eeprom"
- paged = no;
- size = 512;
- page_size = 4;
- blocksize = 4;
- readsize = 4;
- num_pages = 128;
- ;
-
- memory "flash"
- paged = yes;
- size = 40960;
- page_size = 128;
- blocksize = 128;
- readsize = 128;
- num_pages = 320;
- ;
-
- memory "hfuse"
- size = 1;
- ;
-
- memory "lfuse"
- size = 1;
- ;
-
- memory "lockbits"
- size = 1;
- ;
-
- memory "signature"
- size = 3;
- ;
-;
-
-
diff --git a/bootloaders/gemma/gemma_v1.hex b/bootloaders/gemma/gemma_v1.hex
deleted file mode 100644
index 4b68876..0000000
--- a/bootloaders/gemma/gemma_v1.hex
+++ /dev/null
@@ -1,182 +0,0 @@
-:100000005FCA5FCA5FCA5FCA5FCA5FCA5FCA5FCAA8
-:1014C00033C05FC08BC05DC05CC05BC05AC059C038
-:1014D00058C057C056C055C054C053C052C009026E
-:1014E0001200010100803209040000000000000029
-:1014F00012011001FF00000841239F0C00010102AE
-:1015000000010C03470065006D006D0061001603CB
-:10151000410072006400750069006E006F002E00CB
-:10152000630063000403090411241FBECFE5D2E069
-:10153000DEBFCDBF84B7877F84BF88E10FB6F89444
-:1015400081BD11BC0FBE91E080E80FB6F89486BD56
-:1015500096BD0FBE0AEA0F9310E0A0E6B0E0EEEDF4
-:10156000FFE102C005900D92A236B107D9F711E054
-:10157000A2E6B0E001C01D92A832B107E1F7EDD3B9
-:101580002CC59ECFA82FB92F80E090E041E050EA13
-:10159000609530E009C02D9182279795879510F0CE
-:1015A00084279527305EC8F36F5FA8F30895EADFBC
-:1015B0008D939D930895A6E088279927AA9569F0B1
-:1015C0000197E1F3B399FCCFB39BFECF81E099275C
-:1015D000A6B3019611F0A871D9F70895CF93CFB7AC
-:1015E000CF93C0915F02CA3A21F0CF91CFBFCF9184
-:1015F00065CFCC27C395B39BE9F7B39B0BC0B39BD7
-:1016000009C0B39B07C0B39B05C0B39B03C0B39B8A
-:1016100001C0D3C00F92DF93C0910B01DD27CE5ED6
-:10162000DE4F012EB39B03C0DF910F90E6CF2F93C7
-:101630000F931F934F932FEF4F6F06B303FB20F9C8
-:101640005F933F9350E03BE065C016B301265029FD
-:1016500053FDC89556B3012703FB25F92F7306B335
-:10166000B1F05027102713FB26F906B22230F0F014
-:1016700000C016B3012703FB27F90126502906B243
-:101680002430E8F54F77206816B30000F6CF5027D6
-:101690004F7D206206B2102F000000C006B3002666
-:1016A0005029102713FB26F906B2E2CF4F7B06B371
-:1016B000206400C0DACF01265029187106B269F102
-:1016C0004E7F2160012F16B328C0002650294D7F80
-:1016D00006B22260102F29C0012650294B7F06B286
-:1016E0002460012F2DC016B301265029477F2860A2
-:1016F000000006B22EC04F7E06B3206130C04227E4
-:1017000006B3499300265029102706B24FEF13FB6A
-:1017100020F9297F16B379F2187159F10126502961
-:1017200006B2012703FB21F9237F06B371F20026DD
-:1017300050293150D0F006B2102713FB22F9277E32
-:1017400016B351F201265029012703FB06B223F9F3
-:101750002F7C49F2000006B3102713FB24F9002662
-:10176000502906B22F7939F270CF10E21ABF002744
-:1017700017C03B503195C31BD04010E21ABF0881FF
-:10178000033CF9F00B34E9F0209109011981110FA4
-:101790001213EDCF093651F10D3211F0013E39F738
-:1017A000009310013F915F914F911F910F912F91E5
-:1017B000DF910F90CAB7C5FD1DCFCF91CFBFCF919D
-:1017C000189520911001222369F310910E01112325
-:1017D00021F5343022F130930E0120930A0110914B
-:1017E0000B013BE0311B30930B0119C000910E013E
-:1017F00001309CF40AE53091610034FD11C0009382
-:101800006100CEEFD0E010C0052710E000C021C07D
-:10181000052710E0C89508BB14C03AE501C032EDB9
-:10182000032EC0E0D0E032E017B31861C39A08B3CA
-:1018300017BB58E120E84FEF20FF052708BB27958D
-:1018400017951C3F28F700004552B0F720FF0527E9
-:10185000279508BB17951C3FB8F629913A9561F773
-:10186000077E10910F01110F08BBC250D04011F03C
-:101870001093090110E21ABF086017B3177E402FBA
-:10188000477E54E05A95F1F708BB17BB48BB8ACF97
-:101890002091F9003091FA002D3B3441B8F421E059
-:1018A0002093F600F894E091F900F091FA000C0111
-:1018B00020935700E895112478948091F900909135
-:1018C000FA0002969093FA008093F90008958091AF
-:1018D000F600882309F43DC08091F9009091FA0048
-:1018E000813C944108F035C0F8948091F9009091C2
-:1018F000FA008238944118F1809166009091670057
-:101900008F559A409F70906CEEEBF4E121E00C0152
-:1019100020935700E895112480916E0090916F00FC
-:101920008C559A409F70906CECEBF4E10C01209385
-:101930005700E8951124789481E080936400E09149
-:10194000F900F091FA00329785E080935700E8950E
-:1019500078941092F6000895FF920F931F93CF93FF
-:10196000DF9380910E01835087FD5AC190910B0146
-:10197000ACE0B0E0A91BB109AE5EBE4F31E03093E0
-:10198000620090910A019D3209F00AC1883009F085
-:1019900045C183EC8093FE008AE58093610010923C
-:1019A000FD008C91807609F47DC01092F3001092B6
-:1019B000F5001092F40011962C911197213009F442
-:1019C00069C0263021F481E08093FC0067C0273095
-:1019D00009F040C03093FC0089EE90E090930D0137
-:1019E00080930C0113969C9113979093EB001092A7
-:1019F000EC0012968C911297803379F491114CC0BF
-:101A00001496EC911497F0E0EE0FFF1F81E28093A3
-:101A10005700E491E093EC003FC08C3A81F4903899
-:101A2000D9F514968C911497811136C015968C9126
-:101A30001597811131C081E08093E8002DC08C346E
-:101A400059F515968C911597811126C081E08093E8
-:101A5000E70022C0283009F4B6CF14968D919C91EE
-:101A600015979093FA008093F90016968C9116972B
-:101A70008093F10087EF820F843080F48FE788BD78
-:101A80003093FB002093F2002A3051F081E08093E4
-:101A9000FC0006C021E077C024E075C020E073C0E0
-:101AA0002FEF68C012969C91129710920701119621
-:101AB0008C911197811106C01092080187E091E086
-:101AC00022E052C0853019F490930F013FC0863058
-:101AD000B9F513968C911397813019F480EF94E146
-:101AE00004C0823041F48EED94E190930D01809317
-:101AF0000C0122E121C08330F1F4911108C084E28D
-:101B000095E190930D0180930C0124E015C0913074
-:101B100041F48EE095E190930D0180930C0126E154
-:101B20000BC0923041F482E095E190930D018093D7
-:101B30000C012CE001C020E080E48093FD0018C07F
-:101B4000883079F0893031F49093110187E091E089
-:101B500020E00AC021E08A3009F020E087E091E02F
-:101B600003C081E191E021E090930D0180930C018D
-:101B70002F3F49F48C9187FF02C016962C9180E884
-:101B80008093FD000AC017968C911797811105C0AC
-:101B900016968C91821708F4282F209360003EC07F
-:101BA0009091FD0097FF3AC09091F100182F98177F
-:101BB00008F4192F092F011B0093F1001092FC006B
-:101BC0008091F2008A3029F0011128C01092600043
-:101BD00025C0FA2ECA2FDB2F8C2F8F198117A0F763
-:101BE0008091F9009091FA008034910590F421E001
-:101BF00020936500FC01EE0FFF1FEA59FF4F28817B
-:101C000039813183208302969093FA008093F90002
-:101C100003C0888199813CDE2296DECF10920E01AE
-:101C20008091610084FF7BC0809160008F3F09F448
-:101C300076C0182F893008F018E0811B809360006F
-:101C40008091FE0098E889278093FE00112309F413
-:101C50005AC08091FD0087FF38C08091F100811744
-:101C600008F4182F811B8093F1003091F200E0916D
-:101C7000F900F091FA0020E0AFEFB0E0211700F595
-:101C80003B3009F4FFCF3930D9F7E034F10560F487
-:101C9000EF01CC0FDD1FCA59DF4F888199818D93E9
-:101CA0009D932E5F3296EACFEC3B84E1F80710F06B
-:101CB0008FEF01C084918C9311962F5F3196DECF08
-:101CC000F093FA00E093F9001EC0E0910C01F0914E
-:101CD0000D0186FF0BC08FEF90E0DC0124912D9366
-:101CE0003196212F280F2A13F9CF09C08FEF90E0EA
-:101CF000DC0121912D93212F280F2A13FACFF09385
-:101D00000D01E0930C01612F8FEF90E050DC1C5F20
-:101D10001C3019F08FEF809360001093610084E114
-:101D200096B3987131F48150D9F710920F01109247
-:101D30000901C1E08111C0E0809163008C1739F086
-:101D4000C11103C0F89401D17894C0936300DF916E
-:101D5000CF911F910F91FF900895C1B7B99A83E277
-:101D60008ABD81E083BFAC9A8BB780628BBFBB9A80
-:101D70002FE132E18AE0215030408040E1F700C09D
-:101D80000000BB987894E8DD8091E800882321F179
-:101D900082E090E09093F8008093F70013C0CF01A9
-:101DA0008F739927892B21F483E080935700E8955E
-:101DB000D3DD8091F7009091F80002969093F8009F
-:101DC0008093F700E091F700F091F800E03C94E197
-:101DD000F90728F31092E8008091E700882329F0A2
-:101DE000BBDD75DD1092E700B7DD809162008823CE
-:101DF00041F08091FC00811104C08091FB008111B1
-:101E0000C2CF80916200882371F08091E600811139
-:101E10000AC088B5805F88BD88B5811104C08AB5C5
-:101E200090E189278ABD8091E6008F5F8093E6006C
-:101E30008EEC90E00197F1F78091F4009091F5001D
-:101E400001969093F5008093F4002091F3000097A1
-:101E500011F42F5F00C02093F30030916200311124
-:101E600005C081323EE4930708F05AC03091FC006F
-:101E7000332321F08131974208F052C080916200F3
-:101E8000882309F480CF8091FB0081117CCF23301F
-:101E900008F479CF45C080916400811149C08CEB72
-:101EA00094E19093FA008093F90081E08093F6002A
-:101EB0000EDD3EC0DF01AA0FBB1FAA59BF4F8D9197
-:101EC0009C919F012B7F232B31F4E054FB4E859195
-:101ED0009491805A954FDCDCE091F900F091FA0082
-:101EE000E034F10538F3F3DC10925F0217BA13BE49
-:101EF0001ABC03C081B78F5F81BF81B78C17D0F345
-:101F000003C081B7815081BF81B7C817D0F391E07A
-:101F100080E80FB6F89486BD96BD0FBED0CA13C038
-:101F200015BA1BBEF894809165008111B4CFDCCF47
-:101F3000E0E0F0E083E080935700E8951092FA002B
-:101F40001092F900C9CF80E090E0DF92EF92FF920B
-:101F50000F931F93CF93DF9390E080E80FB6F89430
-:101F600086BD96BD0FBE08E010E0F12C80E8E82E9B
-:101F7000DF2CDE0CD1BE1FDBEC01C43389E0D807B7
-:101F80000CF4FD2CE694015011090115110581F79F
-:101F90001F2D8FEF8F0D81BF21B730E0812F90E093
-:101FA00001968217930784F006DB8453994097FFCC
-:101FB00003C09195819591098C179D0714F4F1B692
-:101FC000EC0181B78F5FE7CFF1BEDF91CF911F9119
-:0E1FD0000F91FF90EF90DF900895F894FFCFEF
-:021FDE00FF5AA8
-:04000003000014C025
-:00000001FF
diff --git a/bootloaders/gemma/usbconfig.h b/bootloaders/gemma/usbconfig.h
deleted file mode 100644
index ca0c021..0000000
--- a/bootloaders/gemma/usbconfig.h
+++ /dev/null
@@ -1,351 +0,0 @@
-/* Name: usbconfig.h
- * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers
- * Author: Christian Starkjohann
- * Creation Date: 2005-04-01
- * Tabsize: 4
- * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
- * License: GNU GPL v2 or v3 (see License.txt)
- */
-
-/* Modified by me@frank-zhao.com for project GemmaBoot
- *
- * GemmaBoot is a bootloader that emulates a USBtinyISP (from Adafruit Industries)
- *
- * Gemma will use GemmaBoot
- *
- * This code is heavily derived from USBaspLoader, but also from USBtiny, with USBtinyISP's settings
-
- Copyright (c) 2013 Adafruit Industries
- All rights reserved.
-
- GemmaBoot is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation, either version 3 of
- the License, or (at your option) any later version.
-
- GemmaBoot is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with GemmaBoot. If not, see
- <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef __usbconfig_h_included__
-#define __usbconfig_h_included__
-
-/* YOU SHOULD NOT NEED TO MODIFY THIS FILE! All configurations are supposed
- * to go into bootloaderconfig.h!
- */
-
-/* ---------------------------- Hardware Config ---------------------------- */
-
-/* All the port and pin assignments, as well as the clock speed and CRC
- setting are now in bootloaderconfig.h: */
-
-#include "bootloaderconfig.h"
-
-/* --------------------------- Functional Range ---------------------------- */
-
-#define USB_CFG_HAVE_INTRIN_ENDPOINT 0
-/* Define this to 1 if you want to compile a version with two endpoints: The
- * default control endpoint 0 and an interrupt-in endpoint (any other endpoint
- * number).
- */
-#define USB_CFG_HAVE_INTRIN_ENDPOINT3 0
-/* Define this to 1 if you want to compile a version with three endpoints: The
- * default control endpoint 0, an interrupt-in endpoint 3 (or the number
- * configured below) and a catch-all default interrupt-in endpoint as above.
- * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature.
- */
-#define USB_CFG_EP3_NUMBER 3
-/* If the so-called endpoint 3 is used, it can now be configured to any other
- * endpoint number (except 0) with this macro. Default if undefined is 3.
- */
-/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */
-/* The above macro defines the startup condition for data toggling on the
- * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1.
- * Since the token is toggled BEFORE sending any data, the first packet is
- * sent with the oposite value of this configuration!
- */
-#define USB_CFG_IMPLEMENT_HALT 0
-/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature
- * for endpoint 1 (interrupt endpoint). Although you may not need this feature,
- * it is required by the standard. We have made it a config option because it
- * bloats the code considerably.
- */
-#define USB_CFG_SUPPRESS_INTR_CODE 0
-/* Define this to 1 if you want to declare interrupt-in endpoints, but don't
- * want to send any data over them. If this macro is defined to 1, functions
- * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if
- * you need the interrupt-in endpoints in order to comply to an interface
- * (e.g. HID), but never want to send any data. This option saves a couple
- * of bytes in flash memory and the transmit buffers in RAM.
- */
-#define USB_CFG_INTR_POLL_INTERVAL 10
-/* If you compile a version with endpoint 1 (interrupt-in), this is the poll
- * interval. The value is in milliseconds and must not be less than 10 ms for
- * low speed devices.
- */
-#ifndef USB_CFG_IS_SELF_POWERED // allow bootloaderconfig.h to override
-#define USB_CFG_IS_SELF_POWERED 0
-#endif
-/* Define this to 1 if the device has its own power supply. Set it to 0 if the
- * device is powered from the USB bus.
- */
-#ifndef USB_CFG_MAX_BUS_POWER // allow bootloaderconfig.h to override
-#define USB_CFG_MAX_BUS_POWER 100
-#endif
-/* Set this variable to the maximum USB bus power consumption of your device.
- * The value is in milliamperes. [It will be divided by two since USB
- * communicates power requirements in units of 2 mA.]
- */
-#define USB_CFG_IMPLEMENT_FN_WRITE 1
-/* Set this to 1 if you want usbFunctionWrite() to be called for control-out
- * transfers. Set it to 0 if you don't need it and want to save a couple of
- * bytes.
- */
-#define USB_CFG_IMPLEMENT_FN_READ 1
-/* Set this to 1 if you need to send control replies which are generated
- * "on the fly" when usbFunctionRead() is called. If you only want to send
- * data from a static buffer, set it to 0 and return the data from
- * usbFunctionSetup(). This saves a couple of bytes.
- */
-#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0
-/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints.
- * You must implement the function usbFunctionWriteOut() which receives all
- * interrupt/bulk data sent to any endpoint other than 0. The endpoint number
- * can be found in 'usbRxToken'.
- */
-#define USB_CFG_HAVE_FLOWCONTROL 0
-/* Define this to 1 if you want flowcontrol over USB data. See the definition
- * of the macros usbDisableAllRequests() and usbEnableAllRequests() in
- * usbdrv.h.
- */
-#define USB_CFG_DRIVER_FLASH_PAGE 0
-/* If the device has more than 64 kBytes of flash, define this to the 64 k page
- * where the driver's constants (descriptors) are located. Or in other words:
- * Define this to 1 for boot loaders on the ATMega128.
- */
-#define USB_CFG_LONG_TRANSFERS 0
-/* Define this to 1 if you want to send/receive blocks of more than 254 bytes
- * in a single control-in or control-out transfer. Note that the capability
- * for long transfers increases the driver size.
- */
-#ifndef __ASSEMBLER__
-extern volatile char usbHasRxed;
-#endif
-#define USB_RX_USER_HOOK(data, len) do { usbHasRxed = 1; } while (0);
-/* This macro is a hook if you want to do unconventional things. If it is
- * defined, it's inserted at the beginning of received message processing.
- * If you eat the received message and don't want default processing to
- * proceed, do a return after doing your things. One possible application
- * (besides debugging) is to flash a status LED on each packet.
- */
-/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */
-/* This macro is a hook if you need to know when an USB RESET occurs. It has
- * one parameter which distinguishes between the start of RESET state and its
- * end.
- */
-/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */
-/* This macro (if defined) is executed when a USB SET_ADDRESS request was
- * received.
- */
-#define USB_COUNT_SOF 0
-/* define this macro to 1 if you need the global variable "usbSofCount" which
- * counts SOF packets. This feature requires that the hardware interrupt is
- * connected to D- instead of D+.
- */
-/* #ifdef __ASSEMBLER__
- * macro myAssemblerMacro
- * in YL, TCNT0
- * sts timer0Snapshot, YL
- * endm
- * #endif
- * #define USB_SOF_HOOK myAssemblerMacro
- * This macro (if defined) is executed in the assembler module when a
- * Start Of Frame condition is detected. It is recommended to define it to
- * the name of an assembler macro which is defined here as well so that more
- * than one assembler instruction can be used. The macro may use the register
- * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages
- * immediately after an SOF pulse may be lost and must be retried by the host.
- * What can you do with this hook? Since the SOF signal occurs exactly every
- * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in
- * designs running on the internal RC oscillator.
- * Please note that Start Of Frame detection works only if D- is wired to the
- * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES!
- */
-#define USB_CFG_CHECK_DATA_TOGGLING 0
-/* define this macro to 1 if you want to filter out duplicate data packets
- * sent by the host. Duplicates occur only as a consequence of communication
- * errors, when the host does not receive an ACK. Please note that you need to
- * implement the filtering yourself in usbFunctionWriteOut() and
- * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable
- * for each control- and out-endpoint to check for duplicate packets.
- */
-#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 1
-/* define this macro to 1 if you want the function usbMeasureFrameLength()
- * compiled in. This function can be used to calibrate the AVR's RC oscillator.
- */
-#define USB_USE_FAST_CRC 0
-/* The assembler module has two implementations for the CRC algorithm. One is
- * faster, the other is smaller. This CRC routine is only used for transmitted
- * messages where timing is not critical. The faster routine needs 31 cycles
- * per byte while the smaller one needs 61 to 69 cycles. The faster routine
- * may be worth the 32 bytes bigger code size if you transmit lots of data and
- * run the AVR close to its limit.
- */
-
-/* -------------------------- Device Description --------------------------- */
-
-#define USB_CFG_VENDOR_ID 0x41, 0x23 /* = 0x16c0 = 5824 = voti.nl */
-/* USB vendor ID for the device, low byte first. If you have registered your
- * own Vendor ID, define it here. Otherwise you may use one of obdev's free
- * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules!
- */
-#define USB_CFG_DEVICE_ID 0x9F, 0x0c /* = 0x05dc = 1500 */
-/* This is the ID of the product, low byte first. It is interpreted in the
- * scope of the vendor ID. If you have registered your own VID with usb.org
- * or if you have licensed a PID from somebody else, define it here. Otherwise
- * you may use one of obdev's free shared VID/PID pairs. See the file
- * USB-IDs-for-free.txt for details!
- */
-#define USB_CFG_DEVICE_VERSION 0x00, 0x01
-/* Version number of the device: Minor number first, then major number.
- */
-#define USB_CFG_VENDOR_NAME 'A','r','d','u','i','n','o','.','c','c'
-#define USB_CFG_VENDOR_NAME_LEN 10
-/* These two values define the vendor name returned by the USB device. The name
- * must be given as a list of characters under single quotes. The characters
- * are interpreted as Unicode (UTF-16) entities.
- * If you don't want a vendor name string, undefine these macros.
- * ALWAYS define a vendor name containing your Internet domain name if you use
- * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
- * details.
- */
-#define USB_CFG_DEVICE_NAME 'G','e','m','m','a'
-#define USB_CFG_DEVICE_NAME_LEN 5
-/* Same as above for the device name. If you don't want a device name, undefine
- * the macros. See the file USB-IDs-for-free.txt before you assign a name if
- * you use a shared VID/PID.
- */
-/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */
-/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */
-/* Same as above for the serial number. If you don't want a serial number,
- * undefine the macros.
- * It may be useful to provide the serial number through other means than at
- * compile time. See the section about descriptor properties below for how
- * to fine tune control over USB descriptors such as the string descriptor
- * for the serial number.
- */
-#define USB_CFG_DEVICE_CLASS 0xFF /* set to 0 if deferred to interface */
-#define USB_CFG_DEVICE_SUBCLASS 0
-/* See USB specification if you want to conform to an existing device class.
- * Class 0xff is "vendor specific".
- */
-#define USB_CFG_INTERFACE_CLASS 0 /* define class here if not at device level */
-#define USB_CFG_INTERFACE_SUBCLASS 0
-#define USB_CFG_INTERFACE_PROTOCOL 0
-/* See USB specification if you want to conform to an existing device class or
- * protocol. The following classes must be set at interface level:
- * HID class is 3, no subclass and protocol required (but may be useful!)
- * CDC class is 2, use subclass 2 and protocol 1 for ACM
- */
-/* #define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 42 */
-/* Define this to the length of the HID report descriptor, if you implement
- * an HID device. Otherwise don't define it or define it to 0.
- * If you use this define, you must add a PROGMEM character array named
- * "usbHidReportDescriptor" to your code which contains the report descriptor.
- * Don't forget to keep the array and this define in sync!
- */
-
-#define USB_PUBLIC static
-/* Use the define above if you #include usbdrv.c instead of linking against it.
- * This technique saves a couple of bytes in flash memory.
- */
-
-/* ------------------- Fine Control over USB Descriptors ------------------- */
-/* If you don't want to use the driver's default USB descriptors, you can
- * provide our own. These can be provided as (1) fixed length static data in
- * flash memory, (2) fixed length static data in RAM or (3) dynamically at
- * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more
- * information about this function.
- * Descriptor handling is configured through the descriptor's properties. If
- * no properties are defined or if they are 0, the default descriptor is used.
- * Possible properties are:
- * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched
- * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is
- * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if
- * you want RAM pointers.
- * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found
- * in static memory is in RAM, not in flash memory.
- * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash),
- * the driver must know the descriptor's length. The descriptor itself is
- * found at the address of a well known identifier (see below).
- * List of static descriptor names (must be declared PROGMEM if in flash):
- * char usbDescriptorDevice[];
- * char usbDescriptorConfiguration[];
- * char usbDescriptorHidReport[];
- * char usbDescriptorString0[];
- * int usbDescriptorStringVendor[];
- * int usbDescriptorStringDevice[];
- * int usbDescriptorStringSerialNumber[];
- * Other descriptors can't be provided statically, they must be provided
- * dynamically at runtime.
- *
- * Descriptor properties are or-ed or added together, e.g.:
- * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18))
- *
- * The following descriptors are defined:
- * USB_CFG_DESCR_PROPS_DEVICE
- * USB_CFG_DESCR_PROPS_CONFIGURATION
- * USB_CFG_DESCR_PROPS_STRINGS
- * USB_CFG_DESCR_PROPS_STRING_0
- * USB_CFG_DESCR_PROPS_STRING_VENDOR
- * USB_CFG_DESCR_PROPS_STRING_PRODUCT
- * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER
- * USB_CFG_DESCR_PROPS_HID
- * USB_CFG_DESCR_PROPS_HID_REPORT
- * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver)
- *
- * Note about string descriptors: String descriptors are not just strings, they
- * are Unicode strings prefixed with a 2 byte header. Example:
- * int serialNumberDescriptor[] = {
- * USB_STRING_DESCRIPTOR_HEADER(6),
- * 'S', 'e', 'r', 'i', 'a', 'l'
- * };
- */
-
-#define USB_CFG_DESCR_PROPS_DEVICE 0
-#define USB_CFG_DESCR_PROPS_CONFIGURATION 0
-#define USB_CFG_DESCR_PROPS_STRINGS 0
-#define USB_CFG_DESCR_PROPS_STRING_0 0
-#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0
-#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0
-#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0
-#define USB_CFG_DESCR_PROPS_HID 0
-#define USB_CFG_DESCR_PROPS_HID_REPORT 0
-#define USB_CFG_DESCR_PROPS_UNKNOWN 0
-
-#define usbMsgPtr_t unsigned short // scalar type yields shortest code
-
-/* ----------------------- Optional MCU Description ------------------------ */
-
-/* The following configurations have working defaults in usbdrv.h. You
- * usually don't need to set them explicitly. Only if you want to run
- * the driver on a device which is not yet supported or with a compiler
- * which is not fully supported (such as IAR C) or if you use a differnt
- * interrupt than INT0, you may have to define some of these.
- */
-#define USB_INTR_CFG PCMSK
-#define USB_INTR_CFG_SET (1 << USB_CFG_DPLUS_BIT)
-#define USB_INTR_CFG_CLR 0
-#define USB_INTR_ENABLE GIMSK
-#define USB_INTR_ENABLE_BIT PCIE
-#define USB_INTR_PENDING GIFR
-#define USB_INTR_PENDING_BIT PCIF
-#define USB_INTR_VECTOR PCINT0_vect
-
-#endif /* __usbconfig_h_included__ */
diff --git a/bootloaders/gemma/usbconfig.patch b/bootloaders/gemma/usbconfig.patch
deleted file mode 100644
index 1abb158..0000000
--- a/bootloaders/gemma/usbconfig.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-203c203
-< #define USB_CFG_VENDOR_ID 0x81, 0x17 /* = 0x16c0 = 5824 = voti.nl */
----
-> #define USB_CFG_VENDOR_ID 0x41, 0x23 /* = 0x16c0 = 5824 = voti.nl */
-208c208
-< #define USB_CFG_DEVICE_ID 0x9F, 0x0C /* = 0x05dc = 1500 */
----
-> #define USB_CFG_DEVICE_ID 0x9F, 0x0c /* = 0x05dc = 1500 */
-215c215
-< #define USB_CFG_DEVICE_VERSION 0x05, 0x01
----
-> #define USB_CFG_DEVICE_VERSION 0x00, 0x01
-218,219c218,219
-< #define USB_CFG_VENDOR_NAME 'A','d','a','f','r','u','i','t'
-< #define USB_CFG_VENDOR_NAME_LEN 8
----
-> #define USB_CFG_VENDOR_NAME 'A','r','d','u','i','n','o','.','c','c'
-> #define USB_CFG_VENDOR_NAME_LEN 10
-228,229c228,229
-< #define USB_CFG_DEVICE_NAME 'T','r','i','n','k','e','t'
-< #define USB_CFG_DEVICE_NAME_LEN 7
----
-> #define USB_CFG_DEVICE_NAME 'G','e','m','m','a'
-> #define USB_CFG_DEVICE_NAME_LEN 5
diff --git a/bootloaders/lilypad/LilyPadBOOT_168.hex b/bootloaders/lilypad/LilyPadBOOT_168.hex
deleted file mode 100644
index aea378e..0000000
--- a/bootloaders/lilypad/LilyPadBOOT_168.hex
+++ /dev/null
@@ -1,117 +0,0 @@
-:103800000C94341C0C944F1C0C944F1C0C944F1CA7
-:103810000C944F1C0C944F1C0C944F1C0C944F1C7C
-:103820000C944F1C0C944F1C0C944F1C0C944F1C6C
-:103830000C944F1C0C944F1C0C944F1C0C944F1C5C
-:103840000C944F1C0C944F1C0C944F1C0C944F1C4C
-:103850000C944F1C0C944F1C0C944F1C0C944F1C3C
-:103860000C944F1C0C944F1C11241FBECFEFD4E0BE
-:10387000DEBFCDBF11E0A0E0B1E0E8E1FFE302C0B0
-:1038800005900D92A230B107D9F712E0A2E0B1E0A5
-:1038900001C01D92AD30B107E1F70C94311D0C94BD
-:1038A000001CCF93DF93CDB7DEB724970FB6F89403
-:1038B000DEBF0FBECDBF382F882309F433E010924E
-:1038C0000A02332309F44BC020E02D9A19821A8290
-:1038D0001B821C8289819A81AB81BC8180549F416B
-:1038E000A040B040A0F489819A81AB81BC8101964F
-:1038F000A11DB11D89839A83AB83BC8389819A8181
-:10390000AB81BC8180549F41A040B04060F32D98B2
-:1039100019821A821B821C8289819A81AB81BC81A7
-:1039200080549F41A040B040A0F489819A81AB812E
-:10393000BC810196A11DB11D89839A83AB83BC8391
-:1039400089819A81AB81BC8180549F41A040B04065
-:1039500060F32F5F231708F4B8CF20930A02249650
-:103960000FB6F894DEBF0FBECDBFDF91CF910895A3
-:10397000EF92FF920F931F93EE24FF248701809113
-:10398000C00087FD17C00894E11CF11C011D111D2A
-:1039900081E0E81689E0F8068DE3080780E0180763
-:1039A00070F3E0910201F091030109958091C0004C
-:1039B00087FFE9CF8091C600992787FD90951F91D9
-:1039C0000F91FF90EF900895982F8091C00085FF90
-:1039D000FCCF9093C60008950E94B81C803271F00D
-:1039E000809104018F5F80930401853009F0089570
-:1039F000E0910201F09103010995089584E10E948C
-:103A0000E41C80E10E94E41C08951F93182F0E947B
-:103A1000B81C803269F0809104018F5F80930401AB
-:103A2000853079F4E0910201F0910301099509C014
-:103A300084E10E94E41C812F0E94E41C80E10E942A
-:103A4000E41C1F910895282F882351F090E0809165
-:103A5000C00087FFFCCF8091C6009F5F2917B9F790
-:103A60000895CFEFD4E0DEBFCDBF000089E18093A1
-:103A7000C4001092C50088E18093C10086E0809365
-:103A8000C2005098589A259A83E00E94511C0E94C7
-:103A9000B81C8033B1F18133B9F1803409F454C0DA
-:103AA000813409F45AC0823409F469C0853409F4B8
-:103AB0006CC0803531F1813521F1823511F18535C8
-:103AC00009F4B2C0863509F4BAC0843609F463C07B
-:103AD000843709F4BBC0853709F40EC1863709F471
-:103AE0004AC0809104018F5F80930401853079F68C
-:103AF000E0910201F091030109950E94B81C803306
-:103B000051F60E94EC1CC3CF0E94B81C803249F7CA
-:103B100084E10E94E41C81E40E94E41C86E50E948A
-:103B2000E41C82E50E94E41C80E20E94E41C89E41B
-:103B30000E94E41C83E50E94E41C80E50E94E41CD2
-:103B400080E10E94E41CA3CF0E94B81C8638C8F212
-:103B50000E94B81C0E94EC1C9ACF0E94B81C8038AE
-:103B600009F4F7C0813809F4F8C0823809F4F9C0C3
-:103B7000883909F4BDC080E00E94051D88CF84E12A
-:103B80000E94231D0E94EC1C82CF85E00E94231D11
-:103B90000E94EC1C7CCF0E94B81C809309020E94FA
-:103BA000B81C8093080280910C028E7F80930C02D7
-:103BB0000E94B81C853409F4C6C080910802909117
-:103BC0000902892B09F0ADC00E94B81C803209F0AF
-:103BD00088CF80910C0280FFC8C08091080290912C
-:103BE00009020097D1F02091060130910701E8E029
-:103BF000F1E0AC014E0F5F1FF999FECF32BD21BD40
-:103C0000819180BDFA9AF99A2F5F3F4F4E175F0757
-:103C100099F7309307012093060184E10E94E41C88
-:103C200080E10E94E41C33CF0E94B81C80930601FF
-:103C30000E94B81C809307010E94EC1C28CF84E0EE
-:103C40000E94231D80E00E94051D21CF0E94B81C08
-:103C5000809309020E94B81C809308020E94B81C3D
-:103C6000853409F4F4C080910C028E7F80930C029D
-:103C70008091060190910701880F991F9093070189
-:103C8000809306010E94B81C803209F000CF84E1C5
-:103C90000E94E41C2091080230910902211531058F
-:103CA00019F1C0E0D0E0E0910601F09107018091A8
-:103CB0000C0280FFC4C0F999FECFF2BDE1BDF89AB5
-:103CC00080B50E94E41CE0910601F0910701319655
-:103CD000F0930701E0930601209108023091090258
-:103CE0002196C217D30718F380E10E94E41CCFCEBF
-:103CF00083E00E94051DCBCE0E94B81C803209F0E3
-:103D0000F0CE84E10E94E41C8EE10E94E41C84E970
-:103D10000E94E41C86E00E94E41C80E10E94E41CF6
-:103D2000B6CEC0E0D0E008E011E00E94B81CF80177
-:103D300081938F0121968091080290910902C81702
-:103D4000D90798F341CF80910C02816080930C02D7
-:103D500034CF82E00E94051D9ACE81E00E94051DAD
-:103D600096CE80E10E94051D92CE8091070187FDCD
-:103D700080C010920B028091060190910701880F7C
-:103D8000991F90930701809306018091080280FF9C
-:103D900009C080910802909109020196909309024E
-:103DA00080930802F894F999FECF1127E09106015B
-:103DB000F0910701C8E0D1E08091080290910902DA
-:103DC000103091F40091570001700130D9F303E0F5
-:103DD00000935700E8950091570001700130D9F326
-:103DE00001E100935700E895099019900091570060
-:103DF00001700130D9F301E000935700E895139565
-:103E0000103498F011270091570001700130D9F358
-:103E100005E000935700E8950091570001700130CC
-:103E2000D9F301E100935700E8953296029709F023
-:103E3000C7CF103011F00296E5CF1124EECE81FFEE
-:103E40000CC03196F0930701E093060149CF8091B1
-:103E50000C02816080930C0215CF84910E94E41CB7
-:103E60002091080230910902E0910601F0910701CA
-:103E7000E8CF81E080930B027ECF0F931F930E94C7
-:103E8000B81C182F0E94E41C0E94B81C082F0E9426
-:103E9000E41C11362CF0175501363CF0075508C0CC
-:103EA0001033D4F310530136CCF700330CF0005329
-:103EB0001295107F100F812F992787FD90951F91E4
-:103EC0000F9108951F93282F992787FD9095807F44
-:103ED00090709595879595958795959587959595E6
-:103EE00087958A304CF0982F995A822F8F708A309C
-:103EF0004CF0182F195A08C0982F905D822F8F70A0
-:103F00008A30BCF7182F105D892F0E94E41C812F86
-:083F10000E94E41C1F910895BA
-:023F1800800027
-:0400000300003800C1
-:00000001FF
diff --git a/bootloaders/lilypad/src/ATmegaBOOT.c b/bootloaders/lilypad/src/ATmegaBOOT.c
deleted file mode 100644
index 415babe..0000000
--- a/bootloaders/lilypad/src/ATmegaBOOT.c
+++ /dev/null
@@ -1,977 +0,0 @@
-/**********************************************************/
-/* Serial Bootloader for Atmel megaAVR Controllers */
-/* */
-/* tested with ATmega8, ATmega128 and ATmega168 */
-/* should work with other mega's, see code for details */
-/* */
-/* ATmegaBOOT.c */
-/* */
-/* 20070626: hacked for Arduino Diecimila (which auto- */
-/* resets when a USB connection is made to it) */
-/* by D. Mellis */
-/* 20060802: hacked for Arduino by D. Cuartielles */
-/* based on a previous hack by D. Mellis */
-/* and D. Cuartielles */
-/* */
-/* Monitor and debug functions were added to the original */
-/* code by Dr. Erik Lins, chip45.com. (See below) */
-/* */
-/* Thanks to Karl Pitrich for fixing a bootloader pin */
-/* problem and more informative LED blinking! */
-/* */
-/* For the latest version see: */
-/* http://www.chip45.com/ */
-/* */
-/* ------------------------------------------------------ */
-/* */
-/* based on stk500boot.c */
-/* Copyright (c) 2003, Jason P. Kyle */
-/* All rights reserved. */
-/* see avr1.org for original file and information */
-/* */
-/* This program is free software; you can redistribute it */
-/* and/or modify it under the terms of the GNU General */
-/* Public License as published by the Free Software */
-/* Foundation; either version 2 of the License, or */
-/* (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will */
-/* be useful, but WITHOUT ANY WARRANTY; without even the */
-/* implied warranty of MERCHANTABILITY or FITNESS FOR A */
-/* PARTICULAR PURPOSE. See the GNU General Public */
-/* License for more details. */
-/* */
-/* You should have received a copy of the GNU General */
-/* Public License along with this program; if not, write */
-/* to the Free Software Foundation, Inc., */
-/* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-/* */
-/* Licence can be viewed at */
-/* http://www.fsf.org/licenses/gpl.txt */
-/* */
-/* Target = Atmel AVR m128,m64,m32,m16,m8,m162,m163,m169, */
-/* m8515,m8535. ATmega161 has a very small boot block so */
-/* isn't supported. */
-/* */
-/* Tested with m168 */
-/**********************************************************/
-
-
-/* some includes */
-#include <inttypes.h>
-#include <avr/io.h>
-#include <avr/pgmspace.h>
-#include <avr/interrupt.h>
-#include <avr/wdt.h>
-
-
-/* the current avr-libc eeprom functions do not support the ATmega168 */
-/* own eeprom write/read functions are used instead */
-#ifndef __AVR_ATmega168__
-#include <avr/eeprom.h>
-#endif
-
-/* Use the F_CPU defined in Makefile */
-
-/* 20060803: hacked by DojoCorp */
-/* 20070626: hacked by David A. Mellis to decrease waiting time for auto-reset */
-/* set the waiting time for the bootloader */
-/* get this from the Makefile instead */
-/* #define MAX_TIME_COUNT (F_CPU>>4) */
-
-/* 20070707: hacked by David A. Mellis - after this many errors give up and launch application */
-#define MAX_ERROR_COUNT 5
-
-/* set the UART baud rate */
-/* 20060803: hacked by DojoCorp */
-//#define BAUD_RATE 115200
-#define BAUD_RATE 19200
-
-
-/* SW_MAJOR and MINOR needs to be updated from time to time to avoid warning message from AVR Studio */
-/* never allow AVR Studio to do an update !!!! */
-#define HW_VER 0x02
-#define SW_MAJOR 0x01
-#define SW_MINOR 0x10
-
-
-/* Adjust to suit whatever pin your hardware uses to enter the bootloader */
-/* ATmega128 has two UARTS so two pins are used to enter bootloader and select UART */
-/* BL0... means UART0, BL1... means UART1 */
-#ifdef __AVR_ATmega128__
-#define BL_DDR DDRF
-#define BL_PORT PORTF
-#define BL_PIN PINF
-#define BL0 PINF7
-#define BL1 PINF6
-#else
-/* other ATmegas have only one UART, so only one pin is defined to enter bootloader */
-#define BL_DDR DDRD
-#define BL_PORT PORTD
-#define BL_PIN PIND
-#define BL PIND6
-#endif
-
-
-/* onboard LED is used to indicate, that the bootloader was entered (3x flashing) */
-/* if monitor functions are included, LED goes on after monitor was entered */
-#ifdef __AVR_ATmega128__
-/* Onboard LED is connected to pin PB7 (e.g. Crumb128, PROBOmega128, Savvy128) */
-#define LED_DDR DDRB
-#define LED_PORT PORTB
-#define LED_PIN PINB
-#define LED PINB7
-#else
-/* Onboard LED is connected to pin PB2 (e.g. Crumb8, Crumb168) */
-#define LED_DDR DDRB
-#define LED_PORT PORTB
-#define LED_PIN PINB
-/* 20060803: hacked by DojoCorp, LED pin is B5 in Arduino */
-/* #define LED PINB2 */
-#define LED PINB5
-#endif
-
-
-/* monitor functions will only be compiled when using ATmega128, due to bootblock size constraints */
-#ifdef __AVR_ATmega128__
-#define MONITOR
-#endif
-
-
-/* define various device id's */
-/* manufacturer byte is always the same */
-#define SIG1 0x1E // Yep, Atmel is the only manufacturer of AVR micros. Single source :(
-
-#if defined __AVR_ATmega128__
-#define SIG2 0x97
-#define SIG3 0x02
-#define PAGE_SIZE 0x80U //128 words
-
-#elif defined __AVR_ATmega64__
-#define SIG2 0x96
-#define SIG3 0x02
-#define PAGE_SIZE 0x80U //128 words
-
-#elif defined __AVR_ATmega32__
-#define SIG2 0x95
-#define SIG3 0x02
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega16__
-#define SIG2 0x94
-#define SIG3 0x03
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega8__
-#define SIG2 0x93
-#define SIG3 0x07
-#define PAGE_SIZE 0x20U //32 words
-
-#elif defined __AVR_ATmega88__
-#define SIG2 0x93
-#define SIG3 0x0a
-#define PAGE_SIZE 0x20U //32 words
-
-#elif defined __AVR_ATmega168__
-#define SIG2 0x94
-#define SIG3 0x06
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega162__
-#define SIG2 0x94
-#define SIG3 0x04
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega163__
-#define SIG2 0x94
-#define SIG3 0x02
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega169__
-#define SIG2 0x94
-#define SIG3 0x05
-#define PAGE_SIZE 0x40U //64 words
-
-#elif defined __AVR_ATmega8515__
-#define SIG2 0x93
-#define SIG3 0x06
-#define PAGE_SIZE 0x20U //32 words
-
-#elif defined __AVR_ATmega8535__
-#define SIG2 0x93
-#define SIG3 0x08
-#define PAGE_SIZE 0x20U //32 words
-#endif
-
-
-/* function prototypes */
-void putch(char);
-char getch(void);
-void getNch(uint8_t);
-void byte_response(uint8_t);
-void nothing_response(void);
-char gethex(void);
-void puthex(char);
-void flash_led(uint8_t);
-
-/* some variables */
-union address_union {
- uint16_t word;
- uint8_t byte[2];
-} address;
-
-union length_union {
- uint16_t word;
- uint8_t byte[2];
-} length;
-
-struct flags_struct {
- unsigned eeprom : 1;
- unsigned rampz : 1;
-} flags;
-
-uint8_t buff[256];
-uint8_t address_high;
-
-uint8_t pagesz=0x80;
-
-uint8_t i;
-uint8_t bootuart = 0;
-
-uint8_t error_count = 0;
-
-void (*app_start)(void) = 0x0000;
-
-
-/* main program starts here */
-int main(void)
-{
- uint8_t ch,ch2;
- uint16_t w;
-
- asm volatile("nop\n\t");
-
- /* set pin direction for bootloader pin and enable pullup */
- /* for ATmega128, two pins need to be initialized */
-#ifdef __AVR_ATmega128__
- BL_DDR &= ~_BV(BL0);
- BL_DDR &= ~_BV(BL1);
- BL_PORT |= _BV(BL0);
- BL_PORT |= _BV(BL1);
-#else
- /* We run the bootloader regardless of the state of this pin. Thus, don't
- put it in a different state than the other pins. --DAM, 070709
- BL_DDR &= ~_BV(BL);
- BL_PORT |= _BV(BL);
- */
-#endif
-
-
-#ifdef __AVR_ATmega128__
- /* check which UART should be used for booting */
- if(bit_is_clear(BL_PIN, BL0)) {
- bootuart = 1;
- }
- else if(bit_is_clear(BL_PIN, BL1)) {
- bootuart = 2;
- }
-#endif
-
- /* check if flash is programmed already, if not start bootloader anyway */
- if(pgm_read_byte_near(0x0000) != 0xFF) {
-
-#ifdef __AVR_ATmega128__
- /* no UART was selected, start application */
- if(!bootuart) {
- app_start();
- }
-#else
- /* check if bootloader pin is set low */
- /* we don't start this part neither for the m8, nor m168 */
- //if(bit_is_set(BL_PIN, BL)) {
- // app_start();
- // }
-#endif
- }
-
-#ifdef __AVR_ATmega128__
- /* no bootuart was selected, default to uart 0 */
- if(!bootuart) {
- bootuart = 1;
- }
-#endif
-
-
- /* initialize UART(s) depending on CPU defined */
-#ifdef __AVR_ATmega128__
- if(bootuart == 1) {
- UBRR0L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1);
- UBRR0H = (F_CPU/(BAUD_RATE*16L)-1) >> 8;
- UCSR0A = 0x00;
- UCSR0C = 0x06;
- UCSR0B = _BV(TXEN0)|_BV(RXEN0);
- }
- if(bootuart == 2) {
- UBRR1L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1);
- UBRR1H = (F_CPU/(BAUD_RATE*16L)-1) >> 8;
- UCSR1A = 0x00;
- UCSR1C = 0x06;
- UCSR1B = _BV(TXEN1)|_BV(RXEN1);
- }
-#elif defined __AVR_ATmega163__
- UBRR = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1);
- UBRRHI = (F_CPU/(BAUD_RATE*16L)-1) >> 8;
- UCSRA = 0x00;
- UCSRB = _BV(TXEN)|_BV(RXEN);
-#elif defined __AVR_ATmega168__
- UBRR0L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1);
- UBRR0H = (F_CPU/(BAUD_RATE*16L)-1) >> 8;
- UCSR0B = (1<<RXEN0) | (1<<TXEN0);
- UCSR0C = (1<<UCSZ00) | (1<<UCSZ01);
-
- /* Enable internal pull-up resistor on pin D0 (RX), in order
- to supress line noise that prevents the bootloader from
- timing out (DAM: 20070509) */
- DDRD &= ~_BV(PIND0);
- PORTD |= _BV(PIND0);
-#elif defined __AVR_ATmega8__
- /* m8 */
- UBRRH = (((F_CPU/BAUD_RATE)/16)-1)>>8; // set baud rate
- UBRRL = (((F_CPU/BAUD_RATE)/16)-1);
- UCSRB = (1<<RXEN)|(1<<TXEN); // enable Rx & Tx
- UCSRC = (1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0); // config USART; 8N1
-#else
- /* m16,m32,m169,m8515,m8535 */
- UBRRL = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1);
- UBRRH = (F_CPU/(BAUD_RATE*16L)-1) >> 8;
- UCSRA = 0x00;
- UCSRC = 0x06;
- UCSRB = _BV(TXEN)|_BV(RXEN);
-#endif
-
- /* set LED pin as output */
- LED_DDR |= _BV(LED);
-
-
- /* flash onboard LED to signal entering of bootloader */
-#ifdef __AVR_ATmega128__
- // 4x for UART0, 5x for UART1
- flash_led(NUM_LED_FLASHES + bootuart);
-#else
- flash_led(NUM_LED_FLASHES);
-#endif
-
- /* 20050803: by DojoCorp, this is one of the parts provoking the
- system to stop listening, cancelled from the original */
- //putch('\0');
-
-
- /* forever loop */
- for (;;) {
-
- /* get character from UART */
- ch = getch();
-
- /* A bunch of if...else if... gives smaller code than switch...case ! */
-
- /* Hello is anyone home ? */
- if(ch=='0') {
- nothing_response();
- }
-
-
- /* Request programmer ID */
- /* Not using PROGMEM string due to boot block in m128 being beyond 64kB boundry */
- /* Would need to selectively manipulate RAMPZ, and it's only 9 characters anyway so who cares. */
- else if(ch=='1') {
- if (getch() == ' ') {
- putch(0x14);
- putch('A');
- putch('V');
- putch('R');
- putch(' ');
- putch('I');
- putch('S');
- putch('P');
- putch(0x10);
- } else {
- if (++error_count == MAX_ERROR_COUNT)
- app_start();
- }
- }
-
-
- /* AVR ISP/STK500 board commands DON'T CARE so default nothing_response */
- else if(ch=='@') {
- ch2 = getch();
- if (ch2>0x85) getch();
- nothing_response();
- }
-
-
- /* AVR ISP/STK500 board requests */
- else if(ch=='A') {
- ch2 = getch();
- if(ch2==0x80) byte_response(HW_VER); // Hardware version
- else if(ch2==0x81) byte_response(SW_MAJOR); // Software major version
- else if(ch2==0x82) byte_response(SW_MINOR); // Software minor version
- else if(ch2==0x98) byte_response(0x03); // Unknown but seems to be required by avr studio 3.56
- else byte_response(0x00); // Covers various unnecessary responses we don't care about
- }
-
-
- /* Device Parameters DON'T CARE, DEVICE IS FIXED */
- else if(ch=='B') {
- getNch(20);
- nothing_response();
- }
-
-
- /* Parallel programming stuff DON'T CARE */
- else if(ch=='E') {
- getNch(5);
- nothing_response();
- }
-
-
- /* Enter programming mode */
- else if(ch=='P') {
- nothing_response();
- }
-
-
- /* Leave programming mode */
- else if(ch=='Q') {
- nothing_response();
- }
-
-
- /* Erase device, don't care as we will erase one page at a time anyway. */
- else if(ch=='R') {
- nothing_response();
- }
-
-
- /* Set address, little endian. EEPROM in bytes, FLASH in words */
- /* Perhaps extra address bytes may be added in future to support > 128kB FLASH. */
- /* This might explain why little endian was used here, big endian used everywhere else. */
- else if(ch=='U') {
- address.byte[0] = getch();
- address.byte[1] = getch();
- nothing_response();
- }
-
-
- /* Universal SPI programming command, disabled. Would be used for fuses and lock bits. */
- else if(ch=='V') {
- getNch(4);
- byte_response(0x00);
- }
-
-
- /* Write memory, length is big endian and is in bytes */
- else if(ch=='d') {
- length.byte[1] = getch();
- length.byte[0] = getch();
- flags.eeprom = 0;
- if (getch() == 'E') flags.eeprom = 1;
- for (w=0;w<length.word;w++) {
- buff[w] = getch(); // Store data in buffer, can't keep up with serial data stream whilst programming pages
- }
- if (getch() == ' ') {
- if (flags.eeprom) { //Write to EEPROM one byte at a time
- for(w=0;w<length.word;w++) {
-#ifdef __AVR_ATmega168__
- while(EECR & (1<<EEPE));
- EEAR = (uint16_t)(void *)address.word;
- EEDR = buff[w];
- EECR |= (1<<EEMPE);
- EECR |= (1<<EEPE);
-#else
- eeprom_write_byte((void *)address.word,buff[w]);
-#endif
- address.word++;
- }
- }
- else { //Write to FLASH one page at a time
- if (address.byte[1]>127) address_high = 0x01; //Only possible with m128, m256 will need 3rd address byte. FIXME
- else address_high = 0x00;
-#ifdef __AVR_ATmega128__
- RAMPZ = address_high;
-#endif
- address.word = address.word << 1; //address * 2 -> byte location
- /* if ((length.byte[0] & 0x01) == 0x01) length.word++; //Even up an odd number of bytes */
- if ((length.byte[0] & 0x01)) length.word++; //Even up an odd number of bytes
- cli(); //Disable interrupts, just to be sure
- // HACKME: EEPE used to be EEWE
- while(bit_is_set(EECR,EEPE)); //Wait for previous EEPROM writes to complete
- asm volatile(
- "clr r17 \n\t" //page_word_count
- "lds r30,address \n\t" //Address of FLASH location (in bytes)
- "lds r31,address+1 \n\t"
- "ldi r28,lo8(buff) \n\t" //Start of buffer array in RAM
- "ldi r29,hi8(buff) \n\t"
- "lds r24,length \n\t" //Length of data to be written (in bytes)
- "lds r25,length+1 \n\t"
- "length_loop: \n\t" //Main loop, repeat for number of words in block
- "cpi r17,0x00 \n\t" //If page_word_count=0 then erase page
- "brne no_page_erase \n\t"
- "wait_spm1: \n\t"
- "lds r16,%0 \n\t" //Wait for previous spm to complete
- "andi r16,1 \n\t"
- "cpi r16,1 \n\t"
- "breq wait_spm1 \n\t"
- "ldi r16,0x03 \n\t" //Erase page pointed to by Z
- "sts %0,r16 \n\t"
- "spm \n\t"
-#ifdef __AVR_ATmega163__
- ".word 0xFFFF \n\t"
- "nop \n\t"
-#endif
- "wait_spm2: \n\t"
- "lds r16,%0 \n\t" //Wait for previous spm to complete
- "andi r16,1 \n\t"
- "cpi r16,1 \n\t"
- "breq wait_spm2 \n\t"
-
- "ldi r16,0x11 \n\t" //Re-enable RWW section
- "sts %0,r16 \n\t"
- "spm \n\t"
-#ifdef __AVR_ATmega163__
- ".word 0xFFFF \n\t"
- "nop \n\t"
-#endif
- "no_page_erase: \n\t"
- "ld r0,Y+ \n\t" //Write 2 bytes into page buffer
- "ld r1,Y+ \n\t"
-
- "wait_spm3: \n\t"
- "lds r16,%0 \n\t" //Wait for previous spm to complete
- "andi r16,1 \n\t"
- "cpi r16,1 \n\t"
- "breq wait_spm3 \n\t"
- "ldi r16,0x01 \n\t" //Load r0,r1 into FLASH page buffer
- "sts %0,r16 \n\t"
- "spm \n\t"
-
- "inc r17 \n\t" //page_word_count++
- "cpi r17,%1 \n\t"
- "brlo same_page \n\t" //Still same page in FLASH
- "write_page: \n\t"
- "clr r17 \n\t" //New page, write current one first
- "wait_spm4: \n\t"
- "lds r16,%0 \n\t" //Wait for previous spm to complete
- "andi r16,1 \n\t"
- "cpi r16,1 \n\t"
- "breq wait_spm4 \n\t"
-#ifdef __AVR_ATmega163__
- "andi r30,0x80 \n\t" // m163 requires Z6:Z1 to be zero during page write
-#endif
- "ldi r16,0x05 \n\t" //Write page pointed to by Z
- "sts %0,r16 \n\t"
- "spm \n\t"
-#ifdef __AVR_ATmega163__
- ".word 0xFFFF \n\t"
- "nop \n\t"
- "ori r30,0x7E \n\t" // recover Z6:Z1 state after page write (had to be zero during write)
-#endif
- "wait_spm5: \n\t"
- "lds r16,%0 \n\t" //Wait for previous spm to complete
- "andi r16,1 \n\t"
- "cpi r16,1 \n\t"
- "breq wait_spm5 \n\t"
- "ldi r16,0x11 \n\t" //Re-enable RWW section
- "sts %0,r16 \n\t"
- "spm \n\t"
-#ifdef __AVR_ATmega163__
- ".word 0xFFFF \n\t"
- "nop \n\t"
-#endif
- "same_page: \n\t"
- "adiw r30,2 \n\t" //Next word in FLASH
- "sbiw r24,2 \n\t" //length-2
- "breq final_write \n\t" //Finished
- "rjmp length_loop \n\t"
- "final_write: \n\t"
- "cpi r17,0 \n\t"
- "breq block_done \n\t"
- "adiw r24,2 \n\t" //length+2, fool above check on length after short page write
- "rjmp write_page \n\t"
- "block_done: \n\t"
- "clr __zero_reg__ \n\t" //restore zero register
-#if defined __AVR_ATmega168__
- : "=m" (SPMCSR) : "M" (PAGE_SIZE) : "r0","r16","r17","r24","r25","r28","r29","r30","r31"
-#else
- : "=m" (SPMCR) : "M" (PAGE_SIZE) : "r0","r16","r17","r24","r25","r28","r29","r30","r31"
-#endif
- );
- /* Should really add a wait for RWW section to be enabled, don't actually need it since we never */
- /* exit the bootloader without a power cycle anyhow */
- }
- putch(0x14);
- putch(0x10);
- } else {
- if (++error_count == MAX_ERROR_COUNT)
- app_start();
- }
- }
-
-
- /* Read memory block mode, length is big endian. */
- else if(ch=='t') {
- length.byte[1] = getch();
- length.byte[0] = getch();
-#if defined __AVR_ATmega128__
- if (address.word>0x7FFF) flags.rampz = 1; // No go with m256, FIXME
- else flags.rampz = 0;
-#endif
- if (getch() == 'E') flags.eeprom = 1;
- else {
- flags.eeprom = 0;
- address.word = address.word << 1; // address * 2 -> byte location
- }
- if (getch() == ' ') { // Command terminator
- putch(0x14);
- for (w=0;w < length.word;w++) { // Can handle odd and even lengths okay
- if (flags.eeprom) { // Byte access EEPROM read
-#ifdef __AVR_ATmega168__
- while(EECR & (1<<EEPE));
- EEAR = (uint16_t)(void *)address.word;
- EECR |= (1<<EERE);
- putch(EEDR);
-#else
- putch(eeprom_read_byte((void *)address.word));
-#endif
- address.word++;
- }
- else {
-
- if (!flags.rampz) putch(pgm_read_byte_near(address.word));
-#if defined __AVR_ATmega128__
- else putch(pgm_read_byte_far(address.word + 0x10000));
- // Hmmmm, yuck FIXME when m256 arrvies
-#endif
- address.word++;
- }
- }
- putch(0x10);
- }
- }
-
-
- /* Get device signature bytes */
- else if(ch=='u') {
- if (getch() == ' ') {
- putch(0x14);
- putch(SIG1);
- putch(SIG2);
- putch(SIG3);
- putch(0x10);
- } else {
- if (++error_count == MAX_ERROR_COUNT)
- app_start();
- }
- }
-
-
- /* Read oscillator calibration byte */
- else if(ch=='v') {
- byte_response(0x00);
- }
-
-
-#ifdef MONITOR
-
- /* here come the extended monitor commands by Erik Lins */
-
- /* check for three times exclamation mark pressed */
- else if(ch=='!') {
- ch = getch();
- if(ch=='!') {
- ch = getch();
- if(ch=='!') {
-
-#ifdef __AVR_ATmega128__
- uint16_t extaddr;
-#endif
- uint8_t addrl, addrh;
-
-#ifdef CRUMB128
- PGM_P welcome = {"ATmegaBOOT / Crumb128 - (C) J.P.Kyle, E.Lins - 050815\n\r"};
-#elif defined PROBOMEGA128
- PGM_P welcome = {"ATmegaBOOT / PROBOmega128 - (C) J.P.Kyle, E.Lins - 050815\n\r"};
-#elif defined SAVVY128
- PGM_P welcome = {"ATmegaBOOT / Savvy128 - (C) J.P.Kyle, E.Lins - 050815\n\r"};
-#endif
-
- /* turn on LED */
- LED_DDR |= _BV(LED);
- LED_PORT &= ~_BV(LED);
-
- /* print a welcome message and command overview */
- for(i=0; welcome[i] != '\0'; ++i) {
- putch(welcome[i]);
- }
-
- /* test for valid commands */
- for(;;) {
- putch('\n');
- putch('\r');
- putch(':');
- putch(' ');
-
- ch = getch();
- putch(ch);
-
- /* toggle LED */
- if(ch == 't') {
- if(bit_is_set(LED_PIN,LED)) {
- LED_PORT &= ~_BV(LED);
- putch('1');
- } else {
- LED_PORT |= _BV(LED);
- putch('0');
- }
-
- }
-
- /* read byte from address */
- else if(ch == 'r') {
- ch = getch(); putch(ch);
- addrh = gethex();
- addrl = gethex();
- putch('=');
- ch = *(uint8_t *)((addrh << 8) + addrl);
- puthex(ch);
- }
-
- /* write a byte to address */
- else if(ch == 'w') {
- ch = getch(); putch(ch);
- addrh = gethex();
- addrl = gethex();
- ch = getch(); putch(ch);
- ch = gethex();
- *(uint8_t *)((addrh << 8) + addrl) = ch;
-
- }
-
- /* read from uart and echo back */
- else if(ch == 'u') {
- for(;;) {
- putch(getch());
- }
- }
-#ifdef __AVR_ATmega128__
- /* external bus loop */
- else if(ch == 'b') {
- putch('b');
- putch('u');
- putch('s');
- MCUCR = 0x80;
- XMCRA = 0;
- XMCRB = 0;
- extaddr = 0x1100;
- for(;;) {
- ch = *(volatile uint8_t *)extaddr;
- if(++extaddr == 0) {
- extaddr = 0x1100;
- }
- }
- }
-#endif
-
- else if(ch == 'j') {
- app_start();
- }
-
- }
- /* end of monitor functions */
-
- }
- }
- }
- /* end of monitor */
-#endif
- else if (++error_count == MAX_ERROR_COUNT) {
- app_start();
- }
- }
- /* end of forever loop */
-
-}
-
-
-char gethex(void) {
- char ah,al;
-
- ah = getch(); putch(ah);
- al = getch(); putch(al);
- if(ah >= 'a') {
- ah = ah - 'a' + 0x0a;
- } else if(ah >= '0') {
- ah -= '0';
- }
- if(al >= 'a') {
- al = al - 'a' + 0x0a;
- } else if(al >= '0') {
- al -= '0';
- }
- return (ah << 4) + al;
-}
-
-
-void puthex(char ch) {
- char ah,al;
-
- ah = (ch & 0xf0) >> 4;
- if(ah >= 0x0a) {
- ah = ah - 0x0a + 'a';
- } else {
- ah += '0';
- }
- al = (ch & 0x0f);
- if(al >= 0x0a) {
- al = al - 0x0a + 'a';
- } else {
- al += '0';
- }
- putch(ah);
- putch(al);
-}
-
-
-void putch(char ch)
-{
-#ifdef __AVR_ATmega128__
- if(bootuart == 1) {
- while (!(UCSR0A & _BV(UDRE0)));
- UDR0 = ch;
- }
- else if (bootuart == 2) {
- while (!(UCSR1A & _BV(UDRE1)));
- UDR1 = ch;
- }
-#elif defined __AVR_ATmega168__
- while (!(UCSR0A & _BV(UDRE0)));
- UDR0 = ch;
-#else
- /* m8,16,32,169,8515,8535,163 */
- while (!(UCSRA & _BV(UDRE)));
- UDR = ch;
-#endif
-}
-
-
-char getch(void)
-{
-#ifdef __AVR_ATmega128__
- if(bootuart == 1) {
- while(!(UCSR0A & _BV(RXC0)));
- return UDR0;
- }
- else if(bootuart == 2) {
- while(!(UCSR1A & _BV(RXC1)));
- return UDR1;
- }
- return 0;
-#elif defined __AVR_ATmega168__
- uint32_t count = 0;
- while(!(UCSR0A & _BV(RXC0))){
- /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/
- /* HACKME:: here is a good place to count times*/
- count++;
- if (count > MAX_TIME_COUNT)
- app_start();
- }
- return UDR0;
-#else
- /* m8,16,32,169,8515,8535,163 */
- uint32_t count = 0;
- while(!(UCSRA & _BV(RXC))){
- /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/
- /* HACKME:: here is a good place to count times*/
- count++;
- if (count > MAX_TIME_COUNT)
- app_start();
- }
- return UDR;
-#endif
-}
-
-
-void getNch(uint8_t count)
-{
- uint8_t i;
- for(i=0;i<count;i++) {
-#ifdef __AVR_ATmega128__
- if(bootuart == 1) {
- while(!(UCSR0A & _BV(RXC0)));
- UDR0;
- }
- else if(bootuart == 2) {
- while(!(UCSR1A & _BV(RXC1)));
- UDR1;
- }
-#elif defined __AVR_ATmega168__
- while(!(UCSR0A & _BV(RXC0)));
- UDR0;
-#else
- /* m8,16,32,169,8515,8535,163 */
- /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/
- //while(!(UCSRA & _BV(RXC)));
- //UDR;
- uint8_t i;
- for(i=0;i<count;i++) {
- getch(); // need to handle time out
- }
-#endif
- }
-}
-
-
-void byte_response(uint8_t val)
-{
- if (getch() == ' ') {
- putch(0x14);
- putch(val);
- putch(0x10);
- } else {
- if (++error_count == MAX_ERROR_COUNT)
- app_start();
- }
-}
-
-
-void nothing_response(void)
-{
- if (getch() == ' ') {
- putch(0x14);
- putch(0x10);
- } else {
- if (++error_count == MAX_ERROR_COUNT)
- app_start();
- }
-}
-
-void flash_led(uint8_t count)
-{
- /* flash onboard LED three times to signal entering of bootloader */
- /* l needs to be volatile or the delay loops below might get
- optimized away if compiling with optimizations (DAM). */
- volatile uint32_t l;
-
- if (count == 0) {
- count = 3;
- }
-
- for (i = 0; i < count; ++i) {
- LED_PORT |= _BV(LED);
- for(l = 0; l < (F_CPU / 1000); ++l);
- LED_PORT &= ~_BV(LED);
- for(l = 0; l < (F_CPU / 1000); ++l);
- }
-}
-
-
-/* end of file ATmegaBOOT.c */
diff --git a/bootloaders/lilypad/src/Makefile b/bootloaders/lilypad/src/Makefile
deleted file mode 100644
index 394a88a..0000000
--- a/bootloaders/lilypad/src/Makefile
+++ /dev/null
@@ -1,83 +0,0 @@
-# Makefile for ATmegaBOOT
-# E.Lins, 18.7.2005
-
-# Instructions
-#
-# To build the bootloader for the LilyPad:
-# make lily
-
-
-# program name should not be changed...
-PROGRAM = ATmegaBOOT_168
-
-# enter the target CPU frequency
-AVR_FREQ = 8000000L
-
-# enter the parameters for the avrdude isp tool
-ISPTOOL = stk500v2
-ISPPORT = usb
-ISPSPEED = -b 115200
-
-MCU_TARGET = atmega168
-LDSECTION = --section-start=.text=0x3800
-
-# the efuse should really be 0xf8; since, however, only the lower
-# three bits of that byte are used on the atmega168, avrdude gets
-# confused if you specify 1's for the higher bits, see:
-# http://tinker.it/now/2007/02/24/the-tale-of-avrdude-atmega168-and-extended-bits-fuses/
-#
-# similarly, the lock bits should be 0xff instead of 0x3f (to
-# unlock the bootloader section) and 0xcf instead of 0x0f (to
-# lock it), but since the high two bits of the lock byte are
-# unused, avrdude would get confused.
-ISPFUSES = avrdude -c $(ISPTOOL) -p m168 -P $(ISPPORT) $(ISPSPEED) -e -u -U lock:w:0x3f:m -U efuse:w:0x00:m -U hfuse:w:0xdd:m -U lfuse:w:0xff:m
-ISPFLASH = avrdude -c $(ISPTOOL) -p m168 -P $(ISPPORT) $(ISPSPEED) -U flash:w:$(PROGRAM)_$(TARGET).hex -U lock:w:0x0f:m
-
-
-OBJ = $(PROGRAM).o
-OPTIMIZE = -O2
-
-DEFS =
-LIBS =
-
-CC = avr-gcc
-
-
-# Override is only needed by avr-lib build system.
-
-override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS)
-override LDFLAGS = -Wl,$(LDSECTION)
-#override LDFLAGS = -Wl,-Map,$(PROGRAM).map,$(LDSECTION)
-
-OBJCOPY = avr-objcopy
-OBJDUMP = avr-objdump
-
-all:
-
-lily: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>1' '-DNUM_LED_FLASHES=3'
-lily: $(PROGRAM).hex
-
-$(PROGRAM).hex: $(PROGRAM).elf
- $(OBJCOPY) -j .text -j .data -O ihex $< $@
-
-$(PROGRAM).elf: $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-$(OBJ):
- avr-gcc $(CFLAGS) $(LDFLAGS) -c -g -O2 -Wall -mmcu=atmega168 ATmegaBOOT.c -o ATmegaBOOT_168.o
-
-%.lst: %.elf
- $(OBJDUMP) -h -S $< > $@
-
-%.srec: %.elf
- $(OBJCOPY) -j .text -j .data -O srec $< $@
-
-%.bin: %.elf
- $(OBJCOPY) -j .text -j .data -O binary $< $@
-
-clean:
- rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex
-
-install:
- avrdude -p m168 -c stk500v2 -P /dev/cu.USA19H1b1P1.1 -e -u -U lock:w:0x3f:m -U efuse:w:0x00:m -U hfuse:w:0xdd:m -U lfuse:w:0xe2:m
- avrdude -p m168 -c stk500v2 -P /dev/cu.USA19H1b1P1.1 -e -u -U flash:w:ATmegaBOOT_168.hex -U lock:w:0x0f:m
diff --git a/bootloaders/optiboot/Makefile b/bootloaders/optiboot/Makefile
deleted file mode 100644
index f8d137d..0000000
--- a/bootloaders/optiboot/Makefile
+++ /dev/null
@@ -1,450 +0,0 @@
-# Makefile for ATmegaBOOT
-# E.Lins, 18.7.2005
-#
-# Instructions
-#
-# To make bootloader .hex file:
-# make diecimila
-# make lilypad
-# make ng
-# etc...
-#
-# To burn bootloader .hex file:
-# make diecimila_isp
-# make lilypad_isp
-# make ng_isp
-# etc...
-
-# program name should not be changed...
-PROGRAM = optiboot
-
-# The default behavior is to build using tools that are in the users
-# current path variables, but we can also build using an installed
-# Arduino user IDE setup, or the Arduino source tree.
-# Uncomment this next lines to build within the arduino environment,
-# using the arduino-included avrgcc toolset (mac and pc)
-# ENV ?= arduino
-# ENV ?= arduinodev
-# OS ?= macosx
-# OS ?= windows
-
-
-# enter the parameters for the avrdude isp tool
-ISPTOOL = stk500v2
-ISPPORT = usb
-ISPSPEED = -b 115200
-
-MCU_TARGET = atmega168
-LDSECTIONS = -Wl,--section-start=.text=0x3e00 -Wl,--section-start=.version=0x3ffe
-
-# Build environments
-# Start of some ugly makefile-isms to allow optiboot to be built
-# in several different environments. See the README.TXT file for
-# details.
-
-# default
-fixpath = $(1)
-
-ifeq ($(ENV), arduino)
-# For Arduino, we assume that we're connected to the optiboot directory
-# included with the arduino distribution, which means that the full set
-# of avr-tools are "right up there" in standard places.
-TOOLROOT = ../../../tools
-GCCROOT = $(TOOLROOT)/avr/bin/
-AVRDUDE_CONF = -C$(TOOLROOT)/avr/etc/avrdude.conf
-
-ifeq ($(OS), windows)
-# On windows, SOME of the tool paths will need to have backslashes instead
-# of forward slashes (because they use windows cmd.exe for execution instead
-# of a unix/mingw shell?) We also have to ensure that a consistent shell
-# is used even if a unix shell is installed (ie as part of WINAVR)
-fixpath = $(subst /,\,$1)
-SHELL = cmd.exe
-endif
-
-else ifeq ($(ENV), arduinodev)
-# Arduino IDE source code environment. Use the unpacked compilers created
-# by the build (you'll need to do "ant build" first.)
-ifeq ($(OS), macosx)
-TOOLROOT = ../../../../build/macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools
-endif
-ifeq ($(OS), windows)
-TOOLROOT = ../../../../build/windows/work/hardware/tools
-endif
-
-GCCROOT = $(TOOLROOT)/avr/bin/
-AVRDUDE_CONF = -C$(TOOLROOT)/avr/etc/avrdude.conf
-
-else
-GCCROOT =
-AVRDUDE_CONF =
-endif
-#
-# End of build environment code.
-
-
-# the efuse should really be 0xf8; since, however, only the lower
-# three bits of that byte are used on the atmega168, avrdude gets
-# confused if you specify 1's for the higher bits, see:
-# http://tinker.it/now/2007/02/24/the-tale-of-avrdude-atmega168-and-extended-bits-fuses/
-#
-# similarly, the lock bits should be 0xff instead of 0x3f (to
-# unlock the bootloader section) and 0xcf instead of 0x2f (to
-# lock it), but since the high two bits of the lock byte are
-# unused, avrdude would get confused.
-
-ISPFUSES = $(GCCROOT)avrdude $(AVRDUDE_CONF) -c $(ISPTOOL) \
- -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
- -e -u -U lock:w:0x3f:m -U efuse:w:0x$(EFUSE):m \
- -U hfuse:w:0x$(HFUSE):m -U lfuse:w:0x$(LFUSE):m
-ISPFLASH = $(GCCROOT)avrdude $(AVRDUDE_CONF) -c $(ISPTOOL) \
- -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
- -U flash:w:$(PROGRAM)_$(TARGET).hex -U lock:w:0x2f:m
-
-STK500 = "C:\Program Files\Atmel\AVR Tools\STK500\Stk500.exe"
-STK500-1 = $(STK500) -e -d$(MCU_TARGET) -pf -vf -if$(PROGRAM)_$(TARGET).hex \
--lFF -LFF -f$(HFUSE)$(LFUSE) -EF8 -ms -q -cUSB -I200kHz -s -wt
-STK500-2 = $(STK500) -d$(MCU_TARGET) -ms -q -lCF -LCF -cUSB -I200kHz -s -wt
-
-OBJ = $(PROGRAM).o
-OPTIMIZE = -Os -fno-inline-small-functions -fno-split-wide-types -mshort-calls
-
-DEFS =
-LIBS =
-
-CC = $(GCCROOT)avr-gcc
-
-# Override is only needed by avr-lib build system.
-
-override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS)
-override LDFLAGS = $(LDSECTIONS) -Wl,--relax -Wl,--gc-sections -nostartfiles -nostdlib
-
-OBJCOPY = $(GCCROOT)avr-objcopy
-OBJDUMP = $(call fixpath,$(GCCROOT)avr-objdump)
-
-SIZE = $(GCCROOT)avr-size
-
-# Test platforms
-# Virtual boot block test
-virboot328: TARGET = atmega328
-virboot328: MCU_TARGET = atmega328p
-virboot328: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' '-DVIRTUAL_BOOT'
-virboot328: AVR_FREQ = 16000000L
-virboot328: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
-virboot328: $(PROGRAM)_atmega328.hex
-virboot328: $(PROGRAM)_atmega328.lst
-
-# 20MHz clocked platforms
-#
-# These are capable of 230400 baud, or 115200 baud on PC (Arduino Avrdude issue)
-#
-
-pro20: TARGET = pro_20mhz
-pro20: MCU_TARGET = atmega168
-pro20: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
-pro20: AVR_FREQ = 20000000L
-pro20: $(PROGRAM)_pro_20mhz.hex
-pro20: $(PROGRAM)_pro_20mhz.lst
-
-pro20_isp: pro20
-pro20_isp: TARGET = pro_20mhz
-# 2.7V brownout
-pro20_isp: HFUSE = DD
-# Full swing xtal (20MHz) 258CK/14CK+4.1ms
-pro20_isp: LFUSE = C6
-# 512 byte boot
-pro20_isp: EFUSE = 04
-pro20_isp: isp
-
-# 16MHz clocked platforms
-#
-# These are capable of 230400 baud, or 115200 baud on PC (Arduino Avrdude issue)
-#
-
-pro16: TARGET = pro_16MHz
-pro16: MCU_TARGET = atmega168
-pro16: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
-pro16: AVR_FREQ = 16000000L
-pro16: $(PROGRAM)_pro_16MHz.hex
-pro16: $(PROGRAM)_pro_16MHz.lst
-
-pro16_isp: pro16
-pro16_isp: TARGET = pro_16MHz
-# 2.7V brownout
-pro16_isp: HFUSE = DD
-# Full swing xtal (20MHz) 258CK/14CK+4.1ms
-pro16_isp: LFUSE = C6
-# 512 byte boot
-pro16_isp: EFUSE = 04
-pro16_isp: isp
-
-# Diecimila, Duemilanove with m168, and NG use identical bootloaders
-# Call it "atmega168" for generality and clarity, keep "diecimila" for
-# backward compatibility of makefile
-#
-atmega168: TARGET = atmega168
-atmega168: MCU_TARGET = atmega168
-atmega168: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
-atmega168: AVR_FREQ = 16000000L
-atmega168: $(PROGRAM)_atmega168.hex
-atmega168: $(PROGRAM)_atmega168.lst
-
-atmega168_isp: atmega168
-atmega168_isp: TARGET = atmega168
-# 2.7V brownout
-atmega168_isp: HFUSE = DD
-# Low power xtal (16MHz) 16KCK/14CK+65ms
-atmega168_isp: LFUSE = FF
-# 512 byte boot
-atmega168_isp: EFUSE = 04
-atmega168_isp: isp
-
-diecimila: TARGET = diecimila
-diecimila: MCU_TARGET = atmega168
-diecimila: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
-diecimila: AVR_FREQ = 16000000L
-diecimila: $(PROGRAM)_diecimila.hex
-diecimila: $(PROGRAM)_diecimila.lst
-
-diecimila_isp: diecimila
-diecimila_isp: TARGET = diecimila
-# 2.7V brownout
-diecimila_isp: HFUSE = DD
-# Low power xtal (16MHz) 16KCK/14CK+65ms
-diecimila_isp: LFUSE = FF
-# 512 byte boot
-diecimila_isp: EFUSE = 04
-diecimila_isp: isp
-
-atmega328: TARGET = atmega328
-atmega328: MCU_TARGET = atmega328p
-atmega328: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
-atmega328: AVR_FREQ = 16000000L
-atmega328: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
-atmega328: $(PROGRAM)_atmega328.hex
-atmega328: $(PROGRAM)_atmega328.lst
-
-atmega328_isp: atmega328
-atmega328_isp: TARGET = atmega328
-atmega328_isp: MCU_TARGET = atmega328p
-# 512 byte boot, SPIEN
-atmega328_isp: HFUSE = DE
-# Low power xtal (16MHz) 16KCK/14CK+65ms
-atmega328_isp: LFUSE = FF
-# 2.7V brownout
-atmega328_isp: EFUSE = 05
-atmega328_isp: isp
-
-# Sanguino has a minimum boot size of 1024 bytes, so enable extra functions
-#
-sanguino: TARGET = atmega644p
-sanguino: MCU_TARGET = atmega644p
-sanguino: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' '-DBIGBOOT'
-sanguino: AVR_FREQ = 16000000L
-sanguino: LDSECTIONS = -Wl,--section-start=.text=0xfc00
-sanguino: $(PROGRAM)_atmega644p.hex
-sanguino: $(PROGRAM)_atmega644p.lst
-
-sanguino_isp: sanguino
-sanguino_isp: TARGET = atmega644p
-sanguino_isp: MCU_TARGET = atmega644p
-# 1024 byte boot
-sanguino_isp: HFUSE = DE
-# Low power xtal (16MHz) 16KCK/14CK+65ms
-sanguino_isp: LFUSE = FF
-# 2.7V brownout
-sanguino_isp: EFUSE = 05
-sanguino_isp: isp
-
-# Mega has a minimum boot size of 1024 bytes, so enable extra functions
-#mega: TARGET = atmega1280
-mega: MCU_TARGET = atmega1280
-mega: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' '-DBIGBOOT'
-mega: AVR_FREQ = 16000000L
-mega: LDSECTIONS = -Wl,--section-start=.text=0x1fc00
-mega: $(PROGRAM)_atmega1280.hex
-mega: $(PROGRAM)_atmega1280.lst
-
-mega_isp: mega
-mega_isp: TARGET = atmega1280
-mega_isp: MCU_TARGET = atmega1280
-# 1024 byte boot
-mega_isp: HFUSE = DE
-# Low power xtal (16MHz) 16KCK/14CK+65ms
-mega_isp: LFUSE = FF
-# 2.7V brownout
-mega_isp: EFUSE = 05
-mega_isp: isp
-
-# ATmega8
-#
-atmega8: TARGET = atmega8
-atmega8: MCU_TARGET = atmega8
-atmega8: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
-atmega8: AVR_FREQ = 16000000L
-atmega8: LDSECTIONS = -Wl,--section-start=.text=0x1e00 -Wl,--section-start=.version=0x1ffe
-atmega8: $(PROGRAM)_atmega8.hex
-atmega8: $(PROGRAM)_atmega8.lst
-
-atmega8_isp: atmega8
-atmega8_isp: TARGET = atmega8
-atmega8_isp: MCU_TARGET = atmega8
-# SPIEN, CKOPT, Bootsize=512B
-atmega8_isp: HFUSE = CC
-# 2.7V brownout, Low power xtal (16MHz) 16KCK/14CK+65ms
-atmega8_isp: LFUSE = BF
-atmega8_isp: isp
-
-# ATmega88
-#
-atmega88: TARGET = atmega88
-atmega88: MCU_TARGET = atmega88
-atmega88: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
-atmega88: AVR_FREQ = 16000000L
-atmega88: LDSECTIONS = -Wl,--section-start=.text=0x1e00 -Wl,--section-start=.version=0x1ffe
-atmega88: $(PROGRAM)_atmega88.hex
-atmega88: $(PROGRAM)_atmega88.lst
-
-atmega88_isp: atmega88
-atmega88_isp: TARGET = atmega88
-atmega88_isp: MCU_TARGET = atmega88
-# 2.7V brownout
-atmega88_isp: HFUSE = DD
-# Low power xtal (16MHz) 16KCK/14CK+65ms
-atemga88_isp: LFUSE = FF
-# 512 byte boot
-atmega88_isp: EFUSE = 04
-atmega88_isp: isp
-
-
-# 8MHz clocked platforms
-#
-# These are capable of 115200 baud
-#
-
-lilypad: TARGET = lilypad
-lilypad: MCU_TARGET = atmega168
-lilypad: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
-lilypad: AVR_FREQ = 8000000L
-lilypad: $(PROGRAM)_lilypad.hex
-lilypad: $(PROGRAM)_lilypad.lst
-
-lilypad_isp: lilypad
-lilypad_isp: TARGET = lilypad
-# 2.7V brownout
-lilypad_isp: HFUSE = DD
-# Internal 8MHz osc (8MHz) Slow rising power
-lilypad_isp: LFUSE = E2
-# 512 byte boot
-lilypad_isp: EFUSE = 04
-lilypad_isp: isp
-
-lilypad_resonator: TARGET = lilypad_resonator
-lilypad_resonator: MCU_TARGET = atmega168
-lilypad_resonator: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
-lilypad_resonator: AVR_FREQ = 8000000L
-lilypad_resonator: $(PROGRAM)_lilypad_resonator.hex
-lilypad_resonator: $(PROGRAM)_lilypad_resonator.lst
-
-lilypad_resonator_isp: lilypad_resonator
-lilypad_resonator_isp: TARGET = lilypad_resonator
-# 2.7V brownout
-lilypad_resonator_isp: HFUSE = DD
-# Full swing xtal (20MHz) 258CK/14CK+4.1ms
-lilypad_resonator_isp: LFUSE = C6
-# 512 byte boot
-lilypad_resonator_isp: EFUSE = 04
-lilypad_resonator_isp: isp
-
-pro8: TARGET = pro_8MHz
-pro8: MCU_TARGET = atmega168
-pro8: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
-pro8: AVR_FREQ = 8000000L
-pro8: $(PROGRAM)_pro_8MHz.hex
-pro8: $(PROGRAM)_pro_8MHz.lst
-
-pro8_isp: pro8
-pro8_isp: TARGET = pro_8MHz
-# 2.7V brownout
-pro8_isp: HFUSE = DD
-# Full swing xtal (20MHz) 258CK/14CK+4.1ms
-pro8_isp: LFUSE = C6
-# 512 byte boot
-pro8_isp: EFUSE = 04
-pro8_isp: isp
-
-atmega328_pro8: TARGET = atmega328_pro_8MHz
-atmega328_pro8: MCU_TARGET = atmega328p
-atmega328_pro8: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
-atmega328_pro8: AVR_FREQ = 8000000L
-atmega328_pro8: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
-atmega328_pro8: $(PROGRAM)_atmega328_pro_8MHz.hex
-atmega328_pro8: $(PROGRAM)_atmega328_pro_8MHz.lst
-
-atmega328_pro8_isp: atmega328_pro8
-atmega328_pro8_isp: TARGET = atmega328_pro_8MHz
-atmega328_pro8_isp: MCU_TARGET = atmega328p
-# 512 byte boot, SPIEN
-atmega328_pro8_isp: HFUSE = DE
-# Low power xtal (16MHz) 16KCK/14CK+65ms
-atmega328_pro8_isp: LFUSE = FF
-# 2.7V brownout
-atmega328_pro8_isp: EFUSE = 05
-atmega328_pro8_isp: isp
-
-# 1MHz clocked platforms
-#
-# These are capable of 9600 baud
-#
-
-luminet: TARGET = luminet
-luminet: MCU_TARGET = attiny84
-luminet: CFLAGS += '-DLED_START_FLASHES=3' '-DSOFT_UART' '-DBAUD_RATE=9600'
-luminet: CFLAGS += '-DVIRTUAL_BOOT_PARTITION'
-luminet: AVR_FREQ = 1000000L
-luminet: LDSECTIONS = -Wl,--section-start=.text=0x1d00 -Wl,--section-start=.version=0x1efe
-luminet: $(PROGRAM)_luminet.hex
-luminet: $(PROGRAM)_luminet.lst
-
-luminet_isp: luminet
-luminet_isp: TARGET = luminet
-luminet_isp: MCU_TARGET = attiny84
-# Brownout disabled
-luminet_isp: HFUSE = DF
-# 1MHz internal oscillator, slowly rising power
-luminet_isp: LFUSE = 62
-# Self-programming enable
-luminet_isp: EFUSE = FE
-luminet_isp: isp
-
-#
-# Generic build instructions
-#
-#
-
-isp: $(TARGET)
- $(ISPFUSES)
- $(ISPFLASH)
-
-isp-stk500: $(PROGRAM)_$(TARGET).hex
- $(STK500-1)
- $(STK500-2)
-
-%.elf: $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
- $(SIZE) $@
-
-clean:
- rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex
-
-%.lst: %.elf
- $(OBJDUMP) -h -S $< > $@
-
-%.hex: %.elf
- $(OBJCOPY) -j .text -j .data -j .version --set-section-flags .version=alloc,load -O ihex $< $@
-
-%.srec: %.elf
- $(OBJCOPY) -j .text -j .data -j .version --set-section-flags .version=alloc,load -O srec $< $@
-
-%.bin: %.elf
- $(OBJCOPY) -j .text -j .data -j .version --set-section-flags .version=alloc,load -O binary $< $@
diff --git a/bootloaders/optiboot/README.TXT b/bootloaders/optiboot/README.TXT
deleted file mode 100644
index cd79cd9..0000000
--- a/bootloaders/optiboot/README.TXT
+++ /dev/null
@@ -1,81 +0,0 @@
-This directory contains the Optiboot small bootloader for AVR
-microcontrollers, somewhat modified specifically for the Arduino
-environment.
-
-Optiboot is more fully described here: http://code.google.com/p/optiboot/
-and is the work of Peter Knight (aka Cathedrow), building on work of Jason P
-Kyle, Spiff, and Ladyada. Arduino-specific modification are by Bill
-Westfield (aka WestfW)
-
-Arduino-specific issues are tracked as part of the Arduino project
-at http://code.google.com/p/arduino
-
-
-------------------------------------------------------------
-Building optiboot for Arduino.
-
-Production builds of optiboot for Arduino are done on a Mac in "unix mode"
-using CrossPack-AVR-20100115. CrossPack tracks WINAVR (for windows), which
-is just a package of avr-gcc and related utilities, so similar builds should
-work on Windows or Linux systems.
-
-One of the Arduino-specific changes is modifications to the makefile to
-allow building optiboot using only the tools installed as part of the
-Arduino environment, or the Arduino source development tree. All three
-build procedures should yield identical binaries (.hex files) (although
-this may change if compiler versions drift apart between CrossPack and
-the Arduino IDE.)
-
-
-Building Optiboot in the Arduino IDE Install.
-
-Work in the .../hardware/arduino/bootloaders/optiboot/ and use the
-"omake <targets>" command, which just generates a command that uses
-the arduino-included "make" utility with a command like:
- make OS=windows ENV=arduino <targets>
-or make OS=macosx ENV=arduino <targets>
-On windows, this assumes you're using the windows command shell. If
-you're using a cygwin or mingw shell, or have one of those in your
-path, the build will probably break due to slash vs backslash issues.
-On a Mac, if you have the developer tools installed, you can use the
-Apple-supplied version of make.
-The makefile uses relative paths ("../../../tools/" and such) to find
-the programs it needs, so you need to work in the existing optiboot
-directory (or something created at the same "level") for it to work.
-
-
-Building Optiboot in the Arduino Source Development Install.
-
-In this case, there is no special shell script, and you're assumed to
-have "make" installed somewhere in your path.
-Build the Arduino source ("ant build") to unpack the tools into the
-expected directory.
-Work in Arduino/hardware/arduino/bootloaders/optiboot and use
- make OS=windows ENV=arduinodev <targets>
-or make OS=macosx ENV=arduinodev <targets>
-
-
-Programming Chips Using the _isp Targets
-
-The CPU targets have corresponding ISP targets that will actuall
-program the bootloader into a chip. "atmega328_isp" for the atmega328,
-for example. These will set the fuses and lock bits as appropriate as
-well as uploading the bootloader code.
-
-The makefiles default to using a USB programmer, but you can use
-a serial programmer like ArduinoISP by changing the appropriate
-variables when you invoke make:
-
- make ISPTOOL=stk500v1 ISPPORT=/dev/tty.usbserial-A20e1eAN \
- ISPSPEED=-b19200 atmega328_isp
-
-The "atmega8_isp" target does not currently work, because the mega8
-doesn't have the "extended" fuse that the generic ISP target wants to
-pass on to avrdude. You'll need to run avrdude manually.
-
-
-Standard Targets
-
-I've reduced the pre-built and source-version-controlled targets
-(.hex and .lst files included in the git repository) to just the
-three basic 16MHz targets: atmega8, atmega16, atmega328.
diff --git a/bootloaders/optiboot/boot.h b/bootloaders/optiboot/boot.h
deleted file mode 100644
index 71170a5..0000000
--- a/bootloaders/optiboot/boot.h
+++ /dev/null
@@ -1,846 +0,0 @@
-/* Modified to use out for SPM access
-** Peter Knight, Optiboot project http://optiboot.googlecode.com
-**
-** Todo: Tidy up
-**
-** "_short" routines execute 1 cycle faster and use 1 less word of flash
-** by using "out" instruction instead of "sts".
-**
-** Additional elpm variants that trust the value of RAMPZ
-*/
-
-/* Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007 Eric B. Weddington
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
- * Neither the name of the copyright holders nor the names of
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE. */
-
-#ifndef _AVR_BOOT_H_
-#define _AVR_BOOT_H_ 1
-
-/** \file */
-/** \defgroup avr_boot <avr/boot.h>: Bootloader Support Utilities
- \code
- #include <avr/io.h>
- #include <avr/boot.h>
- \endcode
-
- The macros in this module provide a C language interface to the
- bootloader support functionality of certain AVR processors. These
- macros are designed to work with all sizes of flash memory.
-
- Global interrupts are not automatically disabled for these macros. It
- is left up to the programmer to do this. See the code example below.
- Also see the processor datasheet for caveats on having global interrupts
- enabled during writing of the Flash.
-
- \note Not all AVR processors provide bootloader support. See your
- processor datasheet to see if it provides bootloader support.
-
- \todo From email with Marek: On smaller devices (all except ATmega64/128),
- __SPM_REG is in the I/O space, accessible with the shorter "in" and "out"
- instructions - since the boot loader has a limited size, this could be an
- important optimization.
-
- \par API Usage Example
- The following code shows typical usage of the boot API.
-
- \code
- #include <inttypes.h>
- #include <avr/interrupt.h>
- #include <avr/pgmspace.h>
-
- void boot_program_page (uint32_t page, uint8_t *buf)
- {
- uint16_t i;
- uint8_t sreg;
-
- // Disable interrupts.
-
- sreg = SREG;
- cli();
-
- eeprom_busy_wait ();
-
- boot_page_erase (page);
- boot_spm_busy_wait (); // Wait until the memory is erased.
-
- for (i=0; i<SPM_PAGESIZE; i+=2)
- {
- // Set up little-endian word.
-
- uint16_t w = *buf++;
- w += (*buf++) << 8;
-
- boot_page_fill (page + i, w);
- }
-
- boot_page_write (page); // Store buffer in flash page.
- boot_spm_busy_wait(); // Wait until the memory is written.
-
- // Reenable RWW-section again. We need this if we want to jump back
- // to the application after bootloading.
-
- boot_rww_enable ();
-
- // Re-enable interrupts (if they were ever enabled).
-
- SREG = sreg;
- }\endcode */
-
-#include <avr/eeprom.h>
-#include <avr/io.h>
-#include <inttypes.h>
-#include <limits.h>
-
-/* Check for SPM Control Register in processor. */
-#if defined (SPMCSR)
-# define __SPM_REG SPMCSR
-#elif defined (SPMCR)
-# define __SPM_REG SPMCR
-#else
-# error AVR processor does not provide bootloader support!
-#endif
-
-
-/* Check for SPM Enable bit. */
-#if defined(SPMEN)
-# define __SPM_ENABLE SPMEN
-#elif defined(SELFPRGEN)
-# define __SPM_ENABLE SELFPRGEN
-#else
-# error Cannot find SPM Enable bit definition!
-#endif
-
-/** \ingroup avr_boot
- \def BOOTLOADER_SECTION
-
- Used to declare a function or variable to be placed into a
- new section called .bootloader. This section and its contents
- can then be relocated to any address (such as the bootloader
- NRWW area) at link-time. */
-
-#define BOOTLOADER_SECTION __attribute__ ((section (".bootloader")))
-
-/* Create common bit definitions. */
-#ifdef ASB
-#define __COMMON_ASB ASB
-#else
-#define __COMMON_ASB RWWSB
-#endif
-
-#ifdef ASRE
-#define __COMMON_ASRE ASRE
-#else
-#define __COMMON_ASRE RWWSRE
-#endif
-
-/* Define the bit positions of the Boot Lock Bits. */
-
-#define BLB12 5
-#define BLB11 4
-#define BLB02 3
-#define BLB01 2
-
-/** \ingroup avr_boot
- \def boot_spm_interrupt_enable()
- Enable the SPM interrupt. */
-
-#define boot_spm_interrupt_enable() (__SPM_REG |= (uint8_t)_BV(SPMIE))
-
-/** \ingroup avr_boot
- \def boot_spm_interrupt_disable()
- Disable the SPM interrupt. */
-
-#define boot_spm_interrupt_disable() (__SPM_REG &= (uint8_t)~_BV(SPMIE))
-
-/** \ingroup avr_boot
- \def boot_is_spm_interrupt()
- Check if the SPM interrupt is enabled. */
-
-#define boot_is_spm_interrupt() (__SPM_REG & (uint8_t)_BV(SPMIE))
-
-/** \ingroup avr_boot
- \def boot_rww_busy()
- Check if the RWW section is busy. */
-
-#define boot_rww_busy() (__SPM_REG & (uint8_t)_BV(__COMMON_ASB))
-
-/** \ingroup avr_boot
- \def boot_spm_busy()
- Check if the SPM instruction is busy. */
-
-#define boot_spm_busy() (__SPM_REG & (uint8_t)_BV(__SPM_ENABLE))
-
-/** \ingroup avr_boot
- \def boot_spm_busy_wait()
- Wait while the SPM instruction is busy. */
-
-#define boot_spm_busy_wait() do{}while(boot_spm_busy())
-
-#define __BOOT_PAGE_ERASE (_BV(__SPM_ENABLE) | _BV(PGERS))
-#define __BOOT_PAGE_WRITE (_BV(__SPM_ENABLE) | _BV(PGWRT))
-#define __BOOT_PAGE_FILL _BV(__SPM_ENABLE)
-#define __BOOT_RWW_ENABLE (_BV(__SPM_ENABLE) | _BV(__COMMON_ASRE))
-#define __BOOT_LOCK_BITS_SET (_BV(__SPM_ENABLE) | _BV(BLBSET))
-
-#define __boot_page_fill_short(address, data) \
-(__extension__({ \
- __asm__ __volatile__ \
- ( \
- "movw r0, %3\n\t" \
- "out %0, %1\n\t" \
- "spm\n\t" \
- "clr r1\n\t" \
- : \
- : "i" (_SFR_IO_ADDR(__SPM_REG)), \
- "r" ((uint8_t)__BOOT_PAGE_FILL), \
- "z" ((uint16_t)address), \
- "r" ((uint16_t)data) \
- : "r0" \
- ); \
-}))
-
-#define __boot_page_fill_normal(address, data) \
-(__extension__({ \
- __asm__ __volatile__ \
- ( \
- "movw r0, %3\n\t" \
- "sts %0, %1\n\t" \
- "spm\n\t" \
- "clr r1\n\t" \
- : \
- : "i" (_SFR_MEM_ADDR(__SPM_REG)), \
- "r" ((uint8_t)__BOOT_PAGE_FILL), \
- "z" ((uint16_t)address), \
- "r" ((uint16_t)data) \
- : "r0" \
- ); \
-}))
-
-#define __boot_page_fill_alternate(address, data)\
-(__extension__({ \
- __asm__ __volatile__ \
- ( \
- "movw r0, %3\n\t" \
- "sts %0, %1\n\t" \
- "spm\n\t" \
- ".word 0xffff\n\t" \
- "nop\n\t" \
- "clr r1\n\t" \
- : \
- : "i" (_SFR_MEM_ADDR(__SPM_REG)), \
- "r" ((uint8_t)__BOOT_PAGE_FILL), \
- "z" ((uint16_t)address), \
- "r" ((uint16_t)data) \
- : "r0" \
- ); \
-}))
-
-#define __boot_page_fill_extended(address, data) \
-(__extension__({ \
- __asm__ __volatile__ \
- ( \
- "movw r0, %4\n\t" \
- "movw r30, %A3\n\t" \
- "sts %1, %C3\n\t" \
- "sts %0, %2\n\t" \
- "spm\n\t" \
- "clr r1\n\t" \
- : \
- : "i" (_SFR_MEM_ADDR(__SPM_REG)), \
- "i" (_SFR_MEM_ADDR(RAMPZ)), \
- "r" ((uint8_t)__BOOT_PAGE_FILL), \
- "r" ((uint32_t)address), \
- "r" ((uint16_t)data) \
- : "r0", "r30", "r31" \
- ); \
-}))
-
-#define __boot_page_fill_extended_short(address, data) \
-(__extension__({ \
- __asm__ __volatile__ \
- ( \
- "movw r0, %4\n\t" \
- "movw r30, %A3\n\t" \
- "out %1, %C3\n\t" \
- "out %0, %2\n\t" \
- "spm\n\t" \
- "clr r1\n\t" \
- : \
- : "i" (_SFR_IO_ADDR(__SPM_REG)), \
- "i" (_SFR_IO_ADDR(RAMPZ)), \
- "r" ((uint8_t)__BOOT_PAGE_FILL), \
- "r" ((uint32_t)address), \
- "r" ((uint16_t)data) \
- : "r0", "r30", "r31" \
- ); \
-}))
-
-#define __boot_page_erase_short(address) \
-(__extension__({ \
- __asm__ __volatile__ \
- ( \
- "out %0, %1\n\t" \
- "spm\n\t" \
- : \
- : "i" (_SFR_IO_ADDR(__SPM_REG)), \
- "r" ((uint8_t)__BOOT_PAGE_ERASE), \
- "z" ((uint16_t)address) \
- ); \
-}))
-
-
-#define __boot_page_erase_normal(address) \
-(__extension__({ \
- __asm__ __volatile__ \
- ( \
- "sts %0, %1\n\t" \
- "spm\n\t" \
- : \
- : "i" (_SFR_MEM_ADDR(__SPM_REG)), \
- "r" ((uint8_t)__BOOT_PAGE_ERASE), \
- "z" ((uint16_t)address) \
- ); \
-}))
-
-#define __boot_page_erase_alternate(address) \
-(__extension__({ \
- __asm__ __volatile__ \
- ( \
- "sts %0, %1\n\t" \
- "spm\n\t" \
- ".word 0xffff\n\t" \
- "nop\n\t" \
- : \
- : "i" (_SFR_MEM_ADDR(__SPM_REG)), \
- "r" ((uint8_t)__BOOT_PAGE_ERASE), \
- "z" ((uint16_t)address) \
- ); \
-}))
-
-#define __boot_page_erase_extended(address) \
-(__extension__({ \
- __asm__ __volatile__ \
- ( \
- "movw r30, %A3\n\t" \
- "sts %1, %C3\n\t" \
- "sts %0, %2\n\t" \
- "spm\n\t" \
- : \
- : "i" (_SFR_MEM_ADDR(__SPM_REG)), \
- "i" (_SFR_MEM_ADDR(RAMPZ)), \
- "r" ((uint8_t)__BOOT_PAGE_ERASE), \
- "r" ((uint32_t)address) \
- : "r30", "r31" \
- ); \
-}))
-#define __boot_page_erase_extended_short(address) \
-(__extension__({ \
- __asm__ __volatile__ \
- ( \
- "movw r30, %A3\n\t" \
- "out %1, %C3\n\t" \
- "out %0, %2\n\t" \
- "spm\n\t" \
- : \
- : "i" (_SFR_IO_ADDR(__SPM_REG)), \
- "i" (_SFR_IO_ADDR(RAMPZ)), \
- "r" ((uint8_t)__BOOT_PAGE_ERASE), \
- "r" ((uint32_t)address) \
- : "r30", "r31" \
- ); \
-}))
-
-#define __boot_page_write_short(address) \
-(__extension__({ \
- __asm__ __volatile__ \
- ( \
- "out %0, %1\n\t" \
- "spm\n\t" \
- : \
- : "i" (_SFR_IO_ADDR(__SPM_REG)), \
- "r" ((uint8_t)__BOOT_PAGE_WRITE), \
- "z" ((uint16_t)address) \
- ); \
-}))
-
-#define __boot_page_write_normal(address) \
-(__extension__({ \
- __asm__ __volatile__ \
- ( \
- "sts %0, %1\n\t" \
- "spm\n\t" \
- : \
- : "i" (_SFR_MEM_ADDR(__SPM_REG)), \
- "r" ((uint8_t)__BOOT_PAGE_WRITE), \
- "z" ((uint16_t)address) \
- ); \
-}))
-
-#define __boot_page_write_alternate(address) \
-(__extension__({ \
- __asm__ __volatile__ \
- ( \
- "sts %0, %1\n\t" \
- "spm\n\t" \
- ".word 0xffff\n\t" \
- "nop\n\t" \
- : \
- : "i" (_SFR_MEM_ADDR(__SPM_REG)), \
- "r" ((uint8_t)__BOOT_PAGE_WRITE), \
- "z" ((uint16_t)address) \
- ); \
-}))
-
-#define __boot_page_write_extended(address) \
-(__extension__({ \
- __asm__ __volatile__ \
- ( \
- "movw r30, %A3\n\t" \
- "sts %1, %C3\n\t" \
- "sts %0, %2\n\t" \
- "spm\n\t" \
- : \
- : "i" (_SFR_MEM_ADDR(__SPM_REG)), \
- "i" (_SFR_MEM_ADDR(RAMPZ)), \
- "r" ((uint8_t)__BOOT_PAGE_WRITE), \
- "r" ((uint32_t)address) \
- : "r30", "r31" \
- ); \
-}))
-#define __boot_page_write_extended_short(address) \
-(__extension__({ \
- __asm__ __volatile__ \
- ( \
- "movw r30, %A3\n\t" \
- "out %1, %C3\n\t" \
- "out %0, %2\n\t" \
- "spm\n\t" \
- : \
- : "i" (_SFR_IO_ADDR(__SPM_REG)), \
- "i" (_SFR_IO_ADDR(RAMPZ)), \
- "r" ((uint8_t)__BOOT_PAGE_WRITE), \
- "r" ((uint32_t)address) \
- : "r30", "r31" \
- ); \
-}))
-
-#define __boot_rww_enable_short() \
-(__extension__({ \
- __asm__ __volatile__ \
- ( \
- "out %0, %1\n\t" \
- "spm\n\t" \
- : \
- : "i" (_SFR_IO_ADDR(__SPM_REG)), \
- "r" ((uint8_t)__BOOT_RWW_ENABLE) \
- ); \
-}))
-
-#define __boot_rww_enable() \
-(__extension__({ \
- __asm__ __volatile__ \
- ( \
- "sts %0, %1\n\t" \
- "spm\n\t" \
- : \
- : "i" (_SFR_MEM_ADDR(__SPM_REG)), \
- "r" ((uint8_t)__BOOT_RWW_ENABLE) \
- ); \
-}))
-
-#define __boot_rww_enable_alternate() \
-(__extension__({ \
- __asm__ __volatile__ \
- ( \
- "sts %0, %1\n\t" \
- "spm\n\t" \
- ".word 0xffff\n\t" \
- "nop\n\t" \
- : \
- : "i" (_SFR_MEM_ADDR(__SPM_REG)), \
- "r" ((uint8_t)__BOOT_RWW_ENABLE) \
- ); \
-}))
-
-/* From the mega16/mega128 data sheets (maybe others):
-
- Bits by SPM To set the Boot Loader Lock bits, write the desired data to
- R0, write "X0001001" to SPMCR and execute SPM within four clock cycles
- after writing SPMCR. The only accessible Lock bits are the Boot Lock bits
- that may prevent the Application and Boot Loader section from any
- software update by the MCU.
-
- If bits 5..2 in R0 are cleared (zero), the corresponding Boot Lock bit
- will be programmed if an SPM instruction is executed within four cycles
- after BLBSET and SPMEN (or SELFPRGEN) are set in SPMCR. The Z-pointer is
- don't care during this operation, but for future compatibility it is
- recommended to load the Z-pointer with $0001 (same as used for reading the
- Lock bits). For future compatibility It is also recommended to set bits 7,
- 6, 1, and 0 in R0 to 1 when writing the Lock bits. When programming the
- Lock bits the entire Flash can be read during the operation. */
-
-#define __boot_lock_bits_set_short(lock_bits) \
-(__extension__({ \
- uint8_t value = (uint8_t)(~(lock_bits)); \
- __asm__ __volatile__ \
- ( \
- "ldi r30, 1\n\t" \
- "ldi r31, 0\n\t" \
- "mov r0, %2\n\t" \
- "out %0, %1\n\t" \
- "spm\n\t" \
- : \
- : "i" (_SFR_IO_ADDR(__SPM_REG)), \
- "r" ((uint8_t)__BOOT_LOCK_BITS_SET), \
- "r" (value) \
- : "r0", "r30", "r31" \
- ); \
-}))
-
-#define __boot_lock_bits_set(lock_bits) \
-(__extension__({ \
- uint8_t value = (uint8_t)(~(lock_bits)); \
- __asm__ __volatile__ \
- ( \
- "ldi r30, 1\n\t" \
- "ldi r31, 0\n\t" \
- "mov r0, %2\n\t" \
- "sts %0, %1\n\t" \
- "spm\n\t" \
- : \
- : "i" (_SFR_MEM_ADDR(__SPM_REG)), \
- "r" ((uint8_t)__BOOT_LOCK_BITS_SET), \
- "r" (value) \
- : "r0", "r30", "r31" \
- ); \
-}))
-
-#define __boot_lock_bits_set_alternate(lock_bits) \
-(__extension__({ \
- uint8_t value = (uint8_t)(~(lock_bits)); \
- __asm__ __volatile__ \
- ( \
- "ldi r30, 1\n\t" \
- "ldi r31, 0\n\t" \
- "mov r0, %2\n\t" \
- "sts %0, %1\n\t" \
- "spm\n\t" \
- ".word 0xffff\n\t" \
- "nop\n\t" \
- : \
- : "i" (_SFR_MEM_ADDR(__SPM_REG)), \
- "r" ((uint8_t)__BOOT_LOCK_BITS_SET), \
- "r" (value) \
- : "r0", "r30", "r31" \
- ); \
-}))
-
-/*
- Reading lock and fuse bits:
-
- Similarly to writing the lock bits above, set BLBSET and SPMEN (or
- SELFPRGEN) bits in __SPMREG, and then (within four clock cycles) issue an
- LPM instruction.
-
- Z address: contents:
- 0x0000 low fuse bits
- 0x0001 lock bits
- 0x0002 extended fuse bits
- 0x0003 high fuse bits
-
- Sounds confusing, doesn't it?
-
- Unlike the macros in pgmspace.h, no need to care for non-enhanced
- cores here as these old cores do not provide SPM support anyway.
- */
-
-/** \ingroup avr_boot
- \def GET_LOW_FUSE_BITS
- address to read the low fuse bits, using boot_lock_fuse_bits_get
- */
-#define GET_LOW_FUSE_BITS (0x0000)
-/** \ingroup avr_boot
- \def GET_LOCK_BITS
- address to read the lock bits, using boot_lock_fuse_bits_get
- */
-#define GET_LOCK_BITS (0x0001)
-/** \ingroup avr_boot
- \def GET_EXTENDED_FUSE_BITS
- address to read the extended fuse bits, using boot_lock_fuse_bits_get
- */
-#define GET_EXTENDED_FUSE_BITS (0x0002)
-/** \ingroup avr_boot
- \def GET_HIGH_FUSE_BITS
- address to read the high fuse bits, using boot_lock_fuse_bits_get
- */
-#define GET_HIGH_FUSE_BITS (0x0003)
-
-/** \ingroup avr_boot
- \def boot_lock_fuse_bits_get(address)
-
- Read the lock or fuse bits at \c address.
-
- Parameter \c address can be any of GET_LOW_FUSE_BITS,
- GET_LOCK_BITS, GET_EXTENDED_FUSE_BITS, or GET_HIGH_FUSE_BITS.
-
- \note The lock and fuse bits returned are the physical values,
- i.e. a bit returned as 0 means the corresponding fuse or lock bit
- is programmed.
- */
-#define boot_lock_fuse_bits_get_short(address) \
-(__extension__({ \
- uint8_t __result; \
- __asm__ __volatile__ \
- ( \
- "ldi r30, %3\n\t" \
- "ldi r31, 0\n\t" \
- "out %1, %2\n\t" \
- "lpm %0, Z\n\t" \
- : "=r" (__result) \
- : "i" (_SFR_IO_ADDR(__SPM_REG)), \
- "r" ((uint8_t)__BOOT_LOCK_BITS_SET), \
- "M" (address) \
- : "r0", "r30", "r31" \
- ); \
- __result; \
-}))
-
-#define boot_lock_fuse_bits_get(address) \
-(__extension__({ \
- uint8_t __result; \
- __asm__ __volatile__ \
- ( \
- "ldi r30, %3\n\t" \
- "ldi r31, 0\n\t" \
- "sts %1, %2\n\t" \
- "lpm %0, Z\n\t" \
- : "=r" (__result) \
- : "i" (_SFR_MEM_ADDR(__SPM_REG)), \
- "r" ((uint8_t)__BOOT_LOCK_BITS_SET), \
- "M" (address) \
- : "r0", "r30", "r31" \
- ); \
- __result; \
-}))
-
-/** \ingroup avr_boot
- \def boot_signature_byte_get(address)
-
- Read the Signature Row byte at \c address. For some MCU types,
- this function can also retrieve the factory-stored oscillator
- calibration bytes.
-
- Parameter \c address can be 0-0x1f as documented by the datasheet.
- \note The values are MCU type dependent.
-*/
-
-#define __BOOT_SIGROW_READ (_BV(__SPM_ENABLE) | _BV(SIGRD))
-
-#define boot_signature_byte_get_short(addr) \
-(__extension__({ \
- uint16_t __addr16 = (uint16_t)(addr); \
- uint8_t __result; \
- __asm__ __volatile__ \
- ( \
- "out %1, %2\n\t" \
- "lpm %0, Z" "\n\t" \
- : "=r" (__result) \
- : "i" (_SFR_IO_ADDR(__SPM_REG)), \
- "r" ((uint8_t) __BOOT_SIGROW_READ), \
- "z" (__addr16) \
- ); \
- __result; \
-}))
-
-#define boot_signature_byte_get(addr) \
-(__extension__({ \
- uint16_t __addr16 = (uint16_t)(addr); \
- uint8_t __result; \
- __asm__ __volatile__ \
- ( \
- "sts %1, %2\n\t" \
- "lpm %0, Z" "\n\t" \
- : "=r" (__result) \
- : "i" (_SFR_MEM_ADDR(__SPM_REG)), \
- "r" ((uint8_t) __BOOT_SIGROW_READ), \
- "z" (__addr16) \
- ); \
- __result; \
-}))
-
-/** \ingroup avr_boot
- \def boot_page_fill(address, data)
-
- Fill the bootloader temporary page buffer for flash
- address with data word.
-
- \note The address is a byte address. The data is a word. The AVR
- writes data to the buffer a word at a time, but addresses the buffer
- per byte! So, increment your address by 2 between calls, and send 2
- data bytes in a word format! The LSB of the data is written to the lower
- address; the MSB of the data is written to the higher address.*/
-
-/** \ingroup avr_boot
- \def boot_page_erase(address)
-
- Erase the flash page that contains address.
-
- \note address is a byte address in flash, not a word address. */
-
-/** \ingroup avr_boot
- \def boot_page_write(address)
-
- Write the bootloader temporary page buffer
- to flash page that contains address.
-
- \note address is a byte address in flash, not a word address. */
-
-/** \ingroup avr_boot
- \def boot_rww_enable()
-
- Enable the Read-While-Write memory section. */
-
-/** \ingroup avr_boot
- \def boot_lock_bits_set(lock_bits)
-
- Set the bootloader lock bits.
-
- \param lock_bits A mask of which Boot Loader Lock Bits to set.
-
- \note In this context, a 'set bit' will be written to a zero value.
- Note also that only BLBxx bits can be programmed by this command.
-
- For example, to disallow the SPM instruction from writing to the Boot
- Loader memory section of flash, you would use this macro as such:
-
- \code
- boot_lock_bits_set (_BV (BLB11));
- \endcode
-
- \note Like any lock bits, the Boot Loader Lock Bits, once set,
- cannot be cleared again except by a chip erase which will in turn
- also erase the boot loader itself. */
-
-/* Normal versions of the macros use 16-bit addresses.
- Extended versions of the macros use 32-bit addresses.
- Alternate versions of the macros use 16-bit addresses and require special
- instruction sequences after LPM.
-
- FLASHEND is defined in the ioXXXX.h file.
- USHRT_MAX is defined in <limits.h>. */
-
-#if defined(__AVR_ATmega161__) || defined(__AVR_ATmega163__) \
- || defined(__AVR_ATmega323__)
-
-/* Alternate: ATmega161/163/323 and 16 bit address */
-#define boot_page_fill(address, data) __boot_page_fill_alternate(address, data)
-#define boot_page_erase(address) __boot_page_erase_alternate(address)
-#define boot_page_write(address) __boot_page_write_alternate(address)
-#define boot_rww_enable() __boot_rww_enable_alternate()
-#define boot_lock_bits_set(lock_bits) __boot_lock_bits_set_alternate(lock_bits)
-
-#elif (FLASHEND > USHRT_MAX)
-
-/* Extended: >16 bit address */
-#define boot_page_fill(address, data) __boot_page_fill_extended_short(address, data)
-#define boot_page_erase(address) __boot_page_erase_extended_short(address)
-#define boot_page_write(address) __boot_page_write_extended_short(address)
-#define boot_rww_enable() __boot_rww_enable_short()
-#define boot_lock_bits_set(lock_bits) __boot_lock_bits_set_short(lock_bits)
-
-#else
-
-/* Normal: 16 bit address */
-#define boot_page_fill(address, data) __boot_page_fill_short(address, data)
-#define boot_page_erase(address) __boot_page_erase_short(address)
-#define boot_page_write(address) __boot_page_write_short(address)
-#define boot_rww_enable() __boot_rww_enable_short()
-#define boot_lock_bits_set(lock_bits) __boot_lock_bits_set_short(lock_bits)
-
-#endif
-
-/** \ingroup avr_boot
-
- Same as boot_page_fill() except it waits for eeprom and spm operations to
- complete before filling the page. */
-
-#define boot_page_fill_safe(address, data) \
-do { \
- boot_spm_busy_wait(); \
- eeprom_busy_wait(); \
- boot_page_fill(address, data); \
-} while (0)
-
-/** \ingroup avr_boot
-
- Same as boot_page_erase() except it waits for eeprom and spm operations to
- complete before erasing the page. */
-
-#define boot_page_erase_safe(address) \
-do { \
- boot_spm_busy_wait(); \
- eeprom_busy_wait(); \
- boot_page_erase (address); \
-} while (0)
-
-/** \ingroup avr_boot
-
- Same as boot_page_write() except it waits for eeprom and spm operations to
- complete before writing the page. */
-
-#define boot_page_write_safe(address) \
-do { \
- boot_spm_busy_wait(); \
- eeprom_busy_wait(); \
- boot_page_write (address); \
-} while (0)
-
-/** \ingroup avr_boot
-
- Same as boot_rww_enable() except waits for eeprom and spm operations to
- complete before enabling the RWW mameory. */
-
-#define boot_rww_enable_safe() \
-do { \
- boot_spm_busy_wait(); \
- eeprom_busy_wait(); \
- boot_rww_enable(); \
-} while (0)
-
-/** \ingroup avr_boot
-
- Same as boot_lock_bits_set() except waits for eeprom and spm operations to
- complete before setting the lock bits. */
-
-#define boot_lock_bits_set_safe(lock_bits) \
-do { \
- boot_spm_busy_wait(); \
- eeprom_busy_wait(); \
- boot_lock_bits_set (lock_bits); \
-} while (0)
-
-#endif /* _AVR_BOOT_H_ */
diff --git a/bootloaders/optiboot/makeall b/bootloaders/optiboot/makeall
deleted file mode 100755
index f076bc7..0000000
--- a/bootloaders/optiboot/makeall
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-make clean
-#
-# The "big three" standard bootloaders.
-make atmega8
-make atmega168
-make atmega328
-#
-# additional buildable platforms of
-# somewhat questionable support level
-make lilypad
-make lilypad_resonator
-make pro8
-make pro16
-make pro20
-make atmega328_pro8
-make sanguino
-make mega
-make atmega88
-make luminet
diff --git a/bootloaders/optiboot/omake b/bootloaders/optiboot/omake
deleted file mode 100644
index cc7c6bc..0000000
--- a/bootloaders/optiboot/omake
+++ /dev/null
@@ -1,2 +0,0 @@
-echo ../../../tools/avr/bin/make OS=macosx ENV=arduino $*
-../../../tools/avr/bin/make OS=macosx ENV=arduino $*
diff --git a/bootloaders/optiboot/omake.bat b/bootloaders/optiboot/omake.bat
deleted file mode 100644
index f6815da..0000000
--- a/bootloaders/optiboot/omake.bat
+++ /dev/null
@@ -1 +0,0 @@
-..\..\..\tools\avr\utils\bin\make OS=windows ENV=arduino %*
diff --git a/bootloaders/optiboot/optiboot.c b/bootloaders/optiboot/optiboot.c
deleted file mode 100644
index bd3a1db..0000000
--- a/bootloaders/optiboot/optiboot.c
+++ /dev/null
@@ -1,672 +0,0 @@
-/**********************************************************/
-/* Optiboot bootloader for Arduino */
-/* */
-/* http://optiboot.googlecode.com */
-/* */
-/* Arduino-maintained version : See README.TXT */
-/* http://code.google.com/p/arduino/ */
-/* */
-/* Heavily optimised bootloader that is faster and */
-/* smaller than the Arduino standard bootloader */
-/* */
-/* Enhancements: */
-/* Fits in 512 bytes, saving 1.5K of code space */
-/* Background page erasing speeds up programming */
-/* Higher baud rate speeds up programming */
-/* Written almost entirely in C */
-/* Customisable timeout with accurate timeconstant */
-/* Optional virtual UART. No hardware UART required. */
-/* Optional virtual boot partition for devices without. */
-/* */
-/* What you lose: */
-/* Implements a skeleton STK500 protocol which is */
-/* missing several features including EEPROM */
-/* programming and non-page-aligned writes */
-/* High baud rate breaks compatibility with standard */
-/* Arduino flash settings */
-/* */
-/* Fully supported: */
-/* ATmega168 based devices (Diecimila etc) */
-/* ATmega328P based devices (Duemilanove etc) */
-/* */
-/* Alpha test */
-/* ATmega1280 based devices (Arduino Mega) */
-/* */
-/* Work in progress: */
-/* ATmega644P based devices (Sanguino) */
-/* ATtiny84 based devices (Luminet) */
-/* */
-/* Does not support: */
-/* USB based devices (eg. Teensy) */
-/* */
-/* Assumptions: */
-/* The code makes several assumptions that reduce the */
-/* code size. They are all true after a hardware reset, */
-/* but may not be true if the bootloader is called by */
-/* other means or on other hardware. */
-/* No interrupts can occur */
-/* UART and Timer 1 are set to their reset state */
-/* SP points to RAMEND */
-/* */
-/* Code builds on code, libraries and optimisations from: */
-/* stk500boot.c by Jason P. Kyle */
-/* Arduino bootloader http://www.arduino.cc */
-/* Spiff's 1K bootloader http://spiffie.org/know/arduino_1k_bootloader/bootloader.shtml */
-/* avr-libc project http://nongnu.org/avr-libc */
-/* Adaboot http://www.ladyada.net/library/arduino/bootloader.html */
-/* AVR305 Atmel Application Note */
-/* */
-/* This program is free software; you can redistribute it */
-/* and/or modify it under the terms of the GNU General */
-/* Public License as published by the Free Software */
-/* Foundation; either version 2 of the License, or */
-/* (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will */
-/* be useful, but WITHOUT ANY WARRANTY; without even the */
-/* implied warranty of MERCHANTABILITY or FITNESS FOR A */
-/* PARTICULAR PURPOSE. See the GNU General Public */
-/* License for more details. */
-/* */
-/* You should have received a copy of the GNU General */
-/* Public License along with this program; if not, write */
-/* to the Free Software Foundation, Inc., */
-/* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-/* */
-/* Licence can be viewed at */
-/* http://www.fsf.org/licenses/gpl.txt */
-/* */
-/**********************************************************/
-
-
-/**********************************************************/
-/* */
-/* Optional defines: */
-/* */
-/**********************************************************/
-/* */
-/* BIG_BOOT: */
-/* Build a 1k bootloader, not 512 bytes. This turns on */
-/* extra functionality. */
-/* */
-/* BAUD_RATE: */
-/* Set bootloader baud rate. */
-/* */
-/* LUDICROUS_SPEED: */
-/* 230400 baud :-) */
-/* */
-/* SOFT_UART: */
-/* Use AVR305 soft-UART instead of hardware UART. */
-/* */
-/* LED_START_FLASHES: */
-/* Number of LED flashes on bootup. */
-/* */
-/* LED_DATA_FLASH: */
-/* Flash LED when transferring data. For boards without */
-/* TX or RX LEDs, or for people who like blinky lights. */
-/* */
-/* SUPPORT_EEPROM: */
-/* Support reading and writing from EEPROM. This is not */
-/* used by Arduino, so off by default. */
-/* */
-/* TIMEOUT_MS: */
-/* Bootloader timeout period, in milliseconds. */
-/* 500,1000,2000,4000,8000 supported. */
-/* */
-/**********************************************************/
-
-/**********************************************************/
-/* Version Numbers! */
-/* */
-/* Arduino Optiboot now includes this Version number in */
-/* the source and object code. */
-/* */
-/* Version 3 was released as zip from the optiboot */
-/* repository and was distributed with Arduino 0022. */
-/* Version 4 starts with the arduino repository commit */
-/* that brought the arduino repository up-to-date with */
-/* the optiboot source tree changes since v3. */
-/* */
-/**********************************************************/
-
-/**********************************************************/
-/* Edit History: */
-/* */
-/* 4.4 WestfW: add initialization of address to keep */
-/* the compiler happy. Change SC'ed targets. */
-/* Return the SW version via READ PARAM */
-/* 4.3 WestfW: catch framing errors in getch(), so that */
-/* AVRISP works without HW kludges. */
-/* http://code.google.com/p/arduino/issues/detail?id=368n*/
-/* 4.2 WestfW: reduce code size, fix timeouts, change */
-/* verifySpace to use WDT instead of appstart */
-/* 4.1 WestfW: put version number in binary. */
-/**********************************************************/
-
-#define OPTIBOOT_MAJVER 4
-#define OPTIBOOT_MINVER 4
-
-#define MAKESTR(a) #a
-#define MAKEVER(a, b) MAKESTR(a*256+b)
-
-asm(" .section .version\n"
- "optiboot_version: .word " MAKEVER(OPTIBOOT_MAJVER, OPTIBOOT_MINVER) "\n"
- " .section .text\n");
-
-#include <inttypes.h>
-#include <avr/io.h>
-#include <avr/pgmspace.h>
-
-// <avr/boot.h> uses sts instructions, but this version uses out instructions
-// This saves cycles and program memory.
-#include "boot.h"
-
-
-// We don't use <avr/wdt.h> as those routines have interrupt overhead we don't need.
-
-#include "pin_defs.h"
-#include "stk500.h"
-
-#ifndef LED_START_FLASHES
-#define LED_START_FLASHES 0
-#endif
-
-#ifdef LUDICROUS_SPEED
-#define BAUD_RATE 230400L
-#endif
-
-/* set the UART baud rate defaults */
-#ifndef BAUD_RATE
-#if F_CPU >= 8000000L
-#define BAUD_RATE 115200L // Highest rate Avrdude win32 will support
-#elsif F_CPU >= 1000000L
-#define BAUD_RATE 9600L // 19200 also supported, but with significant error
-#elsif F_CPU >= 128000L
-#define BAUD_RATE 4800L // Good for 128kHz internal RC
-#else
-#define BAUD_RATE 1200L // Good even at 32768Hz
-#endif
-#endif
-
-/* Switch in soft UART for hard baud rates */
-#if (F_CPU/BAUD_RATE) > 280 // > 57600 for 16MHz
-#ifndef SOFT_UART
-#define SOFT_UART
-#endif
-#endif
-
-/* Watchdog settings */
-#define WATCHDOG_OFF (0)
-#define WATCHDOG_16MS (_BV(WDE))
-#define WATCHDOG_32MS (_BV(WDP0) | _BV(WDE))
-#define WATCHDOG_64MS (_BV(WDP1) | _BV(WDE))
-#define WATCHDOG_125MS (_BV(WDP1) | _BV(WDP0) | _BV(WDE))
-#define WATCHDOG_250MS (_BV(WDP2) | _BV(WDE))
-#define WATCHDOG_500MS (_BV(WDP2) | _BV(WDP0) | _BV(WDE))
-#define WATCHDOG_1S (_BV(WDP2) | _BV(WDP1) | _BV(WDE))
-#define WATCHDOG_2S (_BV(WDP2) | _BV(WDP1) | _BV(WDP0) | _BV(WDE))
-#ifndef __AVR_ATmega8__
-#define WATCHDOG_4S (_BV(WDP3) | _BV(WDE))
-#define WATCHDOG_8S (_BV(WDP3) | _BV(WDP0) | _BV(WDE))
-#endif
-
-/* Function Prototypes */
-/* The main function is in init9, which removes the interrupt vector table */
-/* we don't need. It is also 'naked', which means the compiler does not */
-/* generate any entry or exit code itself. */
-int main(void) __attribute__ ((naked)) __attribute__ ((section (".init9")));
-void putch(char);
-uint8_t getch(void);
-static inline void getNch(uint8_t); /* "static inline" is a compiler hint to reduce code size */
-void verifySpace();
-static inline void flash_led(uint8_t);
-uint8_t getLen();
-static inline void watchdogReset();
-void watchdogConfig(uint8_t x);
-#ifdef SOFT_UART
-void uartDelay() __attribute__ ((naked));
-#endif
-void appStart() __attribute__ ((naked));
-
-#if defined(__AVR_ATmega168__)
-#define RAMSTART (0x100)
-#define NRWWSTART (0x3800)
-#elif defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__)
-#define RAMSTART (0x100)
-#define NRWWSTART (0x7000)
-#elif defined (__AVR_ATmega644P__)
-#define RAMSTART (0x100)
-#define NRWWSTART (0xE000)
-#elif defined(__AVR_ATtiny84__)
-#define RAMSTART (0x100)
-#define NRWWSTART (0x0000)
-#elif defined(__AVR_ATmega1280__)
-#define RAMSTART (0x200)
-#define NRWWSTART (0xE000)
-#elif defined(__AVR_ATmega8__) || defined(__AVR_ATmega88__)
-#define RAMSTART (0x100)
-#define NRWWSTART (0x1800)
-#endif
-
-/* C zero initialises all global variables. However, that requires */
-/* These definitions are NOT zero initialised, but that doesn't matter */
-/* This allows us to drop the zero init code, saving us memory */
-#define buff ((uint8_t*)(RAMSTART))
-#ifdef VIRTUAL_BOOT_PARTITION
-#define rstVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+4))
-#define wdtVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+6))
-#endif
-
-/* main program starts here */
-int main(void) {
- uint8_t ch;
-
- /*
- * Making these local and in registers prevents the need for initializing
- * them, and also saves space because code no longer stores to memory.
- * (initializing address keeps the compiler happy, but isn't really
- * necessary, and uses 4 bytes of flash.)
- */
- register uint16_t address = 0;
- register uint8_t length;
-
- // After the zero init loop, this is the first code to run.
- //
- // This code makes the following assumptions:
- // No interrupts will execute
- // SP points to RAMEND
- // r1 contains zero
- //
- // If not, uncomment the following instructions:
- // cli();
- asm volatile ("clr __zero_reg__");
-#ifdef __AVR_ATmega8__
- SP=RAMEND; // This is done by hardware reset
-#endif
-
- // Adaboot no-wait mod
- ch = MCUSR;
- MCUSR = 0;
- if (!(ch & _BV(EXTRF))) appStart();
-
-#if LED_START_FLASHES > 0
- // Set up Timer 1 for timeout counter
- TCCR1B = _BV(CS12) | _BV(CS10); // div 1024
-#endif
-#ifndef SOFT_UART
-#ifdef __AVR_ATmega8__
- UCSRA = _BV(U2X); //Double speed mode USART
- UCSRB = _BV(RXEN) | _BV(TXEN); // enable Rx & Tx
- UCSRC = _BV(URSEL) | _BV(UCSZ1) | _BV(UCSZ0); // config USART; 8N1
- UBRRL = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 );
-#else
- UCSR0A = _BV(U2X0); //Double speed mode USART0
- UCSR0B = _BV(RXEN0) | _BV(TXEN0);
- UCSR0C = _BV(UCSZ00) | _BV(UCSZ01);
- UBRR0L = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 );
-#endif
-#endif
-
- // Set up watchdog to trigger after 500ms
- watchdogConfig(WATCHDOG_1S);
-
- /* Set LED pin as output */
- LED_DDR |= _BV(LED);
-
-#ifdef SOFT_UART
- /* Set TX pin as output */
- UART_DDR |= _BV(UART_TX_BIT);
-#endif
-
-#if LED_START_FLASHES > 0
- /* Flash onboard LED to signal entering of bootloader */
- flash_led(LED_START_FLASHES * 2);
-#endif
-
- /* Forever loop */
- for (;;) {
- /* get character from UART */
- ch = getch();
-
- if(ch == STK_GET_PARAMETER) {
- unsigned char which = getch();
- verifySpace();
- if (which == 0x82) {
- /*
- * Send optiboot version as "minor SW version"
- */
- putch(OPTIBOOT_MINVER);
- } else if (which == 0x81) {
- putch(OPTIBOOT_MAJVER);
- } else {
- /*
- * GET PARAMETER returns a generic 0x03 reply for
- * other parameters - enough to keep Avrdude happy
- */
- putch(0x03);
- }
- }
- else if(ch == STK_SET_DEVICE) {
- // SET DEVICE is ignored
- getNch(20);
- }
- else if(ch == STK_SET_DEVICE_EXT) {
- // SET DEVICE EXT is ignored
- getNch(5);
- }
- else if(ch == STK_LOAD_ADDRESS) {
- // LOAD ADDRESS
- uint16_t newAddress;
- newAddress = getch();
- newAddress = (newAddress & 0xff) | (getch() << 8);
-#ifdef RAMPZ
- // Transfer top bit to RAMPZ
- RAMPZ = (newAddress & 0x8000) ? 1 : 0;
-#endif
- newAddress += newAddress; // Convert from word address to byte address
- address = newAddress;
- verifySpace();
- }
- else if(ch == STK_UNIVERSAL) {
- // UNIVERSAL command is ignored
- getNch(4);
- putch(0x00);
- }
- /* Write memory, length is big endian and is in bytes */
- else if(ch == STK_PROG_PAGE) {
- // PROGRAM PAGE - we support flash programming only, not EEPROM
- uint8_t *bufPtr;
- uint16_t addrPtr;
-
- getch(); /* getlen() */
- length = getch();
- getch();
-
- // If we are in RWW section, immediately start page erase
- if (address < NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
-
- // While that is going on, read in page contents
- bufPtr = buff;
- do *bufPtr++ = getch();
- while (--length);
-
- // If we are in NRWW section, page erase has to be delayed until now.
- // Todo: Take RAMPZ into account
- if (address >= NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
-
- // Read command terminator, start reply
- verifySpace();
-
- // If only a partial page is to be programmed, the erase might not be complete.
- // So check that here
- boot_spm_busy_wait();
-
-#ifdef VIRTUAL_BOOT_PARTITION
- if ((uint16_t)(void*)address == 0) {
- // This is the reset vector page. We need to live-patch the code so the
- // bootloader runs.
- //
- // Move RESET vector to WDT vector
- uint16_t vect = buff[0] | (buff[1]<<8);
- rstVect = vect;
- wdtVect = buff[8] | (buff[9]<<8);
- vect -= 4; // Instruction is a relative jump (rjmp), so recalculate.
- buff[8] = vect & 0xff;
- buff[9] = vect >> 8;
-
- // Add jump to bootloader at RESET vector
- buff[0] = 0x7f;
- buff[1] = 0xce; // rjmp 0x1d00 instruction
- }
-#endif
-
- // Copy buffer into programming buffer
- bufPtr = buff;
- addrPtr = (uint16_t)(void*)address;
- ch = SPM_PAGESIZE / 2;
- do {
- uint16_t a;
- a = *bufPtr++;
- a |= (*bufPtr++) << 8;
- __boot_page_fill_short((uint16_t)(void*)addrPtr,a);
- addrPtr += 2;
- } while (--ch);
-
- // Write from programming buffer
- __boot_page_write_short((uint16_t)(void*)address);
- boot_spm_busy_wait();
-
-#if defined(RWWSRE)
- // Reenable read access to flash
- boot_rww_enable();
-#endif
-
- }
- /* Read memory block mode, length is big endian. */
- else if(ch == STK_READ_PAGE) {
- // READ PAGE - we only read flash
- getch(); /* getlen() */
- length = getch();
- getch();
-
- verifySpace();
-#ifdef VIRTUAL_BOOT_PARTITION
- do {
- // Undo vector patch in bottom page so verify passes
- if (address == 0) ch=rstVect & 0xff;
- else if (address == 1) ch=rstVect >> 8;
- else if (address == 8) ch=wdtVect & 0xff;
- else if (address == 9) ch=wdtVect >> 8;
- else ch = pgm_read_byte_near(address);
- address++;
- putch(ch);
- } while (--length);
-#else
-#ifdef __AVR_ATmega1280__
-// do putch(pgm_read_byte_near(address++));
-// while (--length);
- do {
- uint8_t result;
- __asm__ ("elpm %0,Z\n":"=r"(result):"z"(address));
- putch(result);
- address++;
- }
- while (--length);
-#else
- do putch(pgm_read_byte_near(address++));
- while (--length);
-#endif
-#endif
- }
-
- /* Get device signature bytes */
- else if(ch == STK_READ_SIGN) {
- // READ SIGN - return what Avrdude wants to hear
- verifySpace();
- putch(SIGNATURE_0);
- putch(SIGNATURE_1);
- putch(SIGNATURE_2);
- }
- else if (ch == 'Q') {
- // Adaboot no-wait mod
- watchdogConfig(WATCHDOG_16MS);
- verifySpace();
- }
- else {
- // This covers the response to commands like STK_ENTER_PROGMODE
- verifySpace();
- }
- putch(STK_OK);
- }
-}
-
-void putch(char ch) {
-#ifndef SOFT_UART
- while (!(UCSR0A & _BV(UDRE0)));
- UDR0 = ch;
-#else
- __asm__ __volatile__ (
- " com %[ch]\n" // ones complement, carry set
- " sec\n"
- "1: brcc 2f\n"
- " cbi %[uartPort],%[uartBit]\n"
- " rjmp 3f\n"
- "2: sbi %[uartPort],%[uartBit]\n"
- " nop\n"
- "3: rcall uartDelay\n"
- " rcall uartDelay\n"
- " lsr %[ch]\n"
- " dec %[bitcnt]\n"
- " brne 1b\n"
- :
- :
- [bitcnt] "d" (10),
- [ch] "r" (ch),
- [uartPort] "I" (_SFR_IO_ADDR(UART_PORT)),
- [uartBit] "I" (UART_TX_BIT)
- :
- "r25"
- );
-#endif
-}
-
-uint8_t getch(void) {
- uint8_t ch;
-
-#ifdef LED_DATA_FLASH
-#ifdef __AVR_ATmega8__
- LED_PORT ^= _BV(LED);
-#else
- LED_PIN |= _BV(LED);
-#endif
-#endif
-
-#ifdef SOFT_UART
- __asm__ __volatile__ (
- "1: sbic %[uartPin],%[uartBit]\n" // Wait for start edge
- " rjmp 1b\n"
- " rcall uartDelay\n" // Get to middle of start bit
- "2: rcall uartDelay\n" // Wait 1 bit period
- " rcall uartDelay\n" // Wait 1 bit period
- " clc\n"
- " sbic %[uartPin],%[uartBit]\n"
- " sec\n"
- " dec %[bitCnt]\n"
- " breq 3f\n"
- " ror %[ch]\n"
- " rjmp 2b\n"
- "3:\n"
- :
- [ch] "=r" (ch)
- :
- [bitCnt] "d" (9),
- [uartPin] "I" (_SFR_IO_ADDR(UART_PIN)),
- [uartBit] "I" (UART_RX_BIT)
- :
- "r25"
-);
-#else
- while(!(UCSR0A & _BV(RXC0)))
- ;
- if (!(UCSR0A & _BV(FE0))) {
- /*
- * A Framing Error indicates (probably) that something is talking
- * to us at the wrong bit rate. Assume that this is because it
- * expects to be talking to the application, and DON'T reset the
- * watchdog. This should cause the bootloader to abort and run
- * the application "soon", if it keeps happening. (Note that we
- * don't care that an invalid char is returned...)
- */
- watchdogReset();
- }
-
- ch = UDR0;
-#endif
-
-#ifdef LED_DATA_FLASH
-#ifdef __AVR_ATmega8__
- LED_PORT ^= _BV(LED);
-#else
- LED_PIN |= _BV(LED);
-#endif
-#endif
-
- return ch;
-}
-
-#ifdef SOFT_UART
-// AVR350 equation: #define UART_B_VALUE (((F_CPU/BAUD_RATE)-23)/6)
-// Adding 3 to numerator simulates nearest rounding for more accurate baud rates
-#define UART_B_VALUE (((F_CPU/BAUD_RATE)-20)/6)
-#if UART_B_VALUE > 255
-#error Baud rate too slow for soft UART
-#endif
-
-void uartDelay() {
- __asm__ __volatile__ (
- "ldi r25,%[count]\n"
- "1:dec r25\n"
- "brne 1b\n"
- "ret\n"
- ::[count] "M" (UART_B_VALUE)
- );
-}
-#endif
-
-void getNch(uint8_t count) {
- do getch(); while (--count);
- verifySpace();
-}
-
-void verifySpace() {
- if (getch() != CRC_EOP) {
- watchdogConfig(WATCHDOG_16MS); // shorten WD timeout
- while (1) // and busy-loop so that WD causes
- ; // a reset and app start.
- }
- putch(STK_INSYNC);
-}
-
-#if LED_START_FLASHES > 0
-void flash_led(uint8_t count) {
- do {
- TCNT1 = -(F_CPU/(1024*16));
- TIFR1 = _BV(TOV1);
- while(!(TIFR1 & _BV(TOV1)));
-#ifdef __AVR_ATmega8__
- LED_PORT ^= _BV(LED);
-#else
- LED_PIN |= _BV(LED);
-#endif
- watchdogReset();
- } while (--count);
-}
-#endif
-
-// Watchdog functions. These are only safe with interrupts turned off.
-void watchdogReset() {
- __asm__ __volatile__ (
- "wdr\n"
- );
-}
-
-void watchdogConfig(uint8_t x) {
- WDTCSR = _BV(WDCE) | _BV(WDE);
- WDTCSR = x;
-}
-
-void appStart() {
- watchdogConfig(WATCHDOG_OFF);
- __asm__ __volatile__ (
-#ifdef VIRTUAL_BOOT_PARTITION
- // Jump to WDT vector
- "ldi r30,4\n"
- "clr r31\n"
-#else
- // Jump to RST vector
- "clr r30\n"
- "clr r31\n"
-#endif
- "ijmp\n"
- );
-}
diff --git a/bootloaders/optiboot/optiboot_atmega168.hex b/bootloaders/optiboot/optiboot_atmega168.hex
deleted file mode 100644
index c2f2b5b..0000000
--- a/bootloaders/optiboot/optiboot_atmega168.hex
+++ /dev/null
@@ -1,35 +0,0 @@
-:103E0000112484B714BE81FFF0D085E08093810037
-:103E100082E08093C00088E18093C10086E08093B7
-:103E2000C20080E18093C4008EE0C9D0259A86E06C
-:103E300020E33CEF91E0309385002093840096BB13
-:103E4000B09BFECF1D9AA8958150A9F7CC24DD2404
-:103E500088248394B5E0AB2EA1E19A2EF3E0BF2E27
-:103E6000A2D0813461F49FD0082FAFD0023811F076
-:103E7000013811F484E001C083E08DD089C0823420
-:103E800011F484E103C0853419F485E0A6D080C024
-:103E9000853579F488D0E82EFF2485D0082F10E0EE
-:103EA000102F00270E291F29000F111F8ED0680127
-:103EB0006FC0863521F484E090D080E0DECF843678
-:103EC00009F040C070D06FD0082F6DD080E0C816C8
-:103ED00088E3D80618F4F601B7BEE895C0E0D1E053
-:103EE00062D089930C17E1F7F0E0CF16F8E3DF0614
-:103EF00018F0F601B7BEE89568D007B600FCFDCF14
-:103F0000A601A0E0B1E02C9130E011968C911197C0
-:103F100090E0982F8827822B932B1296FA010C01A0
-:103F200087BEE89511244E5F5F4FF1E0A038BF07D0
-:103F300051F7F601A7BEE89507B600FCFDCF97BE86
-:103F4000E89526C08437B1F42ED02DD0F82E2BD092
-:103F50003CD0F601EF2C8F010F5F1F4F84911BD0D7
-:103F6000EA94F801C1F70894C11CD11CFA94CF0C53
-:103F7000D11C0EC0853739F428D08EE10CD084E9ED
-:103F80000AD086E07ACF813511F488E018D01DD0B0
-:103F900080E101D065CF982F8091C00085FFFCCFD4
-:103FA0009093C60008958091C00087FFFCCF809158
-:103FB000C00084FD01C0A8958091C6000895E0E688
-:103FC000F0E098E1908380830895EDDF803219F06E
-:103FD00088E0F5DFFFCF84E1DECF1F93182FE3DF0A
-:103FE0001150E9F7F2DF1F91089580E0E8DFEE2736
-:043FF000FF2709940A
-:023FFE000404B9
-:0400000300003E00BB
-:00000001FF
diff --git a/bootloaders/optiboot/optiboot_atmega168.lst b/bootloaders/optiboot/optiboot_atmega168.lst
deleted file mode 100644
index 06316db..0000000
--- a/bootloaders/optiboot/optiboot_atmega168.lst
+++ /dev/null
@@ -1,598 +0,0 @@
-
-optiboot_atmega168.elf: file format elf32-avr
-
-Sections:
-Idx Name Size VMA LMA File off Algn
- 0 .text 000001f4 00003e00 00003e00 00000054 2**1
- CONTENTS, ALLOC, LOAD, READONLY, CODE
- 1 .version 00000002 00003ffe 00003ffe 00000248 2**0
- CONTENTS, READONLY
- 2 .debug_aranges 00000028 00000000 00000000 0000024a 2**0
- CONTENTS, READONLY, DEBUGGING
- 3 .debug_pubnames 0000005f 00000000 00000000 00000272 2**0
- CONTENTS, READONLY, DEBUGGING
- 4 .debug_info 000002a8 00000000 00000000 000002d1 2**0
- CONTENTS, READONLY, DEBUGGING
- 5 .debug_abbrev 00000178 00000000 00000000 00000579 2**0
- CONTENTS, READONLY, DEBUGGING
- 6 .debug_line 00000488 00000000 00000000 000006f1 2**0
- CONTENTS, READONLY, DEBUGGING
- 7 .debug_frame 00000080 00000000 00000000 00000b7c 2**2
- CONTENTS, READONLY, DEBUGGING
- 8 .debug_str 0000014f 00000000 00000000 00000bfc 2**0
- CONTENTS, READONLY, DEBUGGING
- 9 .debug_loc 000002d8 00000000 00000000 00000d4b 2**0
- CONTENTS, READONLY, DEBUGGING
- 10 .debug_ranges 00000078 00000000 00000000 00001023 2**0
- CONTENTS, READONLY, DEBUGGING
-
-Disassembly of section .text:
-
-00003e00 <main>:
-#define rstVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+4))
-#define wdtVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+6))
-#endif
-
-/* main program starts here */
-int main(void) {
- 3e00: 11 24 eor r1, r1
-#ifdef __AVR_ATmega8__
- SP=RAMEND; // This is done by hardware reset
-#endif
-
- // Adaboot no-wait mod
- ch = MCUSR;
- 3e02: 84 b7 in r24, 0x34 ; 52
- MCUSR = 0;
- 3e04: 14 be out 0x34, r1 ; 52
- if (!(ch & _BV(EXTRF))) appStart();
- 3e06: 81 ff sbrs r24, 1
- 3e08: f0 d0 rcall .+480 ; 0x3fea <appStart>
-
-#if LED_START_FLASHES > 0
- // Set up Timer 1 for timeout counter
- TCCR1B = _BV(CS12) | _BV(CS10); // div 1024
- 3e0a: 85 e0 ldi r24, 0x05 ; 5
- 3e0c: 80 93 81 00 sts 0x0081, r24
- UCSRA = _BV(U2X); //Double speed mode USART
- UCSRB = _BV(RXEN) | _BV(TXEN); // enable Rx & Tx
- UCSRC = _BV(URSEL) | _BV(UCSZ1) | _BV(UCSZ0); // config USART; 8N1
- UBRRL = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 );
-#else
- UCSR0A = _BV(U2X0); //Double speed mode USART0
- 3e10: 82 e0 ldi r24, 0x02 ; 2
- 3e12: 80 93 c0 00 sts 0x00C0, r24
- UCSR0B = _BV(RXEN0) | _BV(TXEN0);
- 3e16: 88 e1 ldi r24, 0x18 ; 24
- 3e18: 80 93 c1 00 sts 0x00C1, r24
- UCSR0C = _BV(UCSZ00) | _BV(UCSZ01);
- 3e1c: 86 e0 ldi r24, 0x06 ; 6
- 3e1e: 80 93 c2 00 sts 0x00C2, r24
- UBRR0L = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 );
- 3e22: 80 e1 ldi r24, 0x10 ; 16
- 3e24: 80 93 c4 00 sts 0x00C4, r24
-#endif
-#endif
-
- // Set up watchdog to trigger after 500ms
- watchdogConfig(WATCHDOG_1S);
- 3e28: 8e e0 ldi r24, 0x0E ; 14
- 3e2a: c9 d0 rcall .+402 ; 0x3fbe <watchdogConfig>
-
- /* Set LED pin as output */
- LED_DDR |= _BV(LED);
- 3e2c: 25 9a sbi 0x04, 5 ; 4
- 3e2e: 86 e0 ldi r24, 0x06 ; 6
-}
-
-#if LED_START_FLASHES > 0
-void flash_led(uint8_t count) {
- do {
- TCNT1 = -(F_CPU/(1024*16));
- 3e30: 20 e3 ldi r18, 0x30 ; 48
- 3e32: 3c ef ldi r19, 0xFC ; 252
- TIFR1 = _BV(TOV1);
- 3e34: 91 e0 ldi r25, 0x01 ; 1
-}
-
-#if LED_START_FLASHES > 0
-void flash_led(uint8_t count) {
- do {
- TCNT1 = -(F_CPU/(1024*16));
- 3e36: 30 93 85 00 sts 0x0085, r19
- 3e3a: 20 93 84 00 sts 0x0084, r18
- TIFR1 = _BV(TOV1);
- 3e3e: 96 bb out 0x16, r25 ; 22
- while(!(TIFR1 & _BV(TOV1)));
- 3e40: b0 9b sbis 0x16, 0 ; 22
- 3e42: fe cf rjmp .-4 ; 0x3e40 <main+0x40>
-#ifdef __AVR_ATmega8__
- LED_PORT ^= _BV(LED);
-#else
- LED_PIN |= _BV(LED);
- 3e44: 1d 9a sbi 0x03, 5 ; 3
-}
-#endif
-
-// Watchdog functions. These are only safe with interrupts turned off.
-void watchdogReset() {
- __asm__ __volatile__ (
- 3e46: a8 95 wdr
- LED_PORT ^= _BV(LED);
-#else
- LED_PIN |= _BV(LED);
-#endif
- watchdogReset();
- } while (--count);
- 3e48: 81 50 subi r24, 0x01 ; 1
- 3e4a: a9 f7 brne .-22 ; 0x3e36 <main+0x36>
- 3e4c: cc 24 eor r12, r12
- 3e4e: dd 24 eor r13, r13
- ch = SPM_PAGESIZE / 2;
- do {
- uint16_t a;
- a = *bufPtr++;
- a |= (*bufPtr++) << 8;
- __boot_page_fill_short((uint16_t)(void*)addrPtr,a);
- 3e50: 88 24 eor r8, r8
- 3e52: 83 94 inc r8
- addrPtr += 2;
- } while (--ch);
-
- // Write from programming buffer
- __boot_page_write_short((uint16_t)(void*)address);
- 3e54: b5 e0 ldi r27, 0x05 ; 5
- 3e56: ab 2e mov r10, r27
- boot_spm_busy_wait();
-
-#if defined(RWWSRE)
- // Reenable read access to flash
- boot_rww_enable();
- 3e58: a1 e1 ldi r26, 0x11 ; 17
- 3e5a: 9a 2e mov r9, r26
- do *bufPtr++ = getch();
- while (--length);
-
- // If we are in NRWW section, page erase has to be delayed until now.
- // Todo: Take RAMPZ into account
- if (address >= NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
- 3e5c: f3 e0 ldi r31, 0x03 ; 3
- 3e5e: bf 2e mov r11, r31
-#endif
-
- /* Forever loop */
- for (;;) {
- /* get character from UART */
- ch = getch();
- 3e60: a2 d0 rcall .+324 ; 0x3fa6 <getch>
-
- if(ch == STK_GET_PARAMETER) {
- 3e62: 81 34 cpi r24, 0x41 ; 65
- 3e64: 61 f4 brne .+24 ; 0x3e7e <main+0x7e>
- unsigned char which = getch();
- 3e66: 9f d0 rcall .+318 ; 0x3fa6 <getch>
- 3e68: 08 2f mov r16, r24
- verifySpace();
- 3e6a: af d0 rcall .+350 ; 0x3fca <verifySpace>
- if (which == 0x82) {
- 3e6c: 02 38 cpi r16, 0x82 ; 130
- 3e6e: 11 f0 breq .+4 ; 0x3e74 <main+0x74>
- /*
- * Send optiboot version as "minor SW version"
- */
- putch(OPTIBOOT_MINVER);
- } else if (which == 0x81) {
- 3e70: 01 38 cpi r16, 0x81 ; 129
- 3e72: 11 f4 brne .+4 ; 0x3e78 <main+0x78>
- putch(OPTIBOOT_MAJVER);
- 3e74: 84 e0 ldi r24, 0x04 ; 4
- 3e76: 01 c0 rjmp .+2 ; 0x3e7a <main+0x7a>
- } else {
- /*
- * GET PARAMETER returns a generic 0x03 reply for
- * other parameters - enough to keep Avrdude happy
- */
- putch(0x03);
- 3e78: 83 e0 ldi r24, 0x03 ; 3
- 3e7a: 8d d0 rcall .+282 ; 0x3f96 <putch>
- 3e7c: 89 c0 rjmp .+274 ; 0x3f90 <main+0x190>
- }
- }
- else if(ch == STK_SET_DEVICE) {
- 3e7e: 82 34 cpi r24, 0x42 ; 66
- 3e80: 11 f4 brne .+4 ; 0x3e86 <main+0x86>
- // SET DEVICE is ignored
- getNch(20);
- 3e82: 84 e1 ldi r24, 0x14 ; 20
- 3e84: 03 c0 rjmp .+6 ; 0x3e8c <main+0x8c>
- }
- else if(ch == STK_SET_DEVICE_EXT) {
- 3e86: 85 34 cpi r24, 0x45 ; 69
- 3e88: 19 f4 brne .+6 ; 0x3e90 <main+0x90>
- // SET DEVICE EXT is ignored
- getNch(5);
- 3e8a: 85 e0 ldi r24, 0x05 ; 5
- 3e8c: a6 d0 rcall .+332 ; 0x3fda <getNch>
- 3e8e: 80 c0 rjmp .+256 ; 0x3f90 <main+0x190>
- }
- else if(ch == STK_LOAD_ADDRESS) {
- 3e90: 85 35 cpi r24, 0x55 ; 85
- 3e92: 79 f4 brne .+30 ; 0x3eb2 <main+0xb2>
- // LOAD ADDRESS
- uint16_t newAddress;
- newAddress = getch();
- 3e94: 88 d0 rcall .+272 ; 0x3fa6 <getch>
- newAddress = (newAddress & 0xff) | (getch() << 8);
- 3e96: e8 2e mov r14, r24
- 3e98: ff 24 eor r15, r15
- 3e9a: 85 d0 rcall .+266 ; 0x3fa6 <getch>
- 3e9c: 08 2f mov r16, r24
- 3e9e: 10 e0 ldi r17, 0x00 ; 0
- 3ea0: 10 2f mov r17, r16
- 3ea2: 00 27 eor r16, r16
- 3ea4: 0e 29 or r16, r14
- 3ea6: 1f 29 or r17, r15
-#ifdef RAMPZ
- // Transfer top bit to RAMPZ
- RAMPZ = (newAddress & 0x8000) ? 1 : 0;
-#endif
- newAddress += newAddress; // Convert from word address to byte address
- 3ea8: 00 0f add r16, r16
- 3eaa: 11 1f adc r17, r17
- address = newAddress;
- verifySpace();
- 3eac: 8e d0 rcall .+284 ; 0x3fca <verifySpace>
- 3eae: 68 01 movw r12, r16
- 3eb0: 6f c0 rjmp .+222 ; 0x3f90 <main+0x190>
- }
- else if(ch == STK_UNIVERSAL) {
- 3eb2: 86 35 cpi r24, 0x56 ; 86
- 3eb4: 21 f4 brne .+8 ; 0x3ebe <main+0xbe>
- // UNIVERSAL command is ignored
- getNch(4);
- 3eb6: 84 e0 ldi r24, 0x04 ; 4
- 3eb8: 90 d0 rcall .+288 ; 0x3fda <getNch>
- putch(0x00);
- 3eba: 80 e0 ldi r24, 0x00 ; 0
- 3ebc: de cf rjmp .-68 ; 0x3e7a <main+0x7a>
- }
- /* Write memory, length is big endian and is in bytes */
- else if(ch == STK_PROG_PAGE) {
- 3ebe: 84 36 cpi r24, 0x64 ; 100
- 3ec0: 09 f0 breq .+2 ; 0x3ec4 <main+0xc4>
- 3ec2: 40 c0 rjmp .+128 ; 0x3f44 <main+0x144>
- // PROGRAM PAGE - we support flash programming only, not EEPROM
- uint8_t *bufPtr;
- uint16_t addrPtr;
-
- getch(); /* getlen() */
- 3ec4: 70 d0 rcall .+224 ; 0x3fa6 <getch>
- length = getch();
- 3ec6: 6f d0 rcall .+222 ; 0x3fa6 <getch>
- 3ec8: 08 2f mov r16, r24
- getch();
- 3eca: 6d d0 rcall .+218 ; 0x3fa6 <getch>
-
- // If we are in RWW section, immediately start page erase
- if (address < NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
- 3ecc: 80 e0 ldi r24, 0x00 ; 0
- 3ece: c8 16 cp r12, r24
- 3ed0: 88 e3 ldi r24, 0x38 ; 56
- 3ed2: d8 06 cpc r13, r24
- 3ed4: 18 f4 brcc .+6 ; 0x3edc <main+0xdc>
- 3ed6: f6 01 movw r30, r12
- 3ed8: b7 be out 0x37, r11 ; 55
- 3eda: e8 95 spm
- 3edc: c0 e0 ldi r28, 0x00 ; 0
- 3ede: d1 e0 ldi r29, 0x01 ; 1
-
- // While that is going on, read in page contents
- bufPtr = buff;
- do *bufPtr++ = getch();
- 3ee0: 62 d0 rcall .+196 ; 0x3fa6 <getch>
- 3ee2: 89 93 st Y+, r24
- while (--length);
- 3ee4: 0c 17 cp r16, r28
- 3ee6: e1 f7 brne .-8 ; 0x3ee0 <main+0xe0>
-
- // If we are in NRWW section, page erase has to be delayed until now.
- // Todo: Take RAMPZ into account
- if (address >= NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
- 3ee8: f0 e0 ldi r31, 0x00 ; 0
- 3eea: cf 16 cp r12, r31
- 3eec: f8 e3 ldi r31, 0x38 ; 56
- 3eee: df 06 cpc r13, r31
- 3ef0: 18 f0 brcs .+6 ; 0x3ef8 <main+0xf8>
- 3ef2: f6 01 movw r30, r12
- 3ef4: b7 be out 0x37, r11 ; 55
- 3ef6: e8 95 spm
-
- // Read command terminator, start reply
- verifySpace();
- 3ef8: 68 d0 rcall .+208 ; 0x3fca <verifySpace>
-
- // If only a partial page is to be programmed, the erase might not be complete.
- // So check that here
- boot_spm_busy_wait();
- 3efa: 07 b6 in r0, 0x37 ; 55
- 3efc: 00 fc sbrc r0, 0
- 3efe: fd cf rjmp .-6 ; 0x3efa <main+0xfa>
- 3f00: a6 01 movw r20, r12
- 3f02: a0 e0 ldi r26, 0x00 ; 0
- 3f04: b1 e0 ldi r27, 0x01 ; 1
- bufPtr = buff;
- addrPtr = (uint16_t)(void*)address;
- ch = SPM_PAGESIZE / 2;
- do {
- uint16_t a;
- a = *bufPtr++;
- 3f06: 2c 91 ld r18, X
- 3f08: 30 e0 ldi r19, 0x00 ; 0
- a |= (*bufPtr++) << 8;
- 3f0a: 11 96 adiw r26, 0x01 ; 1
- 3f0c: 8c 91 ld r24, X
- 3f0e: 11 97 sbiw r26, 0x01 ; 1
- 3f10: 90 e0 ldi r25, 0x00 ; 0
- 3f12: 98 2f mov r25, r24
- 3f14: 88 27 eor r24, r24
- 3f16: 82 2b or r24, r18
- 3f18: 93 2b or r25, r19
-#define rstVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+4))
-#define wdtVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+6))
-#endif
-
-/* main program starts here */
-int main(void) {
- 3f1a: 12 96 adiw r26, 0x02 ; 2
- ch = SPM_PAGESIZE / 2;
- do {
- uint16_t a;
- a = *bufPtr++;
- a |= (*bufPtr++) << 8;
- __boot_page_fill_short((uint16_t)(void*)addrPtr,a);
- 3f1c: fa 01 movw r30, r20
- 3f1e: 0c 01 movw r0, r24
- 3f20: 87 be out 0x37, r8 ; 55
- 3f22: e8 95 spm
- 3f24: 11 24 eor r1, r1
- addrPtr += 2;
- 3f26: 4e 5f subi r20, 0xFE ; 254
- 3f28: 5f 4f sbci r21, 0xFF ; 255
- } while (--ch);
- 3f2a: f1 e0 ldi r31, 0x01 ; 1
- 3f2c: a0 38 cpi r26, 0x80 ; 128
- 3f2e: bf 07 cpc r27, r31
- 3f30: 51 f7 brne .-44 ; 0x3f06 <main+0x106>
-
- // Write from programming buffer
- __boot_page_write_short((uint16_t)(void*)address);
- 3f32: f6 01 movw r30, r12
- 3f34: a7 be out 0x37, r10 ; 55
- 3f36: e8 95 spm
- boot_spm_busy_wait();
- 3f38: 07 b6 in r0, 0x37 ; 55
- 3f3a: 00 fc sbrc r0, 0
- 3f3c: fd cf rjmp .-6 ; 0x3f38 <main+0x138>
-
-#if defined(RWWSRE)
- // Reenable read access to flash
- boot_rww_enable();
- 3f3e: 97 be out 0x37, r9 ; 55
- 3f40: e8 95 spm
- 3f42: 26 c0 rjmp .+76 ; 0x3f90 <main+0x190>
-#endif
-
- }
- /* Read memory block mode, length is big endian. */
- else if(ch == STK_READ_PAGE) {
- 3f44: 84 37 cpi r24, 0x74 ; 116
- 3f46: b1 f4 brne .+44 ; 0x3f74 <main+0x174>
- // READ PAGE - we only read flash
- getch(); /* getlen() */
- 3f48: 2e d0 rcall .+92 ; 0x3fa6 <getch>
- length = getch();
- 3f4a: 2d d0 rcall .+90 ; 0x3fa6 <getch>
- 3f4c: f8 2e mov r15, r24
- getch();
- 3f4e: 2b d0 rcall .+86 ; 0x3fa6 <getch>
-
- verifySpace();
- 3f50: 3c d0 rcall .+120 ; 0x3fca <verifySpace>
- 3f52: f6 01 movw r30, r12
- 3f54: ef 2c mov r14, r15
- putch(result);
- address++;
- }
- while (--length);
-#else
- do putch(pgm_read_byte_near(address++));
- 3f56: 8f 01 movw r16, r30
- 3f58: 0f 5f subi r16, 0xFF ; 255
- 3f5a: 1f 4f sbci r17, 0xFF ; 255
- 3f5c: 84 91 lpm r24, Z+
- 3f5e: 1b d0 rcall .+54 ; 0x3f96 <putch>
- while (--length);
- 3f60: ea 94 dec r14
- 3f62: f8 01 movw r30, r16
- 3f64: c1 f7 brne .-16 ; 0x3f56 <main+0x156>
-#define rstVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+4))
-#define wdtVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+6))
-#endif
-
-/* main program starts here */
-int main(void) {
- 3f66: 08 94 sec
- 3f68: c1 1c adc r12, r1
- 3f6a: d1 1c adc r13, r1
- 3f6c: fa 94 dec r15
- 3f6e: cf 0c add r12, r15
- 3f70: d1 1c adc r13, r1
- 3f72: 0e c0 rjmp .+28 ; 0x3f90 <main+0x190>
-#endif
-#endif
- }
-
- /* Get device signature bytes */
- else if(ch == STK_READ_SIGN) {
- 3f74: 85 37 cpi r24, 0x75 ; 117
- 3f76: 39 f4 brne .+14 ; 0x3f86 <main+0x186>
- // READ SIGN - return what Avrdude wants to hear
- verifySpace();
- 3f78: 28 d0 rcall .+80 ; 0x3fca <verifySpace>
- putch(SIGNATURE_0);
- 3f7a: 8e e1 ldi r24, 0x1E ; 30
- 3f7c: 0c d0 rcall .+24 ; 0x3f96 <putch>
- putch(SIGNATURE_1);
- 3f7e: 84 e9 ldi r24, 0x94 ; 148
- 3f80: 0a d0 rcall .+20 ; 0x3f96 <putch>
- putch(SIGNATURE_2);
- 3f82: 86 e0 ldi r24, 0x06 ; 6
- 3f84: 7a cf rjmp .-268 ; 0x3e7a <main+0x7a>
- }
- else if (ch == 'Q') {
- 3f86: 81 35 cpi r24, 0x51 ; 81
- 3f88: 11 f4 brne .+4 ; 0x3f8e <main+0x18e>
- // Adaboot no-wait mod
- watchdogConfig(WATCHDOG_16MS);
- 3f8a: 88 e0 ldi r24, 0x08 ; 8
- 3f8c: 18 d0 rcall .+48 ; 0x3fbe <watchdogConfig>
- verifySpace();
- }
- else {
- // This covers the response to commands like STK_ENTER_PROGMODE
- verifySpace();
- 3f8e: 1d d0 rcall .+58 ; 0x3fca <verifySpace>
- }
- putch(STK_OK);
- 3f90: 80 e1 ldi r24, 0x10 ; 16
- 3f92: 01 d0 rcall .+2 ; 0x3f96 <putch>
- 3f94: 65 cf rjmp .-310 ; 0x3e60 <main+0x60>
-
-00003f96 <putch>:
- }
-}
-
-void putch(char ch) {
- 3f96: 98 2f mov r25, r24
-#ifndef SOFT_UART
- while (!(UCSR0A & _BV(UDRE0)));
- 3f98: 80 91 c0 00 lds r24, 0x00C0
- 3f9c: 85 ff sbrs r24, 5
- 3f9e: fc cf rjmp .-8 ; 0x3f98 <putch+0x2>
- UDR0 = ch;
- 3fa0: 90 93 c6 00 sts 0x00C6, r25
- [uartBit] "I" (UART_TX_BIT)
- :
- "r25"
- );
-#endif
-}
- 3fa4: 08 95 ret
-
-00003fa6 <getch>:
- [uartBit] "I" (UART_RX_BIT)
- :
- "r25"
-);
-#else
- while(!(UCSR0A & _BV(RXC0)))
- 3fa6: 80 91 c0 00 lds r24, 0x00C0
- 3faa: 87 ff sbrs r24, 7
- 3fac: fc cf rjmp .-8 ; 0x3fa6 <getch>
- ;
- if (!(UCSR0A & _BV(FE0))) {
- 3fae: 80 91 c0 00 lds r24, 0x00C0
- 3fb2: 84 fd sbrc r24, 4
- 3fb4: 01 c0 rjmp .+2 ; 0x3fb8 <getch+0x12>
-}
-#endif
-
-// Watchdog functions. These are only safe with interrupts turned off.
-void watchdogReset() {
- __asm__ __volatile__ (
- 3fb6: a8 95 wdr
- * don't care that an invalid char is returned...)
- */
- watchdogReset();
- }
-
- ch = UDR0;
- 3fb8: 80 91 c6 00 lds r24, 0x00C6
- LED_PIN |= _BV(LED);
-#endif
-#endif
-
- return ch;
-}
- 3fbc: 08 95 ret
-
-00003fbe <watchdogConfig>:
- "wdr\n"
- );
-}
-
-void watchdogConfig(uint8_t x) {
- WDTCSR = _BV(WDCE) | _BV(WDE);
- 3fbe: e0 e6 ldi r30, 0x60 ; 96
- 3fc0: f0 e0 ldi r31, 0x00 ; 0
- 3fc2: 98 e1 ldi r25, 0x18 ; 24
- 3fc4: 90 83 st Z, r25
- WDTCSR = x;
- 3fc6: 80 83 st Z, r24
-}
- 3fc8: 08 95 ret
-
-00003fca <verifySpace>:
- do getch(); while (--count);
- verifySpace();
-}
-
-void verifySpace() {
- if (getch() != CRC_EOP) {
- 3fca: ed df rcall .-38 ; 0x3fa6 <getch>
- 3fcc: 80 32 cpi r24, 0x20 ; 32
- 3fce: 19 f0 breq .+6 ; 0x3fd6 <verifySpace+0xc>
- watchdogConfig(WATCHDOG_16MS); // shorten WD timeout
- 3fd0: 88 e0 ldi r24, 0x08 ; 8
- 3fd2: f5 df rcall .-22 ; 0x3fbe <watchdogConfig>
- 3fd4: ff cf rjmp .-2 ; 0x3fd4 <verifySpace+0xa>
- while (1) // and busy-loop so that WD causes
- ; // a reset and app start.
- }
- putch(STK_INSYNC);
- 3fd6: 84 e1 ldi r24, 0x14 ; 20
-}
- 3fd8: de cf rjmp .-68 ; 0x3f96 <putch>
-
-00003fda <getNch>:
- ::[count] "M" (UART_B_VALUE)
- );
-}
-#endif
-
-void getNch(uint8_t count) {
- 3fda: 1f 93 push r17
- 3fdc: 18 2f mov r17, r24
- do getch(); while (--count);
- 3fde: e3 df rcall .-58 ; 0x3fa6 <getch>
- 3fe0: 11 50 subi r17, 0x01 ; 1
- 3fe2: e9 f7 brne .-6 ; 0x3fde <getNch+0x4>
- verifySpace();
- 3fe4: f2 df rcall .-28 ; 0x3fca <verifySpace>
-}
- 3fe6: 1f 91 pop r17
- 3fe8: 08 95 ret
-
-00003fea <appStart>:
- WDTCSR = _BV(WDCE) | _BV(WDE);
- WDTCSR = x;
-}
-
-void appStart() {
- watchdogConfig(WATCHDOG_OFF);
- 3fea: 80 e0 ldi r24, 0x00 ; 0
- 3fec: e8 df rcall .-48 ; 0x3fbe <watchdogConfig>
- __asm__ __volatile__ (
- 3fee: ee 27 eor r30, r30
- 3ff0: ff 27 eor r31, r31
- 3ff2: 09 94 ijmp
diff --git a/bootloaders/optiboot/optiboot_atmega328-Mini.hex b/bootloaders/optiboot/optiboot_atmega328-Mini.hex
deleted file mode 100644
index 02266ee..0000000
--- a/bootloaders/optiboot/optiboot_atmega328-Mini.hex
+++ /dev/null
@@ -1,33 +0,0 @@
-:107E000085E08093810082E08093C00088E18093C8
-:107E1000C10086E08093C20080E18093C40084B7F3
-:107E200014BE81FFD0D089E2C8D0259A86E020E335
-:107E30003CEF91E0309385002093840096BBB09B8B
-:107E4000FECF1D9AA8958150A9F7DD24D394A5E013
-:107E5000EA2EF1E1FF2EA4D0813421F481E0BED0DE
-:107E600083E024C0823411F484E103C0853419F422
-:107E700085E0B4D08AC08535A1F492D0082F10E0F7
-:107E800010930102009300028BD090E0982F882776
-:107E9000802B912B880F991F9093010280930002F1
-:107EA00073C0863529F484E099D080E071D06DC02C
-:107EB000843609F043C07CD0E0910002F0910102C9
-:107EC00083E080935700E895C0E0D1E069D08993C2
-:107ED000809102028150809302028823B9F778D002
-:107EE00007B600FCFDCF4091000250910102A0E0D6
-:107EF000B1E02C9130E011968C91119790E0982F81
-:107F00008827822B932B1296FA010C01D0925700EE
-:107F1000E89511244E5F5F4FF1E0A038BF0749F7A5
-:107F2000E0910002F0910102E0925700E89507B657
-:107F300000FCFDCFF0925700E89527C08437B9F4D4
-:107F400037D046D0E0910002F09101023196F093D3
-:107F50000102E09300023197E4918E2F19D08091B5
-:107F60000202815080930202882361F70EC0853798
-:107F700039F42ED08EE10CD085E90AD08FE096CF6F
-:107F8000813511F488E019D023D080E101D063CF8E
-:107F9000982F8091C00085FFFCCF9093C600089574
-:107FA000A8958091C00087FFFCCF8091C6000895FE
-:107FB000F7DFF6DF80930202F3CFE0E6F0E098E12E
-:107FC00090838083089580E0F8DFEE27FF270994EF
-:107FD000E7DF803209F0F7DF84E1DACF1F93182F53
-:0C7FE000DFDF1150E9F7F4DF1F91089576
-:0400000300007E007B
-:00000001FF
diff --git a/bootloaders/optiboot/optiboot_atmega328.hex b/bootloaders/optiboot/optiboot_atmega328.hex
deleted file mode 100644
index a219f08..0000000
--- a/bootloaders/optiboot/optiboot_atmega328.hex
+++ /dev/null
@@ -1,35 +0,0 @@
-:107E0000112484B714BE81FFF0D085E080938100F7
-:107E100082E08093C00088E18093C10086E0809377
-:107E2000C20080E18093C4008EE0C9D0259A86E02C
-:107E300020E33CEF91E0309385002093840096BBD3
-:107E4000B09BFECF1D9AA8958150A9F7CC24DD24C4
-:107E500088248394B5E0AB2EA1E19A2EF3E0BF2EE7
-:107E6000A2D0813461F49FD0082FAFD0023811F036
-:107E7000013811F484E001C083E08DD089C08234E0
-:107E800011F484E103C0853419F485E0A6D080C0E4
-:107E9000853579F488D0E82EFF2485D0082F10E0AE
-:107EA000102F00270E291F29000F111F8ED06801E7
-:107EB0006FC0863521F484E090D080E0DECF843638
-:107EC00009F040C070D06FD0082F6DD080E0C81688
-:107ED00080E7D80618F4F601B7BEE895C0E0D1E017
-:107EE00062D089930C17E1F7F0E0CF16F0E7DF06D8
-:107EF00018F0F601B7BEE89568D007B600FCFDCFD4
-:107F0000A601A0E0B1E02C9130E011968C91119780
-:107F100090E0982F8827822B932B1296FA010C0160
-:107F200087BEE89511244E5F5F4FF1E0A038BF0790
-:107F300051F7F601A7BEE89507B600FCFDCF97BE46
-:107F4000E89526C08437B1F42ED02DD0F82E2BD052
-:107F50003CD0F601EF2C8F010F5F1F4F84911BD097
-:107F6000EA94F801C1F70894C11CD11CFA94CF0C13
-:107F7000D11C0EC0853739F428D08EE10CD085E9AC
-:107F80000AD08FE07ACF813511F488E018D01DD067
-:107F900080E101D065CF982F8091C00085FFFCCF94
-:107FA0009093C60008958091C00087FFFCCF809118
-:107FB000C00084FD01C0A8958091C6000895E0E648
-:107FC000F0E098E1908380830895EDDF803219F02E
-:107FD00088E0F5DFFFCF84E1DECF1F93182FE3DFCA
-:107FE0001150E9F7F2DF1F91089580E0E8DFEE27F6
-:047FF000FF270994CA
-:027FFE00040479
-:0400000300007E007B
-:00000001FF
diff --git a/bootloaders/optiboot/optiboot_atmega328.lst b/bootloaders/optiboot/optiboot_atmega328.lst
deleted file mode 100644
index d9dd4cc..0000000
--- a/bootloaders/optiboot/optiboot_atmega328.lst
+++ /dev/null
@@ -1,598 +0,0 @@
-
-optiboot_atmega328.elf: file format elf32-avr
-
-Sections:
-Idx Name Size VMA LMA File off Algn
- 0 .text 000001f4 00007e00 00007e00 00000054 2**1
- CONTENTS, ALLOC, LOAD, READONLY, CODE
- 1 .version 00000002 00007ffe 00007ffe 00000248 2**0
- CONTENTS, READONLY
- 2 .debug_aranges 00000028 00000000 00000000 0000024a 2**0
- CONTENTS, READONLY, DEBUGGING
- 3 .debug_pubnames 0000005f 00000000 00000000 00000272 2**0
- CONTENTS, READONLY, DEBUGGING
- 4 .debug_info 000002a8 00000000 00000000 000002d1 2**0
- CONTENTS, READONLY, DEBUGGING
- 5 .debug_abbrev 00000178 00000000 00000000 00000579 2**0
- CONTENTS, READONLY, DEBUGGING
- 6 .debug_line 00000488 00000000 00000000 000006f1 2**0
- CONTENTS, READONLY, DEBUGGING
- 7 .debug_frame 00000080 00000000 00000000 00000b7c 2**2
- CONTENTS, READONLY, DEBUGGING
- 8 .debug_str 0000014f 00000000 00000000 00000bfc 2**0
- CONTENTS, READONLY, DEBUGGING
- 9 .debug_loc 000002d8 00000000 00000000 00000d4b 2**0
- CONTENTS, READONLY, DEBUGGING
- 10 .debug_ranges 00000078 00000000 00000000 00001023 2**0
- CONTENTS, READONLY, DEBUGGING
-
-Disassembly of section .text:
-
-00007e00 <main>:
-#define rstVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+4))
-#define wdtVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+6))
-#endif
-
-/* main program starts here */
-int main(void) {
- 7e00: 11 24 eor r1, r1
-#ifdef __AVR_ATmega8__
- SP=RAMEND; // This is done by hardware reset
-#endif
-
- // Adaboot no-wait mod
- ch = MCUSR;
- 7e02: 84 b7 in r24, 0x34 ; 52
- MCUSR = 0;
- 7e04: 14 be out 0x34, r1 ; 52
- if (!(ch & _BV(EXTRF))) appStart();
- 7e06: 81 ff sbrs r24, 1
- 7e08: f0 d0 rcall .+480 ; 0x7fea <appStart>
-
-#if LED_START_FLASHES > 0
- // Set up Timer 1 for timeout counter
- TCCR1B = _BV(CS12) | _BV(CS10); // div 1024
- 7e0a: 85 e0 ldi r24, 0x05 ; 5
- 7e0c: 80 93 81 00 sts 0x0081, r24
- UCSRA = _BV(U2X); //Double speed mode USART
- UCSRB = _BV(RXEN) | _BV(TXEN); // enable Rx & Tx
- UCSRC = _BV(URSEL) | _BV(UCSZ1) | _BV(UCSZ0); // config USART; 8N1
- UBRRL = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 );
-#else
- UCSR0A = _BV(U2X0); //Double speed mode USART0
- 7e10: 82 e0 ldi r24, 0x02 ; 2
- 7e12: 80 93 c0 00 sts 0x00C0, r24
- UCSR0B = _BV(RXEN0) | _BV(TXEN0);
- 7e16: 88 e1 ldi r24, 0x18 ; 24
- 7e18: 80 93 c1 00 sts 0x00C1, r24
- UCSR0C = _BV(UCSZ00) | _BV(UCSZ01);
- 7e1c: 86 e0 ldi r24, 0x06 ; 6
- 7e1e: 80 93 c2 00 sts 0x00C2, r24
- UBRR0L = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 );
- 7e22: 80 e1 ldi r24, 0x10 ; 16
- 7e24: 80 93 c4 00 sts 0x00C4, r24
-#endif
-#endif
-
- // Set up watchdog to trigger after 500ms
- watchdogConfig(WATCHDOG_1S);
- 7e28: 8e e0 ldi r24, 0x0E ; 14
- 7e2a: c9 d0 rcall .+402 ; 0x7fbe <watchdogConfig>
-
- /* Set LED pin as output */
- LED_DDR |= _BV(LED);
- 7e2c: 25 9a sbi 0x04, 5 ; 4
- 7e2e: 86 e0 ldi r24, 0x06 ; 6
-}
-
-#if LED_START_FLASHES > 0
-void flash_led(uint8_t count) {
- do {
- TCNT1 = -(F_CPU/(1024*16));
- 7e30: 20 e3 ldi r18, 0x30 ; 48
- 7e32: 3c ef ldi r19, 0xFC ; 252
- TIFR1 = _BV(TOV1);
- 7e34: 91 e0 ldi r25, 0x01 ; 1
-}
-
-#if LED_START_FLASHES > 0
-void flash_led(uint8_t count) {
- do {
- TCNT1 = -(F_CPU/(1024*16));
- 7e36: 30 93 85 00 sts 0x0085, r19
- 7e3a: 20 93 84 00 sts 0x0084, r18
- TIFR1 = _BV(TOV1);
- 7e3e: 96 bb out 0x16, r25 ; 22
- while(!(TIFR1 & _BV(TOV1)));
- 7e40: b0 9b sbis 0x16, 0 ; 22
- 7e42: fe cf rjmp .-4 ; 0x7e40 <main+0x40>
-#ifdef __AVR_ATmega8__
- LED_PORT ^= _BV(LED);
-#else
- LED_PIN |= _BV(LED);
- 7e44: 1d 9a sbi 0x03, 5 ; 3
-}
-#endif
-
-// Watchdog functions. These are only safe with interrupts turned off.
-void watchdogReset() {
- __asm__ __volatile__ (
- 7e46: a8 95 wdr
- LED_PORT ^= _BV(LED);
-#else
- LED_PIN |= _BV(LED);
-#endif
- watchdogReset();
- } while (--count);
- 7e48: 81 50 subi r24, 0x01 ; 1
- 7e4a: a9 f7 brne .-22 ; 0x7e36 <main+0x36>
- 7e4c: cc 24 eor r12, r12
- 7e4e: dd 24 eor r13, r13
- ch = SPM_PAGESIZE / 2;
- do {
- uint16_t a;
- a = *bufPtr++;
- a |= (*bufPtr++) << 8;
- __boot_page_fill_short((uint16_t)(void*)addrPtr,a);
- 7e50: 88 24 eor r8, r8
- 7e52: 83 94 inc r8
- addrPtr += 2;
- } while (--ch);
-
- // Write from programming buffer
- __boot_page_write_short((uint16_t)(void*)address);
- 7e54: b5 e0 ldi r27, 0x05 ; 5
- 7e56: ab 2e mov r10, r27
- boot_spm_busy_wait();
-
-#if defined(RWWSRE)
- // Reenable read access to flash
- boot_rww_enable();
- 7e58: a1 e1 ldi r26, 0x11 ; 17
- 7e5a: 9a 2e mov r9, r26
- do *bufPtr++ = getch();
- while (--length);
-
- // If we are in NRWW section, page erase has to be delayed until now.
- // Todo: Take RAMPZ into account
- if (address >= NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
- 7e5c: f3 e0 ldi r31, 0x03 ; 3
- 7e5e: bf 2e mov r11, r31
-#endif
-
- /* Forever loop */
- for (;;) {
- /* get character from UART */
- ch = getch();
- 7e60: a2 d0 rcall .+324 ; 0x7fa6 <getch>
-
- if(ch == STK_GET_PARAMETER) {
- 7e62: 81 34 cpi r24, 0x41 ; 65
- 7e64: 61 f4 brne .+24 ; 0x7e7e <main+0x7e>
- unsigned char which = getch();
- 7e66: 9f d0 rcall .+318 ; 0x7fa6 <getch>
- 7e68: 08 2f mov r16, r24
- verifySpace();
- 7e6a: af d0 rcall .+350 ; 0x7fca <verifySpace>
- if (which == 0x82) {
- 7e6c: 02 38 cpi r16, 0x82 ; 130
- 7e6e: 11 f0 breq .+4 ; 0x7e74 <main+0x74>
- /*
- * Send optiboot version as "minor SW version"
- */
- putch(OPTIBOOT_MINVER);
- } else if (which == 0x81) {
- 7e70: 01 38 cpi r16, 0x81 ; 129
- 7e72: 11 f4 brne .+4 ; 0x7e78 <main+0x78>
- putch(OPTIBOOT_MAJVER);
- 7e74: 84 e0 ldi r24, 0x04 ; 4
- 7e76: 01 c0 rjmp .+2 ; 0x7e7a <main+0x7a>
- } else {
- /*
- * GET PARAMETER returns a generic 0x03 reply for
- * other parameters - enough to keep Avrdude happy
- */
- putch(0x03);
- 7e78: 83 e0 ldi r24, 0x03 ; 3
- 7e7a: 8d d0 rcall .+282 ; 0x7f96 <putch>
- 7e7c: 89 c0 rjmp .+274 ; 0x7f90 <main+0x190>
- }
- }
- else if(ch == STK_SET_DEVICE) {
- 7e7e: 82 34 cpi r24, 0x42 ; 66
- 7e80: 11 f4 brne .+4 ; 0x7e86 <main+0x86>
- // SET DEVICE is ignored
- getNch(20);
- 7e82: 84 e1 ldi r24, 0x14 ; 20
- 7e84: 03 c0 rjmp .+6 ; 0x7e8c <main+0x8c>
- }
- else if(ch == STK_SET_DEVICE_EXT) {
- 7e86: 85 34 cpi r24, 0x45 ; 69
- 7e88: 19 f4 brne .+6 ; 0x7e90 <main+0x90>
- // SET DEVICE EXT is ignored
- getNch(5);
- 7e8a: 85 e0 ldi r24, 0x05 ; 5
- 7e8c: a6 d0 rcall .+332 ; 0x7fda <getNch>
- 7e8e: 80 c0 rjmp .+256 ; 0x7f90 <main+0x190>
- }
- else if(ch == STK_LOAD_ADDRESS) {
- 7e90: 85 35 cpi r24, 0x55 ; 85
- 7e92: 79 f4 brne .+30 ; 0x7eb2 <main+0xb2>
- // LOAD ADDRESS
- uint16_t newAddress;
- newAddress = getch();
- 7e94: 88 d0 rcall .+272 ; 0x7fa6 <getch>
- newAddress = (newAddress & 0xff) | (getch() << 8);
- 7e96: e8 2e mov r14, r24
- 7e98: ff 24 eor r15, r15
- 7e9a: 85 d0 rcall .+266 ; 0x7fa6 <getch>
- 7e9c: 08 2f mov r16, r24
- 7e9e: 10 e0 ldi r17, 0x00 ; 0
- 7ea0: 10 2f mov r17, r16
- 7ea2: 00 27 eor r16, r16
- 7ea4: 0e 29 or r16, r14
- 7ea6: 1f 29 or r17, r15
-#ifdef RAMPZ
- // Transfer top bit to RAMPZ
- RAMPZ = (newAddress & 0x8000) ? 1 : 0;
-#endif
- newAddress += newAddress; // Convert from word address to byte address
- 7ea8: 00 0f add r16, r16
- 7eaa: 11 1f adc r17, r17
- address = newAddress;
- verifySpace();
- 7eac: 8e d0 rcall .+284 ; 0x7fca <verifySpace>
- 7eae: 68 01 movw r12, r16
- 7eb0: 6f c0 rjmp .+222 ; 0x7f90 <main+0x190>
- }
- else if(ch == STK_UNIVERSAL) {
- 7eb2: 86 35 cpi r24, 0x56 ; 86
- 7eb4: 21 f4 brne .+8 ; 0x7ebe <main+0xbe>
- // UNIVERSAL command is ignored
- getNch(4);
- 7eb6: 84 e0 ldi r24, 0x04 ; 4
- 7eb8: 90 d0 rcall .+288 ; 0x7fda <getNch>
- putch(0x00);
- 7eba: 80 e0 ldi r24, 0x00 ; 0
- 7ebc: de cf rjmp .-68 ; 0x7e7a <main+0x7a>
- }
- /* Write memory, length is big endian and is in bytes */
- else if(ch == STK_PROG_PAGE) {
- 7ebe: 84 36 cpi r24, 0x64 ; 100
- 7ec0: 09 f0 breq .+2 ; 0x7ec4 <main+0xc4>
- 7ec2: 40 c0 rjmp .+128 ; 0x7f44 <main+0x144>
- // PROGRAM PAGE - we support flash programming only, not EEPROM
- uint8_t *bufPtr;
- uint16_t addrPtr;
-
- getch(); /* getlen() */
- 7ec4: 70 d0 rcall .+224 ; 0x7fa6 <getch>
- length = getch();
- 7ec6: 6f d0 rcall .+222 ; 0x7fa6 <getch>
- 7ec8: 08 2f mov r16, r24
- getch();
- 7eca: 6d d0 rcall .+218 ; 0x7fa6 <getch>
-
- // If we are in RWW section, immediately start page erase
- if (address < NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
- 7ecc: 80 e0 ldi r24, 0x00 ; 0
- 7ece: c8 16 cp r12, r24
- 7ed0: 80 e7 ldi r24, 0x70 ; 112
- 7ed2: d8 06 cpc r13, r24
- 7ed4: 18 f4 brcc .+6 ; 0x7edc <main+0xdc>
- 7ed6: f6 01 movw r30, r12
- 7ed8: b7 be out 0x37, r11 ; 55
- 7eda: e8 95 spm
- 7edc: c0 e0 ldi r28, 0x00 ; 0
- 7ede: d1 e0 ldi r29, 0x01 ; 1
-
- // While that is going on, read in page contents
- bufPtr = buff;
- do *bufPtr++ = getch();
- 7ee0: 62 d0 rcall .+196 ; 0x7fa6 <getch>
- 7ee2: 89 93 st Y+, r24
- while (--length);
- 7ee4: 0c 17 cp r16, r28
- 7ee6: e1 f7 brne .-8 ; 0x7ee0 <main+0xe0>
-
- // If we are in NRWW section, page erase has to be delayed until now.
- // Todo: Take RAMPZ into account
- if (address >= NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
- 7ee8: f0 e0 ldi r31, 0x00 ; 0
- 7eea: cf 16 cp r12, r31
- 7eec: f0 e7 ldi r31, 0x70 ; 112
- 7eee: df 06 cpc r13, r31
- 7ef0: 18 f0 brcs .+6 ; 0x7ef8 <main+0xf8>
- 7ef2: f6 01 movw r30, r12
- 7ef4: b7 be out 0x37, r11 ; 55
- 7ef6: e8 95 spm
-
- // Read command terminator, start reply
- verifySpace();
- 7ef8: 68 d0 rcall .+208 ; 0x7fca <verifySpace>
-
- // If only a partial page is to be programmed, the erase might not be complete.
- // So check that here
- boot_spm_busy_wait();
- 7efa: 07 b6 in r0, 0x37 ; 55
- 7efc: 00 fc sbrc r0, 0
- 7efe: fd cf rjmp .-6 ; 0x7efa <main+0xfa>
- 7f00: a6 01 movw r20, r12
- 7f02: a0 e0 ldi r26, 0x00 ; 0
- 7f04: b1 e0 ldi r27, 0x01 ; 1
- bufPtr = buff;
- addrPtr = (uint16_t)(void*)address;
- ch = SPM_PAGESIZE / 2;
- do {
- uint16_t a;
- a = *bufPtr++;
- 7f06: 2c 91 ld r18, X
- 7f08: 30 e0 ldi r19, 0x00 ; 0
- a |= (*bufPtr++) << 8;
- 7f0a: 11 96 adiw r26, 0x01 ; 1
- 7f0c: 8c 91 ld r24, X
- 7f0e: 11 97 sbiw r26, 0x01 ; 1
- 7f10: 90 e0 ldi r25, 0x00 ; 0
- 7f12: 98 2f mov r25, r24
- 7f14: 88 27 eor r24, r24
- 7f16: 82 2b or r24, r18
- 7f18: 93 2b or r25, r19
-#define rstVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+4))
-#define wdtVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+6))
-#endif
-
-/* main program starts here */
-int main(void) {
- 7f1a: 12 96 adiw r26, 0x02 ; 2
- ch = SPM_PAGESIZE / 2;
- do {
- uint16_t a;
- a = *bufPtr++;
- a |= (*bufPtr++) << 8;
- __boot_page_fill_short((uint16_t)(void*)addrPtr,a);
- 7f1c: fa 01 movw r30, r20
- 7f1e: 0c 01 movw r0, r24
- 7f20: 87 be out 0x37, r8 ; 55
- 7f22: e8 95 spm
- 7f24: 11 24 eor r1, r1
- addrPtr += 2;
- 7f26: 4e 5f subi r20, 0xFE ; 254
- 7f28: 5f 4f sbci r21, 0xFF ; 255
- } while (--ch);
- 7f2a: f1 e0 ldi r31, 0x01 ; 1
- 7f2c: a0 38 cpi r26, 0x80 ; 128
- 7f2e: bf 07 cpc r27, r31
- 7f30: 51 f7 brne .-44 ; 0x7f06 <main+0x106>
-
- // Write from programming buffer
- __boot_page_write_short((uint16_t)(void*)address);
- 7f32: f6 01 movw r30, r12
- 7f34: a7 be out 0x37, r10 ; 55
- 7f36: e8 95 spm
- boot_spm_busy_wait();
- 7f38: 07 b6 in r0, 0x37 ; 55
- 7f3a: 00 fc sbrc r0, 0
- 7f3c: fd cf rjmp .-6 ; 0x7f38 <main+0x138>
-
-#if defined(RWWSRE)
- // Reenable read access to flash
- boot_rww_enable();
- 7f3e: 97 be out 0x37, r9 ; 55
- 7f40: e8 95 spm
- 7f42: 26 c0 rjmp .+76 ; 0x7f90 <main+0x190>
-#endif
-
- }
- /* Read memory block mode, length is big endian. */
- else if(ch == STK_READ_PAGE) {
- 7f44: 84 37 cpi r24, 0x74 ; 116
- 7f46: b1 f4 brne .+44 ; 0x7f74 <main+0x174>
- // READ PAGE - we only read flash
- getch(); /* getlen() */
- 7f48: 2e d0 rcall .+92 ; 0x7fa6 <getch>
- length = getch();
- 7f4a: 2d d0 rcall .+90 ; 0x7fa6 <getch>
- 7f4c: f8 2e mov r15, r24
- getch();
- 7f4e: 2b d0 rcall .+86 ; 0x7fa6 <getch>
-
- verifySpace();
- 7f50: 3c d0 rcall .+120 ; 0x7fca <verifySpace>
- 7f52: f6 01 movw r30, r12
- 7f54: ef 2c mov r14, r15
- putch(result);
- address++;
- }
- while (--length);
-#else
- do putch(pgm_read_byte_near(address++));
- 7f56: 8f 01 movw r16, r30
- 7f58: 0f 5f subi r16, 0xFF ; 255
- 7f5a: 1f 4f sbci r17, 0xFF ; 255
- 7f5c: 84 91 lpm r24, Z+
- 7f5e: 1b d0 rcall .+54 ; 0x7f96 <putch>
- while (--length);
- 7f60: ea 94 dec r14
- 7f62: f8 01 movw r30, r16
- 7f64: c1 f7 brne .-16 ; 0x7f56 <main+0x156>
-#define rstVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+4))
-#define wdtVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+6))
-#endif
-
-/* main program starts here */
-int main(void) {
- 7f66: 08 94 sec
- 7f68: c1 1c adc r12, r1
- 7f6a: d1 1c adc r13, r1
- 7f6c: fa 94 dec r15
- 7f6e: cf 0c add r12, r15
- 7f70: d1 1c adc r13, r1
- 7f72: 0e c0 rjmp .+28 ; 0x7f90 <main+0x190>
-#endif
-#endif
- }
-
- /* Get device signature bytes */
- else if(ch == STK_READ_SIGN) {
- 7f74: 85 37 cpi r24, 0x75 ; 117
- 7f76: 39 f4 brne .+14 ; 0x7f86 <main+0x186>
- // READ SIGN - return what Avrdude wants to hear
- verifySpace();
- 7f78: 28 d0 rcall .+80 ; 0x7fca <verifySpace>
- putch(SIGNATURE_0);
- 7f7a: 8e e1 ldi r24, 0x1E ; 30
- 7f7c: 0c d0 rcall .+24 ; 0x7f96 <putch>
- putch(SIGNATURE_1);
- 7f7e: 85 e9 ldi r24, 0x95 ; 149
- 7f80: 0a d0 rcall .+20 ; 0x7f96 <putch>
- putch(SIGNATURE_2);
- 7f82: 8f e0 ldi r24, 0x0F ; 15
- 7f84: 7a cf rjmp .-268 ; 0x7e7a <main+0x7a>
- }
- else if (ch == 'Q') {
- 7f86: 81 35 cpi r24, 0x51 ; 81
- 7f88: 11 f4 brne .+4 ; 0x7f8e <main+0x18e>
- // Adaboot no-wait mod
- watchdogConfig(WATCHDOG_16MS);
- 7f8a: 88 e0 ldi r24, 0x08 ; 8
- 7f8c: 18 d0 rcall .+48 ; 0x7fbe <watchdogConfig>
- verifySpace();
- }
- else {
- // This covers the response to commands like STK_ENTER_PROGMODE
- verifySpace();
- 7f8e: 1d d0 rcall .+58 ; 0x7fca <verifySpace>
- }
- putch(STK_OK);
- 7f90: 80 e1 ldi r24, 0x10 ; 16
- 7f92: 01 d0 rcall .+2 ; 0x7f96 <putch>
- 7f94: 65 cf rjmp .-310 ; 0x7e60 <main+0x60>
-
-00007f96 <putch>:
- }
-}
-
-void putch(char ch) {
- 7f96: 98 2f mov r25, r24
-#ifndef SOFT_UART
- while (!(UCSR0A & _BV(UDRE0)));
- 7f98: 80 91 c0 00 lds r24, 0x00C0
- 7f9c: 85 ff sbrs r24, 5
- 7f9e: fc cf rjmp .-8 ; 0x7f98 <putch+0x2>
- UDR0 = ch;
- 7fa0: 90 93 c6 00 sts 0x00C6, r25
- [uartBit] "I" (UART_TX_BIT)
- :
- "r25"
- );
-#endif
-}
- 7fa4: 08 95 ret
-
-00007fa6 <getch>:
- [uartBit] "I" (UART_RX_BIT)
- :
- "r25"
-);
-#else
- while(!(UCSR0A & _BV(RXC0)))
- 7fa6: 80 91 c0 00 lds r24, 0x00C0
- 7faa: 87 ff sbrs r24, 7
- 7fac: fc cf rjmp .-8 ; 0x7fa6 <getch>
- ;
- if (!(UCSR0A & _BV(FE0))) {
- 7fae: 80 91 c0 00 lds r24, 0x00C0
- 7fb2: 84 fd sbrc r24, 4
- 7fb4: 01 c0 rjmp .+2 ; 0x7fb8 <getch+0x12>
-}
-#endif
-
-// Watchdog functions. These are only safe with interrupts turned off.
-void watchdogReset() {
- __asm__ __volatile__ (
- 7fb6: a8 95 wdr
- * don't care that an invalid char is returned...)
- */
- watchdogReset();
- }
-
- ch = UDR0;
- 7fb8: 80 91 c6 00 lds r24, 0x00C6
- LED_PIN |= _BV(LED);
-#endif
-#endif
-
- return ch;
-}
- 7fbc: 08 95 ret
-
-00007fbe <watchdogConfig>:
- "wdr\n"
- );
-}
-
-void watchdogConfig(uint8_t x) {
- WDTCSR = _BV(WDCE) | _BV(WDE);
- 7fbe: e0 e6 ldi r30, 0x60 ; 96
- 7fc0: f0 e0 ldi r31, 0x00 ; 0
- 7fc2: 98 e1 ldi r25, 0x18 ; 24
- 7fc4: 90 83 st Z, r25
- WDTCSR = x;
- 7fc6: 80 83 st Z, r24
-}
- 7fc8: 08 95 ret
-
-00007fca <verifySpace>:
- do getch(); while (--count);
- verifySpace();
-}
-
-void verifySpace() {
- if (getch() != CRC_EOP) {
- 7fca: ed df rcall .-38 ; 0x7fa6 <getch>
- 7fcc: 80 32 cpi r24, 0x20 ; 32
- 7fce: 19 f0 breq .+6 ; 0x7fd6 <verifySpace+0xc>
- watchdogConfig(WATCHDOG_16MS); // shorten WD timeout
- 7fd0: 88 e0 ldi r24, 0x08 ; 8
- 7fd2: f5 df rcall .-22 ; 0x7fbe <watchdogConfig>
- 7fd4: ff cf rjmp .-2 ; 0x7fd4 <verifySpace+0xa>
- while (1) // and busy-loop so that WD causes
- ; // a reset and app start.
- }
- putch(STK_INSYNC);
- 7fd6: 84 e1 ldi r24, 0x14 ; 20
-}
- 7fd8: de cf rjmp .-68 ; 0x7f96 <putch>
-
-00007fda <getNch>:
- ::[count] "M" (UART_B_VALUE)
- );
-}
-#endif
-
-void getNch(uint8_t count) {
- 7fda: 1f 93 push r17
- 7fdc: 18 2f mov r17, r24
- do getch(); while (--count);
- 7fde: e3 df rcall .-58 ; 0x7fa6 <getch>
- 7fe0: 11 50 subi r17, 0x01 ; 1
- 7fe2: e9 f7 brne .-6 ; 0x7fde <getNch+0x4>
- verifySpace();
- 7fe4: f2 df rcall .-28 ; 0x7fca <verifySpace>
-}
- 7fe6: 1f 91 pop r17
- 7fe8: 08 95 ret
-
-00007fea <appStart>:
- WDTCSR = _BV(WDCE) | _BV(WDE);
- WDTCSR = x;
-}
-
-void appStart() {
- watchdogConfig(WATCHDOG_OFF);
- 7fea: 80 e0 ldi r24, 0x00 ; 0
- 7fec: e8 df rcall .-48 ; 0x7fbe <watchdogConfig>
- __asm__ __volatile__ (
- 7fee: ee 27 eor r30, r30
- 7ff0: ff 27 eor r31, r31
- 7ff2: 09 94 ijmp
diff --git a/bootloaders/optiboot/optiboot_atmega8.hex b/bootloaders/optiboot/optiboot_atmega8.hex
deleted file mode 100644
index b04f276..0000000
--- a/bootloaders/optiboot/optiboot_atmega8.hex
+++ /dev/null
@@ -1,33 +0,0 @@
-:101E000011248FE594E09EBF8DBF84B714BE81FF7F
-:101E1000E2D085E08EBD82E08BB988E18AB986E8A0
-:101E200080BD80E189B98EE0C2D0BD9A96E020E302
-:101E30003CEF54E040E23DBD2CBD58BF08B602FE69
-:101E4000FDCF88B3842788BBA8959150A1F7CC24F7
-:101E5000DD2488248394B5E0AB2EA1E19A2EF3E033
-:101E6000BF2E9ED0813461F49BD0082FA4D00238BD
-:101E700011F0013811F484E001C083E08DD089C0F5
-:101E8000823411F484E103C0853419F485E09BD0D9
-:101E900080C0853579F484D0E82EFF2481D0082FC6
-:101EA00010E0102F00270E291F29000F111F83D0CB
-:101EB00068016FC0863521F484E085D080E0DECFF4
-:101EC000843609F040C06CD06BD0082F69D080E018
-:101ED000C81688E1D80618F4F601B7BEE895C0E048
-:101EE000D1E05ED089930C17E1F7F0E0CF16F8E16E
-:101EF000DF0618F0F601B7BEE8955DD007B600FC26
-:101F0000FDCFA601A0E0B1E02C9130E011968C91BC
-:101F1000119790E0982F8827822B932B1296FA0125
-:101F20000C0187BEE89511244E5F5F4FF1E0A034AD
-:101F3000BF0751F7F601A7BEE89507B600FCFDCF35
-:101F400097BEE89526C08437B1F42AD029D0F82E60
-:101F500027D031D0F601EF2C8F010F5F1F4F8491F6
-:101F60001BD0EA94F801C1F70894C11CD11CFA9463
-:101F7000CF0CD11C0EC0853739F41DD08EE10CD0AA
-:101F800083E90AD087E07ACF813511F488E00FD059
-:101F900012D080E101D065CF5D9BFECF8CB9089552
-:101FA0005F9BFECF5C9901C0A8958CB1089598E124
-:101FB00091BD81BD0895F4DF803219F088E0F7DF2C
-:101FC000FFCF84E1E9CF1F93182FEADF1150E9F723
-:101FD000F2DF1F91089580E0EADFEE27FF270994E2
-:021FFE000404D9
-:0400000300001E00DB
-:00000001FF
diff --git a/bootloaders/optiboot/optiboot_atmega8.lst b/bootloaders/optiboot/optiboot_atmega8.lst
deleted file mode 100644
index d921895..0000000
--- a/bootloaders/optiboot/optiboot_atmega8.lst
+++ /dev/null
@@ -1,604 +0,0 @@
-
-optiboot_atmega8.elf: file format elf32-avr
-
-Sections:
-Idx Name Size VMA LMA File off Algn
- 0 .text 000001e0 00001e00 00001e00 00000054 2**1
- CONTENTS, ALLOC, LOAD, READONLY, CODE
- 1 .version 00000002 00001ffe 00001ffe 00000234 2**0
- CONTENTS, READONLY
- 2 .debug_aranges 00000028 00000000 00000000 00000236 2**0
- CONTENTS, READONLY, DEBUGGING
- 3 .debug_pubnames 0000005f 00000000 00000000 0000025e 2**0
- CONTENTS, READONLY, DEBUGGING
- 4 .debug_info 000002a6 00000000 00000000 000002bd 2**0
- CONTENTS, READONLY, DEBUGGING
- 5 .debug_abbrev 00000169 00000000 00000000 00000563 2**0
- CONTENTS, READONLY, DEBUGGING
- 6 .debug_line 00000498 00000000 00000000 000006cc 2**0
- CONTENTS, READONLY, DEBUGGING
- 7 .debug_frame 00000080 00000000 00000000 00000b64 2**2
- CONTENTS, READONLY, DEBUGGING
- 8 .debug_str 0000014f 00000000 00000000 00000be4 2**0
- CONTENTS, READONLY, DEBUGGING
- 9 .debug_loc 000002ba 00000000 00000000 00000d33 2**0
- CONTENTS, READONLY, DEBUGGING
- 10 .debug_ranges 00000078 00000000 00000000 00000fed 2**0
- CONTENTS, READONLY, DEBUGGING
-
-Disassembly of section .text:
-
-00001e00 <main>:
-#define rstVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+4))
-#define wdtVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+6))
-#endif
-
-/* main program starts here */
-int main(void) {
- 1e00: 11 24 eor r1, r1
- //
- // If not, uncomment the following instructions:
- // cli();
- asm volatile ("clr __zero_reg__");
-#ifdef __AVR_ATmega8__
- SP=RAMEND; // This is done by hardware reset
- 1e02: 8f e5 ldi r24, 0x5F ; 95
- 1e04: 94 e0 ldi r25, 0x04 ; 4
- 1e06: 9e bf out 0x3e, r25 ; 62
- 1e08: 8d bf out 0x3d, r24 ; 61
-#endif
-
- // Adaboot no-wait mod
- ch = MCUSR;
- 1e0a: 84 b7 in r24, 0x34 ; 52
- MCUSR = 0;
- 1e0c: 14 be out 0x34, r1 ; 52
- if (!(ch & _BV(EXTRF))) appStart();
- 1e0e: 81 ff sbrs r24, 1
- 1e10: e2 d0 rcall .+452 ; 0x1fd6 <appStart>
-
-#if LED_START_FLASHES > 0
- // Set up Timer 1 for timeout counter
- TCCR1B = _BV(CS12) | _BV(CS10); // div 1024
- 1e12: 85 e0 ldi r24, 0x05 ; 5
- 1e14: 8e bd out 0x2e, r24 ; 46
-#endif
-#ifndef SOFT_UART
-#ifdef __AVR_ATmega8__
- UCSRA = _BV(U2X); //Double speed mode USART
- 1e16: 82 e0 ldi r24, 0x02 ; 2
- 1e18: 8b b9 out 0x0b, r24 ; 11
- UCSRB = _BV(RXEN) | _BV(TXEN); // enable Rx & Tx
- 1e1a: 88 e1 ldi r24, 0x18 ; 24
- 1e1c: 8a b9 out 0x0a, r24 ; 10
- UCSRC = _BV(URSEL) | _BV(UCSZ1) | _BV(UCSZ0); // config USART; 8N1
- 1e1e: 86 e8 ldi r24, 0x86 ; 134
- 1e20: 80 bd out 0x20, r24 ; 32
- UBRRL = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 );
- 1e22: 80 e1 ldi r24, 0x10 ; 16
- 1e24: 89 b9 out 0x09, r24 ; 9
- UBRR0L = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 );
-#endif
-#endif
-
- // Set up watchdog to trigger after 500ms
- watchdogConfig(WATCHDOG_1S);
- 1e26: 8e e0 ldi r24, 0x0E ; 14
- 1e28: c2 d0 rcall .+388 ; 0x1fae <watchdogConfig>
-
- /* Set LED pin as output */
- LED_DDR |= _BV(LED);
- 1e2a: bd 9a sbi 0x17, 5 ; 23
- 1e2c: 96 e0 ldi r25, 0x06 ; 6
-}
-
-#if LED_START_FLASHES > 0
-void flash_led(uint8_t count) {
- do {
- TCNT1 = -(F_CPU/(1024*16));
- 1e2e: 20 e3 ldi r18, 0x30 ; 48
- 1e30: 3c ef ldi r19, 0xFC ; 252
- TIFR1 = _BV(TOV1);
- 1e32: 54 e0 ldi r21, 0x04 ; 4
- while(!(TIFR1 & _BV(TOV1)));
-#ifdef __AVR_ATmega8__
- LED_PORT ^= _BV(LED);
- 1e34: 40 e2 ldi r20, 0x20 ; 32
-}
-
-#if LED_START_FLASHES > 0
-void flash_led(uint8_t count) {
- do {
- TCNT1 = -(F_CPU/(1024*16));
- 1e36: 3d bd out 0x2d, r19 ; 45
- 1e38: 2c bd out 0x2c, r18 ; 44
- TIFR1 = _BV(TOV1);
- 1e3a: 58 bf out 0x38, r21 ; 56
- while(!(TIFR1 & _BV(TOV1)));
- 1e3c: 08 b6 in r0, 0x38 ; 56
- 1e3e: 02 fe sbrs r0, 2
- 1e40: fd cf rjmp .-6 ; 0x1e3c <main+0x3c>
-#ifdef __AVR_ATmega8__
- LED_PORT ^= _BV(LED);
- 1e42: 88 b3 in r24, 0x18 ; 24
- 1e44: 84 27 eor r24, r20
- 1e46: 88 bb out 0x18, r24 ; 24
-}
-#endif
-
-// Watchdog functions. These are only safe with interrupts turned off.
-void watchdogReset() {
- __asm__ __volatile__ (
- 1e48: a8 95 wdr
- LED_PORT ^= _BV(LED);
-#else
- LED_PIN |= _BV(LED);
-#endif
- watchdogReset();
- } while (--count);
- 1e4a: 91 50 subi r25, 0x01 ; 1
- 1e4c: a1 f7 brne .-24 ; 0x1e36 <main+0x36>
- 1e4e: cc 24 eor r12, r12
- 1e50: dd 24 eor r13, r13
- ch = SPM_PAGESIZE / 2;
- do {
- uint16_t a;
- a = *bufPtr++;
- a |= (*bufPtr++) << 8;
- __boot_page_fill_short((uint16_t)(void*)addrPtr,a);
- 1e52: 88 24 eor r8, r8
- 1e54: 83 94 inc r8
- addrPtr += 2;
- } while (--ch);
-
- // Write from programming buffer
- __boot_page_write_short((uint16_t)(void*)address);
- 1e56: b5 e0 ldi r27, 0x05 ; 5
- 1e58: ab 2e mov r10, r27
- boot_spm_busy_wait();
-
-#if defined(RWWSRE)
- // Reenable read access to flash
- boot_rww_enable();
- 1e5a: a1 e1 ldi r26, 0x11 ; 17
- 1e5c: 9a 2e mov r9, r26
- do *bufPtr++ = getch();
- while (--length);
-
- // If we are in NRWW section, page erase has to be delayed until now.
- // Todo: Take RAMPZ into account
- if (address >= NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
- 1e5e: f3 e0 ldi r31, 0x03 ; 3
- 1e60: bf 2e mov r11, r31
-#endif
-
- /* Forever loop */
- for (;;) {
- /* get character from UART */
- ch = getch();
- 1e62: 9e d0 rcall .+316 ; 0x1fa0 <getch>
-
- if(ch == STK_GET_PARAMETER) {
- 1e64: 81 34 cpi r24, 0x41 ; 65
- 1e66: 61 f4 brne .+24 ; 0x1e80 <main+0x80>
- unsigned char which = getch();
- 1e68: 9b d0 rcall .+310 ; 0x1fa0 <getch>
- 1e6a: 08 2f mov r16, r24
- verifySpace();
- 1e6c: a4 d0 rcall .+328 ; 0x1fb6 <verifySpace>
- if (which == 0x82) {
- 1e6e: 02 38 cpi r16, 0x82 ; 130
- 1e70: 11 f0 breq .+4 ; 0x1e76 <main+0x76>
- /*
- * Send optiboot version as "minor SW version"
- */
- putch(OPTIBOOT_MINVER);
- } else if (which == 0x81) {
- 1e72: 01 38 cpi r16, 0x81 ; 129
- 1e74: 11 f4 brne .+4 ; 0x1e7a <main+0x7a>
- putch(OPTIBOOT_MAJVER);
- 1e76: 84 e0 ldi r24, 0x04 ; 4
- 1e78: 01 c0 rjmp .+2 ; 0x1e7c <main+0x7c>
- } else {
- /*
- * GET PARAMETER returns a generic 0x03 reply for
- * other parameters - enough to keep Avrdude happy
- */
- putch(0x03);
- 1e7a: 83 e0 ldi r24, 0x03 ; 3
- 1e7c: 8d d0 rcall .+282 ; 0x1f98 <putch>
- 1e7e: 89 c0 rjmp .+274 ; 0x1f92 <main+0x192>
- }
- }
- else if(ch == STK_SET_DEVICE) {
- 1e80: 82 34 cpi r24, 0x42 ; 66
- 1e82: 11 f4 brne .+4 ; 0x1e88 <main+0x88>
- // SET DEVICE is ignored
- getNch(20);
- 1e84: 84 e1 ldi r24, 0x14 ; 20
- 1e86: 03 c0 rjmp .+6 ; 0x1e8e <main+0x8e>
- }
- else if(ch == STK_SET_DEVICE_EXT) {
- 1e88: 85 34 cpi r24, 0x45 ; 69
- 1e8a: 19 f4 brne .+6 ; 0x1e92 <main+0x92>
- // SET DEVICE EXT is ignored
- getNch(5);
- 1e8c: 85 e0 ldi r24, 0x05 ; 5
- 1e8e: 9b d0 rcall .+310 ; 0x1fc6 <getNch>
- 1e90: 80 c0 rjmp .+256 ; 0x1f92 <main+0x192>
- }
- else if(ch == STK_LOAD_ADDRESS) {
- 1e92: 85 35 cpi r24, 0x55 ; 85
- 1e94: 79 f4 brne .+30 ; 0x1eb4 <main+0xb4>
- // LOAD ADDRESS
- uint16_t newAddress;
- newAddress = getch();
- 1e96: 84 d0 rcall .+264 ; 0x1fa0 <getch>
- newAddress = (newAddress & 0xff) | (getch() << 8);
- 1e98: e8 2e mov r14, r24
- 1e9a: ff 24 eor r15, r15
- 1e9c: 81 d0 rcall .+258 ; 0x1fa0 <getch>
- 1e9e: 08 2f mov r16, r24
- 1ea0: 10 e0 ldi r17, 0x00 ; 0
- 1ea2: 10 2f mov r17, r16
- 1ea4: 00 27 eor r16, r16
- 1ea6: 0e 29 or r16, r14
- 1ea8: 1f 29 or r17, r15
-#ifdef RAMPZ
- // Transfer top bit to RAMPZ
- RAMPZ = (newAddress & 0x8000) ? 1 : 0;
-#endif
- newAddress += newAddress; // Convert from word address to byte address
- 1eaa: 00 0f add r16, r16
- 1eac: 11 1f adc r17, r17
- address = newAddress;
- verifySpace();
- 1eae: 83 d0 rcall .+262 ; 0x1fb6 <verifySpace>
- 1eb0: 68 01 movw r12, r16
- 1eb2: 6f c0 rjmp .+222 ; 0x1f92 <main+0x192>
- }
- else if(ch == STK_UNIVERSAL) {
- 1eb4: 86 35 cpi r24, 0x56 ; 86
- 1eb6: 21 f4 brne .+8 ; 0x1ec0 <main+0xc0>
- // UNIVERSAL command is ignored
- getNch(4);
- 1eb8: 84 e0 ldi r24, 0x04 ; 4
- 1eba: 85 d0 rcall .+266 ; 0x1fc6 <getNch>
- putch(0x00);
- 1ebc: 80 e0 ldi r24, 0x00 ; 0
- 1ebe: de cf rjmp .-68 ; 0x1e7c <main+0x7c>
- }
- /* Write memory, length is big endian and is in bytes */
- else if(ch == STK_PROG_PAGE) {
- 1ec0: 84 36 cpi r24, 0x64 ; 100
- 1ec2: 09 f0 breq .+2 ; 0x1ec6 <main+0xc6>
- 1ec4: 40 c0 rjmp .+128 ; 0x1f46 <main+0x146>
- // PROGRAM PAGE - we support flash programming only, not EEPROM
- uint8_t *bufPtr;
- uint16_t addrPtr;
-
- getch(); /* getlen() */
- 1ec6: 6c d0 rcall .+216 ; 0x1fa0 <getch>
- length = getch();
- 1ec8: 6b d0 rcall .+214 ; 0x1fa0 <getch>
- 1eca: 08 2f mov r16, r24
- getch();
- 1ecc: 69 d0 rcall .+210 ; 0x1fa0 <getch>
-
- // If we are in RWW section, immediately start page erase
- if (address < NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
- 1ece: 80 e0 ldi r24, 0x00 ; 0
- 1ed0: c8 16 cp r12, r24
- 1ed2: 88 e1 ldi r24, 0x18 ; 24
- 1ed4: d8 06 cpc r13, r24
- 1ed6: 18 f4 brcc .+6 ; 0x1ede <main+0xde>
- 1ed8: f6 01 movw r30, r12
- 1eda: b7 be out 0x37, r11 ; 55
- 1edc: e8 95 spm
- 1ede: c0 e0 ldi r28, 0x00 ; 0
- 1ee0: d1 e0 ldi r29, 0x01 ; 1
-
- // While that is going on, read in page contents
- bufPtr = buff;
- do *bufPtr++ = getch();
- 1ee2: 5e d0 rcall .+188 ; 0x1fa0 <getch>
- 1ee4: 89 93 st Y+, r24
- while (--length);
- 1ee6: 0c 17 cp r16, r28
- 1ee8: e1 f7 brne .-8 ; 0x1ee2 <main+0xe2>
-
- // If we are in NRWW section, page erase has to be delayed until now.
- // Todo: Take RAMPZ into account
- if (address >= NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
- 1eea: f0 e0 ldi r31, 0x00 ; 0
- 1eec: cf 16 cp r12, r31
- 1eee: f8 e1 ldi r31, 0x18 ; 24
- 1ef0: df 06 cpc r13, r31
- 1ef2: 18 f0 brcs .+6 ; 0x1efa <main+0xfa>
- 1ef4: f6 01 movw r30, r12
- 1ef6: b7 be out 0x37, r11 ; 55
- 1ef8: e8 95 spm
-
- // Read command terminator, start reply
- verifySpace();
- 1efa: 5d d0 rcall .+186 ; 0x1fb6 <verifySpace>
-
- // If only a partial page is to be programmed, the erase might not be complete.
- // So check that here
- boot_spm_busy_wait();
- 1efc: 07 b6 in r0, 0x37 ; 55
- 1efe: 00 fc sbrc r0, 0
- 1f00: fd cf rjmp .-6 ; 0x1efc <main+0xfc>
- 1f02: a6 01 movw r20, r12
- 1f04: a0 e0 ldi r26, 0x00 ; 0
- 1f06: b1 e0 ldi r27, 0x01 ; 1
- bufPtr = buff;
- addrPtr = (uint16_t)(void*)address;
- ch = SPM_PAGESIZE / 2;
- do {
- uint16_t a;
- a = *bufPtr++;
- 1f08: 2c 91 ld r18, X
- 1f0a: 30 e0 ldi r19, 0x00 ; 0
- a |= (*bufPtr++) << 8;
- 1f0c: 11 96 adiw r26, 0x01 ; 1
- 1f0e: 8c 91 ld r24, X
- 1f10: 11 97 sbiw r26, 0x01 ; 1
- 1f12: 90 e0 ldi r25, 0x00 ; 0
- 1f14: 98 2f mov r25, r24
- 1f16: 88 27 eor r24, r24
- 1f18: 82 2b or r24, r18
- 1f1a: 93 2b or r25, r19
-#define rstVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+4))
-#define wdtVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+6))
-#endif
-
-/* main program starts here */
-int main(void) {
- 1f1c: 12 96 adiw r26, 0x02 ; 2
- ch = SPM_PAGESIZE / 2;
- do {
- uint16_t a;
- a = *bufPtr++;
- a |= (*bufPtr++) << 8;
- __boot_page_fill_short((uint16_t)(void*)addrPtr,a);
- 1f1e: fa 01 movw r30, r20
- 1f20: 0c 01 movw r0, r24
- 1f22: 87 be out 0x37, r8 ; 55
- 1f24: e8 95 spm
- 1f26: 11 24 eor r1, r1
- addrPtr += 2;
- 1f28: 4e 5f subi r20, 0xFE ; 254
- 1f2a: 5f 4f sbci r21, 0xFF ; 255
- } while (--ch);
- 1f2c: f1 e0 ldi r31, 0x01 ; 1
- 1f2e: a0 34 cpi r26, 0x40 ; 64
- 1f30: bf 07 cpc r27, r31
- 1f32: 51 f7 brne .-44 ; 0x1f08 <main+0x108>
-
- // Write from programming buffer
- __boot_page_write_short((uint16_t)(void*)address);
- 1f34: f6 01 movw r30, r12
- 1f36: a7 be out 0x37, r10 ; 55
- 1f38: e8 95 spm
- boot_spm_busy_wait();
- 1f3a: 07 b6 in r0, 0x37 ; 55
- 1f3c: 00 fc sbrc r0, 0
- 1f3e: fd cf rjmp .-6 ; 0x1f3a <main+0x13a>
-
-#if defined(RWWSRE)
- // Reenable read access to flash
- boot_rww_enable();
- 1f40: 97 be out 0x37, r9 ; 55
- 1f42: e8 95 spm
- 1f44: 26 c0 rjmp .+76 ; 0x1f92 <main+0x192>
-#endif
-
- }
- /* Read memory block mode, length is big endian. */
- else if(ch == STK_READ_PAGE) {
- 1f46: 84 37 cpi r24, 0x74 ; 116
- 1f48: b1 f4 brne .+44 ; 0x1f76 <main+0x176>
- // READ PAGE - we only read flash
- getch(); /* getlen() */
- 1f4a: 2a d0 rcall .+84 ; 0x1fa0 <getch>
- length = getch();
- 1f4c: 29 d0 rcall .+82 ; 0x1fa0 <getch>
- 1f4e: f8 2e mov r15, r24
- getch();
- 1f50: 27 d0 rcall .+78 ; 0x1fa0 <getch>
-
- verifySpace();
- 1f52: 31 d0 rcall .+98 ; 0x1fb6 <verifySpace>
- 1f54: f6 01 movw r30, r12
- 1f56: ef 2c mov r14, r15
- putch(result);
- address++;
- }
- while (--length);
-#else
- do putch(pgm_read_byte_near(address++));
- 1f58: 8f 01 movw r16, r30
- 1f5a: 0f 5f subi r16, 0xFF ; 255
- 1f5c: 1f 4f sbci r17, 0xFF ; 255
- 1f5e: 84 91 lpm r24, Z+
- 1f60: 1b d0 rcall .+54 ; 0x1f98 <putch>
- while (--length);
- 1f62: ea 94 dec r14
- 1f64: f8 01 movw r30, r16
- 1f66: c1 f7 brne .-16 ; 0x1f58 <main+0x158>
-#define rstVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+4))
-#define wdtVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+6))
-#endif
-
-/* main program starts here */
-int main(void) {
- 1f68: 08 94 sec
- 1f6a: c1 1c adc r12, r1
- 1f6c: d1 1c adc r13, r1
- 1f6e: fa 94 dec r15
- 1f70: cf 0c add r12, r15
- 1f72: d1 1c adc r13, r1
- 1f74: 0e c0 rjmp .+28 ; 0x1f92 <main+0x192>
-#endif
-#endif
- }
-
- /* Get device signature bytes */
- else if(ch == STK_READ_SIGN) {
- 1f76: 85 37 cpi r24, 0x75 ; 117
- 1f78: 39 f4 brne .+14 ; 0x1f88 <main+0x188>
- // READ SIGN - return what Avrdude wants to hear
- verifySpace();
- 1f7a: 1d d0 rcall .+58 ; 0x1fb6 <verifySpace>
- putch(SIGNATURE_0);
- 1f7c: 8e e1 ldi r24, 0x1E ; 30
- 1f7e: 0c d0 rcall .+24 ; 0x1f98 <putch>
- putch(SIGNATURE_1);
- 1f80: 83 e9 ldi r24, 0x93 ; 147
- 1f82: 0a d0 rcall .+20 ; 0x1f98 <putch>
- putch(SIGNATURE_2);
- 1f84: 87 e0 ldi r24, 0x07 ; 7
- 1f86: 7a cf rjmp .-268 ; 0x1e7c <main+0x7c>
- }
- else if (ch == 'Q') {
- 1f88: 81 35 cpi r24, 0x51 ; 81
- 1f8a: 11 f4 brne .+4 ; 0x1f90 <main+0x190>
- // Adaboot no-wait mod
- watchdogConfig(WATCHDOG_16MS);
- 1f8c: 88 e0 ldi r24, 0x08 ; 8
- 1f8e: 0f d0 rcall .+30 ; 0x1fae <watchdogConfig>
- verifySpace();
- }
- else {
- // This covers the response to commands like STK_ENTER_PROGMODE
- verifySpace();
- 1f90: 12 d0 rcall .+36 ; 0x1fb6 <verifySpace>
- }
- putch(STK_OK);
- 1f92: 80 e1 ldi r24, 0x10 ; 16
- 1f94: 01 d0 rcall .+2 ; 0x1f98 <putch>
- 1f96: 65 cf rjmp .-310 ; 0x1e62 <main+0x62>
-
-00001f98 <putch>:
- }
-}
-
-void putch(char ch) {
-#ifndef SOFT_UART
- while (!(UCSR0A & _BV(UDRE0)));
- 1f98: 5d 9b sbis 0x0b, 5 ; 11
- 1f9a: fe cf rjmp .-4 ; 0x1f98 <putch>
- UDR0 = ch;
- 1f9c: 8c b9 out 0x0c, r24 ; 12
- [uartBit] "I" (UART_TX_BIT)
- :
- "r25"
- );
-#endif
-}
- 1f9e: 08 95 ret
-
-00001fa0 <getch>:
- [uartBit] "I" (UART_RX_BIT)
- :
- "r25"
-);
-#else
- while(!(UCSR0A & _BV(RXC0)))
- 1fa0: 5f 9b sbis 0x0b, 7 ; 11
- 1fa2: fe cf rjmp .-4 ; 0x1fa0 <getch>
- ;
- if (!(UCSR0A & _BV(FE0))) {
- 1fa4: 5c 99 sbic 0x0b, 4 ; 11
- 1fa6: 01 c0 rjmp .+2 ; 0x1faa <getch+0xa>
-}
-#endif
-
-// Watchdog functions. These are only safe with interrupts turned off.
-void watchdogReset() {
- __asm__ __volatile__ (
- 1fa8: a8 95 wdr
- * don't care that an invalid char is returned...)
- */
- watchdogReset();
- }
-
- ch = UDR0;
- 1faa: 8c b1 in r24, 0x0c ; 12
- LED_PIN |= _BV(LED);
-#endif
-#endif
-
- return ch;
-}
- 1fac: 08 95 ret
-
-00001fae <watchdogConfig>:
- "wdr\n"
- );
-}
-
-void watchdogConfig(uint8_t x) {
- WDTCSR = _BV(WDCE) | _BV(WDE);
- 1fae: 98 e1 ldi r25, 0x18 ; 24
- 1fb0: 91 bd out 0x21, r25 ; 33
- WDTCSR = x;
- 1fb2: 81 bd out 0x21, r24 ; 33
-}
- 1fb4: 08 95 ret
-
-00001fb6 <verifySpace>:
- do getch(); while (--count);
- verifySpace();
-}
-
-void verifySpace() {
- if (getch() != CRC_EOP) {
- 1fb6: f4 df rcall .-24 ; 0x1fa0 <getch>
- 1fb8: 80 32 cpi r24, 0x20 ; 32
- 1fba: 19 f0 breq .+6 ; 0x1fc2 <verifySpace+0xc>
- watchdogConfig(WATCHDOG_16MS); // shorten WD timeout
- 1fbc: 88 e0 ldi r24, 0x08 ; 8
- 1fbe: f7 df rcall .-18 ; 0x1fae <watchdogConfig>
- 1fc0: ff cf rjmp .-2 ; 0x1fc0 <verifySpace+0xa>
- while (1) // and busy-loop so that WD causes
- ; // a reset and app start.
- }
- putch(STK_INSYNC);
- 1fc2: 84 e1 ldi r24, 0x14 ; 20
-}
- 1fc4: e9 cf rjmp .-46 ; 0x1f98 <putch>
-
-00001fc6 <getNch>:
- ::[count] "M" (UART_B_VALUE)
- );
-}
-#endif
-
-void getNch(uint8_t count) {
- 1fc6: 1f 93 push r17
- 1fc8: 18 2f mov r17, r24
- do getch(); while (--count);
- 1fca: ea df rcall .-44 ; 0x1fa0 <getch>
- 1fcc: 11 50 subi r17, 0x01 ; 1
- 1fce: e9 f7 brne .-6 ; 0x1fca <getNch+0x4>
- verifySpace();
- 1fd0: f2 df rcall .-28 ; 0x1fb6 <verifySpace>
-}
- 1fd2: 1f 91 pop r17
- 1fd4: 08 95 ret
-
-00001fd6 <appStart>:
- WDTCSR = _BV(WDCE) | _BV(WDE);
- WDTCSR = x;
-}
-
-void appStart() {
- watchdogConfig(WATCHDOG_OFF);
- 1fd6: 80 e0 ldi r24, 0x00 ; 0
- 1fd8: ea df rcall .-44 ; 0x1fae <watchdogConfig>
- __asm__ __volatile__ (
- 1fda: ee 27 eor r30, r30
- 1fdc: ff 27 eor r31, r31
- 1fde: 09 94 ijmp
diff --git a/bootloaders/optiboot/pin_defs.h b/bootloaders/optiboot/pin_defs.h
deleted file mode 100644
index 61ce64e..0000000
--- a/bootloaders/optiboot/pin_defs.h
+++ /dev/null
@@ -1,80 +0,0 @@
-#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega88) || defined(__AVR_ATmega8__) || defined(__AVR_ATmega88__)
-/* Onboard LED is connected to pin PB5 in Arduino NG, Diecimila, and Duemilanove */
-#define LED_DDR DDRB
-#define LED_PORT PORTB
-#define LED_PIN PINB
-#define LED PINB5
-
-/* Ports for soft UART */
-#ifdef SOFT_UART
-#define UART_PORT PORTD
-#define UART_PIN PIND
-#define UART_DDR DDRD
-#define UART_TX_BIT 1
-#define UART_RX_BIT 0
-#endif
-#endif
-
-#if defined(__AVR_ATmega8__)
- //Name conversion R.Wiersma
- #define UCSR0A UCSRA
- #define UDR0 UDR
- #define UDRE0 UDRE
- #define RXC0 RXC
- #define FE0 FE
- #define TIFR1 TIFR
- #define WDTCSR WDTCR
-#endif
-
-/* Luminet support */
-#if defined(__AVR_ATtiny84__)
-/* Red LED is connected to pin PA4 */
-#define LED_DDR DDRA
-#define LED_PORT PORTA
-#define LED_PIN PINA
-#define LED PINA4
-/* Ports for soft UART - left port only for now. TX/RX on PA2/PA3 */
-#ifdef SOFT_UART
-#define UART_PORT PORTA
-#define UART_PIN PINA
-#define UART_DDR DDRA
-#define UART_TX_BIT 2
-#define UART_RX_BIT 3
-#endif
-#endif
-
-/* Sanguino support */
-#if defined(__AVR_ATmega644P__)
-/* Onboard LED is connected to pin PB0 on Sanguino */
-#define LED_DDR DDRB
-#define LED_PORT PORTB
-#define LED_PIN PINB
-#define LED PINB0
-
-/* Ports for soft UART */
-#ifdef SOFT_UART
-#define UART_PORT PORTD
-#define UART_PIN PIND
-#define UART_DDR DDRD
-#define UART_TX_BIT 1
-#define UART_RX_BIT 0
-#endif
-#endif
-
-/* Mega support */
-#if defined(__AVR_ATmega1280__)
-/* Onboard LED is connected to pin PB7 on Arduino Mega */
-#define LED_DDR DDRB
-#define LED_PORT PORTB
-#define LED_PIN PINB
-#define LED PINB7
-
-/* Ports for soft UART */
-#ifdef SOFT_UART
-#define UART_PORT PORTE
-#define UART_PIN PINE
-#define UART_DDR DDRE
-#define UART_TX_BIT 1
-#define UART_RX_BIT 0
-#endif
-#endif
diff --git a/bootloaders/optiboot/stk500.h b/bootloaders/optiboot/stk500.h
deleted file mode 100644
index ca0dd91..0000000
--- a/bootloaders/optiboot/stk500.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* STK500 constants list, from AVRDUDE */
-#define STK_OK 0x10
-#define STK_FAILED 0x11 // Not used
-#define STK_UNKNOWN 0x12 // Not used
-#define STK_NODEVICE 0x13 // Not used
-#define STK_INSYNC 0x14 // ' '
-#define STK_NOSYNC 0x15 // Not used
-#define ADC_CHANNEL_ERROR 0x16 // Not used
-#define ADC_MEASURE_OK 0x17 // Not used
-#define PWM_CHANNEL_ERROR 0x18 // Not used
-#define PWM_ADJUST_OK 0x19 // Not used
-#define CRC_EOP 0x20 // 'SPACE'
-#define STK_GET_SYNC 0x30 // '0'
-#define STK_GET_SIGN_ON 0x31 // '1'
-#define STK_SET_PARAMETER 0x40 // '@'
-#define STK_GET_PARAMETER 0x41 // 'A'
-#define STK_SET_DEVICE 0x42 // 'B'
-#define STK_SET_DEVICE_EXT 0x45 // 'E'
-#define STK_ENTER_PROGMODE 0x50 // 'P'
-#define STK_LEAVE_PROGMODE 0x51 // 'Q'
-#define STK_CHIP_ERASE 0x52 // 'R'
-#define STK_CHECK_AUTOINC 0x53 // 'S'
-#define STK_LOAD_ADDRESS 0x55 // 'U'
-#define STK_UNIVERSAL 0x56 // 'V'
-#define STK_PROG_FLASH 0x60 // '`'
-#define STK_PROG_DATA 0x61 // 'a'
-#define STK_PROG_FUSE 0x62 // 'b'
-#define STK_PROG_LOCK 0x63 // 'c'
-#define STK_PROG_PAGE 0x64 // 'd'
-#define STK_PROG_FUSE_EXT 0x65 // 'e'
-#define STK_READ_FLASH 0x70 // 'p'
-#define STK_READ_DATA 0x71 // 'q'
-#define STK_READ_FUSE 0x72 // 'r'
-#define STK_READ_LOCK 0x73 // 's'
-#define STK_READ_PAGE 0x74 // 't'
-#define STK_READ_SIGN 0x75 // 'u'
-#define STK_READ_OSCCAL 0x76 // 'v'
-#define STK_READ_FUSE_EXT 0x77 // 'w'
-#define STK_READ_OSCCAL_EXT 0x78 // 'x'
diff --git a/bootloaders/stk500v2/License.txt b/bootloaders/stk500v2/License.txt
deleted file mode 100644
index e7dcdd8..0000000
--- a/bootloaders/stk500v2/License.txt
+++ /dev/null
@@ -1,280 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
diff --git a/bootloaders/stk500v2/Makefile b/bootloaders/stk500v2/Makefile
deleted file mode 100644
index eeb9add..0000000
--- a/bootloaders/stk500v2/Makefile
+++ /dev/null
@@ -1,587 +0,0 @@
-# ----------------------------------------------------------------------------
-# Makefile to compile and link stk500boot bootloader
-# Author: Peter Fleury
-# based on WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.
-#
-# Adjust F_CPU below to the clock frequency in Mhz of your AVR target
-# Adjust BOOTLOADER_ADDRESS to your AVR target
-#
-#----------------------------------------------------------------------------
-# On command line:
-#
-# make all = Make software.
-#
-# make clean = Clean out built project files.
-#
-# make coff = Convert ELF to AVR COFF.
-#
-# make extcoff = Convert ELF to AVR Extended COFF.
-#
-# make program = Download the hex file to the device, using avrdude.
-# Please customize the avrdude settings below first!
-#
-# make debug = Start either simulavr or avarice as specified for debugging,
-# with avr-gdb or avr-insight as the front end for debugging.
-#
-# make filename.s = Just compile filename.c into the assembler code only.
-#
-# make filename.i = Create a preprocessed source file for use in submitting
-# bug reports to the GCC project.
-#
-# To rebuild project do "make clean" then "make all".
-#----------------------------------------------------------------------------
-# <MLS> = Mark Sproul msproul-at-skychariot.com
-
-
-# MCU name
-#MCU = atmega128
-
-
-# Processor frequency.
-# This will define a symbol, F_CPU, in all source code files equal to the
-# processor frequency. You can then use this symbol in your source code to
-# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-# automatically to create a 32-bit value in your source code.
-#F_CPU = 16000000
-
-
-# Bootloader
-# Please adjust if using a different AVR
-# 0x0e00*2=0x1C00 for ATmega8 512 words Boot Size
-# 0xFC00*2=0x1F800 for ATmega128 1024 words Boot Size
-# 0xF800*2=0x1F000 for ATmega1280
-# 0xF000*2=0x1E000 for ATmega1280
-#BOOTLOADER_ADDRESS = 1E000
-
-
-# Output format. (can be srec, ihex, binary)
-FORMAT = ihex
-
-
-# Target file name (without extension).
-TARGET = stk500boot
-
-
-# List C source files here. (C dependencies are automatically generated.)
-SRC = stk500boot.c
-
-
-# List Assembler source files here.
-# Make them always end in a capital .S. Files ending in a lowercase .s
-# will not be considered source files but generated files (assembler
-# output from the compiler), and will be deleted upon "make clean"!
-# Even though the DOS/Win* filesystem matches both .s and .S the same,
-# it will preserve the spelling of the filenames, and gcc itself does
-# care about how the name is spelled on its command-line.
-ASRC =
-
-
-# Optimization level, can be [0, 1, 2, 3, s].
-# 0 = turn off optimization. s = optimize for size.
-# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
-OPT = s
-
-
-# Debugging format.
-# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.
-# AVR Studio 4.10 requires dwarf-2.
-# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.
-DEBUG = dwarf-2
-
-
-# List any extra directories to look for include files here.
-# Each directory must be seperated by a space.
-# Use forward slashes for directory separators.
-# For a directory that has spaces, enclose it in quotes.
-EXTRAINCDIRS =
-
-
-# Compiler flag to set the C Standard level.
-# c89 = "ANSI" C
-# gnu89 = c89 plus GCC extensions
-# c99 = ISO C99 standard (not yet fully implemented)
-# gnu99 = c99 plus GCC extensions
-CSTANDARD = -std=gnu99
-
-
-# Place -D or -U options here
-CDEFS = -DF_CPU=$(F_CPU)UL
-
-
-# Place -I options here
-CINCS =
-
-
-
-#---------------- Compiler Options ----------------
-# -g*: generate debugging information
-# -O*: optimization level
-# -f...: tuning, see GCC manual and avr-libc documentation
-# -Wall...: warning level
-# -Wa,...: tell GCC to pass this to the assembler.
-# -adhlns...: create assembler listing
-CFLAGS = -g$(DEBUG)
-CFLAGS += $(CDEFS) $(CINCS)
-CFLAGS += -O$(OPT)
-CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -fno-jump-tables
-CFLAGS += -Wall -Wstrict-prototypes
-CFLAGS += -Wa,-adhlns=$(<:.c=.lst)
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
-CFLAGS += $(CSTANDARD)
-
-
-#---------------- Assembler Options ----------------
-# -Wa,...: tell GCC to pass this to the assembler.
-# -ahlms: create listing
-# -gstabs: have the assembler create line number information; note that
-# for use in COFF files, additional information about filenames
-# and function names needs to be present in the assembler source
-# files -- see avr-libc docs [FIXME: not yet described there]
-ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
-
-
-#---------------- Library Options ----------------
-# Minimalistic printf version
-PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
-
-# Floating point printf version (requires MATH_LIB = -lm below)
-PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
-
-# If this is left blank, then it will use the Standard printf version.
-PRINTF_LIB =
-#PRINTF_LIB = $(PRINTF_LIB_MIN)
-#PRINTF_LIB = $(PRINTF_LIB_FLOAT)
-
-
-# Minimalistic scanf version
-SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
-
-# Floating point + %[ scanf version (requires MATH_LIB = -lm below)
-SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt
-
-# If this is left blank, then it will use the Standard scanf version.
-SCANF_LIB =
-#SCANF_LIB = $(SCANF_LIB_MIN)
-#SCANF_LIB = $(SCANF_LIB_FLOAT)
-
-
-MATH_LIB = -lm
-
-
-
-#---------------- External Memory Options ----------------
-
-# 64 KB of external RAM, starting after internal RAM (ATmega128!),
-# used for variables (.data/.bss) and heap (malloc()).
-#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff
-
-# 64 KB of external RAM, starting after internal RAM (ATmega128!),
-# only used for heap (malloc()).
-#EXTMEMOPTS = -Wl,--defsym=__heap_start=0x801100,--defsym=__heap_end=0x80ffff
-
-EXTMEMOPTS =
-
-
-
-
-#---------------- Linker Options ----------------
-# -Wl,...: tell GCC to pass this to linker.
-# -Map: create map file
-# --cref: add cross reference to map file
-LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
-LDFLAGS += $(EXTMEMOPTS)
-LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
-
-
-#--------------- bootloader linker Options -------
-# BOOTLOADER_ADDRESS (=Start of Boot Loader section
-# in bytes - not words) is defined above.
-#LDFLAGS += -Wl,--section-start=.text=$(BOOTLOADER_ADDRESS) -nostartfiles -nodefaultlibs
-#LDFLAGS += -Wl,--section-start=.text=$(BOOTLOADER_ADDRESS) -nostartfiles
-LDFLAGS += -Wl,--section-start=.text=$(BOOTLOADER_ADDRESS)
-
-#---------------- Programming Options (avrdude) ----------------
-
-# Programming hardware: alf avr910 avrisp bascom bsd
-# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
-#
-# Type: avrdude -c ?
-# to get a full listing.
-#
-AVRDUDE_PROGRAMMER = stk500v2
-
-# com1 = serial port. Use lpt1 to connect to parallel port.
-AVRDUDE_PORT = com1 # programmer connected to serial device
-
-AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
-#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
-
-
-# Uncomment the following if you want avrdude's erase cycle counter.
-# Note that this counter needs to be initialized first using -Yn,
-# see avrdude manual.
-#AVRDUDE_ERASE_COUNTER = -y
-
-# Uncomment the following if you do /not/ wish a verification to be
-# performed after programming the device.
-#AVRDUDE_NO_VERIFY = -V
-
-# Increase verbosity level. Please use this when submitting bug
-# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
-# to submit bug reports.
-#AVRDUDE_VERBOSE = -v -v
-
-AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
-AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
-AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
-AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
-
-
-
-#---------------- Debugging Options ----------------
-
-# For simulavr only - target MCU frequency.
-DEBUG_MFREQ = $(F_CPU)
-
-# Set the DEBUG_UI to either gdb or insight.
-# DEBUG_UI = gdb
-DEBUG_UI = insight
-
-# Set the debugging back-end to either avarice, simulavr.
-DEBUG_BACKEND = avarice
-#DEBUG_BACKEND = simulavr
-
-# GDB Init Filename.
-GDBINIT_FILE = __avr_gdbinit
-
-# When using avarice settings for the JTAG
-JTAG_DEV = /dev/com1
-
-# Debugging port used to communicate between GDB / avarice / simulavr.
-DEBUG_PORT = 4242
-
-# Debugging host used to communicate between GDB / avarice / simulavr, normally
-# just set to localhost unless doing some sort of crazy debugging when
-# avarice is running on a different computer.
-DEBUG_HOST = localhost
-
-
-
-#============================================================================
-
-
-# Define programs and commands.
-SHELL = sh
-CC = avr-gcc
-OBJCOPY = avr-objcopy
-OBJDUMP = avr-objdump
-SIZE = avr-size
-NM = avr-nm
-AVRDUDE = avrdude
-REMOVE = rm -f
-COPY = cp
-WINSHELL = cmd
-
-
-# Define Messages
-# English
-MSG_ERRORS_NONE = Errors: none
-MSG_BEGIN = -------- begin --------
-MSG_END = -------- end --------
-MSG_SIZE_BEFORE = Size before:
-MSG_SIZE_AFTER = Size after:
-MSG_COFF = Converting to AVR COFF:
-MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
-MSG_FLASH = Creating load file for Flash:
-MSG_EEPROM = Creating load file for EEPROM:
-MSG_EXTENDED_LISTING = Creating Extended Listing:
-MSG_SYMBOL_TABLE = Creating Symbol Table:
-MSG_LINKING = Linking:
-MSG_COMPILING = Compiling:
-MSG_ASSEMBLING = Assembling:
-MSG_CLEANING = Cleaning project:
-
-
-
-
-# Define all object files.
-OBJ = $(SRC:.c=.o) $(ASRC:.S=.o)
-
-# Define all listing files.
-LST = $(SRC:.c=.lst) $(ASRC:.S=.lst)
-
-
-# Compiler flags to generate dependency files.
-GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
-
-
-# Combine all necessary flags and optional flags.
-# Add target processor to flags.
-ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
-ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
-
-
-
-############################################################
-# May 25, 2010 <MLS> Adding 1280 support
-mega1280: MCU = atmega1280
-mega1280: F_CPU = 16000000
-mega1280: BOOTLOADER_ADDRESS = 1E000
-mega1280: CFLAGS += -D_MEGA_BOARD_
-mega1280: begin gccversion sizebefore build sizeafter end
- mv $(TARGET).hex stk500boot_v2_mega1280.hex
-
-
-############################################################
-# Jul 6, 2010 <MLS> Adding 2560 support
-mega2560: MCU = atmega2560
-mega2560: F_CPU = 16000000
-mega2560: BOOTLOADER_ADDRESS = 3E000
-mega2560: CFLAGS += -D_MEGA_BOARD_
-mega2560: begin gccversion sizebefore build sizeafter end
- mv $(TARGET).hex stk500boot_v2_mega2560.hex
-
-
-############################################################
-#Initial config on Amber128 board
-# avrdude: Device signature = 0x1e9702
-# avrdude: safemode: lfuse reads as 8F
-# avrdude: safemode: hfuse reads as CB
-# avrdude: safemode: efuse reads as FF
-# Jul 17, 2010 <MLS> Adding 128 support
-############################################################
-amber128: MCU = atmega128
-#amber128: F_CPU = 16000000
-amber128: F_CPU = 14745600
-amber128: BOOTLOADER_ADDRESS = 1E000
-amber128: CFLAGS += -D_BOARD_AMBER128_
-amber128: begin gccversion sizebefore build sizeafter end
- mv $(TARGET).hex stk500boot_v2_amber128.hex
-
-############################################################
-# Aug 23, 2010 <MLS> Adding atmega2561 support
-m2561: MCU = atmega2561
-m2561: F_CPU = 8000000
-m2561: BOOTLOADER_ADDRESS = 3E000
-m2561: CFLAGS += -D_ANDROID_2561_ -DBAUDRATE=57600
-m2561: begin gccversion sizebefore build sizeafter end
- mv $(TARGET).hex stk500boot_v2_android2561.hex
-
-
-############################################################
-# avrdude: Device signature = 0x1e9801
-# avrdude: safemode: lfuse reads as EC
-# avrdude: safemode: hfuse reads as 18
-# avrdude: safemode: efuse reads as FD
-# Aug 23, 2010 <MLS> Adding cerebot 2560 @ 8mhz
-#avrdude -P usb -c usbtiny -p m2560 -v -U flash:w:/Arduino/WiringBootV2_upd1/stk500boot_v2_cerebotplus.hex
-############################################################
-cerebot: MCU = atmega2560
-cerebot: F_CPU = 8000000
-cerebot: BOOTLOADER_ADDRESS = 3E000
-cerebot: CFLAGS += -D_CEREBOTPLUS_BOARD_ -DBAUDRATE=38400 -DUART_BAUDRATE_DOUBLE_SPEED=1
-cerebot: begin gccversion sizebefore build sizeafter end
- mv $(TARGET).hex stk500boot_v2_cerebotplus.hex
-
-
-############################################################
-# Aug 23, 2010 <MLS> Adding atmega2561 support
-penguino: MCU = atmega32
-penguino: F_CPU = 16000000
-penguino: BOOTLOADER_ADDRESS = 7800
-penguino: CFLAGS += -D_PENGUINO_ -DBAUDRATE=57600
-penguino: begin gccversion sizebefore build sizeafter end
- mv $(TARGET).hex stk500boot_v2_penguino.hex
-
-
-# Default target.
-all: begin gccversion sizebefore build sizeafter end
-
-build: elf hex eep lss sym
-#build: hex eep lss sym
-
-elf: $(TARGET).elf
-hex: $(TARGET).hex
-eep: $(TARGET).eep
-lss: $(TARGET).lss
-sym: $(TARGET).sym
-
-
-
-# Eye candy.
-# AVR Studio 3.x does not check make's exit code but relies on
-# the following magic strings to be generated by the compile job.
-begin:
- @echo
- @echo $(MSG_BEGIN)
-
-end:
- @echo $(MSG_END)
- @echo
-
-
-# Display size of file.
-HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --format=avr --mcu=$(MCU) $(TARGET).elf
-
-sizebefore:
- @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
- 2>/dev/null; echo; fi
-
-sizeafter:
- @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \
- 2>/dev/null; echo; fi
-
-
-
-# Display compiler version information.
-gccversion :
- @$(CC) --version
-
-
-
-# Program the device.
-program: $(TARGET).hex $(TARGET).eep
- $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
-
-
-# Generate avr-gdb config/init file which does the following:
-# define the reset signal, load the target file, connect to target, and set
-# a breakpoint at main().
-gdb-config:
- @$(REMOVE) $(GDBINIT_FILE)
- @echo define reset >> $(GDBINIT_FILE)
- @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)
- @echo end >> $(GDBINIT_FILE)
- @echo file $(TARGET).elf >> $(GDBINIT_FILE)
- @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE)
-ifeq ($(DEBUG_BACKEND),simulavr)
- @echo load >> $(GDBINIT_FILE)
-endif
- @echo break main >> $(GDBINIT_FILE)
-
-debug: gdb-config $(TARGET).elf
-ifeq ($(DEBUG_BACKEND), avarice)
- @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.
- @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \
- $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)
- @$(WINSHELL) /c pause
-
-else
- @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \
- $(DEBUG_MFREQ) --port $(DEBUG_PORT)
-endif
- @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)
-
-
-
-
-# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
-COFFCONVERT=$(OBJCOPY) --debugging \
---change-section-address .data-0x800000 \
---change-section-address .bss-0x800000 \
---change-section-address .noinit-0x800000 \
---change-section-address .eeprom-0x810000
-
-
-
-coff: $(TARGET).elf
- @echo
- @echo $(MSG_COFF) $(TARGET).cof
- $(COFFCONVERT) -O coff-avr $< $(TARGET).cof
-
-
-extcoff: $(TARGET).elf
- @echo
- @echo $(MSG_EXTENDED_COFF) $(TARGET).cof
- $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
-
-
-# Create final output files (.hex, .eep) from ELF output file.
-%.hex: %.elf
- @echo
- @echo $(MSG_FLASH) $@
- $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
-
-%.eep: %.elf
- @echo
- @echo $(MSG_EEPROM) $@
- -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
- --change-section-lma .eeprom=0 -O $(FORMAT) $< $@
-
-# Create extended listing file from ELF output file.
-%.lss: %.elf
- @echo
- @echo $(MSG_EXTENDED_LISTING) $@
- $(OBJDUMP) -h -S $< > $@
-
-# Create a symbol table from ELF output file.
-%.sym: %.elf
- @echo
- @echo $(MSG_SYMBOL_TABLE) $@
- $(NM) -n $< > $@
-
-
-
-# Link: create ELF output file from object files.
-.SECONDARY : $(TARGET).elf
-.PRECIOUS : $(OBJ)
-%.elf: $(OBJ)
- @echo
- @echo $(MSG_LINKING) $@
- $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)
-
-
-# Compile: create object files from C source files.
-%.o : %.c
- @echo
- @echo $(MSG_COMPILING) $<
- $(CC) -c $(ALL_CFLAGS) $< -o $@
-
-
-# Compile: create assembler files from C source files.
-%.s : %.c
- $(CC) -S $(ALL_CFLAGS) $< -o $@
-
-
-# Assemble: create object files from assembler source files.
-%.o : %.S
- @echo
- @echo $(MSG_ASSEMBLING) $<
- $(CC) -c $(ALL_ASFLAGS) $< -o $@
-
-# Create preprocessed source for use in sending a bug report.
-%.i : %.c
- $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@
-
-
-# Target: clean project.
-clean: begin clean_list end
-
-clean_list :
- @echo
- @echo $(MSG_CLEANING)
- $(REMOVE) *.hex
- $(REMOVE) *.eep
- $(REMOVE) *.cof
- $(REMOVE) *.elf
- $(REMOVE) *.map
- $(REMOVE) *.sym
- $(REMOVE) *.lss
- $(REMOVE) $(OBJ)
- $(REMOVE) $(LST)
- $(REMOVE) $(SRC:.c=.s)
- $(REMOVE) $(SRC:.c=.d)
- $(REMOVE) .dep/*
-
-
-
-# Include the dependency files.
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
-
-
-# Listing of phony targets.
-.PHONY : all begin finish end sizebefore sizeafter gccversion \
-build elf hex eep lss sym coff extcoff \
-clean clean_list program debug gdb-config
-
diff --git a/bootloaders/stk500v2/Mega2560-prod-firmware-2011-06-29.hex b/bootloaders/stk500v2/Mega2560-prod-firmware-2011-06-29.hex
deleted file mode 100644
index 4f36699..0000000
--- a/bootloaders/stk500v2/Mega2560-prod-firmware-2011-06-29.hex
+++ /dev/null
@@ -1,513 +0,0 @@
-:020000023000CC
-:10E000000D94F6F20D941FF30D941FF30D941FF36E
-:10E010000D941FF30D941FF30D941FF30D941FF334
-:10E020000D941FF30D941FF30D941FF30D941FF324
-:10E030000D941FF30D941FF30D941FF30D941FF314
-:10E040000D941FF30D941FF30D941FF30D941FF304
-:10E050000D941FF30D941FF30D941FF30D941FF3F4
-:10E060000D941FF30D941FF30D941FF30D941FF3E4
-:10E070000D941FF30D941FF30D941FF30D941FF3D4
-:10E080000D941FF30D941FF30D941FF30D941FF3C4
-:10E090000D941FF30D941FF30D941FF30D941FF3B4
-:10E0A0000D941FF30D941FF30D941FF30D941FF3A4
-:10E0B0000D941FF30D941FF30D941FF30D941FF394
-:10E0C0000D941FF30D941FF30D941FF30D941FF384
-:10E0D0000D941FF30D941FF30D941FF30D941FF374
-:10E0E0000D941FF341546D65676132353630004140
-:10E0F000726475696E6F206578706C6F72657220DE
-:10E1000073746B3530305632206279204D4C530099
-:10E11000426F6F746C6F616465723E004875683F52
-:10E1200000436F6D70696C6564206F6E20203D2028
-:10E1300000435055205479706520202020203D2038
-:10E14000005F5F4156525F415243485F5F203D2070
-:10E1500000415652204C69624320566572203D2092
-:10E16000004743432056657273696F6E20203D203F
-:10E1700000435055207369676E61747572653D2068
-:10E18000004C6F77206675736520202020203D208D
-:10E1900000486967682066757365202020203D204F
-:10E1A00000457874206675736520202020203D206E
-:10E1B000004C6F636B2066757365202020203D2026
-:10E1C00000536570202039203230313000312E3636
-:10E1D0002E3700342E332E33005623202020414486
-:10E1E00044522020206F7020636F6465202020201F
-:10E1F00020696E737472756374696F6E20616464F4
-:10E2000072202020496E74657272757074006E6F92
-:10E2100020766563746F7200726A6D702020006AE8
-:10E220006D7020005768617420706F72743A0050EE
-:10E230006F7274206E6F7420737570706F72746576
-:10E2400064004D7573742062652061206C65747480
-:10E2500065720020005772697474696E67204545C5
-:10E260000052656164696E6720454500656570729E
-:10E270006F6D206572726F7220636F756E743D00F2
-:10E28000504F525400303D5A65726F206164647281
-:10E290006573732063747273003F3D435055207360
-:10E2A0007461747300403D454550524F4D20746574
-:10E2B000737400423D426C696E6B204C45440045CE
-:10E2C0003D44756D7020454550524F4D00463D44CC
-:10E2D000756D7020464C41534800483D48656C7050
-:10E2E000004C3D4C69737420492F4F20506F72745D
-:10E2F0007300513D517569742026206A756D702038
-:10E30000746F20757365722070676D00523D44759F
-:10E310006D702052414D00563D73686F7720696ED5
-:10E320007465727275707420566563746F727300D1
-:10E33000593D506F727420626C696E6B002A0052F6
-:10E340004553455400494E543000494E543100491C
-:10E350004E543200494E543300494E543400494E15
-:10E36000543500494E543600494E54370050434905
-:10E370004E5430005043494E5431005043494E549E
-:10E3800032005744540054494D45523020434F4DBC
-:10E3900050410054494D45523020434F4D504200AA
-:10E3A00054494D455230204F56460054494D455230
-:10E3B0003120434150540054494D45523120434F80
-:10E3C0004D50410054494D45523120434F4D50422C
-:10E3D0000054494D45523120434F4D50430054495C
-:10E3E0004D455231204F56460054494D455232203A
-:10E3F000434F4D50410054494D45523220434F4DFB
-:10E4000050420054494D455232204F56460054491F
-:10E410004D45523320434150540054494D455233E9
-:10E4200020434F4D50410054494D45523320434FF6
-:10E430004D50420054494D45523320434F4D5043B7
-:10E440000054494D455233204F56460054494D45DE
-:10E45000523420434150540054494D4552342043D6
-:10E460004F4D50410054494D45523420434F4D507B
-:10E47000420054494D45523420434F4D50430054BF
-:10E48000494D455234204F56460054494D4552356A
-:10E4900020434150540054494D45523520434F4D7F
-:10E4A00050410054494D45523520434F4D50420094
-:10E4B00054494D45523520434F4D50430054494D2A
-:10E4C000455235204F564600555341525430205244
-:10E4D000580055534152543020554452450055532D
-:10E4E0004152543020545800555341525431205217
-:10E4F000580055534152543120554452450055530C
-:10E5000041525431205458005553415254322052F4
-:10E5100058005553415254322055445245005553EA
-:10E5200041525432205458005553415254332052D2
-:10E5300058005553415254332055445245005553C9
-:10E5400041525433205458005350492053544300EF
-:10E5500041444300414E414C4F4720434F4D5000F2
-:10E560004545205245414459005457490053504DA8
-:10E57000205245414459002A003FE345E34AE34F16
-:10E58000E354E359E35EE363E368E36DE374E37B41
-:10E59000E382E3E9E3F6E303E4ABE3B7E3C4E3D107
-:10E5A000E3DEE386E393E3A0E348E5C8E4D2E4DEF8
-:10E5B000E454E550E560E50EE41AE427E434E44170
-:10E5C000E4E8E4F2E4FEE469E56DE54CE458E46572
-:10E5D000E472E47FE48AE496E4A3E4B0E4BDE408F2
-:10E5E000E512E51EE528E532E53EE50011241FBEF3
-:10E5F000CFEFD1E2DEBFCDBF01E00CBF12E0A0E063
-:10E60000B2E0EAEDFFEF03E00BBF02C007900D920E
-:10E61000A030B107D9F712E0A0E0B2E001C01D922E
-:10E62000AC30B107E1F70F94FBF40D94EBFF01E27E
-:10E630000EBF0FEF0DBF11241FBE0D94FBF40D9400
-:10E6400000F020E030E040ED57E005C0FA013197DE
-:10E65000F1F72F5F3F4F28173907C0F308959C014A
-:10E66000442737FD4095542FDA01C901860F911DCB
-:10E67000A11DB11DABBFFC018791882369F0809378
-:10E68000C6008091C00086FFFCCF8091C0008064EE
-:10E690008093C0006F5FE8CF08958DE08093C6003F
-:10E6A0008091C00086FFFCCF8091C0008064809381
-:10E6B000C0008AE08093C6008091C00086FFFCCF36
-:10E6C0008091C00080648093C00008950F942FF360
-:10E6D0000F944DF30895FC019081992359F0909384
-:10E6E000C6008091C00086FFFCCF8091C00080648E
-:10E6F0008093C0003196992379F70895282F982F99
-:10E7000092959F70892F805D8A3308F0895F80938E
-:10E71000C6008091C00086FFFCCF8091C00080645D
-:10E720008093C000822F8F70982F905D9A3308F0ED
-:10E73000995F9093C6008091C00086FFFCCF8091C6
-:10E74000C00080648093C00008959C01FB01853661
-:10E7500091051CF46330710594F0C90164E670E022
-:10E760000F948CFF605D7F4F6093C6008091C00066
-:10E7700086FFFCCF8091C00080648093C0002B3066
-:10E78000310514F43297B4F0C90164E670E00F94D7
-:10E790008CFF6AE070E00F948CFF605D7F4F6093A8
-:10E7A000C6008091C00086FFFCCF8091C0008064CD
-:10E7B0008093C000C9016AE070E00F948CFFC0969E
-:10E7C0008093C6008091C00086FFFCCF8091C0007E
-:10E7D00080648093C0000895282F277020642093C0
-:10E7E0007C0020917B0086958695869590E08170CF
-:10E7F000907033E0880F991F3A95E1F7277F282B17
-:10E8000020937B0080917A00806480937A008091CD
-:10E810007A0086FDFCCF2091780040917900942FFA
-:10E8200080E030E0282B392BC90108951F93182F61
-:10E8300080E892EE60E00F942FF31093C600809171
-:10E84000C00086FFFCCF8091C00080648093C00030
-:10E850000F944DF31F9108952F923F924F925F9224
-:10E860006F927F928F929F92AF92BF92CF92DF92E0
-:10E87000EF92FF920F931F93DF93CF93CDB7DEB745
-:10E8800062970FB6F894DEBF0FBECDBF382E622E52
-:10E89000CA01DB015C016D01772460E2262E2E01A6
-:10E8A0000894411C511C8BC081E0A81680E0B8067A
-:10E8B00081E0C80680E0D80628F0C601AA27BB2759
-:10E8C0000F947EF3BB27AD2D9C2D8B2D0F947EF3E3
-:10E8D0008A2D0F947EF32092C6008091C00086FF9F
-:10E8E000FCCF8091C00080648093C0009DE2909333
-:10E8F000C6008091C00086FFFCCF8091C00080647C
-:10E900008093C0002092C6008091C00086FFFCCF9B
-:10E910008091C00080648093C000198286017501D7
-:10E9200088249924A1E03A1651F03A1620F0B2E07A
-:10E930003B1661F409C00BBFF701779007C0C70110
-:10E940000F94D5FF782E02C0F7017080872D0F94A9
-:10E950007EF32092C6008091C00086FFFCCF80919C
-:10E96000C00080648093C000872D8052F401EF7056
-:10E97000F0708F3520F4E40DF51D708204C0E40DB5
-:10E98000F51D8EE280830894E11CF11C011D111D10
-:10E990000894811C911C90E18916910409F0C2CF62
-:10E9A00080E190E0A0E0B0E0A80EB91ECA1EDB1E18
-:10E9B000198AC2010F946BF30F944DF36A94662089
-:10E9C00009F072CF62960FB6F894DEBF0FBECDBFCE
-:10E9D000CF91DF911F910F91FF90EF90DF90CF903B
-:10E9E000BF90AF909F908F907F906F905F904F906F
-:10E9F0003F902F9008952F923F924F925F926F9287
-:10EA00007F928F929F92AF92BF92CF92DF92EF92BE
-:10EA1000FF920F931F93DF93CF93CDB7DEB7CD5304
-:10EA2000D1400FB6F894DEBF0FBECDBF279A2F9A04
-:10EA30008091C00082608093C00080E18093C40018
-:10EA400088E18093C1000000EE24FF248701B4E038
-:10EA5000AB2EB12CCC24DD2424C0C5010197F1F7E5
-:10EA60000894E11CF11C011D111D21E2E2162EE4A7
-:10EA7000F20620E0020720E0120718F0A1E0CA2EFB
-:10EA8000D12CC801B70128E53BE140E050E00F94EC
-:10EA90009FFF611571058105910519F485B18058B5
-:10EAA00085B98091C00087FD03C0C114D104A9F2CB
-:10EAB000A6014F5F5F4FC25EDE4F59834883CE5140
-:10EAC000D140C25EDE4F68817981CE51D140613044
-:10EAD000710511F00D946EFFC05DDE4F1982188232
-:10EAE000C053D14060E0C15DDE4F1882CF52D140AB
-:10EAF000AA24BB24C05EDE4F188219821A821B82B0
-:10EB0000C052D140CE5CDE4F188219821A821B821D
-:10EB1000C253D14080E090E0A0E0B0E0ABBFFC0188
-:10EB2000A791B691C45CDE4FB983A883CC53D14082
-:10EB30000D9469FFC25EDE4FE881F981CE51D1406C
-:10EB4000319709F52091C600C25EDE4F1982188206
-:10EB5000CE51D14022C02F5F3F4F4F4F5F4F2130EA
-:10EB6000F2E13F07FAE74F07F0E05F0780F0C45C8F
-:10EB7000DE4F08811981CC53D1400F5F1F4F19F030
-:10EB8000EE27FF27099420E030E040E050E080913C
-:10EB9000C00087FFE0CF2091C600213209F094C663
-:10EBA0000894A11CB11C33E0A316B10409F08EC671
-:10EBB00000E010E018C041E24093C6008091C00020
-:10EBC00086FFFCCF8091C00080648093C0002F5FDF
-:10EBD0003F4F2931310579F70F944DF30F5F1F4FE8
-:10EBE0000530110519F020E030E0E5CF1092080261
-:10EBF0001092090210920A0210920B021092040263
-:10EC00001092050210920602109207021092000262
-:10EC10001092010210920202109203028FEE90EE07
-:10EC200060E00F9466F380E191EE60E00F942FF3C3
-:10EC30008091C00087FFFCCF9091C600903608F00D
-:10EC40009F759032B8F09093C6008091C00086FF07
-:10EC5000FCCF8091C00080648093C00080E28093EC
-:10EC6000C6008091C00086FFFCCF8091C000806408
-:10EC70008093C000983409F4DBC19934B8F492341D
-:10EC800009F45DC1933458F4903319F1903308F4CA
-:10EC900018C69F33A1F1903409F013C6BDC0953456
-:10ECA00009F474C1963409F00CC69CC1923509F47C
-:10ECB0002FC2933538F49C3409F4F9C1913509F029
-:10ECC00000C61CC2963509F449C2993509F0F9C548
-:10ECD0009CC485E892EE62E00F9466F31092040201
-:10ECE000109205021092060210920702109208027A
-:10ECF0001092090210920A0210920B0217C189E9C0
-:10ED000092EE62E00F9466F38FEE90EE60E00F9467
-:10ED100066F381E291EE60E00F942FF381EC91EEC7
-:10ED200060E00F9466F381E391EE60E00F942FF3BF
-:10ED300084EE90EE60E00F9466F381E491EE60E083
-:10ED40000F942FF386E090E061E070E00F94A5F35C
-:10ED50000F944DF381E691EE60E00F942FF383ED75
-:10ED600091EE60E00F9466F381E591EE60E00F9420
-:10ED70002FF38DEC91EE60E00F9466F381E791EE56
-:10ED800060E00F942FF38EE10F947EF388E90F94E7
-:10ED90007EF381E00F947EF30F944DF381E891EEC2
-:10EDA00060E00F942FF319E0E0E0F0E010935700DB
-:10EDB000E4918E2F0F947EF30F944DF381E991EE41
-:10EDC00060E00F942FF3E3E0F0E010935700E4913C
-:10EDD0008E2F0F947EF30F944DF381EA91EE60E055
-:10EDE0000F942FF3E2E0F0E010935700E4918E2FA0
-:10EDF0000F947EF30F944DF381EB91EE60E00F944E
-:10EE00002FF3E1E0F0E0109357001491812F0F945D
-:10EE10007EF30F944DF307CF85EA92EE62E00F94F4
-:10EE200066F385E592EE60E00F9466F30F944DF380
-:10EE300000E010E019C0C8016F2D0F94DDFFFF2026
-:10EE400031F483E592EE60E00F942FF30BC0F09263
-:10EE5000C6008091C00086FFFCCF8091C000806416
-:10EE60008093C0000F5F1F4FC80181519F41AA27A7
-:10EE700097FDA095BA2FABBFFC01F7905AE2F516AB
-:10EE800021F062E000301607B1F60F944DF30F94B5
-:10EE90004DF381E692EE60E00F9466F30F944DF32C
-:10EEA000CC24DD2400E010E01EC0C8010F94D5FF83
-:10EEB000F82E882331F483E592EE60E00F942FF36F
-:10EEC0000BC08093C6008091C00086FFFCCF80916C
-:10EED000C00080648093C000FE1419F00894C11C27
-:10EEE000D11C0F5F1F4FC80181519F41AA2797FD79
-:10EEF000A095BA2FABBFFC01E7907AE2E71621F0AC
-:10EF000082E00030180789F60F944DF30F944DF30B
-:10EF10008CE692EE60E00F942FF3C60161E070E0A2
-:10EF20000F94A5F30F944DF30F944DF3109200023C
-:10EF300010920102109202021092030274CE83EB2F
-:10EF400092EE62E00F9466F3279A2F9A16C02F98DC
-:10EF500080E090E0E0EDF7E03197F1F7019684363C
-:10EF60009105C1F72F9A80E090E0E0EDF7E031974E
-:10EF7000F1F7019684369105C1F78091C00087FFB3
-:10EF8000E6CF8091C00087FFFCCF95C48FEB92EE57
-:10EF900062E00F9466F3409100025091010260918B
-:10EFA00002027091030281E020E10F942CF4809121
-:10EFB000000290910102A0910202B09103028050E0
-:10EFC0009F4FAF4FBF4F8093000290930102A093D9
-:10EFD0000202B093030280509041A040B04008F478
-:10EFE00022CEA4CF8DEC92EE62E00F9466F34091B6
-:10EFF000040250910502609106027091070280E0C0
-:10F0000020E10F942CF48091040290910502A091CC
-:10F010000602B091070280509F4FAF4FBF4F8093C1
-:10F02000040290930502A0930602B0930702FBCD61
-:10F030008AED92EE62E00F9466F385E892EE60E06E
-:10F040000F9466F389E992EE60E00F9466F385EA27
-:10F0500092EE60E00F9466F383EB92EE60E00F9423
-:10F0600066F38FEB92EE60E00F9466F38DEC92EE18
-:10F0700060E00F9466F38AED92EE60E00F9466F321
-:10F0800081EE92EE60E00F9466F382EF92EE60E024
-:10F090000F9466F38CE093EE60E00F9466F387E1E3
-:10F0A00093EE60E00F9466F380E393EEB9CD81EECA
-:10F0B00092EE62E00F9466F381E40F9416F482E41A
-:10F0C0000F9416F483E40F9416F484E40F9416F46A
-:10F0D00085E40F9416F486E40F9416F487E40F94F5
-:10F0E00016F488E40F9416F48AE40F9416F48BE473
-:10F0F0000F9416F48CE40F9416F495CD82EF92EEF3
-:10F1000062E00F9466F399249394AA24BB2445C427
-:10F110008CE093EE62E00F9466F340910802509108
-:10F12000090260910A0270910B0282E020E10F94C3
-:10F130002CF48091080290910902A0910A02B091EA
-:10F140000B0280509F4FAF4FBF4F809308029093A8
-:10F150000902A0930A02B0930B0265CD87E193EEFA
-:10F1600062E00F9466F384EE90EE60E00F9466F335
-:10F1700089ED91EE60E00F9466F309E715EECC5D42
-:10F18000DE4F19830883C452D1406624772443019B
-:10F19000CA5DDE4F19821882C652D140A401930184
-:10F1A0005695479537952795C85DDE4F2883398357
-:10F1B0004A835B83C852D140CA5DDE4F4881598182
-:10F1C000C652D1404F5F5F4FCA5DDE4F59834883BF
-:10F1D000C652D140CA0162E070E00F94A5F350E23C
-:10F1E0005093C6008091C00086FFFCCF8091C00084
-:10F1F00080648093C0006DE26093C6008091C0007F
-:10F2000086FFFCCF8091C00080648093C00070E2D4
-:10F210007093C6008091C00086FFFCCF8091C00033
-:10F2200080648093C000C85DDE4FE880F9800A8169
-:10F230001B81C852D140BB27A12F902F8F2D0F9437
-:10F240007EF3C85DDE4F8881C852D1400F947EF3B3
-:10F2500070E2F72EF092C6008091C00086FFFCCFCE
-:10F260008091C00080648093C0000DE30093C600CD
-:10F270008091C00086FFFCCF8091C00080648093A5
-:10F28000C00010E21093C6008091C00086FFFCCF42
-:10F290008091C00080648093C0008BBEF3012791F1
-:10F2A000C45DDE4F2883CC52D140A22EBB24CC2497
-:10F2B000DD240894611C711C811C911C8BBEF30120
-:10F2C0008791282E332444245524142D032DF22C09
-:10F2D000EE24EA0CFB1C0C1D1D1D0894611C711C06
-:10F2E000811C911C8BBEF3013791C35DDE4F3883C7
-:10F2F000CD52D1400894611C711C811C911C8BBEA5
-:10F30000F3014791C25DDE4F4883CE52D1402DEFCD
-:10F310003FEF4FEF5FEF620E731E841E951E0F943A
-:10F320007EF330E23093C6008091C00086FFFCCFB0
-:10F330008091C00080648093C000C45DDE4F8881EE
-:10F34000CC52D1400F947EF340E24093C6008091AE
-:10F35000C00086FFFCCF8091C00080648093C00015
-:10F36000C25DDE4F8881CE52D1400F947EF350E2D1
-:10F370005093C6008091C00086FFFCCF8091C000F2
-:10F3800080648093C000C35DDE4F8881CD52D14040
-:10F390000F947EF360E26093C6008091C00086FF08
-:10F3A000FCCF8091C00080648093C0007FEFE7169F
-:10F3B0007FEFF70670E0070770E0170731F48EE083
-:10F3C00092EE60E00F942FF3DFC0D801C701807088
-:10F3D000907CA070B0708050904CA040B040D1F5AF
-:10F3E0002FEF3FE340E050E0E222F3220423152315
-:10F3F000C85DDE4FA880B980CA80DB80C852D1408A
-:10F40000AE0CBF1CC01ED11EAA0CBB1CCC1CDD1C2C
-:10F4100088E192EE60E00F942FF3BB27A12F902F8D
-:10F420008F2D0F947EF38E2D0F947EF330E2309368
-:10F43000C6008091C00086FFFCCF8091C000806430
-:10F440008093C0004EE34093C6008091C00086FFC9
-:10F45000FCCF87C06EE07EEF80E090E0E622F722EE
-:10F46000082319237CE0E71674E9F70670E0070724
-:10F4700070E0170709F088C0C25DDE4F8881CE5268
-:10F48000D140E82EFF2400E010E0102F0F2DFE2CBD
-:10F49000EE24C35DDE4F9881CD52D140E90EF11CC0
-:10F4A000011D111DD601C50181709070A070B07052
-:10F4B000DC0199278827E80EF91E0A1F1B1F20EF81
-:10F4C00030E040E050E0A222B322C422D522F1E194
-:10F4D000AA0CBB1CCC1CDD1CFA95D1F7EA0CFB1C5A
-:10F4E0000C1D1D1D41E050E060E070E0242235223B
-:10F4F00046225722E5E1220C331C441C551CEA9598
-:10F50000D1F7E20CF31C041D151D57016801AA0C6C
-:10F51000BB1CCC1CDD1C8FE192EE60E00F942FF33E
-:10F52000C801AA27BB270F947EF3BB27A12F902FDA
-:10F530008F2D0F947EF38E2D0F947EF350E2509317
-:10F54000C6008091C00086FFFCCF8091C00080641F
-:10F550008093C0006EE36093C6008091C00086FF78
-:10F56000FCCF8091C00080648093C000C601AA27B0
-:10F57000BB270F947EF3BB27AD2D9C2D8B2D0F94B5
-:10F580007EF38A2D0F947EF370E27093C600809113
-:10F59000C00086FFFCCF8091C00080648093C000D3
-:10F5A000CC5DDE4FE881F981C452D140CF01AA275A
-:10F5B00097FDA095BA2FABBFFC018791969160E0B3
-:10F5C0000F942FF30F944DF3CC5DDE4F088119811A
-:10F5D000C452D1400E5F1F4FCC5DDE4F19830883AC
-:10F5E000C452D140CA5DDE4F28813981C652D14014
-:10F5F0002933310509F417CB44E050E060E070E0B6
-:10F60000640E751E861E971EC9CD80E393EE62E0E0
-:10F610000F9466F384E292EE60E00F942FF38091F2
-:10F62000C00087FFFCCF1091C6001F751093C60065
-:10F630008091C00086FFFCCF8091C00080648093E1
-:10F64000C0000F944DF3812F81548A3108F036C1E8
-:10F65000163409F495C0173490F4133409F44EC0ED
-:10F66000143430F41134F1F0123409F01DC130C0FB
-:10F67000143409F459C0153409F016C16BC01A349A
-:10F6800009F4C4C01B3438F4173409F48FC018349B
-:10F6900009F00AC1A1C01B3409F4D2C01C3409F01E
-:10F6A00003C1E8C08FEF81B90DC082B1809582B9E6
-:10F6B00080E090E0E0EDF7E03197F1F70196883CCB
-:10F6C0009105C1F78091C00087FFEFCF12B8EFC05E
-:10F6D0008FEF84B90DC085B1809585B980E090E049
-:10F6E000E0EDF7E03197F1F70196883C9105C1F71D
-:10F6F0008091C00087FFEFCF15B8D9C08FEF87B9D1
-:10F700000DC088B1809588B980E090E0E0EDF7E029
-:10F710003197F1F70196883C9105C1F78091C000BF
-:10F7200087FFEFCF18B8C3C08FEF8AB90DC08BB178
-:10F7300080958BB980E090E0E0EDF7E03197F1F74C
-:10F740000196883C9105C1F78091C00087FFEFCFFB
-:10F750001BB8ADC08FEF8DB90DC08EB180958EB93D
-:10F7600080E090E0E0EDF7E03197F1F70196883C1A
-:10F770009105C1F78091C00087FFEFCF1EB897C0F9
-:10F780008FEF80BB0DC081B3809581BB80E090E09E
-:10F79000E0EDF7E03197F1F70196883C9105C1F76C
-:10F7A0008091C00087FFEFCF11BA81C08FEF83BB7C
-:10F7B0000DC084B3809584BB80E090E0E0EDF7E07D
-:10F7C0003197F1F70196883C9105C1F78091C0000F
-:10F7D00087FFEFCF14BA6BC08FEF809301010FC08A
-:10F7E0008091020180958093020180E090E0E0ED3D
-:10F7F000F7E03197F1F70196883C9105C1F78091C8
-:10F80000C00087FFEDCF1092020151C08FEF8093AF
-:10F8100004010FC08091050180958093050180E06F
-:10F8200090E0E0EDF7E03197F1F70196883C910523
-:10F83000C1F78091C00087FFEDCF1092050137C05E
-:10F840008FEF809307010FC080910801809580930E
-:10F85000080180E090E0E0EDF7E03197F1F70196E4
-:10F86000883C9105C1F78091C00087FFEDCF1092D1
-:10F8700008011DC08FEF80930A010FC080910B011A
-:10F88000809580930B0180E090E0E0EDF7E0319708
-:10F89000F1F70196883C9105C1F78091C00087FF80
-:10F8A000EDCF10920B0103C08FE292EEB9C98091A7
-:10F8B000C00087FFFCCF8091C600B5C982E492EEFC
-:10F8C000AFC98CE191EEACC9AA24BB24933061F19D
-:10F8D000943028F4913089F0923008F508C09530C2
-:10F8E000B1F1953040F1963009F053C04EC02B3144
-:10F8F00009F020C991E06BE11DC9213041F0C15DE3
-:10F90000DE4F5881CF52D140251709F002C362273C
-:10F91000C15DDE4F2883CF52D14092E00BC9B22F98
-:10F92000A0E0622793E006C9822F90E0A82BB92BB4
-:10F93000622794E0FFC82E3009F0EBC2622795E001
-:10F94000C05DDE4F19821882C053D140F3C8E1E098
-:10F95000F0E0EC0FFD1FC05DDE4FE880F980C05382
-:10F96000D140EE0DFF1D208387010F5F1F4FC05D4B
-:10F97000DE4F19830883C053D14062270A171B0743
-:10F9800009F0D8C8D80196E0D5C8261709F0C1C239
-:10F9900003C0973009F0CEC899248981833109F4D6
-:10F9A000FCC08431C8F4863009F4C2C0873050F4FA
-:10F9B000823009F4F0C0833009F458C0813009F076
-:10F9C0000AC23EC0813109F462C0823108F0A6C08B
-:10F9D000803109F000C2DFC0883109F472C089317A
-:10F9E00050F4853109F4D9C0853108F477C18631E6
-:10F9F00009F0F1C173C18A3109F457C08A3108F4A2
-:10FA00007CC08B3109F446C08D3109F0E4C18D8191
-:10FA1000803311F090E00AC08F81882311F49EE1B9
-:10FA200005C0813011F091E001C098E91A821B8273
-:10FA30008D818C831D829E831F8227E030E0CFC1A1
-:10FA40001A8288E08B8381E48C8386E58D8382E54E
-:10FA50008E8389E48F8383E5888780E589878FE5B6
-:10FA60008A8782E38B872BE030E0B9C18A818139B4
-:10FA700041F0823941F0803911F48FE005C080E017
-:10FA800003C082E001C08AE01A828B8344C09924BB
-:10FA9000939481C08D81882311F48EE12CC0813034
-:10FAA00011F081E028C088E926C01A82E1E0F0E088
-:10FAB00089E08093570084918B831C8224E030E09E
-:10FAC0008EC18B81803589F48C81883039F4E2E0F5
-:10FAD000F0E089E08093570084910DC0E0E0F0E011
-:10FAE00089E080935700849106C0E3E0F0E089E06C
-:10FAF0008093570084911A82DFCF8D81836C99E0C7
-:10FB0000E1E0F0E0082E90935700E89507B600FC7E
-:10FB1000FDCF1A821B8223E030E061C11A82CE5CE5
-:10FB2000DE4F188219821A821B82C253D14055C1FE
-:10FB30008A8190E0A0E0B0E0582F442733272227A5
-:10FB40008B8190E0A0E0B0E0DC0199278827282B8A
-:10FB5000392B4A2B5B2B8D8190E0A0E0B0E0282B65
-:10FB6000392B4A2B5B2B8C8190E0A0E0B0E0BA2FC0
-:10FB7000A92F982F8827282B392B4A2B5B2B220F54
-:10FB8000331F441F551FC05EDE4F288339834A83CD
-:10FB90005B83C052D1401A8220C19A812B8183316C
-:10FBA00049F0C05EDE4F488159816A817B81C05235
-:10FBB000D1408AC0CE5CDE4F488159816A817B8109
-:10FBC000C253D140403080EC580783E0680780E0A2
-:10FBD0007807F0F483E0FA0160935B0080935700AC
-:10FBE000E89507B600FCFDCFCE5CDE4F4881598119
-:10FBF0006A817B81C253D14040505F4F6F4F7F4F2E
-:10FC0000CE5CDE4F488359836A837B83C253D140E5
-:10FC1000C95CDE4F9883C753D140CA5CDE4F18825F
-:10FC2000C653D140022F10E0CA5CDE4F6881798153
-:10FC3000C653D140062B172BC05EDE4F4881598139
-:10FC40006A817B81C052D140DE011B9631E08C91EC
-:10FC500011962C9111971296C75CDE4F2883C953D9
-:10FC6000D140C85CDE4F1882C853D14090E0C85CD8
-:10FC7000DE4FE881F981C853D1408E2B9F2B0C01B8
-:10FC8000FA0160935B0030935700E89511244E5FB2
-:10FC90005F4F6F4F7F4F02501040C9F685E0C05E46
-:10FCA000DE4FE880F9800A811B81C052D140F70104
-:10FCB00000935B0080935700E89507B600FCFDCFEA
-:10FCC00081E180935700E8951A82C05EDE4F488339
-:10FCD00059836A837B83C052D1407FC0FA80C55C60
-:10FCE000DE4FF882CB53D140C65CDE4F1882CA5338
-:10FCF000D1408B81C82EDD24C65CDE4F088119817E
-:10FD0000CA53D140C02AD12A1A828981BE016D5FAF
-:10FD10007F4F843121F59601C05EDE4FE880F98087
-:10FD20000A811B81C052D1400BBFF7018791969188
-:10FD3000DB018C9311969C936E5F7F4FD801C701B6
-:10FD40000296A11DB11DC05EDE4F88839983AA83F0
-:10FD5000BB83C052D14022503040F1F636C0C05E65
-:10FD6000DE4F288139814A815B81C052D14008949D
-:10FD7000C108D108760100E010E00894C11CD11C34
-:10FD80000894E11CF11C011D111DE20EF31E041F5D
-:10FD9000151F21BDBB27A52F942F832F82BD2F5F59
-:10FDA0003F4F4F4F5F4FF89A80B5DB018D93BD01F8
-:10FDB0002E153F054007510761F7C05EDE4F2883CF
-:10FDC00039834A835B83C052D14096012D5F3F4FF8
-:10FDD000FB01108204C080EC8A8322E030E08BE1DA
-:10FDE0008093C6008091C00086FFFCCF8091C00048
-:10FDF00080648093C000C15DDE4FF881CF52D14056
-:10FE0000F093C6008091C00086FFFCCF8091C000B7
-:10FE100080648093C000432F3093C6008091C0005F
-:10FE200086FFFCCF8091C00080648093C000922F39
-:10FE30002093C6008091C00086FFFCCF8091C00057
-:10FE400080648093C0008EE08093C6008091C000E3
-:10FE500086FFFCCF8091C00080648093C00065E184
-:10FE6000C15DDE4FE880CF52D1406E2569276427FF
-:10FE7000FE01319610C090819093C6008091C00021
-:10FE800086FFFCCF31968091C00080648093C000D3
-:10FE90006927215030402115310569F76093C6006C
-:10FEA0008091C00086FFFCCF8091C0008064809369
-:10FEB000C00085B1805885B9992081F4C15DDE4FBD
-:10FEC0000881CF52D1400F5FC15DDE4F0883CF5212
-:10FED000D14090E0A0E0B0E00D949AF527982F98DB
-:10FEE00080E090E020ED37E0F9013197F1F70196DD
-:10FEF00084369105C9F700008091C0008D7F809302
-:10FF0000C00081E180935700E895EE27FF27099410
-:10FF1000FFCF90E00D949AF597FB092E07260AD0A3
-:10FF200077FD04D02ED006D000201AF4709561958C
-:10FF30007F4F0895F6F7909581959F4F0895A1E220
-:10FF40001A2EAA1BBB1BFD010DC0AA1FBB1FEE1F53
-:10FF5000FF1FA217B307E407F50720F0A21BB30B9E
-:10FF6000E40BF50B661F771F881F991F1A9469F71A
-:10FF700060957095809590959B01AC01BD01CF0176
-:10FF80000895AA1BBB1B51E107C0AA1FBB1FA617E0
-:10FF9000B70710F0A61BB70B881F991F5A95A9F732
-:10FFA00080959095BC01CD010895F999FECF92BD41
-:10FFB00081BDF89A992780B50895262FF999FECF2B
-:10FFC0001FBA92BD81BD20BD0FB6F894FA9AF99A76
-:0AFFD0000FBE01960895F894FFCFCC
-:040000033000E000E9
-:00000001FF
diff --git a/bootloaders/stk500v2/STK500V2.pnproj b/bootloaders/stk500v2/STK500V2.pnproj
deleted file mode 100644
index d935019..0000000
--- a/bootloaders/stk500v2/STK500V2.pnproj
+++ /dev/null
@@ -1 +0,0 @@
-<Project name="STK500V2"><File path="License.txt"></File><File path="Makefile"></File><File path="stk500boot.c"></File><File path="command.h"></File><File path="Readme.txt"></File></Project> \ No newline at end of file
diff --git a/bootloaders/stk500v2/STK500V2.pnps b/bootloaders/stk500v2/STK500V2.pnps
deleted file mode 100644
index f85cde5..0000000
--- a/bootloaders/stk500v2/STK500V2.pnps
+++ /dev/null
@@ -1 +0,0 @@
-<pd><ViewState><e p="STK500V2" x="true"></e></ViewState></pd> \ No newline at end of file
diff --git a/bootloaders/stk500v2/avr_cpunames.h b/bootloaders/stk500v2/avr_cpunames.h
deleted file mode 100644
index ad0ed9c..0000000
--- a/bootloaders/stk500v2/avr_cpunames.h
+++ /dev/null
@@ -1,189 +0,0 @@
-//**************************************************************************************************
-//*
-//* Atmel AVR CPU name strings
-//*
-//**************************************************************************************************
-//* Sep 19, 2010 <MLS> Started on avr_cpunames.h
-//**************************************************************************************************
-
-//#include "avr_cpunames.h"
-
-//**************************************************************************************************
-
-
-#if defined (__AVR_AT94K__)
- #define _AVR_CPU_NAME_ "AT94k"
-#elif defined (__AVR_AT43USB320__)
-#elif defined (__AVR_AT43USB355__)
-#elif defined (__AVR_AT76C711__)
-#elif defined (__AVR_AT86RF401__)
-#elif defined (__AVR_AT90PWM1__)
-#elif defined (__AVR_AT90PWM2__)
-#elif defined (__AVR_AT90PWM2B__)
-#elif defined (__AVR_AT90PWM3__)
-#elif defined (__AVR_AT90PWM3B__)
-#elif defined (__AVR_AT90PWM216__)
-#elif defined (__AVR_AT90PWM316__)
-#elif defined (__AVR_ATmega32C1__)
-#elif defined (__AVR_ATmega32M1__)
-#elif defined (__AVR_ATmega32U4__)
- #define _AVR_CPU_NAME_ "ATmega32U4"
-#elif defined (__AVR_ATmega32U6__)
- #define _AVR_CPU_NAME_ "ATmega32U6"
-#elif defined (__AVR_ATmega128__)
- #define _AVR_CPU_NAME_ "Atmega128"
-#elif defined (__AVR_ATmega1280__)
- #define _AVR_CPU_NAME_ "ATmega1280"
-#elif defined (__AVR_ATmega1281__)
- #define _AVR_CPU_NAME_ "ATmega1281"
-#elif defined (__AVR_ATmega1284P__)
- #define _AVR_CPU_NAME_ "ATmega1284"
-#elif defined (__AVR_ATmega128RFA1__)
- #define _AVR_CPU_NAME_ "ATmega128RFA1"
-#elif defined (__AVR_ATmega2560__)
- #define _AVR_CPU_NAME_ "ATmega2560"
-#elif defined (__AVR_ATmega2561__)
- #define _AVR_CPU_NAME_ "ATmega2561"
-#elif defined (__AVR_AT90CAN32__)
- #define _AVR_CPU_NAME_ "AT90CAN32"
-#elif defined (__AVR_AT90CAN64__)
- #define _AVR_CPU_NAME_ "AT90CAN64"
-#elif defined (__AVR_AT90CAN128__)
- #define _AVR_CPU_NAME_ "AT90CAN128"
-#elif defined (__AVR_AT90USB82__)
- #define _AVR_CPU_NAME_ "AT90USB82"
-#elif defined (__AVR_AT90USB162__)
- #define _AVR_CPU_NAME_ "AT90USB162"
-#elif defined (__AVR_AT90USB646__)
- #define _AVR_CPU_NAME_ "AT90USB646"
-#elif defined (__AVR_AT90USB647__)
- #define _AVR_CPU_NAME_ "AT90USB647"
-#elif defined (__AVR_AT90USB1286__)
- #define _AVR_CPU_NAME_ "AT90USB1286"
-#elif defined (__AVR_AT90USB1287__)
- #define _AVR_CPU_NAME_ "AT90USB1287"
-#elif defined (__AVR_ATmega64__)
- #define _AVR_CPU_NAME_ "ATmega64"
-#elif defined (__AVR_ATmega640__)
- #define _AVR_CPU_NAME_ "ATmega640"
-#elif defined (__AVR_ATmega644__)
- #define _AVR_CPU_NAME_ "ATmega644"
-#elif defined (__AVR_ATmega644P__)
- #define _AVR_CPU_NAME_ "ATmega644P"
-#elif defined (__AVR_ATmega645__)
- #define _AVR_CPU_NAME_ "ATmega645"
-#elif defined (__AVR_ATmega6450__)
- #define _AVR_CPU_NAME_ "ATmega6450"
-#elif defined (__AVR_ATmega649__)
- #define _AVR_CPU_NAME_ "ATmega649"
-#elif defined (__AVR_ATmega6490__)
- #define _AVR_CPU_NAME_ "ATmega6490"
-#elif defined (__AVR_ATmega103__)
- #define _AVR_CPU_NAME_ "ATmega103"
-#elif defined (__AVR_ATmega32__)
- #define _AVR_CPU_NAME_ "Atmega32"
-#elif defined (__AVR_ATmega323__)
- #define _AVR_CPU_NAME_ "ATmega323"
-#elif defined (__AVR_ATmega324P__)
- #define _AVR_CPU_NAME_ "ATmega324P"
-#elif defined (__AVR_ATmega325__)
- #define _AVR_CPU_NAME_ "ATmega325"
-#elif defined (__AVR_ATmega325P__)
- #define _AVR_CPU_NAME_ "ATmega325P"
-#elif defined (__AVR_ATmega3250__)
- #define _AVR_CPU_NAME_ "ATmega3250"
-#elif defined (__AVR_ATmega3250P__)
- #define _AVR_CPU_NAME_ "ATmega3250P"
-#elif defined (__AVR_ATmega328P__)
- #define _AVR_CPU_NAME_ "ATmega328P"
-#elif defined (__AVR_ATmega329__)
- #define _AVR_CPU_NAME_ "ATmega329"
-#elif defined (__AVR_ATmega329P__)
- #define _AVR_CPU_NAME_ "ATmega329P"
-#elif defined (__AVR_ATmega3290__)
- #define _AVR_CPU_NAME_ "ATmega3290"
-#elif defined (__AVR_ATmega3290P__)
- #define _AVR_CPU_NAME_ "ATmega3290P"
-#elif defined (__AVR_ATmega32HVB__)
- #define _AVR_CPU_NAME_ "ATmega32HVB"
-#elif defined (__AVR_ATmega406__)
- #define _AVR_CPU_NAME_ "ATmega406"
-#elif defined (__AVR_ATmega16__)
- #define _AVR_CPU_NAME_ "Atmega16"
-#elif defined (__AVR_ATmega161__)
- #define _AVR_CPU_NAME_ "ATmega161"
-#elif defined (__AVR_ATmega162__)
- #define _AVR_CPU_NAME_ "ATmega162"
-#elif defined (__AVR_ATmega163__)
- #define _AVR_CPU_NAME_ "ATmega163"
-#elif defined (__AVR_ATmega164P__)
- #define _AVR_CPU_NAME_ "ATmega164P"
-#elif defined (__AVR_ATmega165__)
- #define _AVR_CPU_NAME_ "ATmega165"
-#elif defined (__AVR_ATmega165P__)
- #define _AVR_CPU_NAME_ "ATmega165P"
-#elif defined (__AVR_ATmega168__)
- #define _AVR_CPU_NAME_ "ATmega168"
-#elif defined (__AVR_ATmega168P__)
- #define _AVR_CPU_NAME_ "ATmega168P"
-#elif defined (__AVR_ATmega169__)
- #define _AVR_CPU_NAME_ "Atmega169"
-#elif defined (__AVR_ATmega169P__)
- #define _AVR_CPU_NAME_ "ATmega169P"
-#elif defined (__AVR_ATmega8HVA__)
- #define _AVR_CPU_NAME_ "ATmega8HVA"
-#elif defined (__AVR_ATmega16HVA__)
- #define _AVR_CPU_NAME_ "ATmega16HVA"
-#elif defined (__AVR_ATmega8__)
- #define _AVR_CPU_NAME_ "ATmega8"
-#elif defined (__AVR_ATmega48__)
- #define _AVR_CPU_NAME_ "ATmega48"
-#elif defined (__AVR_ATmega48P__)
- #define _AVR_CPU_NAME_ "ATmega48P"
-#elif defined (__AVR_ATmega88__)
- #define _AVR_CPU_NAME_ "ATmega88"
-#elif defined (__AVR_ATmega88P__)
- #define _AVR_CPU_NAME_ "ATmega88P"
-#elif defined (__AVR_ATmega8515__)
- #define _AVR_CPU_NAME_ "ATmega8515"
-#elif defined (__AVR_ATmega8535__)
- #define _AVR_CPU_NAME_ "ATmega8535"
-#elif defined (__AVR_AT90S8535__)
-#elif defined (__AVR_AT90C8534__)
-#elif defined (__AVR_AT90S8515__)
-#elif defined (__AVR_AT90S4434__)
-#elif defined (__AVR_AT90S4433__)
-#elif defined (__AVR_AT90S4414__)
-#elif defined (__AVR_ATtiny22__)
-#elif defined (__AVR_ATtiny26__)
-#elif defined (__AVR_AT90S2343__)
-#elif defined (__AVR_AT90S2333__)
-#elif defined (__AVR_AT90S2323__)
-#elif defined (__AVR_AT90S2313__)
-#elif defined (__AVR_ATtiny2313__)
- #define _AVR_CPU_NAME_ "ATtiny2313"
-#elif defined (__AVR_ATtiny13__)
-#elif defined (__AVR_ATtiny13A__)
-#elif defined (__AVR_ATtiny25__)
-#elif defined (__AVR_ATtiny45__)
-#elif defined (__AVR_ATtiny85__)
-#elif defined (__AVR_ATtiny24__)
-#elif defined (__AVR_ATtiny44__)
-#elif defined (__AVR_ATtiny84__)
-#elif defined (__AVR_ATtiny261__)
-#elif defined (__AVR_ATtiny461__)
-#elif defined (__AVR_ATtiny861__)
-#elif defined (__AVR_ATtiny43U__)
-#elif defined (__AVR_ATtiny48__)
-#elif defined (__AVR_ATtiny88__)
-#elif defined (__AVR_ATtiny167__)
-#elif defined (__AVR_ATmega8U2__)
- #define _AVR_CPU_NAME_ "ATmega8U2"
-#else
- #error cpu not defined
-#endif
-
-
-#if !defined (_AVR_CPU_NAME_)
-// #define _AVR_CPU_NAME_ "UNKNOWN"
-#endif
diff --git a/bootloaders/stk500v2/avrinterruptnames.h b/bootloaders/stk500v2/avrinterruptnames.h
deleted file mode 100644
index e7e3ed9..0000000
--- a/bootloaders/stk500v2/avrinterruptnames.h
+++ /dev/null
@@ -1,1040 +0,0 @@
-//**************************************************************************************************
-//*
-//* interrupt vector names
-//*
-//* It is important to note that the vector numbers listed here
-//* are the ATMEL documentation numbers. The Arduino numbers are 1 less
-//* This is because the Atmel docs start numbering the interrupts at 1
-//* when it is actually vector #0 in the table.
-//**************************************************************************************************
-//* Jun 1, 2010 <MLS> Added support for ATmega1281
-//* Jun 30, 2010 <MLS> Putting in more ifdefs to conserve space
-//* Jul 3, 2010 <MLS> More #ifdefs to conserve space and testing on most of my boards
-//* Jul 4, 2010 <MLS> Started using vector defs for #ifdefs as defined in <avr/io.h>
-//* Jul 13, 2010 <MLS> Added support for __AVR_ATmega128__
-//* Aug 26, 2010 <MLS> Added support for __AVR_ATmega2561__
-//* Sep 13, 2010 <MLS> Added support for __AVR_AT90CAN32__ __AVR_AT90CAN64__ __AVR_AT90CAN128__
-//**************************************************************************************************
-
-//#include "avrinterruptnames.h"
-
-//**************************************************************************************************
-//* this defines the interrupt vectors and allows us to compile ONLY those strings that are actually
-//* in the target CPU. This way we do not have to keep making changes based on cpu, it will be
-//* automatic even if we add a new CPU
-#ifndef _AVR_IO_H_
- #include <avr/io.h>
-#endif
-//**************************************************************************************************
-
-#ifdef __MWERKS__
- #define prog_char char
- #define PGM_P char *
-#endif
-
- prog_char gAvrInt_RESET[] PROGMEM = "RESET";
-#ifdef INT0_vect
- prog_char gAvrInt_INT0[] PROGMEM = "INT0";
-#endif
-#ifdef INT1_vect
- prog_char gAvrInt_INT1[] PROGMEM = "INT1";
-#endif
-#ifdef INT2_vect
- prog_char gAvrInt_INT2[] PROGMEM = "INT2";
-#endif
-#ifdef INT3_vect
- prog_char gAvrInt_INT3[] PROGMEM = "INT3";
-#endif
-#ifdef INT4_vect
- prog_char gAvrInt_INT4[] PROGMEM = "INT4";
-#endif
-#ifdef INT5_vect
- prog_char gAvrInt_INT5[] PROGMEM = "INT5";
-#endif
-#ifdef INT6_vect
- prog_char gAvrInt_INT6[] PROGMEM = "INT6";
-#endif
-#ifdef INT7_vect
- prog_char gAvrInt_INT7[] PROGMEM = "INT7";
-#endif
-#ifdef PCINT0_vect
- prog_char gAvrInt_PCINT0[] PROGMEM = "PCINT0";
-#endif
-#ifdef PCINT1_vect
- prog_char gAvrInt_PCINT1[] PROGMEM = "PCINT1";
-#endif
-#ifdef PCINT2_vect
- prog_char gAvrInt_PCINT2[] PROGMEM = "PCINT2";
-#endif
-#ifdef PCINT3_vect
- prog_char gAvrInt_PCINT3[] PROGMEM = "PCINT3";
-#endif
-#ifdef WDT_vect
- prog_char gAvrInt_WDT[] PROGMEM = "WDT";
-#endif
-#ifdef TIMER0_COMP_vect
- prog_char gAvrInt_TIMER0_COMP[] PROGMEM = "TIMER0 COMP";
-#endif
-#ifdef TIMER0_COMPA_vect
- prog_char gAvrInt_TIMER0_COMPA[] PROGMEM = "TIMER0 COMPA";
-#endif
-#ifdef TIMER0_COMPB_vect
- prog_char gAvrInt_TIMER0_COMPB[] PROGMEM = "TIMER0 COMPB";
-#endif
-#ifdef TIMER0_OVF_vect
- prog_char gAvrInt_TIMER0_OVF[] PROGMEM = "TIMER0 OVF";
-#endif
-#ifdef TIMER1_CAPT_vect
- prog_char gAvrInt_TIMER1_CAPT[] PROGMEM = "TIMER1 CAPT";
-#endif
-#ifdef TIMER1_COMPA_vect
- prog_char gAvrInt_TIMER1_COMPA[] PROGMEM = "TIMER1 COMPA";
-#endif
-#ifdef TIMER1_COMPB_vect
- prog_char gAvrInt_TIMER1_COMPB[] PROGMEM = "TIMER1 COMPB";
-#endif
-#ifdef TIMER1_COMPC_vect
- prog_char gAvrInt_TIMER1_COMPC[] PROGMEM = "TIMER1 COMPC";
-#endif
-#ifdef TIMER1_OVF_vect
- prog_char gAvrInt_TIMER1_OVF[] PROGMEM = "TIMER1 OVF";
-#endif
-#ifdef TIMER2_COMP_vect
- prog_char gAvrInt_TIMER2_COMP[] PROGMEM = "TIMER2 COMP";
-#endif
-#ifdef TIMER2_COMPA_vect
- prog_char gAvrInt_TIMER2_COMPA[] PROGMEM = "TIMER2 COMPA";
-#endif
-#ifdef TIMER2_COMPB_vect
- prog_char gAvrInt_TIMER2_COMPB[] PROGMEM = "TIMER2 COMPB";
-#endif
-#ifdef TIMER2_OVF_vect
- prog_char gAvrInt_TIMER2_OVF[] PROGMEM = "TIMER2 OVF";
-#endif
-#ifdef TIMER3_CAPT_vect
- prog_char gAvrInt_TIMER3_CAPT[] PROGMEM = "TIMER3 CAPT";
-#endif
-#ifdef TIMER3_COMPA_vect
- prog_char gAvrInt_TIMER3_COMPA[] PROGMEM = "TIMER3 COMPA";
-#endif
-#ifdef TIMER3_COMPB_vect
- prog_char gAvrInt_TIMER3_COMPB[] PROGMEM = "TIMER3 COMPB";
-#endif
-#ifdef TIMER3_COMPC_vect
- prog_char gAvrInt_TIMER3_COMPC[] PROGMEM = "TIMER3 COMPC";
-#endif
-#ifdef TIMER3_OVF_vect
- prog_char gAvrInt_TIMER3_OVF[] PROGMEM = "TIMER3 OVF";
-#endif
-#ifdef TIMER4_CAPT_vect
- prog_char gAvrInt_TIMER4_CAPT[] PROGMEM = "TIMER4 CAPT";
-#endif
-#ifdef TIMER4_COMPA_vect
- prog_char gAvrInt_TIMER4_COMPA[] PROGMEM = "TIMER4 COMPA";
-#endif
-#ifdef TIMER4_COMPB_vect
- prog_char gAvrInt_TIMER4_COMPB[] PROGMEM = "TIMER4 COMPB";
-#endif
-#ifdef TIMER4_COMPC_vect
- prog_char gAvrInt_TIMER4_COMPC[] PROGMEM = "TIMER4 COMPC";
-#endif
-#ifdef TIMER4_COMPD_vect
- prog_char gAvrInt_TIMER4_COMPD[] PROGMEM = "TIMER4 COMPD";
-#endif
-#ifdef TIMER4_OVF_vect
- prog_char gAvrInt_TIMER4_OVF[] PROGMEM = "TIMER4 OVF";
-#endif
-#ifdef TIMER4_FPF_vect
- prog_char gAvrInt_TIMER4_FPF[] PROGMEM = "TIMER4 Fault Protection";
-#endif
-#ifdef TIMER5_CAPT_vect
- prog_char gAvrInt_TIMER5_CAPT[] PROGMEM = "TIMER5 CAPT";
-#endif
-#ifdef TIMER5_COMPA_vect
- prog_char gAvrInt_TIMER5_COMPA[] PROGMEM = "TIMER5 COMPA";
-#endif
-#ifdef TIMER5_COMPB_vect
- prog_char gAvrInt_TIMER5_COMPB[] PROGMEM = "TIMER5 COMPB";
-#endif
-#ifdef TIMER5_COMPC_vect
- prog_char gAvrInt_TIMER5_COMPC[] PROGMEM = "TIMER5 COMPC";
-#endif
-#ifdef TIMER5_OVF_vect
- prog_char gAvrInt_TIMER5_OVF[] PROGMEM = "TIMER5 OVF";
-#endif
-
-//* when there is only 1 usart
-#if defined(USART_RX_vect) || defined(USART_RXC_vect)
- prog_char gAvrInt_USART_RX[] PROGMEM = "USART RX";
-#endif
-#if defined(USART_UDRE_vect)
- prog_char gAvrInt_USART_UDRE[] PROGMEM = "USART UDRE";
-#endif
-#if defined(USART_TX_vect) || defined(USART_TXC_vect)
- prog_char gAvrInt_USART_TX[] PROGMEM = "USART TX";
-#endif
-
-
-//* usart 0
-#if defined(USART0_RX_vect)
- prog_char gAvrInt_USART0_RX[] PROGMEM = "USART0 RX";
-#endif
-#if defined(USART0_UDRE_vect)
- prog_char gAvrInt_USART0_UDRE[] PROGMEM = "USART0 UDRE";
-#endif
-#if defined(USART0_TX_vect)
- prog_char gAvrInt_USART0_TX[] PROGMEM = "USART0 TX";
-#endif
-
-
-//* usart 1
-#ifdef USART1_RX_vect
- prog_char gAvrInt_USART1_RX[] PROGMEM = "USART1 RX";
-#endif
-#ifdef USART1_UDRE_vect
- prog_char gAvrInt_USART1_UDRE[] PROGMEM = "USART1 UDRE";
-#endif
-#ifdef USART1_TX_vect
- prog_char gAvrInt_USART1_TX[] PROGMEM = "USART1 TX";
-#endif
-
-//* usart 2
-#ifdef USART2_RX_vect
- prog_char gAvrInt_USART2_RX[] PROGMEM = "USART2 RX";
-#endif
-#ifdef USART2_UDRE_vect
- prog_char gAvrInt_USART2_UDRE[] PROGMEM = "USART2 UDRE";
-#endif
-#ifdef USART2_TX_vect
- prog_char gAvrInt_USART2_TX[] PROGMEM = "USART2 TX";
-#endif
-
-//* usart 3
-#ifdef USART3_RX_vect
- prog_char gAvrInt_USART3_RX[] PROGMEM = "USART3 RX";
-#endif
-#ifdef USART3_UDRE_vect
- prog_char gAvrInt_USART3_UDRE[] PROGMEM = "USART3 UDRE";
-#endif
-#ifdef USART3_TX_vect
- prog_char gAvrInt_USART3_TX[] PROGMEM = "USART3 TX";
-#endif
-#ifdef SPI_STC_vect
- prog_char gAvrInt_SPI_STC[] PROGMEM = "SPI STC";
-#endif
-#ifdef ADC_vect
- prog_char gAvrInt_ADC[] PROGMEM = "ADC";
-#endif
-#if defined(ANALOG_COMP_vect) || defined(ANA_COMP_vect)
- prog_char gAvrInt_ANALOG_COMP[] PROGMEM = "ANALOG COMP";
-#endif
-#if defined(EE_READY_vect) || defined(EE_RDY_vect)
- prog_char gAvrInt_EE_READY[] PROGMEM = "EE READY";
-#endif
-#ifdef TWI_vect
- prog_char gAvrInt_TWI[] PROGMEM = "TWI";
-#endif
-#if defined(SPM_READY_vect) || defined(SPM_RDY_vect)
- prog_char gAvrInt_SPM_READY[] PROGMEM = "SPM READY";
-#endif
-#ifdef USI_START_vect
- prog_char gAvrInt_USI_START[] PROGMEM = "USI START";
-#endif
-#ifdef USI_OVERFLOW_vect
- prog_char gAvrInt_USI_OVERFLOW[] PROGMEM = "USI OVERFLOW";
-#endif
-#ifdef USB_GEN_vect
- prog_char gAvrInt_USB_General[] PROGMEM = "USB General";
-#endif
-#ifdef USB_COM_vect
- prog_char gAvrInt_USB_Endpoint[] PROGMEM = "USB Endpoint";
-#endif
-
-#ifdef LCD_vect
- prog_char gAvrInt_LCD_StartFrame[] PROGMEM = "LCD Start of Frame";
-#endif
-
-//* these are for the chips with CAN bus support
-#ifdef CANIT_vect
- prog_char gAvrInt_CAN_TrafnsferCE[] PROGMEM = "CAN Transfer Complete or Error";
-#endif
-#ifdef OVRIT_vect
- prog_char gAvrInt_CAN_TimerOverRun[] PROGMEM = "CAN Timer Overrun";
-#endif
-
-//* these are for __AVR_ATmega128RFA1__
-#ifdef TRX24_PLL_LOCK_vect
- prog_char gAvrInt_TRN_PLL_LOCK[] PROGMEM = "TRX24_PLL_LOCK";
-#endif
-#ifdef TRX24_PLL_UNLOCK_vect
- prog_char gAvrInt_TRN_PLL_UNLOCK[] PROGMEM = "TRX24_PLL_UNLOCK";
-#endif
-#ifdef TRX24_RX_START_vect
- prog_char gAvrInt_TRN_RX_START[] PROGMEM = "TRX24_RX_START";
-#endif
-#ifdef TRX24_RX_END_vect
- prog_char gAvrInt_TRN_RX_END[] PROGMEM = "TRX24_RX_END";
-#endif
-#ifdef TRX24_CCA_ED_DONE_vect
- prog_char gAvrInt_TRN_CAAED_DONE[] PROGMEM = "TRX24_CCA_ED_DONE";
-#endif
-#ifdef TRX24_XAH_AMI_vect
- prog_char gAvrInt_TRN_FRAME_MATCH[] PROGMEM = "TRX24_FRAME_ADDRESS_MATCH";
-#endif
-#ifdef TRX24_TX_END_vect
- prog_char gAvrInt_TRN_TX_END[] PROGMEM = "TRX24_TX_END";
-#endif
-#ifdef TRX24_AWAKE_vect
- prog_char gAvrInt_TRN_AWAKE[] PROGMEM = "TRX24_AWAKE";
-#endif
-#ifdef SCNT_CMP1_vect
- prog_char gAvrInt_SCNT_CMP1[] PROGMEM = "SCNT_CMP1";
-#endif
-#ifdef SCNT_CMP2_vect
- prog_char gAvrInt_SCNT_CMP2[] PROGMEM = "SCNT_CMP2";
-#endif
-#ifdef SCNT_CMP3_vect
- prog_char gAvrInt_SCNT_CMP3[] PROGMEM = "SCNT_CMP3";
-#endif
-#ifdef SCNT_OVFL_vect
- prog_char gAvrInt_SCNT_OVFL[] PROGMEM = "SCNT_OVFL";
-#endif
-#ifdef SCNT_BACKOFF_vect
- prog_char gAvrInt_SCNT_BACKOFF[] PROGMEM = "SCNT_BACKOFF";
-#endif
-#ifdef AES_READY_vect
- prog_char gAvrInt_AES_READY[] PROGMEM = "AES_READY";
-#endif
-#ifdef BAT_LOW_vect
- prog_char gAvrInt_BAT_LOW[] PROGMEM = "BAT_LOW";
-#endif
-
-
-
-//**************************************************************************************************
-//* these do not have vector defs and have to be done by CPU type
-#if defined(__AVR_ATmega645__ ) || defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
- prog_char gAvrInt_NOT_USED[] PROGMEM = "NOT_USED";
-#endif
-#if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega128RFA1__)
- prog_char gAvrInt_RESERVED[] PROGMEM = "Reserved";
-#endif
-
- prog_char gAvrInt_END[] PROGMEM = "*";
-
-
-
-
-
-//**************************************************************************************************
-#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__)
-#pragma mark __AVR_ATmega168__ / __AVR_ATmega328P__ / __AVR_ATmega328__
-
-#define _INTERRUPT_NAMES_DEFINED_
-
-PGM_P gInterruptNameTable[] PROGMEM =
-{
-
- gAvrInt_RESET, // 1
- gAvrInt_INT0, // 2
- gAvrInt_INT1, // 3
- gAvrInt_PCINT0, // 4
- gAvrInt_PCINT1, // 5
- gAvrInt_PCINT2, // 6
- gAvrInt_WDT, // 7
- gAvrInt_TIMER2_COMPA, // 8
- gAvrInt_TIMER2_COMPB, // 9
- gAvrInt_TIMER2_OVF, // 10
- gAvrInt_TIMER1_CAPT, // 11
- gAvrInt_TIMER1_COMPA, // 12
- gAvrInt_TIMER1_COMPB, // 13
- gAvrInt_TIMER1_OVF, // 14
- gAvrInt_TIMER0_COMPA, // 15
- gAvrInt_TIMER0_COMPB, // 16
- gAvrInt_TIMER0_OVF, // 17
- gAvrInt_SPI_STC, // 18
- gAvrInt_USART_RX, // 19
- gAvrInt_USART_UDRE, // 20
- gAvrInt_USART_TX, // 21
- gAvrInt_ADC, // 22
- gAvrInt_EE_READY, // 23
- gAvrInt_ANALOG_COMP, // 24
- gAvrInt_TWI, // 25
- gAvrInt_SPM_READY, // 26
-};
-
-#endif
-
-//**************************************************************************************************
-#if defined(__AVR_ATmega169__)
-#pragma mark __AVR_ATmega169__
-
-#define _INTERRUPT_NAMES_DEFINED_
-
-PGM_P gInterruptNameTable[] PROGMEM =
-{
-
- gAvrInt_RESET, // 1
- gAvrInt_INT0, // 2
- gAvrInt_PCINT0, // 3
- gAvrInt_PCINT1, // 4
- gAvrInt_TIMER2_COMP, // 5
- gAvrInt_TIMER2_OVF, // 6
- gAvrInt_TIMER1_CAPT, // 7
- gAvrInt_TIMER1_COMPA, // 8
- gAvrInt_TIMER1_COMPB, // 9
- gAvrInt_TIMER1_OVF, // 10
- gAvrInt_TIMER0_COMP, // 11
- gAvrInt_TIMER0_OVF, // 12
- gAvrInt_SPI_STC, // 13
- gAvrInt_USART0_RX, // 14
- gAvrInt_USART0_UDRE, // 15
- gAvrInt_USART0_TX, // 16
- gAvrInt_USI_START, // 17
- gAvrInt_USI_OVERFLOW, // 18
- gAvrInt_ANALOG_COMP, // 19
- gAvrInt_ADC, // 20
- gAvrInt_EE_READY, // 21
- gAvrInt_SPM_READY, // 22
- gAvrInt_LCD_StartFrame, // 23
-
-};
-
-#endif
-
-
-//**************************************************************************************************
-#if defined(__AVR_ATmega640__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__)
-#pragma mark __AVR_ATmega640__ __AVR_ATmega1280__ __AVR_ATmega1281__ __AVR_ATmega2560__ __AVR_ATmega2561__
-
-#define _INTERRUPT_NAMES_DEFINED_
-
-PGM_P gInterruptNameTable[] PROGMEM =
-{
-
- gAvrInt_RESET, // 1
- gAvrInt_INT0, // 2
- gAvrInt_INT1, // 3
- gAvrInt_INT2, // 4
- gAvrInt_INT3, // 5
- gAvrInt_INT4, // 6
- gAvrInt_INT5, // 7
- gAvrInt_INT6, // 8
- gAvrInt_INT7, // 9
- gAvrInt_PCINT0, // 10
- gAvrInt_PCINT1, // 11
-#if defined(__AVR_ATmega640__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
- gAvrInt_PCINT2, // 12
-#else
- gAvrInt_NOT_USED, // 12
-#endif
- gAvrInt_WDT, // 13
- gAvrInt_TIMER2_COMPA, // 14
- gAvrInt_TIMER2_COMPB, // 15
- gAvrInt_TIMER2_OVF, // 16
- gAvrInt_TIMER1_CAPT, // 17
- gAvrInt_TIMER1_COMPA, // 18
- gAvrInt_TIMER1_COMPB, // 19
- gAvrInt_TIMER1_COMPC, // 20
- gAvrInt_TIMER1_OVF, // 21
- gAvrInt_TIMER0_COMPA, // 22
- gAvrInt_TIMER0_COMPB, // 23
- gAvrInt_TIMER0_OVF, // 24
- gAvrInt_SPI_STC, // 25
-
- gAvrInt_USART0_RX, // 26
- gAvrInt_USART0_UDRE, // 27
- gAvrInt_USART0_TX, // 28
- gAvrInt_ANALOG_COMP, // 29
- gAvrInt_ADC, // 30
- gAvrInt_EE_READY, // 31
-
- gAvrInt_TIMER3_CAPT, // 32
- gAvrInt_TIMER3_COMPA, // 33
- gAvrInt_TIMER3_COMPB, // 34
- gAvrInt_TIMER3_COMPC, // 35
- gAvrInt_TIMER3_OVF, // 36
-
- gAvrInt_USART1_RX, // 37
- gAvrInt_USART1_UDRE, // 38
- gAvrInt_USART1_TX, // 39
- gAvrInt_TWI, // 40
- gAvrInt_SPM_READY, // 41
-#if defined(__AVR_ATmega640__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
- gAvrInt_TIMER4_CAPT, // 42
-#else
- gAvrInt_NOT_USED, // 42
-#endif
- gAvrInt_TIMER4_COMPA, // 43
- gAvrInt_TIMER4_COMPB, // 44
- gAvrInt_TIMER4_COMPC, // 45
- gAvrInt_TIMER4_OVF, // 46
-#if defined(__AVR_ATmega640__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
- gAvrInt_TIMER5_CAPT, // 47
-#else
- gAvrInt_NOT_USED, // 47
-#endif
- gAvrInt_TIMER5_COMPA, // 48
- gAvrInt_TIMER5_COMPB, // 49
- gAvrInt_TIMER5_COMPC, // 50
- gAvrInt_TIMER5_OVF, // 51
-
-#if defined(__AVR_ATmega640__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
- gAvrInt_USART2_RX, // 52
- gAvrInt_USART2_UDRE, // 53
- gAvrInt_USART2_TX, // 54
-
- gAvrInt_USART3_RX, // 55
- gAvrInt_USART3_UDRE, // 56
- gAvrInt_USART3_TX, // 57
-#endif
-
-};
-
-#endif
-
-
-
-//**************************************************************************************************
-#if defined(__AVR_ATmega324P__ ) || defined(__AVR_ATmega644__ ) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
-#pragma mark __AVR_ATmega324P__ __AVR_ATmega644__ __AVR_ATmega644P__ __AVR_ATmega1284P__
-
-#define _INTERRUPT_NAMES_DEFINED_
-
-PGM_P gInterruptNameTable[] PROGMEM =
-{
-
- gAvrInt_RESET, // 1
- gAvrInt_INT0, // 2
- gAvrInt_INT1, // 3
- gAvrInt_INT2, // 4
- gAvrInt_PCINT0, // 5
- gAvrInt_PCINT1, // 6
- gAvrInt_PCINT2, // 7
- gAvrInt_PCINT3, // 8
- gAvrInt_WDT, // 9
- gAvrInt_TIMER2_COMPA, // 10
- gAvrInt_TIMER2_COMPB, // 11
- gAvrInt_TIMER2_OVF, // 12
- gAvrInt_TIMER1_CAPT, // 13
- gAvrInt_TIMER1_COMPA, // 14
- gAvrInt_TIMER1_COMPB, // 15
- gAvrInt_TIMER1_OVF, // 16
- gAvrInt_TIMER0_COMPA, // 17
- gAvrInt_TIMER0_COMPB, // 18
- gAvrInt_TIMER0_OVF, // 19
- gAvrInt_SPI_STC, // 20
- gAvrInt_USART0_RX, // 21
- gAvrInt_USART0_UDRE, // 22
- gAvrInt_USART0_TX, // 23
- gAvrInt_ANALOG_COMP, // 24
- gAvrInt_ADC, // 25
- gAvrInt_EE_READY, // 26
- gAvrInt_TWI, // 27
- gAvrInt_SPM_READY, // 28
-
-#if defined(__AVR_ATmega324P__ ) || defined(__AVR_ATmega644P__)
- gAvrInt_USART1_RX, // 29
- gAvrInt_USART1_UDRE, // 30
- gAvrInt_USART1_TX, // 31
-#endif
-
-};
-
-
-#endif
-
-//**************************************************************************************************
-#if defined(__AVR_ATmega1284P__ )
-#pragma mark __AVR_ATmega1284P__
-
-#define _INTERRUPT_NAMES_DEFINED_
-
-PGM_P gInterruptNameTable[] PROGMEM =
-{
-
- gAvrInt_RESET, // 1
- gAvrInt_INT0, // 2
- gAvrInt_INT1, // 3
- gAvrInt_INT2, // 4
- gAvrInt_PCINT0, // 5
- gAvrInt_PCINT1, // 6
- gAvrInt_PCINT2, // 7
- gAvrInt_PCINT3, // 8
- gAvrInt_WDT, // 9
- gAvrInt_TIMER2_COMPA, // 10
- gAvrInt_TIMER2_COMPB, // 11
- gAvrInt_TIMER2_OVF, // 12
- gAvrInt_TIMER1_CAPT, // 13
- gAvrInt_TIMER1_COMPA, // 14
- gAvrInt_TIMER1_COMPB, // 15
- gAvrInt_TIMER1_OVF, // 16
- gAvrInt_TIMER0_COMPA, // 17
- gAvrInt_TIMER0_COMPB, // 18
- gAvrInt_TIMER0_OVF, // 19
- gAvrInt_SPI_STC, // 20
- gAvrInt_USART0_RX, // 21
- gAvrInt_USART0_UDRE, // 22
- gAvrInt_USART0_TX, // 23
- gAvrInt_ANALOG_COMP, // 24
- gAvrInt_ADC, // 25
- gAvrInt_EE_READY, // 26
- gAvrInt_TWI, // 27
- gAvrInt_SPM_READY, // 28
-
- gAvrInt_USART1_RX, // 29
- gAvrInt_USART1_UDRE, // 30
- gAvrInt_USART1_TX, // 31
- //* these are NOT documented in doc8272.pdf
- //* they are in iom1284p.h
- gAvrInt_TIMER3_CAPT, // 32
- gAvrInt_TIMER3_COMPA, // 33
- gAvrInt_TIMER3_COMPB, // 34
- gAvrInt_TIMER3_OVF, // 35
-
-
-};
-
-
-#endif
-
-
-//**************************************************************************************************
-#if defined(__AVR_ATmega645__ )
-#pragma mark __AVR_ATmega645__
-
-#define _INTERRUPT_NAMES_DEFINED_
-
-PGM_P gInterruptNameTable[] PROGMEM =
-{
-
- gAvrInt_RESET, // 1
- gAvrInt_INT0, // 2
- gAvrInt_PCINT0, // 3
- gAvrInt_PCINT1, // 4
- gAvrInt_TIMER2_COMP, // 5
- gAvrInt_TIMER2_OVF, // 6
- gAvrInt_TIMER1_CAPT, // 7
- gAvrInt_TIMER1_COMPA, // 8
- gAvrInt_TIMER1_COMPB, // 9
- gAvrInt_TIMER1_OVF, // 10
- gAvrInt_TIMER0_COMP, // 11
- gAvrInt_TIMER0_OVF, // 12
- gAvrInt_SPI_STC, // 13
- gAvrInt_USART0_RX, // 14
- gAvrInt_USART0_UDRE, // 15
- gAvrInt_USART0_TX, // 16
- gAvrInt_USI_START, // 17
- gAvrInt_USI_OVERFLOW, // 18
- gAvrInt_ANALOG_COMP, // 19
- gAvrInt_ADC, // 20
- gAvrInt_EE_READY, // 21
- gAvrInt_SPM_READY, // 22
- gAvrInt_NOT_USED, // 23
-
-#if defined(__AVR_ATmega3250__) || defined(__AVR_ATmega6450__)
- gAvrInt_PCINT2, // 24
- gAvrInt_PCINT3, // 25
-#endif
-};
-
-
-#endif
-
-//**************************************************************************************************
-#if defined(__AVR_ATmega16__ )
-#pragma mark __AVR_ATmega16__
-
-#define _INTERRUPT_NAMES_DEFINED_
-
-PGM_P gInterruptNameTable[] PROGMEM =
-{
-
- gAvrInt_RESET, // 1
- gAvrInt_INT0, // 2
- gAvrInt_INT1, // 3
- gAvrInt_TIMER2_COMP, // 4
- gAvrInt_TIMER2_OVF, // 5
- gAvrInt_TIMER1_CAPT, // 6
- gAvrInt_TIMER1_COMPA, // 7
- gAvrInt_TIMER1_COMPB, // 8
- gAvrInt_TIMER1_OVF, // 9
- gAvrInt_TIMER0_OVF, // 10
- gAvrInt_SPI_STC, // 11
- gAvrInt_USART_RX, // 12
- gAvrInt_USART_UDRE, // 13
- gAvrInt_USART_TX, // 14
- gAvrInt_ADC, // 15
- gAvrInt_EE_READY, // 16
- gAvrInt_ANALOG_COMP, // 17
- gAvrInt_TWI, // 18
- gAvrInt_INT2, // 19
- gAvrInt_TIMER0_COMP, // 20
- gAvrInt_SPM_READY, // 21
-
-};
-
-
-#endif
-
-//**************************************************************************************************
-#if defined(__AVR_ATmega32__ )
-#pragma mark __AVR_ATmega32__
-
-#define _INTERRUPT_NAMES_DEFINED_
-
-PGM_P gInterruptNameTable[] PROGMEM =
-{
-
- gAvrInt_RESET, // 1
- gAvrInt_INT0, // 2
- gAvrInt_INT1, // 3
- gAvrInt_INT2, // 4
- gAvrInt_TIMER2_COMP, // 5
- gAvrInt_TIMER2_OVF, // 6
- gAvrInt_TIMER1_CAPT, // 7
- gAvrInt_TIMER1_COMPA, // 8
- gAvrInt_TIMER1_COMPB, // 9
- gAvrInt_TIMER1_OVF, // 10
- gAvrInt_TIMER0_COMP, // 11
- gAvrInt_TIMER0_OVF, // 12
- gAvrInt_SPI_STC, // 13
- gAvrInt_USART_RX, // 14
- gAvrInt_USART_UDRE, // 15
- gAvrInt_USART_TX, // 16
- gAvrInt_ADC, // 17
- gAvrInt_EE_READY, // 18
- gAvrInt_ANALOG_COMP, // 19
- gAvrInt_TWI, // 20
- gAvrInt_SPM_READY, // 21
-
-};
-
-
-#endif
-
-//**************************************************************************************************
-#if defined(__AVR_ATmega32U4__)
-#pragma mark __AVR_ATmega32U4__
-//* teensy 2.0
-//* http://www.pjrc.com/teensy/pinout.html
-#define _INTERRUPT_NAMES_DEFINED_
-
-
-PGM_P gInterruptNameTable[] PROGMEM =
-{
-
- gAvrInt_RESET, // 1
- gAvrInt_INT0, // 2
- gAvrInt_INT1, // 3
- gAvrInt_INT2, // 4
- gAvrInt_INT3, // 5
- gAvrInt_RESERVED, // 6
- gAvrInt_RESERVED, // 7
- gAvrInt_INT6, // 8
- gAvrInt_RESERVED, // 9
- gAvrInt_PCINT0, // 10
- gAvrInt_USB_General, // 11
- gAvrInt_USB_Endpoint, // 12
- gAvrInt_WDT, // 13
- gAvrInt_RESERVED, // 14
- gAvrInt_RESERVED, // 15
- gAvrInt_RESERVED, // 16
- gAvrInt_TIMER1_CAPT, // 17
- gAvrInt_TIMER1_COMPA, // 18
- gAvrInt_TIMER1_COMPB, // 19
- gAvrInt_TIMER1_COMPC, // 20
- gAvrInt_TIMER1_OVF, // 21
- gAvrInt_TIMER0_COMPA, // 22
- gAvrInt_TIMER0_COMPB, // 23
- gAvrInt_TIMER0_OVF, // 24
- gAvrInt_SPI_STC, // 25
-
- gAvrInt_USART1_RX, // 26
- gAvrInt_USART1_UDRE, // 27
- gAvrInt_USART1_TX, // 28
- gAvrInt_ANALOG_COMP, // 29
-
- gAvrInt_ADC, // 30
- gAvrInt_EE_READY, // 31
-
- gAvrInt_TIMER3_CAPT, // 32
- gAvrInt_TIMER3_COMPA, // 33
- gAvrInt_TIMER3_COMPB, // 34
- gAvrInt_TIMER3_COMPC, // 35
- gAvrInt_TIMER3_OVF, // 36
- gAvrInt_TWI, // 37
- gAvrInt_SPM_READY, // 38
-
- gAvrInt_TIMER4_COMPA, // 39
- gAvrInt_TIMER4_COMPB, // 40
- gAvrInt_TIMER4_COMPD, // 41
- gAvrInt_TIMER4_OVF, // 42
- gAvrInt_TIMER4_FPF, // 43
-};
-
-#endif
-
-//**************************************************************************************************
-#if defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
-#pragma mark __AVR_AT90USB1286__
-//* teensy++ 2.0
-//* http://www.pjrc.com/teensy/pinout.html
-#define _INTERRUPT_NAMES_DEFINED_
-
-
-PGM_P gInterruptNameTable[] PROGMEM =
-{
-
- gAvrInt_RESET, // 1
- gAvrInt_INT0, // 2
- gAvrInt_INT1, // 3
- gAvrInt_INT2, // 4
- gAvrInt_INT3, // 5
- gAvrInt_INT4, // 6
- gAvrInt_INT5, // 7
- gAvrInt_INT6, // 8
- gAvrInt_INT7, // 9
- gAvrInt_PCINT0, // 10
- gAvrInt_USB_General, // 11
- gAvrInt_USB_Endpoint, // 12
- gAvrInt_WDT, // 13
- gAvrInt_TIMER2_COMPA, // 14
- gAvrInt_TIMER2_COMPB, // 15
- gAvrInt_TIMER2_OVF, // 16
- gAvrInt_TIMER1_CAPT, // 17
- gAvrInt_TIMER1_COMPA, // 18
- gAvrInt_TIMER1_COMPB, // 19
- gAvrInt_TIMER1_COMPC, // 20
- gAvrInt_TIMER1_OVF, // 21
- gAvrInt_TIMER0_COMPA, // 22
- gAvrInt_TIMER0_COMPB, // 23
- gAvrInt_TIMER0_OVF, // 24
- gAvrInt_SPI_STC, // 25
-
- gAvrInt_USART1_RX, // 26
- gAvrInt_USART1_UDRE, // 27
- gAvrInt_USART1_TX, // 28
- gAvrInt_ANALOG_COMP, // 29
-
- gAvrInt_ADC, // 30
- gAvrInt_EE_READY, // 31
-
- gAvrInt_TIMER3_CAPT, // 32
- gAvrInt_TIMER3_COMPA, // 33
- gAvrInt_TIMER3_COMPB, // 34
- gAvrInt_TIMER3_COMPC, // 35
- gAvrInt_TIMER3_OVF, // 36
- gAvrInt_TWI, // 37
- gAvrInt_SPM_READY, // 38
-
-};
-
-#endif
-
-
-
-
-//**************************************************************************************************
-#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega64__)
-#pragma mark __AVR_ATmega64__ __AVR_ATmega128__
-#define _INTERRUPT_NAMES_DEFINED_
-
-
-PGM_P gInterruptNameTable[] PROGMEM =
-{
-
- gAvrInt_RESET, // 1
- gAvrInt_INT0, // 2
- gAvrInt_INT1, // 3
- gAvrInt_INT2, // 4
- gAvrInt_INT3, // 5
- gAvrInt_INT4, // 6
- gAvrInt_INT5, // 7
- gAvrInt_INT6, // 8
- gAvrInt_INT7, // 9
- gAvrInt_TIMER2_COMP, // 10
- gAvrInt_TIMER2_OVF, // 11
- gAvrInt_TIMER1_CAPT, // 12
- gAvrInt_TIMER1_COMPA, // 13
- gAvrInt_TIMER1_COMPB, // 14
- gAvrInt_TIMER1_OVF, // 15
- gAvrInt_TIMER0_COMP, // 16
- gAvrInt_TIMER0_OVF, // 17
- gAvrInt_SPI_STC, // 18
- gAvrInt_USART0_RX, // 19
- gAvrInt_USART0_UDRE, // 20
- gAvrInt_USART0_TX, // 21
- gAvrInt_ADC, // 22
- gAvrInt_EE_READY, // 23
- gAvrInt_ANALOG_COMP, // 24
- gAvrInt_TIMER1_COMPC, // 25
- gAvrInt_TIMER3_CAPT, // 26
- gAvrInt_TIMER3_COMPA, // 27
- gAvrInt_TIMER3_COMPB, // 28
- gAvrInt_TIMER3_COMPC, // 29
- gAvrInt_TIMER3_OVF, // 30
- gAvrInt_USART1_RX, // 31
- gAvrInt_USART1_UDRE, // 32
- gAvrInt_USART1_TX, // 33
- gAvrInt_TWI, // 34
- gAvrInt_SPM_READY, // 35
-
-};
-
-#endif
-
-//**************************************************************************************************
-#if defined(__AVR_AT90CAN32__) || defined(__AVR_AT90CAN64__) || defined(__AVR_AT90CAN128__)
-#pragma mark __AVR_AT90CAN32__ __AVR_AT90CAN64__ __AVR_AT90CAN128__
-
-#define _INTERRUPT_NAMES_DEFINED_
-
-PGM_P gInterruptNameTable[] PROGMEM =
-{
-
- gAvrInt_RESET, // 1
- gAvrInt_INT0, // 2
- gAvrInt_INT1, // 3
- gAvrInt_INT2, // 4
- gAvrInt_INT3, // 5
- gAvrInt_INT4, // 6
- gAvrInt_INT5, // 7
- gAvrInt_INT6, // 8
- gAvrInt_INT7, // 9
- gAvrInt_TIMER2_COMP, // 10
- gAvrInt_TIMER2_OVF, // 11
- gAvrInt_TIMER1_CAPT, // 12
- gAvrInt_TIMER1_COMPA, // 13
- gAvrInt_TIMER1_COMPB, // 14
- gAvrInt_TIMER1_COMPC, // 15
- gAvrInt_TIMER1_OVF, // 16
- gAvrInt_TIMER0_COMP, // 17
- gAvrInt_TIMER0_OVF, // 18
- gAvrInt_CAN_TrafnsferCE, // 19
- gAvrInt_CAN_TimerOverRun, // 20
- gAvrInt_SPI_STC, // 21
- gAvrInt_USART0_RX, // 22
- gAvrInt_USART0_UDRE, // 23
- gAvrInt_USART0_TX, // 24
- gAvrInt_ANALOG_COMP, // 25
- gAvrInt_ADC, // 26
- gAvrInt_EE_READY, // 27
- gAvrInt_TIMER3_CAPT, // 28
- gAvrInt_TIMER3_COMPA, // 29
- gAvrInt_TIMER3_COMPB, // 30
- gAvrInt_TIMER3_COMPC, // 31
- gAvrInt_TIMER3_OVF, // 32
- gAvrInt_USART1_RX, // 33
- gAvrInt_USART1_UDRE, // 34
- gAvrInt_USART1_TX, // 35
- gAvrInt_TWI, // 36
- gAvrInt_SPM_READY, // 37
-};
-
-#endif
-
-//**************************************************************************************************
-#if defined (__AVR_ATmega128RFA1__)
-#pragma mark __AVR_ATmega128RFA1__
-#define _INTERRUPT_NAMES_DEFINED_
-
-PGM_P gInterruptNameTable[] PROGMEM =
-{
- //* Atmel changed the number scheme for interrupt vectors
- gAvrInt_RESET, // 0
- gAvrInt_INT0, // 1
- gAvrInt_INT1, // 2
- gAvrInt_INT2, // 3
- gAvrInt_INT3, // 4
- gAvrInt_INT4, // 5
- gAvrInt_INT5, // 6
- gAvrInt_INT6, // 7
- gAvrInt_INT7, // 8
- gAvrInt_PCINT0, // 9
- gAvrInt_PCINT1, // 10
- gAvrInt_PCINT2, // 11
- gAvrInt_WDT, // 12
- gAvrInt_TIMER2_COMPA, // 13
- gAvrInt_TIMER2_COMPB, // 14
- gAvrInt_TIMER2_OVF, // 15
- gAvrInt_TIMER1_CAPT, // 16
- gAvrInt_TIMER1_COMPA, // 17
- gAvrInt_TIMER1_COMPB, // 18
- gAvrInt_TIMER1_COMPC, // 19
- gAvrInt_TIMER1_OVF, // 20
- gAvrInt_TIMER0_COMPA, // 21
- gAvrInt_TIMER0_COMPB, // 22
- gAvrInt_TIMER0_OVF, // 23
- gAvrInt_SPI_STC, // 24
- gAvrInt_USART0_RX, // 25
- gAvrInt_USART0_UDRE, // 26
- gAvrInt_USART0_TX, // 27
- gAvrInt_ANALOG_COMP, // 28
- gAvrInt_ADC, // 29
- gAvrInt_EE_READY, // 30
- gAvrInt_TIMER3_CAPT, // 31
- gAvrInt_TIMER3_COMPA, // 32
- gAvrInt_TIMER3_COMPB, // 33
- gAvrInt_TIMER3_COMPC, // 34
- gAvrInt_TIMER3_OVF, // 35
- gAvrInt_USART1_RX, // 36
- gAvrInt_USART1_UDRE, // 37
- gAvrInt_USART1_TX, // 38
- gAvrInt_TWI, // 39
- gAvrInt_SPM_READY, // 40
- gAvrInt_TIMER4_CAPT, // 41
- gAvrInt_TIMER4_COMPA, // 42
- gAvrInt_TIMER4_COMPB, // 43
- gAvrInt_TIMER4_COMPC, // 44
- gAvrInt_TIMER4_OVF, // 45
- gAvrInt_TIMER5_CAPT, // 46
- gAvrInt_TIMER5_COMPA, // 47
- gAvrInt_TIMER5_COMPB, // 48
- gAvrInt_TIMER5_COMPC, // 49
- gAvrInt_TIMER5_OVF, // 50
-#if 1
- gAvrInt_RESERVED, // 51
- gAvrInt_RESERVED, // 52
- gAvrInt_RESERVED, // 53
-
- gAvrInt_RESERVED, // 54
- gAvrInt_RESERVED, // 55
- gAvrInt_RESERVED, // 56
-
-#else
- gAvrInt_USART2_RX, // 51
- gAvrInt_USART2_UDRE, // 52
- gAvrInt_USART2_TX, // 53
-
- gAvrInt_USART3_RX, // 54
- gAvrInt_USART3_UDRE, // 55
- gAvrInt_USART3_TX, // 56
-#endif
- gAvrInt_TRN_PLL_LOCK, // 57
- gAvrInt_TRN_PLL_UNLOCK, // 58
- gAvrInt_TRN_RX_START, // 59
- gAvrInt_TRN_RX_END, // 60
- gAvrInt_TRN_CAAED_DONE, // 61
- gAvrInt_TRN_FRAME_MATCH,// 62
- gAvrInt_TRN_TX_END, // 63
- gAvrInt_TRN_AWAKE, // 64
-
- gAvrInt_SCNT_CMP1, // 65
- gAvrInt_SCNT_CMP2, // 66
- gAvrInt_SCNT_CMP3, // 67
- gAvrInt_SCNT_OVFL, // 68
- gAvrInt_SCNT_BACKOFF, // 69
- gAvrInt_AES_READY, // 70
- gAvrInt_BAT_LOW, // 71
-
-
-};
-
-#endif
-
-
-#if !defined(_INTERRUPT_NAMES_DEFINED_)
- #warning No interrupt string defs for this cpu
-#endif
-
diff --git a/bootloaders/stk500v2/command.h b/bootloaders/stk500v2/command.h
deleted file mode 100644
index 03b1b38..0000000
--- a/bootloaders/stk500v2/command.h
+++ /dev/null
@@ -1,114 +0,0 @@
-//**** ATMEL AVR - A P P L I C A T I O N N O T E ************************
-//*
-//* Title: AVR068 - STK500 Communication Protocol
-//* Filename: command.h
-//* Version: 1.0
-//* Last updated: 31.01.2005
-//*
-//* Support E-mail: avr@atmel.com
-//*
-//**************************************************************************
-
-// *****************[ STK message constants ]***************************
-
-#define MESSAGE_START 0x1B //= ESC = 27 decimal
-#define TOKEN 0x0E
-
-// *****************[ STK general command constants ]**************************
-
-#define CMD_SIGN_ON 0x01
-#define CMD_SET_PARAMETER 0x02
-#define CMD_GET_PARAMETER 0x03
-#define CMD_SET_DEVICE_PARAMETERS 0x04
-#define CMD_OSCCAL 0x05
-#define CMD_LOAD_ADDRESS 0x06
-#define CMD_FIRMWARE_UPGRADE 0x07
-
-
-// *****************[ STK ISP command constants ]******************************
-
-#define CMD_ENTER_PROGMODE_ISP 0x10
-#define CMD_LEAVE_PROGMODE_ISP 0x11
-#define CMD_CHIP_ERASE_ISP 0x12
-#define CMD_PROGRAM_FLASH_ISP 0x13
-#define CMD_READ_FLASH_ISP 0x14
-#define CMD_PROGRAM_EEPROM_ISP 0x15
-#define CMD_READ_EEPROM_ISP 0x16
-#define CMD_PROGRAM_FUSE_ISP 0x17
-#define CMD_READ_FUSE_ISP 0x18
-#define CMD_PROGRAM_LOCK_ISP 0x19
-#define CMD_READ_LOCK_ISP 0x1A
-#define CMD_READ_SIGNATURE_ISP 0x1B
-#define CMD_READ_OSCCAL_ISP 0x1C
-#define CMD_SPI_MULTI 0x1D
-
-// *****************[ STK PP command constants ]*******************************
-
-#define CMD_ENTER_PROGMODE_PP 0x20
-#define CMD_LEAVE_PROGMODE_PP 0x21
-#define CMD_CHIP_ERASE_PP 0x22
-#define CMD_PROGRAM_FLASH_PP 0x23
-#define CMD_READ_FLASH_PP 0x24
-#define CMD_PROGRAM_EEPROM_PP 0x25
-#define CMD_READ_EEPROM_PP 0x26
-#define CMD_PROGRAM_FUSE_PP 0x27
-#define CMD_READ_FUSE_PP 0x28
-#define CMD_PROGRAM_LOCK_PP 0x29
-#define CMD_READ_LOCK_PP 0x2A
-#define CMD_READ_SIGNATURE_PP 0x2B
-#define CMD_READ_OSCCAL_PP 0x2C
-
-#define CMD_SET_CONTROL_STACK 0x2D
-
-// *****************[ STK HVSP command constants ]*****************************
-
-#define CMD_ENTER_PROGMODE_HVSP 0x30
-#define CMD_LEAVE_PROGMODE_HVSP 0x31
-#define CMD_CHIP_ERASE_HVSP 0x32
-#define CMD_PROGRAM_FLASH_HVSP ` 0x33
-#define CMD_READ_FLASH_HVSP 0x34
-#define CMD_PROGRAM_EEPROM_HVSP 0x35
-#define CMD_READ_EEPROM_HVSP 0x36
-#define CMD_PROGRAM_FUSE_HVSP 0x37
-#define CMD_READ_FUSE_HVSP 0x38
-#define CMD_PROGRAM_LOCK_HVSP 0x39
-#define CMD_READ_LOCK_HVSP 0x3A
-#define CMD_READ_SIGNATURE_HVSP 0x3B
-#define CMD_READ_OSCCAL_HVSP 0x3C
-
-// *****************[ STK status constants ]***************************
-
-// Success
-#define STATUS_CMD_OK 0x00
-
-// Warnings
-#define STATUS_CMD_TOUT 0x80
-#define STATUS_RDY_BSY_TOUT 0x81
-#define STATUS_SET_PARAM_MISSING 0x82
-
-// Errors
-#define STATUS_CMD_FAILED 0xC0
-#define STATUS_CKSUM_ERROR 0xC1
-#define STATUS_CMD_UNKNOWN 0xC9
-
-// *****************[ STK parameter constants ]***************************
-#define PARAM_BUILD_NUMBER_LOW 0x80
-#define PARAM_BUILD_NUMBER_HIGH 0x81
-#define PARAM_HW_VER 0x90
-#define PARAM_SW_MAJOR 0x91
-#define PARAM_SW_MINOR 0x92
-#define PARAM_VTARGET 0x94
-#define PARAM_VADJUST 0x95
-#define PARAM_OSC_PSCALE 0x96
-#define PARAM_OSC_CMATCH 0x97
-#define PARAM_SCK_DURATION 0x98
-#define PARAM_TOPCARD_DETECT 0x9A
-#define PARAM_STATUS 0x9C
-#define PARAM_DATA 0x9D
-#define PARAM_RESET_POLARITY 0x9E
-#define PARAM_CONTROLLER_INIT 0x9F
-
-// *****************[ STK answer constants ]***************************
-
-#define ANSWER_CKSUM_ERROR 0xB0
-
diff --git a/bootloaders/stk500v2/stk500boot.c b/bootloaders/stk500v2/stk500boot.c
deleted file mode 100644
index 0b49dff..0000000
--- a/bootloaders/stk500v2/stk500boot.c
+++ /dev/null
@@ -1,2122 +0,0 @@
-/*****************************************************************************
-Title: STK500v2 compatible bootloader
- Modified for Wiring board ATMega128-16MHz
-Author: Peter Fleury <pfleury@gmx.ch> http://jump.to/fleury
-Compiler: avr-gcc 3.4.5 or 4.1 / avr-libc 1.4.3
-Hardware: All AVRs with bootloader support, tested with ATmega8
-License: GNU General Public License
-
-Modified: Worapoht Kornkaewwattanakul <dev@avride.com> http://www.avride.com
-Date: 17 October 2007
-Update: 1st, 29 Dec 2007 : Enable CMD_SPI_MULTI but ignore unused command by return 0x00 byte response..
-Compiler: WINAVR20060421
-Description: add timeout feature like previous Wiring bootloader
-
-DESCRIPTION:
- This program allows an AVR with bootloader capabilities to
- read/write its own Flash/EEprom. To enter Programming mode
- an input pin is checked. If this pin is pulled low, programming mode
- is entered. If not, normal execution is done from $0000
- "reset" vector in Application area.
- Size fits into a 1024 word bootloader section
- when compiled with avr-gcc 4.1
- (direct replace on Wiring Board without fuse setting changed)
-
-USAGE:
- - Set AVR MCU type and clock-frequency (F_CPU) in the Makefile.
- - Set baud rate below (AVRISP only works with 115200 bps)
- - compile/link the bootloader with the supplied Makefile
- - program the "Boot Flash section size" (BOOTSZ fuses),
- for boot-size 1024 words: program BOOTSZ01
- - enable the BOOT Reset Vector (program BOOTRST)
- - Upload the hex file to the AVR using any ISP programmer
- - Program Boot Lock Mode 3 (program BootLock 11 and BootLock 12 lock bits) // (leave them)
- - Reset your AVR while keeping PROG_PIN pulled low // (for enter bootloader by switch)
- - Start AVRISP Programmer (AVRStudio/Tools/Program AVR)
- - AVRISP will detect the bootloader
- - Program your application FLASH file and optional EEPROM file using AVRISP
-
-Note:
- Erasing the device without flashing, through AVRISP GUI button "Erase Device"
- is not implemented, due to AVRStudio limitations.
- Flash is always erased before programming.
-
- AVRdude:
- Please uncomment #define REMOVE_CMD_SPI_MULTI when using AVRdude.
- Comment #define REMOVE_PROGRAM_LOCK_BIT_SUPPORT to reduce code size
- Read Fuse Bits and Read/Write Lock Bits is not supported
-
-NOTES:
- Based on Atmel Application Note AVR109 - Self-programming
- Based on Atmel Application Note AVR068 - STK500v2 Protocol
-
-LICENSE:
- Copyright (C) 2006 Peter Fleury
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
-*****************************************************************************/
-
-//************************************************************************
-//* Edit History
-//************************************************************************
-//* Jul 7, 2010 <MLS> = Mark Sproul msproul@skycharoit.com
-//* Jul 7, 2010 <MLS> Working on mega2560. No Auto-restart
-//* Jul 7, 2010 <MLS> Switched to 8K bytes (4K words) so that we have room for the monitor
-//* Jul 8, 2010 <MLS> Found older version of source that had auto restart, put that code back in
-//* Jul 8, 2010 <MLS> Adding monitor code
-//* Jul 11, 2010 <MLS> Added blinking LED while waiting for download to start
-//* Jul 11, 2010 <MLS> Added EEPROM test
-//* Jul 29, 2010 <MLS> Added recchar_timeout for timing out on bootloading
-//* Aug 23, 2010 <MLS> Added support for atmega2561
-//* Aug 26, 2010 <MLS> Removed support for BOOT_BY_SWITCH
-//* Sep 8, 2010 <MLS> Added support for atmega16
-//* Nov 9, 2010 <MLS> Issue 392:Fixed bug that 3 !!! in code would cause it to jump to monitor
-//* Jun 24, 2011 <MLS> Removed analogRead (was not used)
-//* Dec 29, 2011 <MLS> Issue 181: added watch dog timmer support
-//* Dec 29, 2011 <MLS> Issue 505: bootloader is comparing the seqNum to 1 or the current sequence
-//* Jan 1, 2012 <MLS> Issue 543: CMD_CHIP_ERASE_ISP now returns STATUS_CMD_FAILED instead of STATUS_CMD_OK
-//* Jan 1, 2012 <MLS> Issue 543: Write EEPROM now does something (NOT TESTED)
-//* Jan 1, 2012 <MLS> Issue 544: stk500v2 bootloader doesn't support reading fuses
-//************************************************************************
-
-//************************************************************************
-//* these are used to test issues
-//* http://code.google.com/p/arduino/issues/detail?id=505
-//* Reported by mark.stubbs, Mar 14, 2011
-//* The STK500V2 bootloader is comparing the seqNum to 1 or the current sequence
-//* (IE: Requiring the sequence to be 1 or match seqNum before continuing).
-//* The correct behavior is for the STK500V2 to accept the PC's sequence number, and echo it back for the reply message.
-#define _FIX_ISSUE_505_
-//************************************************************************
-//* Issue 181: added watch dog timmer support
-#define _FIX_ISSUE_181_
-
-#include <inttypes.h>
-#include <avr/io.h>
-#include <avr/interrupt.h>
-#include <avr/boot.h>
-#include <avr/pgmspace.h>
-#include <util/delay.h>
-#include <avr/eeprom.h>
-#include <avr/common.h>
-#include <stdlib.h>
-#include "command.h"
-
-
-#if defined(_MEGA_BOARD_) || defined(_BOARD_AMBER128_) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) \
- || defined(__AVR_ATmega2561__) || defined(__AVR_ATmega1284P__) || defined(ENABLE_MONITOR)
- #undef ENABLE_MONITOR
- #define ENABLE_MONITOR
- static void RunMonitor(void);
-#endif
-
-#ifndef EEWE
- #define EEWE 1
-#endif
-#ifndef EEMWE
- #define EEMWE 2
-#endif
-
-//#define _DEBUG_SERIAL_
-//#define _DEBUG_WITH_LEDS_
-
-
-/*
- * Uncomment the following lines to save code space
- */
-//#define REMOVE_PROGRAM_LOCK_BIT_SUPPORT // disable program lock bits
-//#define REMOVE_BOOTLOADER_LED // no LED to show active bootloader
-//#define REMOVE_CMD_SPI_MULTI // disable processing of SPI_MULTI commands, Remark this line for AVRDUDE <Worapoht>
-//
-
-
-
-//************************************************************************
-//* LED on pin "PROGLED_PIN" on port "PROGLED_PORT"
-//* indicates that bootloader is active
-//* PG2 -> LED on Wiring board
-//************************************************************************
-#define BLINK_LED_WHILE_WAITING
-
-#ifdef _MEGA_BOARD_
- #define PROGLED_PORT PORTB
- #define PROGLED_DDR DDRB
- #define PROGLED_PIN PINB7
-#elif defined( _BOARD_AMBER128_ )
- //* this is for the amber 128 http://www.soc-robotics.com/
- //* onbarod led is PORTE4
- #define PROGLED_PORT PORTD
- #define PROGLED_DDR DDRD
- #define PROGLED_PIN PINE7
-#elif defined( _CEREBOTPLUS_BOARD_ ) || defined(_CEREBOT_II_BOARD_)
- //* this is for the Cerebot 2560 board and the Cerebot-ii
- //* onbarod leds are on PORTE4-7
- #define PROGLED_PORT PORTE
- #define PROGLED_DDR DDRE
- #define PROGLED_PIN PINE7
-#elif defined( _PENGUINO_ )
- //* this is for the Penguino
- //* onbarod led is PORTE4
- #define PROGLED_PORT PORTC
- #define PROGLED_DDR DDRC
- #define PROGLED_PIN PINC6
-#elif defined( _ANDROID_2561_ ) || defined( __AVR_ATmega2561__ )
- //* this is for the Boston Android 2561
- //* onbarod led is PORTE4
- #define PROGLED_PORT PORTA
- #define PROGLED_DDR DDRA
- #define PROGLED_PIN PINA3
-#elif defined( _BOARD_MEGA16 )
- //* onbarod led is PORTA7
- #define PROGLED_PORT PORTA
- #define PROGLED_DDR DDRA
- #define PROGLED_PIN PINA7
- #define UART_BAUDRATE_DOUBLE_SPEED 0
-
-#elif defined( _BOARD_BAHBOT_ )
- //* dosent have an onboard LED but this is what will probably be added to this port
- #define PROGLED_PORT PORTB
- #define PROGLED_DDR DDRB
- #define PROGLED_PIN PINB0
-
-#elif defined( _BOARD_ROBOTX_ )
- #define PROGLED_PORT PORTB
- #define PROGLED_DDR DDRB
- #define PROGLED_PIN PINB6
-#elif defined( _BOARD_CUSTOM1284_BLINK_B0_ )
- #define PROGLED_PORT PORTB
- #define PROGLED_DDR DDRB
- #define PROGLED_PIN PINB0
-#elif defined( _BOARD_CUSTOM1284_ )
- #define PROGLED_PORT PORTD
- #define PROGLED_DDR DDRD
- #define PROGLED_PIN PIND5
-#elif defined( _AVRLIP_ )
- #define PROGLED_PORT PORTB
- #define PROGLED_DDR DDRB
- #define PROGLED_PIN PINB5
-#elif defined( _BOARD_STK500_ )
- #define PROGLED_PORT PORTA
- #define PROGLED_DDR DDRA
- #define PROGLED_PIN PINA7
-#elif defined( _BOARD_STK502_ )
- #define PROGLED_PORT PORTB
- #define PROGLED_DDR DDRB
- #define PROGLED_PIN PINB5
-#elif defined( _BOARD_STK525_ )
- #define PROGLED_PORT PORTB
- #define PROGLED_DDR DDRB
- #define PROGLED_PIN PINB7
-#else
- #define PROGLED_PORT PORTG
- #define PROGLED_DDR DDRG
- #define PROGLED_PIN PING2
-#endif
-
-
-
-/*
- * define CPU frequency in Mhz here if not defined in Makefile
- */
-#ifndef F_CPU
- #define F_CPU 16000000UL
-#endif
-
-#define _BLINK_LOOP_COUNT_ (F_CPU / 2250)
-/*
- * UART Baudrate, AVRStudio AVRISP only accepts 115200 bps
- */
-
-#ifndef BAUDRATE
- #define BAUDRATE 115200
-#endif
-
-/*
- * Enable (1) or disable (0) USART double speed operation
- */
-#ifndef UART_BAUDRATE_DOUBLE_SPEED
- #if defined (__AVR_ATmega32__)
- #define UART_BAUDRATE_DOUBLE_SPEED 0
- #else
- #define UART_BAUDRATE_DOUBLE_SPEED 1
- #endif
-#endif
-
-/*
- * HW and SW version, reported to AVRISP, must match version of AVRStudio
- */
-#define CONFIG_PARAM_BUILD_NUMBER_LOW 0
-#define CONFIG_PARAM_BUILD_NUMBER_HIGH 0
-#define CONFIG_PARAM_HW_VER 0x0F
-#define CONFIG_PARAM_SW_MAJOR 2
-#define CONFIG_PARAM_SW_MINOR 0x0A
-
-/*
- * Calculate the address where the bootloader starts from FLASHEND and BOOTSIZE
- * (adjust BOOTSIZE below and BOOTLOADER_ADDRESS in Makefile if you want to change the size of the bootloader)
- */
-//#define BOOTSIZE 1024
-#if FLASHEND > 0x0F000
- #define BOOTSIZE 8192
-#else
- #define BOOTSIZE 2048
-#endif
-
-#define APP_END (FLASHEND -(2*BOOTSIZE) + 1)
-
-/*
- * Signature bytes are not available in avr-gcc io_xxx.h
- */
-#if defined (__AVR_ATmega8__)
- #define SIGNATURE_BYTES 0x1E9307
-#elif defined (__AVR_ATmega16__)
- #define SIGNATURE_BYTES 0x1E9403
-#elif defined (__AVR_ATmega32__)
- #define SIGNATURE_BYTES 0x1E9502
-#elif defined (__AVR_ATmega8515__)
- #define SIGNATURE_BYTES 0x1E9306
-#elif defined (__AVR_ATmega8535__)
- #define SIGNATURE_BYTES 0x1E9308
-#elif defined (__AVR_ATmega162__)
- #define SIGNATURE_BYTES 0x1E9404
-#elif defined (__AVR_ATmega128__)
- #define SIGNATURE_BYTES 0x1E9702
-#elif defined (__AVR_ATmega1280__)
- #define SIGNATURE_BYTES 0x1E9703
-#elif defined (__AVR_ATmega2560__)
- #define SIGNATURE_BYTES 0x1E9801
-#elif defined (__AVR_ATmega2561__)
- #define SIGNATURE_BYTES 0x1e9802
-#elif defined (__AVR_ATmega1284P__)
- #define SIGNATURE_BYTES 0x1e9705
-#elif defined (__AVR_ATmega640__)
- #define SIGNATURE_BYTES 0x1e9608
-#elif defined (__AVR_ATmega64__)
- #define SIGNATURE_BYTES 0x1E9602
-#elif defined (__AVR_ATmega169__)
- #define SIGNATURE_BYTES 0x1e9405
-#elif defined (__AVR_AT90USB1287__)
- #define SIGNATURE_BYTES 0x1e9782
-#else
- #error "no signature definition for MCU available"
-#endif
-
-
-#if defined(_BOARD_ROBOTX_) || defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__)
- #define UART_BAUD_RATE_LOW UBRR1L
- #define UART_STATUS_REG UCSR1A
- #define UART_CONTROL_REG UCSR1B
- #define UART_ENABLE_TRANSMITTER TXEN1
- #define UART_ENABLE_RECEIVER RXEN1
- #define UART_TRANSMIT_COMPLETE TXC1
- #define UART_RECEIVE_COMPLETE RXC1
- #define UART_DATA_REG UDR1
- #define UART_DOUBLE_SPEED U2X1
-
-#elif defined(__AVR_ATmega8__) || defined(__AVR_ATmega16__) || defined(__AVR_ATmega32__) \
- || defined(__AVR_ATmega8515__) || defined(__AVR_ATmega8535__)
- /* ATMega8 with one USART */
- #define UART_BAUD_RATE_LOW UBRRL
- #define UART_STATUS_REG UCSRA
- #define UART_CONTROL_REG UCSRB
- #define UART_ENABLE_TRANSMITTER TXEN
- #define UART_ENABLE_RECEIVER RXEN
- #define UART_TRANSMIT_COMPLETE TXC
- #define UART_RECEIVE_COMPLETE RXC
- #define UART_DATA_REG UDR
- #define UART_DOUBLE_SPEED U2X
-
-#elif defined(__AVR_ATmega64__) || defined(__AVR_ATmega128__) || defined(__AVR_ATmega162__) \
- || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__)
- /* ATMega with two USART, use UART0 */
- #define UART_BAUD_RATE_LOW UBRR0L
- #define UART_STATUS_REG UCSR0A
- #define UART_CONTROL_REG UCSR0B
- #define UART_ENABLE_TRANSMITTER TXEN0
- #define UART_ENABLE_RECEIVER RXEN0
- #define UART_TRANSMIT_COMPLETE TXC0
- #define UART_RECEIVE_COMPLETE RXC0
- #define UART_DATA_REG UDR0
- #define UART_DOUBLE_SPEED U2X0
-#elif defined(UBRR0L) && defined(UCSR0A) && defined(TXEN0)
- /* ATMega with two USART, use UART0 */
- #define UART_BAUD_RATE_LOW UBRR0L
- #define UART_STATUS_REG UCSR0A
- #define UART_CONTROL_REG UCSR0B
- #define UART_ENABLE_TRANSMITTER TXEN0
- #define UART_ENABLE_RECEIVER RXEN0
- #define UART_TRANSMIT_COMPLETE TXC0
- #define UART_RECEIVE_COMPLETE RXC0
- #define UART_DATA_REG UDR0
- #define UART_DOUBLE_SPEED U2X0
-#elif defined(UBRRL) && defined(UCSRA) && defined(UCSRB) && defined(TXEN) && defined(RXEN)
- //* catch all
- #define UART_BAUD_RATE_LOW UBRRL
- #define UART_STATUS_REG UCSRA
- #define UART_CONTROL_REG UCSRB
- #define UART_ENABLE_TRANSMITTER TXEN
- #define UART_ENABLE_RECEIVER RXEN
- #define UART_TRANSMIT_COMPLETE TXC
- #define UART_RECEIVE_COMPLETE RXC
- #define UART_DATA_REG UDR
- #define UART_DOUBLE_SPEED U2X
-#else
- #error "no UART definition for MCU available"
-#endif
-
-
-
-/*
- * Macro to calculate UBBR from XTAL and baudrate
- */
-#if defined(__AVR_ATmega32__) && UART_BAUDRATE_DOUBLE_SPEED
- #define UART_BAUD_SELECT(baudRate,xtalCpu) ((xtalCpu / 4 / baudRate - 1) / 2)
-#elif defined(__AVR_ATmega32__)
- #define UART_BAUD_SELECT(baudRate,xtalCpu) ((xtalCpu / 8 / baudRate - 1) / 2)
-#elif UART_BAUDRATE_DOUBLE_SPEED
- #define UART_BAUD_SELECT(baudRate,xtalCpu) (((float)(xtalCpu))/(((float)(baudRate))*8.0)-1.0+0.5)
-#else
- #define UART_BAUD_SELECT(baudRate,xtalCpu) (((float)(xtalCpu))/(((float)(baudRate))*16.0)-1.0+0.5)
-#endif
-
-
-/*
- * States used in the receive state machine
- */
-#define ST_START 0
-#define ST_GET_SEQ_NUM 1
-#define ST_MSG_SIZE_1 2
-#define ST_MSG_SIZE_2 3
-#define ST_GET_TOKEN 4
-#define ST_GET_DATA 5
-#define ST_GET_CHECK 6
-#define ST_PROCESS 7
-
-/*
- * use 16bit address variable for ATmegas with <= 64K flash
- */
-#if defined(RAMPZ)
- typedef uint32_t address_t;
-#else
- typedef uint16_t address_t;
-#endif
-
-/*
- * function prototypes
- */
-static void sendchar(char c);
-static unsigned char recchar(void);
-
-/*
- * since this bootloader is not linked against the avr-gcc crt1 functions,
- * to reduce the code size, we need to provide our own initialization
- */
-void __jumpMain (void) __attribute__ ((naked)) __attribute__ ((section (".init9")));
-#include <avr/sfr_defs.h>
-
-//#define SPH_REG 0x3E
-//#define SPL_REG 0x3D
-
-//*****************************************************************************
-void __jumpMain(void)
-{
-//* July 17, 2010 <MLS> Added stack pointer initialzation
-//* the first line did not do the job on the ATmega128
-
- asm volatile ( ".set __stack, %0" :: "i" (RAMEND) );
-
-//* set stack pointer to top of RAM
-
- asm volatile ( "ldi 16, %0" :: "i" (RAMEND >> 8) );
- asm volatile ( "out %0,16" :: "i" (AVR_STACK_POINTER_HI_ADDR) );
-
- asm volatile ( "ldi 16, %0" :: "i" (RAMEND & 0x0ff) );
- asm volatile ( "out %0,16" :: "i" (AVR_STACK_POINTER_LO_ADDR) );
-
- asm volatile ( "clr __zero_reg__" ); // GCC depends on register r1 set to 0
- asm volatile ( "out %0, __zero_reg__" :: "I" (_SFR_IO_ADDR(SREG)) ); // set SREG to 0
- asm volatile ( "jmp main"); // jump to main()
-}
-
-
-//*****************************************************************************
-void delay_ms(unsigned int timedelay)
-{
- unsigned int i;
- for (i=0;i<timedelay;i++)
- {
- _delay_ms(0.5);
- }
-}
-
-
-//*****************************************************************************
-/*
- * send single byte to USART, wait until transmission is completed
- */
-static void sendchar(char c)
-{
- UART_DATA_REG = c; // prepare transmission
- while (!(UART_STATUS_REG & (1 << UART_TRANSMIT_COMPLETE))); // wait until byte sent
- UART_STATUS_REG |= (1 << UART_TRANSMIT_COMPLETE); // delete TXCflag
-}
-
-
-//************************************************************************
-static int Serial_Available(void)
-{
- return(UART_STATUS_REG & (1 << UART_RECEIVE_COMPLETE)); // wait for data
-}
-
-
-//*****************************************************************************
-/*
- * Read single byte from USART, block if no data available
- */
-static unsigned char recchar(void)
-{
- while (!(UART_STATUS_REG & (1 << UART_RECEIVE_COMPLETE)))
- {
- // wait for data
- }
- return UART_DATA_REG;
-}
-
-#define MAX_TIME_COUNT (F_CPU >> 1)
-//*****************************************************************************
-static unsigned char recchar_timeout(void)
-{
-uint32_t count = 0;
-
- while (!(UART_STATUS_REG & (1 << UART_RECEIVE_COMPLETE)))
- {
- // wait for data
- count++;
- if (count > MAX_TIME_COUNT)
- {
- unsigned int data;
- #if (FLASHEND > 0x10000)
- data = pgm_read_word_far(0); //* get the first word of the user program
- #else
- data = pgm_read_word_near(0); //* get the first word of the user program
- #endif
- if (data != 0xffff) //* make sure its valid before jumping to it.
- {
- asm volatile(
- "clr r30 \n\t"
- "clr r31 \n\t"
- "ijmp \n\t"
- );
- }
- count = 0;
- }
- }
- return UART_DATA_REG;
-}
-
-//* for watch dog timer startup
-void (*app_start)(void) = 0x0000;
-
-
-//*****************************************************************************
-int main(void)
-{
- address_t address = 0;
- address_t eraseAddress = 0;
- unsigned char msgParseState;
- unsigned int ii = 0;
- unsigned char checksum = 0;
- unsigned char seqNum = 0;
- unsigned int msgLength = 0;
- unsigned char msgBuffer[285];
- unsigned char c, *p;
- unsigned char isLeave = 0;
-
- unsigned long boot_timeout;
- unsigned long boot_timer;
- unsigned int boot_state;
-#ifdef ENABLE_MONITOR
- unsigned int exPointCntr = 0;
- unsigned int rcvdCharCntr = 0;
-#endif
-
- //* some chips dont set the stack properly
- asm volatile ( ".set __stack, %0" :: "i" (RAMEND) );
- asm volatile ( "ldi 16, %0" :: "i" (RAMEND >> 8) );
- asm volatile ( "out %0,16" :: "i" (AVR_STACK_POINTER_HI_ADDR) );
- asm volatile ( "ldi 16, %0" :: "i" (RAMEND & 0x0ff) );
- asm volatile ( "out %0,16" :: "i" (AVR_STACK_POINTER_LO_ADDR) );
-
-#ifdef _FIX_ISSUE_181_
- //************************************************************************
- //* Dec 29, 2011 <MLS> Issue #181, added watch dog timmer support
- //* handle the watch dog timer
- uint8_t mcuStatusReg;
- mcuStatusReg = MCUSR;
-
- __asm__ __volatile__ ("cli");
- __asm__ __volatile__ ("wdr");
- MCUSR = 0;
- WDTCSR |= _BV(WDCE) | _BV(WDE);
- WDTCSR = 0;
- __asm__ __volatile__ ("sei");
- // check if WDT generated the reset, if so, go straight to app
- if (mcuStatusReg & _BV(WDRF))
- {
- app_start();
- }
- //************************************************************************
-#endif
-
-
- boot_timer = 0;
- boot_state = 0;
-
-#ifdef BLINK_LED_WHILE_WAITING
-// boot_timeout = 90000; //* should be about 4 seconds
-// boot_timeout = 170000;
- boot_timeout = 20000; //* should be about 1 second
-#else
- boot_timeout = 3500000; // 7 seconds , approx 2us per step when optimize "s"
-#endif
- /*
- * Branch to bootloader or application code ?
- */
-
-#ifndef REMOVE_BOOTLOADER_LED
- /* PROG_PIN pulled low, indicate with LED that bootloader is active */
- PROGLED_DDR |= (1<<PROGLED_PIN);
-// PROGLED_PORT &= ~(1<<PROGLED_PIN); // active low LED ON
- PROGLED_PORT |= (1<<PROGLED_PIN); // active high LED ON
-
-#ifdef _DEBUG_WITH_LEDS_
- for (ii=0; ii<3; ii++)
- {
- PROGLED_PORT &= ~(1<<PROGLED_PIN); // turn LED off
- delay_ms(100);
- PROGLED_PORT |= (1<<PROGLED_PIN); // turn LED on
- delay_ms(100);
- }
-#endif
-
-#endif
- /*
- * Init UART
- * set baudrate and enable USART receiver and transmiter without interrupts
- */
-#if UART_BAUDRATE_DOUBLE_SPEED
- UART_STATUS_REG |= (1 <<UART_DOUBLE_SPEED);
-#endif
- UART_BAUD_RATE_LOW = UART_BAUD_SELECT(BAUDRATE,F_CPU);
- UART_CONTROL_REG = (1 << UART_ENABLE_RECEIVER) | (1 << UART_ENABLE_TRANSMITTER);
-
- asm volatile ("nop"); // wait until port has changed
-
-#ifdef _DEBUG_SERIAL_
-// delay_ms(500);
-
- sendchar('s');
- sendchar('t');
- sendchar('k');
-// sendchar('5');
-// sendchar('0');
-// sendchar('0');
- sendchar('v');
- sendchar('2');
- sendchar(0x0d);
- sendchar(0x0a);
-
- delay_ms(100);
-#endif
-
- while (boot_state==0)
- {
- while ((!(Serial_Available())) && (boot_state == 0)) // wait for data
- {
- _delay_ms(0.001);
- boot_timer++;
- if (boot_timer > boot_timeout)
- {
- boot_state = 1; // (after ++ -> boot_state=2 bootloader timeout, jump to main 0x00000 )
- }
- #ifdef BLINK_LED_WHILE_WAITING
- if ((boot_timer % _BLINK_LOOP_COUNT_) == 0)
- {
- //* toggle the LED
- PROGLED_PORT ^= (1<<PROGLED_PIN); // turn LED ON
- }
- #endif
- }
- boot_state++; // ( if boot_state=1 bootloader received byte from UART, enter bootloader mode)
- }
-
-
- if (boot_state==1)
- {
- //* main loop
- while (!isLeave)
- {
- /*
- * Collect received bytes to a complete message
- */
- msgParseState = ST_START;
- while ( msgParseState != ST_PROCESS )
- {
- if (boot_state==1)
- {
- boot_state = 0;
- c = UART_DATA_REG;
- }
- else
- {
- // c = recchar();
- c = recchar_timeout();
-
- }
-
- #ifdef ENABLE_MONITOR
- rcvdCharCntr++;
-
- if ((c == '!') && (rcvdCharCntr < 10))
- {
- exPointCntr++;
- if (exPointCntr == 3)
- {
- RunMonitor();
- exPointCntr = 0; // reset back to zero so we dont get in an endless loop
- isLeave = 1;
- msgParseState = 99; //* we dont want it do anything
- break;
- }
- }
- else
- {
- exPointCntr = 0;
- }
- #endif
-
- switch (msgParseState)
- {
- case ST_START:
- if ( c == MESSAGE_START )
- {
- msgParseState = ST_GET_SEQ_NUM;
- checksum = MESSAGE_START^0;
- }
- break;
-
- case ST_GET_SEQ_NUM:
- #ifdef _FIX_ISSUE_505_
- seqNum = c;
- msgParseState = ST_MSG_SIZE_1;
- checksum ^= c;
- #else
- if ( (c == 1) || (c == seqNum) )
- {
- seqNum = c;
- msgParseState = ST_MSG_SIZE_1;
- checksum ^= c;
- }
- else
- {
- msgParseState = ST_START;
- }
- #endif
- break;
-
- case ST_MSG_SIZE_1:
- msgLength = c<<8;
- msgParseState = ST_MSG_SIZE_2;
- checksum ^= c;
- break;
-
- case ST_MSG_SIZE_2:
- msgLength |= c;
- msgParseState = ST_GET_TOKEN;
- checksum ^= c;
- break;
-
- case ST_GET_TOKEN:
- if ( c == TOKEN )
- {
- msgParseState = ST_GET_DATA;
- checksum ^= c;
- ii = 0;
- }
- else
- {
- msgParseState = ST_START;
- }
- break;
-
- case ST_GET_DATA:
- msgBuffer[ii++] = c;
- checksum ^= c;
- if (ii == msgLength )
- {
- msgParseState = ST_GET_CHECK;
- }
- break;
-
- case ST_GET_CHECK:
- if ( c == checksum )
- {
- msgParseState = ST_PROCESS;
- }
- else
- {
- msgParseState = ST_START;
- }
- break;
- } // switch
- } // while(msgParseState)
-
- /*
- * Now process the STK500 commands, see Atmel Appnote AVR068
- */
-
- switch (msgBuffer[0])
- {
- #ifndef REMOVE_CMD_SPI_MULTI
- case CMD_SPI_MULTI:
- {
- unsigned char answerByte;
- unsigned char flag=0;
-
- if ( msgBuffer[4]== 0x30 )
- {
- unsigned char signatureIndex = msgBuffer[6];
-
- if ( signatureIndex == 0 )
- {
- answerByte = (SIGNATURE_BYTES >> 16) & 0x000000FF;
- }
- else if ( signatureIndex == 1 )
- {
- answerByte = (SIGNATURE_BYTES >> 8) & 0x000000FF;
- }
- else
- {
- answerByte = SIGNATURE_BYTES & 0x000000FF;
- }
- }
- else if ( msgBuffer[4] & 0x50 )
- {
- //* Issue 544: stk500v2 bootloader doesn't support reading fuses
- //* I cant find the docs that say what these are supposed to be but this was figured out by trial and error
- // answerByte = boot_lock_fuse_bits_get(GET_LOW_FUSE_BITS);
- // answerByte = boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS);
- // answerByte = boot_lock_fuse_bits_get(GET_EXTENDED_FUSE_BITS);
- if (msgBuffer[4] == 0x50)
- {
- answerByte = boot_lock_fuse_bits_get(GET_LOW_FUSE_BITS);
- }
- else if (msgBuffer[4] == 0x58)
- {
- answerByte = boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS);
- }
- else
- {
- answerByte = 0;
- }
- }
- else
- {
- answerByte = 0; // for all others command are not implemented, return dummy value for AVRDUDE happy <Worapoht>
- }
- if ( !flag )
- {
- msgLength = 7;
- msgBuffer[1] = STATUS_CMD_OK;
- msgBuffer[2] = 0;
- msgBuffer[3] = msgBuffer[4];
- msgBuffer[4] = 0;
- msgBuffer[5] = answerByte;
- msgBuffer[6] = STATUS_CMD_OK;
- }
- }
- break;
- #endif
- case CMD_SIGN_ON:
- msgLength = 11;
- msgBuffer[1] = STATUS_CMD_OK;
- msgBuffer[2] = 8;
- msgBuffer[3] = 'A';
- msgBuffer[4] = 'V';
- msgBuffer[5] = 'R';
- msgBuffer[6] = 'I';
- msgBuffer[7] = 'S';
- msgBuffer[8] = 'P';
- msgBuffer[9] = '_';
- msgBuffer[10] = '2';
- break;
-
- case CMD_GET_PARAMETER:
- {
- unsigned char value;
-
- switch(msgBuffer[1])
- {
- case PARAM_BUILD_NUMBER_LOW:
- value = CONFIG_PARAM_BUILD_NUMBER_LOW;
- break;
- case PARAM_BUILD_NUMBER_HIGH:
- value = CONFIG_PARAM_BUILD_NUMBER_HIGH;
- break;
- case PARAM_HW_VER:
- value = CONFIG_PARAM_HW_VER;
- break;
- case PARAM_SW_MAJOR:
- value = CONFIG_PARAM_SW_MAJOR;
- break;
- case PARAM_SW_MINOR:
- value = CONFIG_PARAM_SW_MINOR;
- break;
- default:
- value = 0;
- break;
- }
- msgLength = 3;
- msgBuffer[1] = STATUS_CMD_OK;
- msgBuffer[2] = value;
- }
- break;
-
- case CMD_LEAVE_PROGMODE_ISP:
- isLeave = 1;
- //* fall thru
-
- case CMD_SET_PARAMETER:
- case CMD_ENTER_PROGMODE_ISP:
- msgLength = 2;
- msgBuffer[1] = STATUS_CMD_OK;
- break;
-
- case CMD_READ_SIGNATURE_ISP:
- {
- unsigned char signatureIndex = msgBuffer[4];
- unsigned char signature;
-
- if ( signatureIndex == 0 )
- signature = (SIGNATURE_BYTES >>16) & 0x000000FF;
- else if ( signatureIndex == 1 )
- signature = (SIGNATURE_BYTES >> 8) & 0x000000FF;
- else
- signature = SIGNATURE_BYTES & 0x000000FF;
-
- msgLength = 4;
- msgBuffer[1] = STATUS_CMD_OK;
- msgBuffer[2] = signature;
- msgBuffer[3] = STATUS_CMD_OK;
- }
- break;
-
- case CMD_READ_LOCK_ISP:
- msgLength = 4;
- msgBuffer[1] = STATUS_CMD_OK;
- msgBuffer[2] = boot_lock_fuse_bits_get( GET_LOCK_BITS );
- msgBuffer[3] = STATUS_CMD_OK;
- break;
-
- case CMD_READ_FUSE_ISP:
- {
- unsigned char fuseBits;
-
- if ( msgBuffer[2] == 0x50 )
- {
- if ( msgBuffer[3] == 0x08 )
- fuseBits = boot_lock_fuse_bits_get( GET_EXTENDED_FUSE_BITS );
- else
- fuseBits = boot_lock_fuse_bits_get( GET_LOW_FUSE_BITS );
- }
- else
- {
- fuseBits = boot_lock_fuse_bits_get( GET_HIGH_FUSE_BITS );
- }
- msgLength = 4;
- msgBuffer[1] = STATUS_CMD_OK;
- msgBuffer[2] = fuseBits;
- msgBuffer[3] = STATUS_CMD_OK;
- }
- break;
-
- #ifndef REMOVE_PROGRAM_LOCK_BIT_SUPPORT
- case CMD_PROGRAM_LOCK_ISP:
- {
- unsigned char lockBits = msgBuffer[4];
-
- lockBits = (~lockBits) & 0x3C; // mask BLBxx bits
- boot_lock_bits_set(lockBits); // and program it
- boot_spm_busy_wait();
-
- msgLength = 3;
- msgBuffer[1] = STATUS_CMD_OK;
- msgBuffer[2] = STATUS_CMD_OK;
- }
- break;
- #endif
- case CMD_CHIP_ERASE_ISP:
- eraseAddress = 0;
- msgLength = 2;
- // msgBuffer[1] = STATUS_CMD_OK;
- msgBuffer[1] = STATUS_CMD_FAILED; //* isue 543, return FAILED instead of OK
- break;
-
- case CMD_LOAD_ADDRESS:
- #if defined(RAMPZ)
- address = ( ((address_t)(msgBuffer[1])<<24)|((address_t)(msgBuffer[2])<<16)|((address_t)(msgBuffer[3])<<8)|(msgBuffer[4]) )<<1;
- #else
- address = ( ((msgBuffer[3])<<8)|(msgBuffer[4]) )<<1; //convert word to byte address
- #endif
- msgLength = 2;
- msgBuffer[1] = STATUS_CMD_OK;
- break;
-
- case CMD_PROGRAM_FLASH_ISP:
- case CMD_PROGRAM_EEPROM_ISP:
- {
- unsigned int size = ((msgBuffer[1])<<8) | msgBuffer[2];
- unsigned char *p = msgBuffer+10;
- unsigned int data;
- unsigned char highByte, lowByte;
- address_t tempaddress = address;
-
-
- if ( msgBuffer[0] == CMD_PROGRAM_FLASH_ISP )
- {
- // erase only main section (bootloader protection)
- if (eraseAddress < APP_END )
- {
- boot_page_erase(eraseAddress); // Perform page erase
- boot_spm_busy_wait(); // Wait until the memory is erased.
- eraseAddress += SPM_PAGESIZE; // point to next page to be erase
- }
-
- /* Write FLASH */
- do {
- lowByte = *p++;
- highByte = *p++;
-
- data = (highByte << 8) | lowByte;
- boot_page_fill(address,data);
-
- address = address + 2; // Select next word in memory
- size -= 2; // Reduce number of bytes to write by two
- } while (size); // Loop until all bytes written
-
- boot_page_write(tempaddress);
- boot_spm_busy_wait();
- boot_rww_enable(); // Re-enable the RWW section
- }
- else
- {
- //* issue 543, this should work, It has not been tested.
- uint16_t ii = address >> 1;
- /* write EEPROM */
- while (size) {
- eeprom_write_byte((uint8_t*)ii, *p++);
- address+=2; // Select next EEPROM byte
- ii++;
- size--;
- }
- }
- msgLength = 2;
- msgBuffer[1] = STATUS_CMD_OK;
- }
- break;
-
- case CMD_READ_FLASH_ISP:
- case CMD_READ_EEPROM_ISP:
- {
- unsigned int size = ((msgBuffer[1])<<8) | msgBuffer[2];
- unsigned char *p = msgBuffer+1;
- msgLength = size+3;
-
- *p++ = STATUS_CMD_OK;
- if (msgBuffer[0] == CMD_READ_FLASH_ISP )
- {
- unsigned int data;
-
- // Read FLASH
- do {
- //#if defined(RAMPZ)
- #if (FLASHEND > 0x10000)
- data = pgm_read_word_far(address);
- #else
- data = pgm_read_word_near(address);
- #endif
- *p++ = (unsigned char)data; //LSB
- *p++ = (unsigned char)(data >> 8); //MSB
- address += 2; // Select next word in memory
- size -= 2;
- }while (size);
- }
- else
- {
- /* Read EEPROM */
- do {
- EEARL = address; // Setup EEPROM address
- EEARH = ((address >> 8));
- address++; // Select next EEPROM byte
- EECR |= (1<<EERE); // Read EEPROM
- *p++ = EEDR; // Send EEPROM data
- size--;
- } while (size);
- }
- *p++ = STATUS_CMD_OK;
- }
- break;
-
- default:
- msgLength = 2;
- msgBuffer[1] = STATUS_CMD_FAILED;
- break;
- }
-
- /*
- * Now send answer message back
- */
- sendchar(MESSAGE_START);
- checksum = MESSAGE_START^0;
-
- sendchar(seqNum);
- checksum ^= seqNum;
-
- c = ((msgLength>>8)&0xFF);
- sendchar(c);
- checksum ^= c;
-
- c = msgLength&0x00FF;
- sendchar(c);
- checksum ^= c;
-
- sendchar(TOKEN);
- checksum ^= TOKEN;
-
- p = msgBuffer;
- while ( msgLength )
- {
- c = *p++;
- sendchar(c);
- checksum ^=c;
- msgLength--;
- }
- sendchar(checksum);
- seqNum++;
-
- #ifndef REMOVE_BOOTLOADER_LED
- //* <MLS> toggle the LED
- PROGLED_PORT ^= (1<<PROGLED_PIN); // active high LED ON
- #endif
-
- }
- }
-
-#ifdef _DEBUG_WITH_LEDS_
- //* this is for debugging it can be removed
- for (ii=0; ii<10; ii++)
- {
- PROGLED_PORT &= ~(1<<PROGLED_PIN); // turn LED off
- delay_ms(200);
- PROGLED_PORT |= (1<<PROGLED_PIN); // turn LED on
- delay_ms(200);
- }
- PROGLED_PORT &= ~(1<<PROGLED_PIN); // turn LED off
-#endif
-
-#ifdef _DEBUG_SERIAL_
- sendchar('j');
-// sendchar('u');
-// sendchar('m');
-// sendchar('p');
-// sendchar(' ');
-// sendchar('u');
-// sendchar('s');
-// sendchar('r');
- sendchar(0x0d);
- sendchar(0x0a);
-
- delay_ms(100);
-#endif
-
-
-#ifndef REMOVE_BOOTLOADER_LED
- PROGLED_DDR &= ~(1<<PROGLED_PIN); // set to default
- PROGLED_PORT &= ~(1<<PROGLED_PIN); // active low LED OFF
-// PROGLED_PORT |= (1<<PROGLED_PIN); // active high LED OFf
- delay_ms(100); // delay after exit
-#endif
-
-
- asm volatile ("nop"); // wait until port has changed
-
- /*
- * Now leave bootloader
- */
-
- UART_STATUS_REG &= 0xfd;
- boot_rww_enable(); // enable application section
-
-
- asm volatile(
- "clr r30 \n\t"
- "clr r31 \n\t"
- "ijmp \n\t"
- );
-// asm volatile ( "push r1" "\n\t" // Jump to Reset vector in Application Section
-// "push r1" "\n\t"
-// "ret" "\n\t"
-// ::);
-
- /*
- * Never return to stop GCC to generate exit return code
- * Actually we will never reach this point, but the compiler doesn't
- * understand this
- */
- for(;;);
-}
-
-/*
-base address = f800
-
-avrdude: Device signature = 0x1e9703
-avrdude: safemode: lfuse reads as FF
-avrdude: safemode: hfuse reads as DA
-avrdude: safemode: efuse reads as F5
-avrdude>
-
-
-base address = f000
-avrdude: Device signature = 0x1e9703
-avrdude: safemode: lfuse reads as FF
-avrdude: safemode: hfuse reads as D8
-avrdude: safemode: efuse reads as F5
-avrdude>
-*/
-
-//************************************************************************
-#ifdef ENABLE_MONITOR
-#include <math.h>
-
-unsigned long gRamIndex;
-unsigned long gFlashIndex;
-unsigned long gEepromIndex;
-
-
-#define true 1
-#define false 0
-
-#include "avr_cpunames.h"
-
-#ifndef _AVR_CPU_NAME_
- #error cpu name not defined
-#endif
-
-#ifdef _VECTORS_SIZE
- #define kInterruptVectorCount (_VECTORS_SIZE / 4)
-#else
- #define kInterruptVectorCount 23
-#endif
-
-
-void PrintDecInt(int theNumber, int digitCnt);
-
-#ifdef _AVR_CPU_NAME_
- const char gTextMsg_CPU_Name[] PROGMEM = _AVR_CPU_NAME_;
-#else
- const char gTextMsg_CPU_Name[] PROGMEM = "UNKNOWN";
-#endif
-
- const char gTextMsg_Explorer[] PROGMEM = "Arduino explorer stk500V2 by MLS";
- const char gTextMsg_Prompt[] PROGMEM = "Bootloader>";
- const char gTextMsg_HUH[] PROGMEM = "Huh?";
- const char gTextMsg_COMPILED_ON[] PROGMEM = "Compiled on = ";
- const char gTextMsg_CPU_Type[] PROGMEM = "CPU Type = ";
- const char gTextMsg_AVR_ARCH[] PROGMEM = "__AVR_ARCH__= ";
- const char gTextMsg_AVR_LIBC[] PROGMEM = "AVR LibC Ver= ";
- const char gTextMsg_GCC_VERSION[] PROGMEM = "GCC Version = ";
- const char gTextMsg_CPU_SIGNATURE[] PROGMEM = "CPU ID = ";
- const char gTextMsg_FUSE_BYTE_LOW[] PROGMEM = "Low fuse = ";
- const char gTextMsg_FUSE_BYTE_HIGH[] PROGMEM = "High fuse = ";
- const char gTextMsg_FUSE_BYTE_EXT[] PROGMEM = "Ext fuse = ";
- const char gTextMsg_FUSE_BYTE_LOCK[] PROGMEM = "Lock fuse = ";
- const char gTextMsg_GCC_DATE_STR[] PROGMEM = __DATE__;
- const char gTextMsg_AVR_LIBC_VER_STR[] PROGMEM = __AVR_LIBC_VERSION_STRING__;
- const char gTextMsg_GCC_VERSION_STR[] PROGMEM = __VERSION__;
- const char gTextMsg_VECTOR_HEADER[] PROGMEM = "V# ADDR op code instruction addr Interrupt";
- const char gTextMsg_noVector[] PROGMEM = "no vector";
- const char gTextMsg_rjmp[] PROGMEM = "rjmp ";
- const char gTextMsg_jmp[] PROGMEM = "jmp ";
- const char gTextMsg_WHAT_PORT[] PROGMEM = "What port:";
- const char gTextMsg_PortNotSupported[] PROGMEM = "Port not supported";
- const char gTextMsg_MustBeLetter[] PROGMEM = "Must be a letter";
- const char gTextMsg_SPACE[] PROGMEM = " ";
- const char gTextMsg_WriteToEEprom[] PROGMEM = "Writting EE";
- const char gTextMsg_ReadingEEprom[] PROGMEM = "Reading EE";
- const char gTextMsg_EEPROMerrorCnt[] PROGMEM = "EE err cnt=";
- const char gTextMsg_PORT[] PROGMEM = "PORT";
-
-
-//************************************************************************
-//* Help messages
- const char gTextMsg_HELP_MSG_0[] PROGMEM = "0=Zero addr";
- const char gTextMsg_HELP_MSG_QM[] PROGMEM = "?=CPU stats";
- const char gTextMsg_HELP_MSG_AT[] PROGMEM = "@=EEPROM test";
- const char gTextMsg_HELP_MSG_B[] PROGMEM = "B=Blink LED";
- const char gTextMsg_HELP_MSG_E[] PROGMEM = "E=Dump EEPROM";
- const char gTextMsg_HELP_MSG_F[] PROGMEM = "F=Dump FLASH";
- const char gTextMsg_HELP_MSG_H[] PROGMEM = "H=Help";
- const char gTextMsg_HELP_MSG_L[] PROGMEM = "L=List I/O Ports";
-// const char gTextMsg_HELP_MSG_Q[] PROGMEM = "Q=Quit & jump to user pgm";
- const char gTextMsg_HELP_MSG_Q[] PROGMEM = "Q=Quit";
- const char gTextMsg_HELP_MSG_R[] PROGMEM = "R=Dump RAM";
- const char gTextMsg_HELP_MSG_V[] PROGMEM = "V=show interrupt Vectors";
- const char gTextMsg_HELP_MSG_Y[] PROGMEM = "Y=Port blink";
-
- const char gTextMsg_END[] PROGMEM = "*";
-
-
-//************************************************************************
-void PrintFromPROGMEM(const void *dataPtr, unsigned char offset)
-{
-char theChar;
-
- dataPtr += offset;
-
- do {
- #if (FLASHEND > 0x10000)
- theChar = pgm_read_byte_far((uint16_t)dataPtr++);
- #else
- theChar = pgm_read_byte_near((uint16_t)dataPtr++);
- #endif
- if (theChar != 0)
- {
- sendchar(theChar);
- }
- } while (theChar != 0);
-}
-
-//************************************************************************
-void PrintNewLine(void)
-{
- sendchar(0x0d);
- sendchar(0x0a);
-}
-
-
-//************************************************************************
-void PrintFromPROGMEMln(const void *dataPtr, unsigned char offset)
-{
- PrintFromPROGMEM(dataPtr, offset);
-
- PrintNewLine();
-}
-
-
-//************************************************************************
-void PrintString(char *textString)
-{
-char theChar;
-int ii;
-
- theChar = 1;
- ii = 0;
- while (theChar != 0)
- {
- theChar = textString[ii];
- if (theChar != 0)
- {
- sendchar(theChar);
- }
- ii++;
- }
-}
-
-//************************************************************************
-void PrintHexByte(unsigned char theByte)
-{
-char theChar;
-
- theChar = 0x30 + ((theByte >> 4) & 0x0f);
- if (theChar > 0x39)
- {
- theChar += 7;
- }
- sendchar(theChar );
-
- theChar = 0x30 + (theByte & 0x0f);
- if (theChar > 0x39)
- {
- theChar += 7;
- }
- sendchar(theChar );
-}
-
-//************************************************************************
-void PrintDecInt(int theNumber, int digitCnt)
-{
-int theChar;
-int myNumber;
-
- myNumber = theNumber;
-
- if ((myNumber > 100) || (digitCnt >= 3))
- {
- theChar = 0x30 + myNumber / 100;
- sendchar(theChar );
- }
-
- if ((myNumber > 10) || (digitCnt >= 2))
- {
- theChar = 0x30 + ((myNumber % 100) / 10 );
- sendchar(theChar );
- }
- theChar = 0x30 + (myNumber % 10);
- sendchar(theChar );
-}
-
-
-
-
-//************************************************************************
-static void PrintCPUstats(void)
-{
-unsigned char fuseByte;
-
- PrintFromPROGMEMln(gTextMsg_Explorer, 0);
-
- PrintFromPROGMEM(gTextMsg_COMPILED_ON, 0);
- PrintFromPROGMEMln(gTextMsg_GCC_DATE_STR, 0);
-
- PrintFromPROGMEM(gTextMsg_CPU_Type, 0);
- PrintFromPROGMEMln(gTextMsg_CPU_Name, 0);
-
- PrintFromPROGMEM(gTextMsg_AVR_ARCH, 0);
- PrintDecInt(__AVR_ARCH__, 1);
- PrintNewLine();
-
- PrintFromPROGMEM(gTextMsg_GCC_VERSION, 0);
- PrintFromPROGMEMln(gTextMsg_GCC_VERSION_STR, 0);
-
- //* these can be found in avr/version.h
- PrintFromPROGMEM(gTextMsg_AVR_LIBC, 0);
- PrintFromPROGMEMln(gTextMsg_AVR_LIBC_VER_STR, 0);
-
-#if defined(SIGNATURE_0)
- PrintFromPROGMEM(gTextMsg_CPU_SIGNATURE, 0);
- //* these can be found in avr/iomxxx.h
- PrintHexByte(SIGNATURE_0);
- PrintHexByte(SIGNATURE_1);
- PrintHexByte(SIGNATURE_2);
- PrintNewLine();
-#endif
-
-
-#if defined(GET_LOW_FUSE_BITS)
- //* fuse settings
- PrintFromPROGMEM(gTextMsg_FUSE_BYTE_LOW, 0);
- fuseByte = boot_lock_fuse_bits_get(GET_LOW_FUSE_BITS);
- PrintHexByte(fuseByte);
- PrintNewLine();
-
- PrintFromPROGMEM(gTextMsg_FUSE_BYTE_HIGH, 0);
- fuseByte = boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS);
- PrintHexByte(fuseByte);
- PrintNewLine();
-
- PrintFromPROGMEM(gTextMsg_FUSE_BYTE_EXT, 0);
- fuseByte = boot_lock_fuse_bits_get(GET_EXTENDED_FUSE_BITS);
- PrintHexByte(fuseByte);
- PrintNewLine();
-
- PrintFromPROGMEM(gTextMsg_FUSE_BYTE_LOCK, 0);
- fuseByte = boot_lock_fuse_bits_get(GET_LOCK_BITS);
- PrintHexByte(fuseByte);
- PrintNewLine();
-
-#endif
-
-}
-
-
-//************************************************************************
-static void BlinkLED(void)
-{
- PROGLED_DDR |= (1<<PROGLED_PIN);
- PROGLED_PORT |= (1<<PROGLED_PIN); // active high LED ON
-
- while (!Serial_Available())
- {
- PROGLED_PORT &= ~(1<<PROGLED_PIN); // turn LED off
- delay_ms(100);
- PROGLED_PORT |= (1<<PROGLED_PIN); // turn LED on
- delay_ms(100);
- }
- recchar(); // get the char out of the buffer
-}
-
-enum
-{
- kDUMP_FLASH = 0,
- kDUMP_EEPROM,
- kDUMP_RAM
-};
-
-//************************************************************************
-static void DumpHex(unsigned char dumpWhat, unsigned long startAddress, unsigned char numRows)
-{
-unsigned long myAddressPointer;
-uint8_t ii;
-unsigned char theValue;
-char asciiDump[18];
-unsigned char *ramPtr;
-
-
- ramPtr = 0;
- theValue = 0;
- myAddressPointer = startAddress;
- while (numRows > 0)
- {
- if (myAddressPointer > 0x10000)
- {
- PrintHexByte((myAddressPointer >> 16) & 0x00ff);
- }
- PrintHexByte((myAddressPointer >> 8) & 0x00ff);
- PrintHexByte(myAddressPointer & 0x00ff);
- sendchar(0x20);
- sendchar('-');
- sendchar(0x20);
-
- asciiDump[0] = 0;
- for (ii=0; ii<16; ii++)
- {
- switch(dumpWhat)
- {
- case kDUMP_FLASH:
- #if (FLASHEND > 0x10000)
- theValue = pgm_read_byte_far(myAddressPointer);
- #else
- theValue = pgm_read_byte_near(myAddressPointer);
- #endif
- break;
-
- case kDUMP_EEPROM:
- theValue = eeprom_read_byte((uint8_t *)(uint16_t)myAddressPointer);
- break;
-
- case kDUMP_RAM:
- theValue = ramPtr[myAddressPointer];
- break;
-
- }
- PrintHexByte(theValue);
- sendchar(0x20);
- if ((theValue >= 0x20) && (theValue < 0x7f))
- {
- asciiDump[ii % 16] = theValue;
- }
- else
- {
- asciiDump[ii % 16] = '.';
- }
-
- myAddressPointer++;
- }
- asciiDump[16] = 0;
- PrintString(asciiDump);
- PrintNewLine();
-
- numRows--;
- }
-}
-
-
-
-//************************************************************************
-//* returns amount of extended memory
-static void EEPROMtest(void)
-{
-int ii;
-char theChar;
-char theEEPROMchar;
-int errorCount;
-
- PrintFromPROGMEMln(gTextMsg_WriteToEEprom, 0);
- PrintNewLine();
- ii = 0;
-#if (FLASHEND > 0x10000)
- while (((theChar = pgm_read_byte_far(((uint16_t)gTextMsg_Explorer) + ii)) != '*') && (ii < 512))
-#else
- while (((theChar = pgm_read_byte_near(((uint16_t)gTextMsg_Explorer) + ii)) != '*') && (ii < 512))
-#endif
- {
- eeprom_write_byte((uint8_t *)ii, theChar);
- if (theChar == 0)
- {
- PrintFromPROGMEM(gTextMsg_SPACE, 0);
- }
- else
- {
- sendchar(theChar);
- }
- ii++;
- }
-
- //* no go back through and test
- PrintNewLine();
- PrintNewLine();
- PrintFromPROGMEMln(gTextMsg_ReadingEEprom, 0);
- PrintNewLine();
- errorCount = 0;
- ii = 0;
-#if (FLASHEND > 0x10000)
- while (((theChar = pgm_read_byte_far((uint16_t)gTextMsg_Explorer + ii)) != '*') && (ii < 512))
-#else
- while (((theChar = pgm_read_byte_near((uint16_t)gTextMsg_Explorer + ii)) != '*') && (ii < 512))
-#endif
- {
- theEEPROMchar = eeprom_read_byte((uint8_t *)ii);
- if (theEEPROMchar == 0)
- {
- PrintFromPROGMEM(gTextMsg_SPACE, 0);
- }
- else
- {
- sendchar(theEEPROMchar);
- }
- if (theEEPROMchar != theChar)
- {
- errorCount++;
- }
- ii++;
- }
- PrintNewLine();
- PrintNewLine();
- PrintFromPROGMEM(gTextMsg_EEPROMerrorCnt, 0);
- PrintDecInt(errorCount, 1);
- PrintNewLine();
- PrintNewLine();
-
- gEepromIndex = 0; //* set index back to zero for next eeprom dump
-
-}
-
-
-
-#if (FLASHEND > 0x08000)
-//* this includes the interrupt names for the monitor portion. There is no longer enough
-//* memory to include this
-// #include "avrinterruptnames.h"
-// #ifndef _INTERRUPT_NAMES_DEFINED_
-// #warning Interrupt vectors not defined
-// #endif
-#endif
-
-//************************************************************************
-static void VectorDisplay(void)
-{
-unsigned long byte1;
-unsigned long byte2;
-unsigned long byte3;
-unsigned long byte4;
-unsigned long word1;
-unsigned long word2;
-int vectorIndex;
-unsigned long myMemoryPtr;
-unsigned long wordMemoryAddress;
-unsigned long realitiveAddr;
-unsigned long myFullAddress;
-unsigned long absoluteAddr;
-#if defined(_INTERRUPT_NAMES_DEFINED_)
- long stringPointer;
-#endif
-
- myMemoryPtr = 0;
- vectorIndex = 0;
- PrintFromPROGMEMln(gTextMsg_CPU_Name, 0);
- PrintFromPROGMEMln(gTextMsg_VECTOR_HEADER, 0);
- // V# ADDR op code
- // 1 - 0000 = C3 BB 00 00 rjmp 03BB >000776 RESET
- while (vectorIndex < kInterruptVectorCount)
- {
- wordMemoryAddress = myMemoryPtr / 2;
- // 01 - 0000 = 12 34
- PrintDecInt(vectorIndex + 1, 2);
- sendchar(0x20);
- sendchar('-');
- sendchar(0x20);
- PrintHexByte((wordMemoryAddress >> 8) & 0x00ff);
- PrintHexByte((wordMemoryAddress) & 0x00ff);
- sendchar(0x20);
- sendchar('=');
- sendchar(0x20);
-
-
- //* the AVR is LITTLE ENDIAN, swap the byte order
- #if (FLASHEND > 0x10000)
- byte1 = pgm_read_byte_far(myMemoryPtr++);
- byte2 = pgm_read_byte_far(myMemoryPtr++);
- byte3 = pgm_read_byte_far(myMemoryPtr++);
- byte4 = pgm_read_byte_far(myMemoryPtr++);
- #else
- byte1 = pgm_read_byte_near(myMemoryPtr++);
- byte2 = pgm_read_byte_near(myMemoryPtr++);
- byte3 = pgm_read_byte_near(myMemoryPtr++);
- byte4 = pgm_read_byte_near(myMemoryPtr++);
- #endif
- word1 = (byte2 << 8) + byte1;
- word2 = (byte4 << 8) + byte3;
-
-
- PrintHexByte(byte2);
- sendchar(0x20);
- PrintHexByte(byte1);
- sendchar(0x20);
- PrintHexByte(byte4);
- sendchar(0x20);
- PrintHexByte(byte3);
- sendchar(0x20);
-
- if (word1 == 0xffff)
- {
- PrintFromPROGMEM(gTextMsg_noVector, 0);
- }
- else if ((word1 & 0xc000) == 0xc000)
- {
- //* rjmp instruction
- realitiveAddr = word1 & 0x3FFF;
- absoluteAddr = wordMemoryAddress + realitiveAddr; //* add the offset to the current address
- absoluteAddr = absoluteAddr << 1; //* multiply by 2 for byte address
-
- PrintFromPROGMEM(gTextMsg_rjmp, 0);
- PrintHexByte((realitiveAddr >> 8) & 0x00ff);
- PrintHexByte((realitiveAddr) & 0x00ff);
- sendchar(0x20);
- sendchar('>');
- PrintHexByte((absoluteAddr >> 16) & 0x00ff);
- PrintHexByte((absoluteAddr >> 8) & 0x00ff);
- PrintHexByte((absoluteAddr) & 0x00ff);
-
- }
- else if ((word1 & 0xfE0E) == 0x940c)
- {
- //* jmp instruction, this is REALLY complicated, refer to the instruction manual (JMP)
- myFullAddress = ((byte1 & 0x01) << 16) +
- ((byte1 & 0xf0) << 17) +
- ((byte2 & 0x01) << 21) +
- word2;
-
- absoluteAddr = myFullAddress << 1;
-
- PrintFromPROGMEM(gTextMsg_jmp, 0);
- PrintHexByte((myFullAddress >> 16) & 0x00ff);
- PrintHexByte((myFullAddress >> 8) & 0x00ff);
- PrintHexByte((myFullAddress) & 0x00ff);
- sendchar(0x20);
- sendchar('>');
- PrintHexByte((absoluteAddr >> 16) & 0x00ff);
- PrintHexByte((absoluteAddr >> 8) & 0x00ff);
- PrintHexByte((absoluteAddr) & 0x00ff);
- }
-
- #if defined(_INTERRUPT_NAMES_DEFINED_)
- sendchar(0x20);
- #if (FLASHEND > 0x10000)
- stringPointer = pgm_read_word_far(&(gInterruptNameTable[vectorIndex]));
- #else
- stringPointer = pgm_read_word_near(&(gInterruptNameTable[vectorIndex]));
- #endif
- PrintFromPROGMEM((char *)stringPointer, 0);
- #endif
- PrintNewLine();
-
- vectorIndex++;
- }
-}
-
-//************************************************************************
-static void PrintAvailablePort(char thePortLetter)
-{
- PrintFromPROGMEM(gTextMsg_PORT, 0);
- sendchar(thePortLetter);
- PrintNewLine();
-}
-
-//************************************************************************
-static void ListAvailablePorts(void)
-{
-
-#ifdef DDRA
- PrintAvailablePort('A');
-#endif
-
-#ifdef DDRB
- PrintAvailablePort('B');
-#endif
-
-#ifdef DDRC
- PrintAvailablePort('C');
-#endif
-
-#ifdef DDRD
- PrintAvailablePort('D');
-#endif
-
-#ifdef DDRE
- PrintAvailablePort('E');
-#endif
-
-#ifdef DDRF
- PrintAvailablePort('F');
-#endif
-
-#ifdef DDRG
- PrintAvailablePort('G');
-#endif
-
-#ifdef DDRH
- PrintAvailablePort('H');
-#endif
-
-#ifdef DDRI
- PrintAvailablePort('I');
-#endif
-
-#ifdef DDRJ
- PrintAvailablePort('J');
-#endif
-
-#ifdef DDRK
- PrintAvailablePort('K');
-#endif
-
-#ifdef DDRL
- PrintAvailablePort('L');
-#endif
-
-}
-
-//************************************************************************
-static void AVR_PortOutput(void)
-{
-char portLetter;
-char getCharFlag;
-
- PrintFromPROGMEM(gTextMsg_WHAT_PORT, 0);
-
- portLetter = recchar();
- portLetter = portLetter & 0x5f;
- sendchar(portLetter);
- PrintNewLine();
-
- if ((portLetter >= 'A') && (portLetter <= 'Z'))
- {
- getCharFlag = true;
- switch(portLetter)
- {
- #ifdef DDRA
- case 'A':
- DDRA = 0xff;
- while (!Serial_Available())
- {
- PORTA ^= 0xff;
- delay_ms(200);
- }
- PORTA = 0;
- break;
- #endif
-
- #ifdef DDRB
- case 'B':
- DDRB = 0xff;
- while (!Serial_Available())
- {
- PORTB ^= 0xff;
- delay_ms(200);
- }
- PORTB = 0;
- break;
- #endif
-
- #ifdef DDRC
- case 'C':
- DDRC = 0xff;
- while (!Serial_Available())
- {
- PORTC ^= 0xff;
- delay_ms(200);
- }
- PORTC = 0;
- break;
- #endif
-
- #ifdef DDRD
- case 'D':
- DDRD = 0xff;
- while (!Serial_Available())
- {
- PORTD ^= 0xff;
- delay_ms(200);
- }
- PORTD = 0;
- break;
- #endif
-
- #ifdef DDRE
- case 'E':
- DDRE = 0xff;
- while (!Serial_Available())
- {
- PORTE ^= 0xff;
- delay_ms(200);
- }
- PORTE = 0;
- break;
- #endif
-
- #ifdef DDRF
- case 'F':
- DDRF = 0xff;
- while (!Serial_Available())
- {
- PORTF ^= 0xff;
- delay_ms(200);
- }
- PORTF = 0;
- break;
- #endif
-
- #ifdef DDRG
- case 'G':
- DDRG = 0xff;
- while (!Serial_Available())
- {
- PORTG ^= 0xff;
- delay_ms(200);
- }
- PORTG = 0;
- break;
- #endif
-
- #ifdef DDRH
- case 'H':
- DDRH = 0xff;
- while (!Serial_Available())
- {
- PORTH ^= 0xff;
- delay_ms(200);
- }
- PORTH = 0;
- break;
- #endif
-
- #ifdef DDRI
- case 'I':
- DDRI = 0xff;
- while (!Serial_Available())
- {
- PORTI ^= 0xff;
- delay_ms(200);
- }
- PORTI = 0;
- break;
- #endif
-
- #ifdef DDRJ
- case 'J':
- DDRJ = 0xff;
- while (!Serial_Available())
- {
- PORTJ ^= 0xff;
- delay_ms(200);
- }
- PORTJ = 0;
- break;
- #endif
-
- #ifdef DDRK
- case 'K':
- DDRK = 0xff;
- while (!Serial_Available())
- {
- PORTK ^= 0xff;
- delay_ms(200);
- }
- PORTK = 0;
- break;
- #endif
-
- #ifdef DDRL
- case 'L':
- DDRL = 0xff;
- while (!Serial_Available())
- {
- PORTL ^= 0xff;
- delay_ms(200);
- }
- PORTL = 0;
- break;
- #endif
-
- default:
- PrintFromPROGMEMln(gTextMsg_PortNotSupported, 0);
- getCharFlag = false;
- break;
- }
- if (getCharFlag)
- {
- recchar();
- }
- }
- else
- {
- PrintFromPROGMEMln(gTextMsg_MustBeLetter, 0);
- }
-}
-
-
-//*******************************************************************
-static void PrintHelp(void)
-{
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_0, 0);
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_QM, 0);
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_AT, 0);
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_B, 0);
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_E, 0);
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_F, 0);
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_H, 0);
-
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_L, 0);
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_Q, 0);
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_R, 0);
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_V, 0);
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_Y, 0);
-}
-
-//************************************************************************
-static void RunMonitor(void)
-{
-char keepGoing;
-unsigned char theChar;
-int ii, jj;
-
- for (ii=0; ii<5; ii++)
- {
- for (jj=0; jj<25; jj++)
- {
- sendchar('!');
- }
- PrintNewLine();
- }
-
- gRamIndex = 0;
- gFlashIndex = 0;
- gEepromIndex = 0;
-
- PrintFromPROGMEMln(gTextMsg_Explorer, 0);
-
- keepGoing = 1;
- while (keepGoing)
- {
- PrintFromPROGMEM(gTextMsg_Prompt, 0);
- theChar = recchar();
- if (theChar >= 0x60)
- {
- theChar = theChar & 0x5F;
- }
-
- if (theChar >= 0x20)
- {
- sendchar(theChar);
- sendchar(0x20);
- }
-
- switch(theChar)
- {
- case '0':
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_0, 2);
- gFlashIndex = 0;
- gRamIndex = 0;
- gEepromIndex = 0;
- break;
-
- case '?':
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_QM, 2);
- PrintCPUstats();
- break;
-
- case '@':
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_AT, 2);
- EEPROMtest();
- break;
-
- case 'B':
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_B, 2);
- BlinkLED();
- break;
-
- case 'E':
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_E, 2);
- DumpHex(kDUMP_EEPROM, gEepromIndex, 16);
- gEepromIndex += 256;
- if (gEepromIndex > E2END)
- {
- gEepromIndex = 0;
- }
- break;
-
- case 'F':
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_F, 2);
- DumpHex(kDUMP_FLASH, gFlashIndex, 16);
- gFlashIndex += 256;
- break;
-
- case 'H':
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_H, 2);
- PrintHelp();
- break;
-
- case 'L':
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_L, 2);
- ListAvailablePorts();
- break;
-
- case 'Q':
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_Q, 2);
- keepGoing = false;
- break;
-
- case 'R':
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_R, 2);
- DumpHex(kDUMP_RAM, gRamIndex, 16);
- gRamIndex += 256;
- break;
-
- case 'V':
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_V, 2);
- VectorDisplay();
- break;
-
- case 'Y':
- PrintFromPROGMEMln(gTextMsg_HELP_MSG_Y, 2);
- AVR_PortOutput();
- break;
-
- default:
- PrintFromPROGMEMln(gTextMsg_HUH, 0);
- break;
- }
- }
-}
-
-#endif
-
diff --git a/bootloaders/stk500v2/stk500boot.ppg b/bootloaders/stk500v2/stk500boot.ppg
deleted file mode 100644
index a8929d7..0000000
--- a/bootloaders/stk500v2/stk500boot.ppg
+++ /dev/null
@@ -1 +0,0 @@
-<Workspace name="Bootloader"><Project path="STK500V2.pnproj"></Project></Workspace> \ No newline at end of file
diff --git a/bootloaders/stk500v2/stk500boot_v2_mega2560.hex b/bootloaders/stk500v2/stk500boot_v2_mega2560.hex
deleted file mode 100644
index 68d2e18..0000000
--- a/bootloaders/stk500v2/stk500boot_v2_mega2560.hex
+++ /dev/null
@@ -1,469 +0,0 @@
-:020000023000CC
-:10E000000D9489F10D94B2F10D94B2F10D94B2F129
-:10E010000D94B2F10D94B2F10D94B2F10D94B2F1F0
-:10E020000D94B2F10D94B2F10D94B2F10D94B2F1E0
-:10E030000D94B2F10D94B2F10D94B2F10D94B2F1D0
-:10E040000D94B2F10D94B2F10D94B2F10D94B2F1C0
-:10E050000D94B2F10D94B2F10D94B2F10D94B2F1B0
-:10E060000D94B2F10D94B2F10D94B2F10D94B2F1A0
-:10E070000D94B2F10D94B2F10D94B2F10D94B2F190
-:10E080000D94B2F10D94B2F10D94B2F10D94B2F180
-:10E090000D94B2F10D94B2F10D94B2F10D94B2F170
-:10E0A0000D94B2F10D94B2F10D94B2F10D94B2F160
-:10E0B0000D94B2F10D94B2F10D94B2F10D94B2F150
-:10E0C0000D94B2F10D94B2F10D94B2F10D94B2F140
-:10E0D0000D94B2F10D94B2F10D94B2F10D94B2F130
-:10E0E0000D94B2F141546D656761323536300041AF
-:10E0F000726475696E6F206578706C6F72657220DE
-:10E1000073746B3530305632206279204D4C530099
-:10E11000426F6F746C6F616465723E004875683F52
-:10E1200000436F6D70696C6564206F6E203D200048
-:10E130004350552054797065202020203D20005FF9
-:10E140005F4156525F415243485F5F3D2000415658
-:10E1500052204C696243205665723D20004743437C
-:10E160002056657273696F6E203D20004350552024
-:10E1700049442020202020203D20004C6F7720663D
-:10E18000757365202020203D20004869676820665F
-:10E190007573652020203D200045787420667573D6
-:10E1A00065202020203D20004C6F636B2066757336
-:10E1B000652020203D20004D617220203720323024
-:10E1C000313300312E362E3800342E332E350056A2
-:10E1D00023202020414444522020206F7020636F70
-:10E1E00064652020202020696E73747275637469E1
-:10E1F0006F6E2061646472202020496E74657272B3
-:10E20000757074006E6F20766563746F7200726A49
-:10E210006D702020006A6D70200057686174207056
-:10E220006F72743A00506F7274206E6F7420737541
-:10E2300070706F72746564004D7573742062652030
-:10E2400061206C6574746572002000577269747483
-:10E25000696E672045450052656164696E672045B7
-:10E26000450045452065727220636E743D00504F35
-:10E27000525400303D5A65726F2061646472003FF1
-:10E280003D43505520737461747300403D454550C3
-:10E29000524F4D207465737400423D426C696E6B41
-:10E2A000204C454400453D44756D70204545505215
-:10E2B0004F4D00463D44756D7020464C415348001B
-:10E2C000483D48656C70004C3D4C69737420492F83
-:10E2D0004F20506F72747300513D51756974005234
-:10E2E0003D44756D702052414D00563D73686F7707
-:10E2F00020696E7465727275707420566563746FF0
-:10E30000727300593D506F727420626C696E6B00BD
-:10E310002A0011241FBECFEFD1E2DEBFCDBF01E046
-:10E320000CBF12E0A0E0B2E0EEE1FDEF03E00BBFB6
-:10E3300002C007900D92A030B107D9F712E0A0E01B
-:10E34000B2E001C01D92AE30B107E1F70F9460F367
-:10E350000D948DFE01E20EBF0FEF0DBF11241FBE05
-:10E360000D9460F30D9400F020E030E040ED57E0B4
-:10E3700005C0FA013197F1F72F5F3F4F2817390792
-:10E38000C0F308959C01260F311DC901A0E0B0E043
-:10E390002F5F3F4FABBFFC018791882361F08093D3
-:10E3A000C6008091C00086FFFCCF8091C0008064D1
-:10E3B0008093C000EACF08958DE08093C6008091DD
-:10E3C000C00086FFFCCF8091C00080648093C000B5
-:10E3D0008AE08093C6008091C00086FFFCCF8091C8
-:10E3E000C00080648093C00008950F94C2F10F9420
-:10E3F000DCF10895FC019081992359F09093C600B7
-:10E400008091C00086FFFCCF8091C0008064809323
-:10E41000C0003196992379F70895282F982F929567
-:10E420009F70892F805D8A3308F0895F8093C600D2
-:10E430008091C00086FFFCCF8091C00080648093F3
-:10E44000C000822F8F70982F905D9A3308F0995FEB
-:10E450009093C6008091C00086FFFCCF8091C000E1
-:10E4600080648093C00008959C01FB01853691056E
-:10E470001CF46330710594F0C90164E670E00F94F8
-:10E480002EFE605D7F4F6093C6008091C00086FFC6
-:10E49000FCCF8091C00080648093C0002B30310598
-:10E4A00014F43297B4F0C90164E670E00F942EFEC4
-:10E4B0006AE070E00F942EFE605D7F4F6093C600AF
-:10E4C0008091C00086FFFCCF8091C0008064809363
-:10E4D000C000C9016AE070E00F942EFEC0968093E0
-:10E4E000C6008091C00086FFFCCF8091C000806490
-:10E4F0008093C00008951F93182F8EE692EE60E07F
-:10E500000F94C2F11093C6008091C00086FFFCCF2B
-:10E510008091C00080648093C0000F94DCF11F9153
-:10E5200008952F923F924F925F926F927F928F92B7
-:10E530009F92AF92BF92CF92DF92EF92FF920F9392
-:10E540001F93DF93CF93CDB7DEB762970FB6F894E2
-:10E55000DEBF0FBECDBF382E622ECA01DB015C01CB
-:10E560006D01772420E2222E2E010894411C511CBB
-:10E570008BC081E0A81680E0B80681E0C80680E084
-:10E58000D80628F0C601AA27BB270F940DF2BB2797
-:10E59000AD2D9C2D8B2D0F940DF28A2D0F940DF225
-:10E5A0002092C6008091C00086FFFCCF8091C00001
-:10E5B00080648093C0009DE29093C6008091C0006B
-:10E5C00086FFFCCF8091C00080648093C0002092C1
-:10E5D000C6008091C00086FFFCCF8091C00080649F
-:10E5E0008093C00019828601750188249924A1E0D6
-:10E5F0003A1651F03A1620F0B2E03B1661F409C029
-:10E600000BBFF701779007C0C7010F9477FE782EF4
-:10E6100002C0F7017080872D0F940DF22092C60082
-:10E620008091C00086FFFCCF8091C0008064809301
-:10E63000C000872D8052F401EF70F0708F3520F408
-:10E64000E40DF51D708204C0E40DF51D8EE280839B
-:10E650000894E11CF11C011D111D0894811C911CE2
-:10E6600090E18916910409F0C2CF80E190E0A0E02A
-:10E67000B0E0A80EB91ECA1EDB1E198AC2010F9493
-:10E68000FAF10F94DCF16A94662009F072CF629679
-:10E690000FB6F894DEBF0FBECDBFCF91DF911F91B3
-:10E6A0000F91FF90EF90DF90CF90BF90AF909F9031
-:10E6B0008F907F906F905F904F903F902F90089534
-:10E6C0002F923F924F925F926F927F928F929F9282
-:10E6D000AF92BF92CF92DF92EF92FF920F931F9370
-:10E6E000DF93CF93CDB7DEB7CD53D1400FB6F894BB
-:10E6F000DEBF0FBECDBF01E20EBF0FEF0DBF94B75F
-:10E70000F894A89514BE80916000886180936000A1
-:10E7100010926000789493FF05C0E0910002F091A0
-:10E7200001021995279A2F9A8091C00082608093E8
-:10E73000C00080E18093C40088E18093C1000000A4
-:10E74000EE24FF24870144E0A42EB12CCC24DD2448
-:10E7500024C0C5010197F1F70894E11CF11C011DCB
-:10E76000111D21E2E2162EE4F20620E0020720E06D
-:10E77000120718F031E0C32ED12CC801B70127ECE5
-:10E780003BE140E050E00F9441FE611571058105C9
-:10E79000910519F485B1805885B98091C00087FD35
-:10E7A00003C0C114D104A9F2A6014F5F5F4FC25E3E
-:10E7B000DE4F59834883CE51D140C25EDE4F8881FF
-:10E7C0009981CE51D140019711F00D9410FEC05D9A
-:10E7D000DE4F19821882C053D14060E0C15DDE4F28
-:10E7E0001882CF52D14088249924C35DDE4F19820C
-:10E7F0001882CD52D140C05EDE4F188219821A8233
-:10E800001B82C052D140CE5CDE4F188219821A8220
-:10E810001B82C253D140EE24FF2487010BBFF701B6
-:10E8200007911691C45CDE4F19830883CC53D14005
-:10E830000D940BFEC25EDE4F28813981CE51D1404E
-:10E840002130310509F52091C600C25EDE4F1982E4
-:10E850001882CE51D14022C02F5F3F4F4F4F5F4FA4
-:10E86000213082E138078AE7480780E0580780F0C6
-:10E87000C45CDE4FE881F981CC53D140EF5FFF4F9C
-:10E8800019F0EE27FF27099420E030E040E050E047
-:10E890008091C00087FFE0CF2091C600C35DDE4FAE
-:10E8A00048815981CD52D1404F5F5F4FC35DDE4FEC
-:10E8B00059834883CD52D140213209F063C64A3092
-:10E8C000510508F05FC60894811C911C53E0851621
-:10E8D000910409F059C600E010E018C081E280936D
-:10E8E000C6008091C00086FFFCCF8091C00080648C
-:10E8F0008093C0002F5F3F4F2931310579F70F9486
-:10E90000DCF10F5F1F4F0530110519F020E030E0FA
-:10E91000E5CF10920A0210920B0210920C02109294
-:10E920000D02109206021092070210920802109235
-:10E930000902109202021092030210920402109235
-:10E9400005028FEE90EE60E00F94F5F180E191EE1C
-:10E9500060E00F94C2F18091C00087FFFCCF9091DE
-:10E96000C600903608F09F759032B8F09093C600BC
-:10E970008091C00086FFFCCF8091C00080648093AE
-:10E98000C000A0E2A093C6008091C00086FFFCCF2B
-:10E990008091C00080648093C000983409F4D7C18E
-:10E9A0009934B8F4923409F459C1933458F490333B
-:10E9B00019F1903308F4E3C59F33A1F1903409F0C5
-:10E9C000DEC5BDC0953409F470C1963409F0D7C5D1
-:10E9D00098C1923509F42BC2933538F49C3409F46C
-:10E9E000F5C1913509F0CBC518C2963509F445C279
-:10E9F000993509F0C4C567C483E792EE62E00F94CD
-:10EA0000F5F110920602109207021092080210927D
-:10EA1000090210920A0210920B0210920C0210923C
-:10EA20000D0213C18FE792EE62E00F94F5F18FEEC5
-:10EA300090EE60E00F94F5F181E291EE60E00F94CA
-:10EA4000C2F187EB91EE60E00F94F5F180E391EE77
-:10EA500060E00F94C2F184EE90EE60E00F94F5F167
-:10EA60008FE391EE60E00F94C2F186E090E061E008
-:10EA700070E00F9434F20F94DCF18DE591EE60E0DC
-:10EA80000F94C2F189EC91EE60E00F94F5F18EE401
-:10EA900091EE60E00F94C2F183EC91EE60E00F9490
-:10EAA000F5F18CE691EE60E00F94C2F18EE10F94E7
-:10EAB0000DF288E90F940DF281E00F940DF20F949E
-:10EAC000DCF18BE791EE60E00F94C2F119E0E0E039
-:10EAD000F0E010935700E4918E2F0F940DF20F94F5
-:10EAE000DCF18AE891EE60E00F94C2F1E3E0F0E03F
-:10EAF00010935700E4918E2F0F940DF20F94DCF1D8
-:10EB000089E991EE60E00F94C2F1E2E0F0E0109349
-:10EB10005700E4918E2F0F940DF20F94DCF188EAE8
-:10EB200091EE60E00F94C2F1E1E0F0E01093570045
-:10EB30001491812F0F940DF20F94DCF107CF8BE825
-:10EB400092EE62E00F94F5F18BE492EE60E00F94A8
-:10EB5000F5F10F94DCF100E010E019C0C8016F2D51
-:10EB60000F947FFEFF2031F489E492EE60E00F9471
-:10EB7000C2F10BC0F092C6008091C00086FFFCCFAE
-:10EB80008091C00080648093C0000F5F1F4FC80158
-:10EB900081519F41A0E0B0E0ABBFFC01F790BAE229
-:10EBA000FB1621F0E2E000301E07C1F60F94DCF105
-:10EBB0000F94DCF187E592EE60E00F94F5F10F948D
-:10EBC000DCF1CC24DD2400E010E01EC0C8010F946D
-:10EBD00077FEF82E882331F489E492EE60E00F94FA
-:10EBE000C2F10BC08093C6008091C00086FFFCCFAD
-:10EBF0008091C00080648093C000FE1419F00894D6
-:10EC0000C11CD11C0F5F1F4FC80181519F41A0E063
-:10EC1000B0E0ABBFFC01E790FAE2EF1621F022E092
-:10EC20000030120799F60F94DCF10F94DCF182E6C4
-:10EC300092EE60E00F94C2F1C60161E070E00F94C3
-:10EC400034F20F94DCF10F94DCF110920202109276
-:10EC50000302109204021092050278CE89E992EE26
-:10EC600062E00F94F5F1279A2F9A16C02F9880E052
-:10EC700090E0E0EDF7E03197F1F7019684369105E9
-:10EC8000C1F72F9A80E090E0E0EDF7E03197F1F7DF
-:10EC9000019684369105C1F78091C00087FFE6CFC9
-:10ECA0008091C00087FFFCCF64C485EA92EE62E0E9
-:10ECB0000F94F5F140910202509103026091040219
-:10ECC0007091050281E020E10F9491F2809102029F
-:10ECD00090910302A0910402B091050280509F4FD1
-:10ECE000AF4FBF4F8093020290930302A0930402A0
-:10ECF000B093050280509041A040B04008F426CE69
-:10ED0000A4CF83EB92EE62E00F94F5F140910602FE
-:10ED100050910702609108027091090280E020E1A1
-:10ED20000F9491F28091060290910702A09108023F
-:10ED3000B091090280509F4FAF4FBF4F80930602A2
-:10ED400090930702A0930802B0930902FFCD80ECD4
-:10ED500092EE62E00F94F5F183E792EE60E00F949B
-:10ED6000F5F18FE792EE60E00F94F5F18BE892EE0B
-:10ED700060E00F94F5F189E992EE60E00F94F5F10F
-:10ED800085EA92EE60E00F94F5F183EB92EE60E09D
-:10ED90000F94F5F180EC92EE60E00F94F5F187ECC2
-:10EDA00092EE60E00F94F5F188ED92EE60E00F9442
-:10EDB000F5F18FED92EE60E00F94F5F18AEE92EEB0
-:10EDC00060E00F94F5F183E093EEBDCD87EC92EE19
-:10EDD00062E00F94F5F181E40F947BF282E40F94EA
-:10EDE0007BF283E40F947BF284E40F947BF285E45E
-:10EDF0000F947BF286E40F947BF287E40F947BF20E
-:10EE000088E40F947BF28AE40F947BF28BE40F94F6
-:10EE10007BF28CE40F947BF299CD88ED92EE62E068
-:10EE20000F94F5F1772473948824992409C48FED05
-:10EE300092EE62E00F94F5F140910A0250910B02BC
-:10EE400060910C0270910D0282E020E10F9491F22A
-:10EE500080910A0290910B02A0910C02B0910D02D8
-:10EE600080509F4FAF4FBF4F80930A0290930B0289
-:10EE7000A0930C02B0930D0269CD8AEE92EE62E08F
-:10EE80000F94F5F184EE90EE60E00F94F5F18FECC5
-:10EE900091EE60E00F94F5F1662477244301CC5D98
-:10EEA000DE4F19821882C452D140D401C301B695F5
-:10EEB000A79597958795CA5DDE4F88839983AA8326
-:10EEC000BB83C652D140CC5DDE4FA881B981C4520C
-:10EED000D1401196CC5DDE4FB983A883C452D14096
-:10EEE000CD0162E070E00F9434F2B0E2B093C6005E
-:10EEF0008091C00086FFFCCF8091C0008064809329
-:10EF0000C000EDE2E093C6008091C00086FFFCCF18
-:10EF10008091C00080648093C000F0E2F093C6004E
-:10EF20008091C00086FFFCCF8091C00080648093F8
-:10EF3000C000CA5DDE4FE880F9800A811B81C6529D
-:10EF4000D140BB27A12F902F8F2D0F940DF2CA5DBA
-:10EF5000DE4F8881C652D1400F940DF2B0E2FB2EF5
-:10EF6000F092C6008091C00086FFFCCF8091C00067
-:10EF700080648093C0000DE30093C6008091C000C0
-:10EF800086FFFCCF8091C00080648093C00010E2B7
-:10EF90001093C6008091C00086FFFCCF8091C00016
-:10EFA00080648093C0008BBEF3012791C65DDE4F65
-:10EFB0002883CA52D140A22EBB24CC24DD2408943D
-:10EFC000611C711C811C911C8BBEF3018791282E42
-:10EFD0003324442455240894611C711C811C911C09
-:10EFE0008BBEF3013791C55DDE4F3883CB52D140E4
-:10EFF0000894611C711C811C911C8BBEF30147910C
-:10F00000C45DDE4F4883CC52D140ADEFEA2EAFEF66
-:10F01000FA2EAFEF0A2FAFEF1A2F6E0C7F1C801E57
-:10F02000911E142D032DF22CEE24EA0CFB1C0C1D5A
-:10F030001D1D0F940DF220E22093C6008091C000A8
-:10F0400086FFFCCF8091C00080648093C000C65DC5
-:10F05000DE4F8881CA52D1400F940DF230E23093D6
-:10F06000C6008091C00086FFFCCF8091C000806404
-:10F070008093C000C45DDE4F8881CC52D1400F9494
-:10F080000DF240E24093C6008091C00086FFFCCFA5
-:10F090008091C00080648093C000C55DDE4F888190
-:10F0A000CB52D1400F940DF250E25093C6008091A4
-:10F0B000C00086FFFCCF8091C00080648093C000B8
-:10F0C0008FEFE8168FEFF80680E0080780E018075A
-:10F0D00031F484E092EE60E00F94C2F1DFC0D80119
-:10F0E000C7018070907CA070B0708050904CA040A0
-:10F0F000B040D1F52FEF3FE340E050E0E222F322B1
-:10F1000004231523CA5DDE4FA880B980CA80DB8046
-:10F11000C652D140AE0CBF1CC01ED11EAA0CBB1CD7
-:10F12000CC1CDD1C8EE092EE60E00F94C2F1BB2798
-:10F13000A12F902F8F2D0F940DF28E2D0F940DF285
-:10F1400030E23093C6008091C00086FFFCCF8091F2
-:10F15000C00080648093C0004EE34093C60080915D
-:10F16000C00086FFFCCF87C08EE09EEFA0E0B0E03D
-:10F17000E822F9220A231B239CE0E91694E9F90608
-:10F1800090E0090790E0190709F088C0C45DDE4FE0
-:10F19000A881CC52D140EA2EFF2400E010E0102FCD
-:10F1A0000F2DFE2CEE24C55DDE4FB881CB52D14031
-:10F1B000EB0EF11C011D111DD601C501817090706F
-:10F1C000A070B070DC0199278827E80EF91E0A1F8D
-:10F1D0001B1F20EF30E040E050E0A222B322C42207
-:10F1E000D52241E1AA0CBB1CCC1CDD1C4A95D1F7F1
-:10F1F000EA0CFB1C0C1D1D1D81E090E0A0E0B0E0BE
-:10F20000282239224A225B2235E1220C331C441C7D
-:10F21000551C3A95D1F7E20CF31C041D151D57013E
-:10F220006801AA0CBB1CCC1CDD1C85E192EE60E0E1
-:10F230000F94C2F1C801AA27BB270F940DF2BB2778
-:10F24000A12F902F8F2D0F940DF28E2D0F940DF274
-:10F2500090E29093C6008091C00086FFFCCF809121
-:10F26000C00080648093C000AEE3A093C60080918C
-:10F27000C00086FFFCCF8091C00080648093C000F6
-:10F28000C601AA27BB270F940DF2BB27AD2D9C2DDD
-:10F290008B2D0F940DF28A2D0F940DF20F94DCF14B
-:10F2A000CC5DDE4FE881F981C452D140F99709F471
-:10F2B0004DCBF4E0EF2EF12C012D112D6E0C7F1CA7
-:10F2C000801E911EF2CD83E093EE62E00F94F5F183
-:10F2D0008AE192EE60E00F94C2F18091C00087FF56
-:10F2E000FCCF1091C6001F751093C6008091C0001E
-:10F2F00086FFFCCF8091C00080648093C0000F9493
-:10F30000DCF1812F81548A3108F036C1163409F4BA
-:10F3100095C0173490F4133409F44EC0143430F40B
-:10F320001134F1F0123409F01DC130C0143409F465
-:10F3300059C0153409F016C16BC01A3409F4C4C0A1
-:10F340001B3438F4173409F48FC0183409F00AC19B
-:10F35000A1C01B3409F4D2C01C3409F003C1E8C0B9
-:10F360008FEF81B90DC082B1809582B980E090E0C5
-:10F37000E0EDF7E03197F1F70196883C9105C1F790
-:10F380008091C00087FFEFCF12B8EFC08FEF84B934
-:10F390000DC085B1809585B980E090E0E0EDF7E0A3
-:10F3A0003197F1F70196883C9105C1F78091C00033
-:10F3B00087FFEFCF15B8D9C08FEF87B90DC088B1DF
-:10F3C000809588B980E090E0E0EDF7E03197F1F7C3
-:10F3D0000196883C9105C1F78091C00087FFEFCF6F
-:10F3E00018B8C3C08FEF8AB90DC08BB180958BB9A7
-:10F3F00080E090E0E0EDF7E03197F1F70196883C8E
-:10F400009105C1F78091C00087FFEFCF1BB8ADC059
-:10F410008FEF8DB90DC08EB180958EB980E090E0F0
-:10F42000E0EDF7E03197F1F70196883C9105C1F7DF
-:10F430008091C00087FFEFCF1EB897C08FEF80BBD1
-:10F440000DC081B3809581BB80E090E0E0EDF7E0F6
-:10F450003197F1F70196883C9105C1F78091C00082
-:10F4600087FFEFCF11BA81C08FEF83BB0DC084B38C
-:10F47000809584BB80E090E0E0EDF7E03197F1F714
-:10F480000196883C9105C1F78091C00087FFEFCFBE
-:10F4900014BA6BC08FEF809301010FC080910201FD
-:10F4A00080958093020180E090E0E0EDF7E03197F5
-:10F4B000F1F70196883C9105C1F78091C00087FF64
-:10F4C000EDCF1092020151C08FEF809304010FC065
-:10F4D0008091050180958093050180E090E0E0ED4A
-:10F4E000F7E03197F1F70196883C9105C1F78091DB
-:10F4F000C00087FFEDCF1092050137C08FEF8093DA
-:10F5000007010FC08091080180958093080180E079
-:10F5100090E0E0EDF7E03197F1F70196883C910536
-:10F52000C1F78091C00087FFEDCF109208011DC088
-:10F530008FEF80930A010FC080910B01809580931B
-:10F540000B0180E090E0E0EDF7E03197F1F70196F4
-:10F55000883C9105C1F78091C00087FFEDCF1092E4
-:10F560000B0103C085E292EEEEC98091C00087FFD7
-:10F57000FCCF8091C600EAC988E392EEE4C98CE131
-:10F5800091EEE1C988249924933011F1943028F444
-:10F59000913089F09230B8F408C0953061F195301F
-:10F5A000F0F0963009F048C043C02B3109F042C951
-:10F5B00091E06BE13FC96227C15DDE4F2883CF52E6
-:10F5C000D14092E037C9B22FA0E0622793E032C960
-:10F5D000822F90E0A82BB92B622794E02BC92E3004
-:10F5E00009F039C3622795E0C05DDE4F19821882A9
-:10F5F000C053D1401FC9E1E0F0E0EC0FFD1FC05D3A
-:10F60000DE4F08811981C053D140E00FF11F2083E4
-:10F610000F5F1F4FC05DDE4F19830883C053D14079
-:10F6200062270A171B0709F005C9D80196E002C92D
-:10F63000261709F010C303C0973009F0FBC87724E0
-:10F640009981933109F412C19431C8F4963009F4C8
-:10F65000D8C0973050F4923009F406C1933009F4C1
-:10F660006DC0913009F059C253C0913109F477C08F
-:10F67000923108F0BBC0903109F04FC2F5C098310B
-:10F6800009F487C0993150F4953109F4EFC09531F0
-:10F6900008F4C6C1963109F040C2C2C19A3109F4DA
-:10F6A0006CC09A3108F491C09B3109F45BC09D3164
-:10F6B00009F033C29D81903359F48F81882311F46E
-:10F6C0009EE11CC0813011F091E018C098E916C08D
-:10F6D000892F807591F0903539F4E0E0F0E089E011
-:10F6E0008093570094910AC0983539F4E3E0F0E034
-:10F6F00089E080935700949101C090E01A821B82A8
-:10F700008D818C831D829E831F8227E030E009C299
-:10F710001A8288E08B8381E48C8386E58D8382E581
-:10F720008E8389E48F8383E5888780E589878FE5E9
-:10F730008A8782E38B872BE030E0F3C18A818139AD
-:10F7400041F0823941F0803911F48FE005C080E04A
-:10F7500003C082E001C08AE01A828B8344C0772410
-:10F76000739482C08D81882311F48EE12CC0813086
-:10F7700011F081E028C088E926C01A82E1E0F0E0BB
-:10F7800089E08093570084918B831C8224E030E0D1
-:10F79000C8C18B81803589F48C81883039F4E2E0EE
-:10F7A000F0E089E08093570084910DC0E0E0F0E044
-:10F7B00089E080935700849106C0E3E0F0E089E09F
-:10F7C0008093570084911A82DFCF8D81836C99E0FA
-:10F7D000E1E0F0E0082E90935700E89507B600FCB2
-:10F7E000FDCF1A821B8223E030E09BC180EC8A832C
-:10F7F000CE5CDE4F188219821A821B82C253D1401E
-:10F800008EC18A8190E0A0E0B0E0582F44273327D2
-:10F8100022278B8190E0A0E0B0E0DC0199278827C7
-:10F82000282B392B4A2B5B2B8D8190E0A0E0B0E098
-:10F83000282B392B4A2B5B2B8C8190E0A0E0B0E089
-:10F84000BA2FA92F982F8827282B392B4A2B5B2BCF
-:10F85000220F331F441F551FC05EDE4F288339839C
-:10F860004A835B83C052D1401A8259C13A81C95C34
-:10F87000DE4F3883C753D140CA5CDE4F1882C6536F
-:10F88000D1408B81C82EDD24CA5CDE4F488159816E
-:10F89000C653D140C42AD52A933109F082C0CE5C28
-:10F8A000DE4F88819981AA81BB81C253D1408050AB
-:10F8B000904CA340B04030F583E0CE5CDE4FE88052
-:10F8C000F9800A811B81C253D140F70100935B008C
-:10F8D00080935700E89507B600FCFDCFCE5CDE4F65
-:10F8E000088119812A813B81C253D14000501F4FAA
-:10F8F0002F4F3F4FCE5CDE4F088319832A833B8313
-:10F90000C253D140C05EDE4F488159816A817B81FC
-:10F91000C052D140DE011B9631E08C9111962C91A2
-:10F9200011971296C75CDE4F2883C953D140C85C3B
-:10F93000DE4F1882C853D14090E0C85CDE4FE881AA
-:10F94000F981C853D1408E2B9F2B0C01FA01609393
-:10F950005B0030935700E89511244E5F5F4F6F4F67
-:10F960007F4F0EEFE02E0FEFF02ECE0CDF1CC114F8
-:10F97000D10499F685E0C05EDE4F088119812A81A5
-:10F980003B81C052D140F80120935B008093570027
-:10F99000E89507B600FCFDCF81E180935700E8951C
-:10F9A00035C0C05EDE4F88819981AA81BB81C0527B
-:10F9B000D140B695A795979587957C018601ABE0D8
-:10F9C000AA2EB12CAC0EBD1E0BC0D5016D915D01F0
-:10F9D000C7010F947FFE0894E11CF11C01501040F8
-:10F9E0000115110591F7A60160E070E0440F551F65
-:10F9F000661F771FC05EDE4FE880F9800A811B8199
-:10FA0000C052D1404E0D5F1D601F711F1A82C05E33
-:10FA1000DE4F488359836A837B83C052D1407FC0C5
-:10FA2000FA80C55CDE4FF882CB53D140C65CDE4F16
-:10FA30001882CA53D1408B81C82EDD24C65CDE4FAC
-:10FA400008811981CA53D140C02AD12A1A828981DA
-:10FA5000BE016D5F7F4F843121F59601C05EDE4FA0
-:10FA6000E880F9800A811B81C052D1400BBFF701A9
-:10FA700087919691DB018C9311969C936E5F7F4FDB
-:10FA8000D801C7010296A11DB11DC05EDE4F88835B
-:10FA90009983AA83BB83C052D14022503040F1F6F3
-:10FAA00036C0C05EDE4F288139814A815B81C052F9
-:10FAB000D1400894C108D108760100E010E0089414
-:10FAC000C11CD11C0894E11CF11C011D111DE20E8A
-:10FAD000F31E041F151F21BDBB27A52F942F832FB5
-:10FAE00082BD2F5F3F4F4F4F5F4FF89A80B5DB01CC
-:10FAF0008D93BD012E153F054007510761F7C05E8C
-:10FB0000DE4F288339834A835B83C052D1409601FC
-:10FB10002D5F3F4FFB01108204C080EC8A8322E0FE
-:10FB200030E08BE18093C6008091C00086FFFCCF5F
-:10FB30008091C00080648093C000C15DDE4FF88179
-:10FB4000CF52D140F093C6008091C00086FFFCCF19
-:10FB50008091C00080648093C000432F3093C60022
-:10FB60008091C00086FFFCCF8091C00080648093AC
-:10FB7000C000922F2093C6008091C00086FFFCCF6A
-:10FB80008091C00080648093C0008EE08093C600A6
-:10FB90008091C00086FFFCCF8091C000806480937C
-:10FBA000C00065E1C15DDE4FE880CF52D1406E25D7
-:10FBB00069276427FE01319610C090819093C6009A
-:10FBC0008091C00086FFFCCF31968091C000806498
-:10FBD0008093C0006927215030402115310569F715
-:10FBE0006093C6008091C00086FFFCCF8091C0006A
-:10FBF00080648093C00085B1805885B9772081F4F6
-:10FC0000C15DDE4F0881CF52D1400F5FC15DDE4F35
-:10FC10000883CF52D14090E0A0E0B0E00D941AF4F8
-:10FC200027982F9880E090E020ED37E0F901319798
-:10FC3000F1F7019684369105C9F700008091C00064
-:10FC40008D7F8093C00081E180935700E895EE2777
-:10FC5000FF270994FFCF90E00D941AF497FB092E2B
-:10FC600007260AD077FD04D02ED006D000201AF443
-:10FC7000709561957F4F0895F6F7909581959F4F08
-:10FC80000895A1E21A2EAA1BBB1BFD010DC0AA1FDD
-:10FC9000BB1FEE1FFF1FA217B307E407F50720F0F5
-:10FCA000A21BB30BE40BF50B661F771F881F991F70
-:10FCB0001A9469F760957095809590959B01AC01B9
-:10FCC000BD01CF010895AA1BBB1B51E107C0AA1FAC
-:10FCD000BB1FA617B70710F0A61BB70B881F991FED
-:10FCE0005A95A9F780959095BC01CD010895F99991
-:10FCF000FECF92BD81BDF89A992780B50895262F31
-:10FD0000F999FECF1FBA92BD81BD20BD0FB6F89400
-:0EFD1000FA9AF99A0FBE01960895F894FFCF63
-:040000033000E000E9
-:00000001FF
diff --git a/variants/eightanaloginputs/pins_arduino.h b/variants/eightanaloginputs/pins_arduino.h
deleted file mode 100644
index 4ccf8ba..0000000
--- a/variants/eightanaloginputs/pins_arduino.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- pins_arduino.h - Pin definition functions for Arduino
- Part of Arduino - http://www.arduino.cc/
-
- Copyright (c) 2007 David A. Mellis
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General
- Public License along with this library; if not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- Boston, MA 02111-1307 USA
-*/
-
-#include "../standard/pins_arduino.h"
-#undef NUM_ANALOG_INPUTS
-#define NUM_ANALOG_INPUTS 8
diff --git a/variants/ethernet/pins_arduino.h b/variants/ethernet/pins_arduino.h
deleted file mode 100644
index 77fcc40..0000000
--- a/variants/ethernet/pins_arduino.h
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- pins_arduino.h - Pin definition functions for Arduino
- Part of Arduino - http://www.arduino.cc/
-
- Copyright (c) 2007 David A. Mellis
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General
- Public License along with this library; if not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- Boston, MA 02111-1307 USA
-*/
-
-#ifndef Pins_Arduino_h
-#define Pins_Arduino_h
-
-#include <avr/pgmspace.h>
-
-#define NUM_DIGITAL_PINS 20
-#define NUM_ANALOG_INPUTS 6
-#define analogInputToDigitalPin(p) ((p < 6) ? (p) + 14 : -1)
-
-#if defined(__AVR_ATmega8__)
-#define digitalPinHasPWM(p) ((p) == 9 || (p) == 10 || (p) == 11)
-#else
-#define digitalPinHasPWM(p) ((p) == 3 || (p) == 5 || (p) == 6 || (p) == 9 || (p) == 10 || (p) == 11)
-#endif
-
-#define PIN_SPI_SS (10)
-#define PIN_SPI_MOSI (11)
-#define PIN_SPI_MISO (12)
-#define PIN_SPI_SCK (13)
-
-static const uint8_t SS = PIN_SPI_SS;
-static const uint8_t MOSI = PIN_SPI_MOSI;
-static const uint8_t MISO = PIN_SPI_MISO;
-static const uint8_t SCK = PIN_SPI_SCK;
-
-#define PIN_WIRE_SDA (18)
-#define PIN_WIRE_SCL (19)
-
-static const uint8_t SDA = PIN_WIRE_SDA;
-static const uint8_t SCL = PIN_WIRE_SCL;
-
-#define LED_BUILTIN 9
-
-#define PIN_A0 (14)
-#define PIN_A1 (15)
-#define PIN_A2 (16)
-#define PIN_A3 (17)
-#define PIN_A4 (18)
-#define PIN_A5 (19)
-#define PIN_A6 (20)
-#define PIN_A7 (21)
-
-static const uint8_t A0 = PIN_A0;
-static const uint8_t A1 = PIN_A1;
-static const uint8_t A2 = PIN_A2;
-static const uint8_t A3 = PIN_A3;
-static const uint8_t A4 = PIN_A4;
-static const uint8_t A5 = PIN_A5;
-static const uint8_t A6 = PIN_A6;
-static const uint8_t A7 = PIN_A7;
-
-#define digitalPinToPCICR(p) (((p) >= 0 && (p) <= 21) ? (&PCICR) : ((uint8_t *)0))
-#define digitalPinToPCICRbit(p) (((p) <= 7) ? 2 : (((p) <= 13) ? 0 : 1))
-#define digitalPinToPCMSK(p) (((p) <= 7) ? (&PCMSK2) : (((p) <= 13) ? (&PCMSK0) : (((p) <= 21) ? (&PCMSK1) : ((uint8_t *)0))))
-#define digitalPinToPCMSKbit(p) (((p) <= 7) ? (p) : (((p) <= 13) ? ((p) - 8) : ((p) - 14)))
-
-#define digitalPinToInterrupt(p) ((p) == 2 ? 0 : ((p) == 3 ? 1 : NOT_AN_INTERRUPT))
-
-#ifdef ARDUINO_MAIN
-
-// On the Arduino board, digital pins are also used
-// for the analog output (software PWM). Analog input
-// pins are a separate set.
-
-// ATMEL ATMEGA8 & 168 / ARDUINO
-//
-// +-\/-+
-// PC6 1| |28 PC5 (AI 5)
-// (D 0) PD0 2| |27 PC4 (AI 4)
-// (D 1) PD1 3| |26 PC3 (AI 3)
-// (D 2) PD2 4| |25 PC2 (AI 2)
-// PWM+ (D 3) PD3 5| |24 PC1 (AI 1)
-// (D 4) PD4 6| |23 PC0 (AI 0)
-// VCC 7| |22 GND
-// GND 8| |21 AREF
-// PB6 9| |20 AVCC
-// PB7 10| |19 PB5 (D 13)
-// PWM+ (D 5) PD5 11| |18 PB4 (D 12)
-// PWM+ (D 6) PD6 12| |17 PB3 (D 11) PWM
-// (D 7) PD7 13| |16 PB2 (D 10) PWM
-// (D 8) PB0 14| |15 PB1 (D 9) PWM
-// +----+
-//
-// (PWM+ indicates the additional PWM pins on the ATmega168.)
-
-// ATMEL ATMEGA1280 / ARDUINO
-//
-// 0-7 PE0-PE7 works
-// 8-13 PB0-PB5 works
-// 14-21 PA0-PA7 works
-// 22-29 PH0-PH7 works
-// 30-35 PG5-PG0 works
-// 36-43 PC7-PC0 works
-// 44-51 PJ7-PJ0 works
-// 52-59 PL7-PL0 works
-// 60-67 PD7-PD0 works
-// A0-A7 PF0-PF7
-// A8-A15 PK0-PK7
-
-
-// these arrays map port names (e.g. port B) to the
-// appropriate addresses for various functions (e.g. reading
-// and writing)
-const uint16_t PROGMEM port_to_mode_PGM[] = {
- NOT_A_PORT,
- NOT_A_PORT,
- (uint16_t) &DDRB,
- (uint16_t) &DDRC,
- (uint16_t) &DDRD,
-};
-
-const uint16_t PROGMEM port_to_output_PGM[] = {
- NOT_A_PORT,
- NOT_A_PORT,
- (uint16_t) &PORTB,
- (uint16_t) &PORTC,
- (uint16_t) &PORTD,
-};
-
-const uint16_t PROGMEM port_to_input_PGM[] = {
- NOT_A_PORT,
- NOT_A_PORT,
- (uint16_t) &PINB,
- (uint16_t) &PINC,
- (uint16_t) &PIND,
-};
-
-const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
- PD, /* 0 */
- PD,
- PD,
- PD,
- PD,
- PD,
- PD,
- PD,
- PB, /* 8 */
- PB,
- PB,
- PB,
- PB,
- PB,
- PC, /* 14 */
- PC,
- PC,
- PC,
- PC,
- PC,
-};
-
-const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
- _BV(0), /* 0, port D */
- _BV(1),
- _BV(2),
- _BV(3),
- _BV(4),
- _BV(5),
- _BV(6),
- _BV(7),
- _BV(0), /* 8, port B */
- _BV(1),
- _BV(2),
- _BV(3),
- _BV(4),
- _BV(5),
- _BV(0), /* 14, port C */
- _BV(1),
- _BV(2),
- _BV(3),
- _BV(4),
- _BV(5),
-};
-
-const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
- NOT_ON_TIMER, /* 0 - port D */
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- // on the ATmega168, digital pin 3 has hardware pwm
-#if defined(__AVR_ATmega8__)
- NOT_ON_TIMER,
-#else
- TIMER2B,
-#endif
- NOT_ON_TIMER,
- // on the ATmega168, digital pins 5 and 6 have hardware pwm
-#if defined(__AVR_ATmega8__)
- NOT_ON_TIMER,
- NOT_ON_TIMER,
-#else
- TIMER0B,
- TIMER0A,
-#endif
- NOT_ON_TIMER,
- NOT_ON_TIMER, /* 8 - port B */
- TIMER1A,
- TIMER1B,
-#if defined(__AVR_ATmega8__)
- TIMER2,
-#else
- TIMER2A,
-#endif
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER, /* 14 - port C */
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
-};
-
-#endif
-
-// These serial port names are intended to allow libraries and architecture-neutral
-// sketches to automatically default to the correct port name for a particular type
-// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
-// the first hardware serial port whose RX/TX pins are not dedicated to another use.
-//
-// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
-//
-// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
-//
-// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
-//
-// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
-//
-// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
-// pins are NOT connected to anything by default.
-#define SERIAL_PORT_HARDWARE Serial
-#define SERIAL_PORT_HARDWARE_OPEN Serial
-
-#endif
diff --git a/variants/gemma/pins_arduino.h b/variants/gemma/pins_arduino.h
deleted file mode 100644
index e0ec217..0000000
--- a/variants/gemma/pins_arduino.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- pins_arduino.c - pin definitions for the Arduino board
- Part of Arduino / Wiring Lite
-
- Copyright (c) 2005 David A. Mellis
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General
- Public License along with this library; if not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- Boston, MA 02111-1307 USA
-
- Modified 28-08-2009 for attiny84 R.Wiersma
- Modified 09-10-2009 for attiny45 A.Saporetti
-*/
-
-#ifndef Pins_Arduino_h
-#define Pins_Arduino_h
-
-#include <avr/pgmspace.h>
-
-// Defines to make D4 support PWM
-// See for more info: http://forums.adafruit.com/viewtopic.php?f=52&t=43951
-//#define TCCR1A GTCCR
-//#define WGM10 PWM1B
-
-// ATMEL ATTINY45 / ARDUINO
-//
-// +-\/-+
-// Ain0 (D 5) PB5 1| |8 Vcc
-// Ain3 (D 3) PB3 2| |7 PB2 (D 2) Ain1
-// Ain2 (D 4) PB4 3| |6 PB1 (D 1) pwm1
-// GND 4| |5 PB0 (D 0) pwm0
-// +----+
-
-#define NUM_DIGITAL_PINS 3
-#define NUM_ANALOG_INPUTS 1
-#define LED_BUILTIN 1
-
-#define PIN_A0 (6)
-#define PIN_A1 (7)
-#define PIN_A2 (8)
-#define PIN_A3 (9)
-
-static const uint8_t A0 = PIN_A0;
-static const uint8_t A1 = PIN_A1;
-static const uint8_t A2 = PIN_A2;
-static const uint8_t A3 = PIN_A3;
-
-#define digitalPinToPCICR(p) ( ((p) >= 0 && (p) <= 4) ? (&GIMSK) : ((uint8_t *)0) )
-#define digitalPinToPCICRbit(p) ( PCIE )
-#define digitalPinToPCMSK(p) ( ((p) <= 4) ? (&PCMSK) : ((uint8_t *)0) )
-#define digitalPinToPCMSKbit(p) ( (p) )
-
-#define digitalPinToInterrupt(p) ((p) == 2 ? 0 : NOT_AN_INTERRUPT)
-
-#define analogPinToChannel(p) ( (p) < 6 ? (p) : (p) - 6 )
-
-#define TCCR1A GTCCR
-
-#ifdef ARDUINO_MAIN
-
-void initVariant()
-{
- GTCCR |= (1 << PWM1B);
-}
-
-// these arrays map port names (e.g. port B) to the
-// appropriate addresses for various functions (e.g. reading
-// and writing) tiny45 only port B
-const uint16_t PROGMEM port_to_mode_PGM[] = {
- NOT_A_PORT,
- NOT_A_PORT,
- (uint16_t) &DDRB,
-};
-
-const uint16_t PROGMEM port_to_output_PGM[] = {
- NOT_A_PORT,
- NOT_A_PORT,
- (uint16_t) &PORTB,
-};
-
-const uint16_t PROGMEM port_to_input_PGM[] = {
- NOT_A_PIN,
- NOT_A_PIN,
- (uint16_t) &PINB,
-};
-
-const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
- PB, /* 0 */
- PB,
- PB,
- PB,
- PB,
- PB, // 5
- PB, // A0
- PB,
- PB,
- PB, // A4
-
-};
-
-const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
- _BV(0), /* 0, port B */
- _BV(1),
- _BV(2),
- _BV(3), /* 3 port B */
- _BV(4),
- _BV(5),
- _BV(5),
- _BV(2),
- _BV(4),
- _BV(3),
-};
-
-const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
- TIMER0A, /* OC0A */
- TIMER0B,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- TIMER1B,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
-};
-
-#endif
-
-#endif
diff --git a/variants/mega/pins_arduino.h b/variants/mega/pins_arduino.h
deleted file mode 100644
index 5115c04..0000000
--- a/variants/mega/pins_arduino.h
+++ /dev/null
@@ -1,413 +0,0 @@
-/*
- pins_arduino.h - Pin definition functions for Arduino
- Part of Arduino - http://www.arduino.cc/
-
- Copyright (c) 2007 David A. Mellis
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General
- Public License along with this library; if not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- Boston, MA 02111-1307 USA
-*/
-
-#ifndef Pins_Arduino_h
-#define Pins_Arduino_h
-
-#include <avr/pgmspace.h>
-
-#define NUM_DIGITAL_PINS 70
-#define NUM_ANALOG_INPUTS 16
-#define analogInputToDigitalPin(p) ((p < 16) ? (p) + 54 : -1)
-#define digitalPinHasPWM(p) (((p) >= 2 && (p) <= 13) || ((p) >= 44 && (p)<= 46))
-
-#define PIN_SPI_SS (53)
-#define PIN_SPI_MOSI (51)
-#define PIN_SPI_MISO (50)
-#define PIN_SPI_SCK (52)
-
-static const uint8_t SS = PIN_SPI_SS;
-static const uint8_t MOSI = PIN_SPI_MOSI;
-static const uint8_t MISO = PIN_SPI_MISO;
-static const uint8_t SCK = PIN_SPI_SCK;
-
-#define PIN_WIRE_SDA (20)
-#define PIN_WIRE_SCL (21)
-
-static const uint8_t SDA = PIN_WIRE_SDA;
-static const uint8_t SCL = PIN_WIRE_SCL;
-
-#define LED_BUILTIN 13
-
-#define PIN_A0 (54)
-#define PIN_A1 (55)
-#define PIN_A2 (56)
-#define PIN_A3 (57)
-#define PIN_A4 (58)
-#define PIN_A5 (59)
-#define PIN_A6 (60)
-#define PIN_A7 (61)
-#define PIN_A8 (62)
-#define PIN_A9 (63)
-#define PIN_A10 (64)
-#define PIN_A11 (65)
-#define PIN_A12 (66)
-#define PIN_A13 (67)
-#define PIN_A14 (68)
-#define PIN_A15 (69)
-
-static const uint8_t A0 = PIN_A0;
-static const uint8_t A1 = PIN_A1;
-static const uint8_t A2 = PIN_A2;
-static const uint8_t A3 = PIN_A3;
-static const uint8_t A4 = PIN_A4;
-static const uint8_t A5 = PIN_A5;
-static const uint8_t A6 = PIN_A6;
-static const uint8_t A7 = PIN_A7;
-static const uint8_t A8 = PIN_A8;
-static const uint8_t A9 = PIN_A9;
-static const uint8_t A10 = PIN_A10;
-static const uint8_t A11 = PIN_A11;
-static const uint8_t A12 = PIN_A12;
-static const uint8_t A13 = PIN_A13;
-static const uint8_t A14 = PIN_A14;
-static const uint8_t A15 = PIN_A15;
-
-// A majority of the pins are NOT PCINTs, SO BE WARNED (i.e. you cannot use them as receive pins)
-// Only pins available for RECEIVE (TRANSMIT can be on any pin):
-// (I've deliberately left out pin mapping to the Hardware USARTs - seems senseless to me)
-// Pins: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69
-
-#define digitalPinToPCICR(p) ( (((p) >= 10) && ((p) <= 13)) || \
- (((p) >= 50) && ((p) <= 53)) || \
- (((p) >= 62) && ((p) <= 69)) ? (&PCICR) : ((uint8_t *)0) )
-
-#define digitalPinToPCICRbit(p) ( (((p) >= 10) && ((p) <= 13)) || (((p) >= 50) && ((p) <= 53)) ? 0 : \
- ( (((p) >= 62) && ((p) <= 69)) ? 2 : \
- 0 ) )
-
-#define digitalPinToPCMSK(p) ( (((p) >= 10) && ((p) <= 13)) || (((p) >= 50) && ((p) <= 53)) ? (&PCMSK0) : \
- ( (((p) >= 62) && ((p) <= 69)) ? (&PCMSK2) : \
- ((uint8_t *)0) ) )
-
-#define digitalPinToPCMSKbit(p) ( (((p) >= 10) && ((p) <= 13)) ? ((p) - 6) : \
- ( ((p) == 50) ? 3 : \
- ( ((p) == 51) ? 2 : \
- ( ((p) == 52) ? 1 : \
- ( ((p) == 53) ? 0 : \
- ( (((p) >= 62) && ((p) <= 69)) ? ((p) - 62) : \
- 0 ) ) ) ) ) )
-
-#define digitalPinToInterrupt(p) ((p) == 2 ? 0 : ((p) == 3 ? 1 : ((p) >= 18 && (p) <= 21 ? 23 - (p) : NOT_AN_INTERRUPT)))
-
-#ifdef ARDUINO_MAIN
-
-const uint16_t PROGMEM port_to_mode_PGM[] = {
- NOT_A_PORT,
- (uint16_t) &DDRA,
- (uint16_t) &DDRB,
- (uint16_t) &DDRC,
- (uint16_t) &DDRD,
- (uint16_t) &DDRE,
- (uint16_t) &DDRF,
- (uint16_t) &DDRG,
- (uint16_t) &DDRH,
- NOT_A_PORT,
- (uint16_t) &DDRJ,
- (uint16_t) &DDRK,
- (uint16_t) &DDRL,
-};
-
-const uint16_t PROGMEM port_to_output_PGM[] = {
- NOT_A_PORT,
- (uint16_t) &PORTA,
- (uint16_t) &PORTB,
- (uint16_t) &PORTC,
- (uint16_t) &PORTD,
- (uint16_t) &PORTE,
- (uint16_t) &PORTF,
- (uint16_t) &PORTG,
- (uint16_t) &PORTH,
- NOT_A_PORT,
- (uint16_t) &PORTJ,
- (uint16_t) &PORTK,
- (uint16_t) &PORTL,
-};
-
-const uint16_t PROGMEM port_to_input_PGM[] = {
- NOT_A_PIN,
- (uint16_t) &PINA,
- (uint16_t) &PINB,
- (uint16_t) &PINC,
- (uint16_t) &PIND,
- (uint16_t) &PINE,
- (uint16_t) &PINF,
- (uint16_t) &PING,
- (uint16_t) &PINH,
- NOT_A_PIN,
- (uint16_t) &PINJ,
- (uint16_t) &PINK,
- (uint16_t) &PINL,
-};
-
-const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
- // PORTLIST
- // -------------------------------------------
- PE , // PE 0 ** 0 ** USART0_RX
- PE , // PE 1 ** 1 ** USART0_TX
- PE , // PE 4 ** 2 ** PWM2
- PE , // PE 5 ** 3 ** PWM3
- PG , // PG 5 ** 4 ** PWM4
- PE , // PE 3 ** 5 ** PWM5
- PH , // PH 3 ** 6 ** PWM6
- PH , // PH 4 ** 7 ** PWM7
- PH , // PH 5 ** 8 ** PWM8
- PH , // PH 6 ** 9 ** PWM9
- PB , // PB 4 ** 10 ** PWM10
- PB , // PB 5 ** 11 ** PWM11
- PB , // PB 6 ** 12 ** PWM12
- PB , // PB 7 ** 13 ** PWM13
- PJ , // PJ 1 ** 14 ** USART3_TX
- PJ , // PJ 0 ** 15 ** USART3_RX
- PH , // PH 1 ** 16 ** USART2_TX
- PH , // PH 0 ** 17 ** USART2_RX
- PD , // PD 3 ** 18 ** USART1_TX
- PD , // PD 2 ** 19 ** USART1_RX
- PD , // PD 1 ** 20 ** I2C_SDA
- PD , // PD 0 ** 21 ** I2C_SCL
- PA , // PA 0 ** 22 ** D22
- PA , // PA 1 ** 23 ** D23
- PA , // PA 2 ** 24 ** D24
- PA , // PA 3 ** 25 ** D25
- PA , // PA 4 ** 26 ** D26
- PA , // PA 5 ** 27 ** D27
- PA , // PA 6 ** 28 ** D28
- PA , // PA 7 ** 29 ** D29
- PC , // PC 7 ** 30 ** D30
- PC , // PC 6 ** 31 ** D31
- PC , // PC 5 ** 32 ** D32
- PC , // PC 4 ** 33 ** D33
- PC , // PC 3 ** 34 ** D34
- PC , // PC 2 ** 35 ** D35
- PC , // PC 1 ** 36 ** D36
- PC , // PC 0 ** 37 ** D37
- PD , // PD 7 ** 38 ** D38
- PG , // PG 2 ** 39 ** D39
- PG , // PG 1 ** 40 ** D40
- PG , // PG 0 ** 41 ** D41
- PL , // PL 7 ** 42 ** D42
- PL , // PL 6 ** 43 ** D43
- PL , // PL 5 ** 44 ** D44
- PL , // PL 4 ** 45 ** D45
- PL , // PL 3 ** 46 ** D46
- PL , // PL 2 ** 47 ** D47
- PL , // PL 1 ** 48 ** D48
- PL , // PL 0 ** 49 ** D49
- PB , // PB 3 ** 50 ** SPI_MISO
- PB , // PB 2 ** 51 ** SPI_MOSI
- PB , // PB 1 ** 52 ** SPI_SCK
- PB , // PB 0 ** 53 ** SPI_SS
- PF , // PF 0 ** 54 ** A0
- PF , // PF 1 ** 55 ** A1
- PF , // PF 2 ** 56 ** A2
- PF , // PF 3 ** 57 ** A3
- PF , // PF 4 ** 58 ** A4
- PF , // PF 5 ** 59 ** A5
- PF , // PF 6 ** 60 ** A6
- PF , // PF 7 ** 61 ** A7
- PK , // PK 0 ** 62 ** A8
- PK , // PK 1 ** 63 ** A9
- PK , // PK 2 ** 64 ** A10
- PK , // PK 3 ** 65 ** A11
- PK , // PK 4 ** 66 ** A12
- PK , // PK 5 ** 67 ** A13
- PK , // PK 6 ** 68 ** A14
- PK , // PK 7 ** 69 ** A15
-};
-
-const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
- // PIN IN PORT
- // -------------------------------------------
- _BV( 0 ) , // PE 0 ** 0 ** USART0_RX
- _BV( 1 ) , // PE 1 ** 1 ** USART0_TX
- _BV( 4 ) , // PE 4 ** 2 ** PWM2
- _BV( 5 ) , // PE 5 ** 3 ** PWM3
- _BV( 5 ) , // PG 5 ** 4 ** PWM4
- _BV( 3 ) , // PE 3 ** 5 ** PWM5
- _BV( 3 ) , // PH 3 ** 6 ** PWM6
- _BV( 4 ) , // PH 4 ** 7 ** PWM7
- _BV( 5 ) , // PH 5 ** 8 ** PWM8
- _BV( 6 ) , // PH 6 ** 9 ** PWM9
- _BV( 4 ) , // PB 4 ** 10 ** PWM10
- _BV( 5 ) , // PB 5 ** 11 ** PWM11
- _BV( 6 ) , // PB 6 ** 12 ** PWM12
- _BV( 7 ) , // PB 7 ** 13 ** PWM13
- _BV( 1 ) , // PJ 1 ** 14 ** USART3_TX
- _BV( 0 ) , // PJ 0 ** 15 ** USART3_RX
- _BV( 1 ) , // PH 1 ** 16 ** USART2_TX
- _BV( 0 ) , // PH 0 ** 17 ** USART2_RX
- _BV( 3 ) , // PD 3 ** 18 ** USART1_TX
- _BV( 2 ) , // PD 2 ** 19 ** USART1_RX
- _BV( 1 ) , // PD 1 ** 20 ** I2C_SDA
- _BV( 0 ) , // PD 0 ** 21 ** I2C_SCL
- _BV( 0 ) , // PA 0 ** 22 ** D22
- _BV( 1 ) , // PA 1 ** 23 ** D23
- _BV( 2 ) , // PA 2 ** 24 ** D24
- _BV( 3 ) , // PA 3 ** 25 ** D25
- _BV( 4 ) , // PA 4 ** 26 ** D26
- _BV( 5 ) , // PA 5 ** 27 ** D27
- _BV( 6 ) , // PA 6 ** 28 ** D28
- _BV( 7 ) , // PA 7 ** 29 ** D29
- _BV( 7 ) , // PC 7 ** 30 ** D30
- _BV( 6 ) , // PC 6 ** 31 ** D31
- _BV( 5 ) , // PC 5 ** 32 ** D32
- _BV( 4 ) , // PC 4 ** 33 ** D33
- _BV( 3 ) , // PC 3 ** 34 ** D34
- _BV( 2 ) , // PC 2 ** 35 ** D35
- _BV( 1 ) , // PC 1 ** 36 ** D36
- _BV( 0 ) , // PC 0 ** 37 ** D37
- _BV( 7 ) , // PD 7 ** 38 ** D38
- _BV( 2 ) , // PG 2 ** 39 ** D39
- _BV( 1 ) , // PG 1 ** 40 ** D40
- _BV( 0 ) , // PG 0 ** 41 ** D41
- _BV( 7 ) , // PL 7 ** 42 ** D42
- _BV( 6 ) , // PL 6 ** 43 ** D43
- _BV( 5 ) , // PL 5 ** 44 ** D44
- _BV( 4 ) , // PL 4 ** 45 ** D45
- _BV( 3 ) , // PL 3 ** 46 ** D46
- _BV( 2 ) , // PL 2 ** 47 ** D47
- _BV( 1 ) , // PL 1 ** 48 ** D48
- _BV( 0 ) , // PL 0 ** 49 ** D49
- _BV( 3 ) , // PB 3 ** 50 ** SPI_MISO
- _BV( 2 ) , // PB 2 ** 51 ** SPI_MOSI
- _BV( 1 ) , // PB 1 ** 52 ** SPI_SCK
- _BV( 0 ) , // PB 0 ** 53 ** SPI_SS
- _BV( 0 ) , // PF 0 ** 54 ** A0
- _BV( 1 ) , // PF 1 ** 55 ** A1
- _BV( 2 ) , // PF 2 ** 56 ** A2
- _BV( 3 ) , // PF 3 ** 57 ** A3
- _BV( 4 ) , // PF 4 ** 58 ** A4
- _BV( 5 ) , // PF 5 ** 59 ** A5
- _BV( 6 ) , // PF 6 ** 60 ** A6
- _BV( 7 ) , // PF 7 ** 61 ** A7
- _BV( 0 ) , // PK 0 ** 62 ** A8
- _BV( 1 ) , // PK 1 ** 63 ** A9
- _BV( 2 ) , // PK 2 ** 64 ** A10
- _BV( 3 ) , // PK 3 ** 65 ** A11
- _BV( 4 ) , // PK 4 ** 66 ** A12
- _BV( 5 ) , // PK 5 ** 67 ** A13
- _BV( 6 ) , // PK 6 ** 68 ** A14
- _BV( 7 ) , // PK 7 ** 69 ** A15
-};
-
-const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
- // TIMERS
- // -------------------------------------------
- NOT_ON_TIMER , // PE 0 ** 0 ** USART0_RX
- NOT_ON_TIMER , // PE 1 ** 1 ** USART0_TX
- TIMER3B , // PE 4 ** 2 ** PWM2
- TIMER3C , // PE 5 ** 3 ** PWM3
- TIMER0B , // PG 5 ** 4 ** PWM4
- TIMER3A , // PE 3 ** 5 ** PWM5
- TIMER4A , // PH 3 ** 6 ** PWM6
- TIMER4B , // PH 4 ** 7 ** PWM7
- TIMER4C , // PH 5 ** 8 ** PWM8
- TIMER2B , // PH 6 ** 9 ** PWM9
- TIMER2A , // PB 4 ** 10 ** PWM10
- TIMER1A , // PB 5 ** 11 ** PWM11
- TIMER1B , // PB 6 ** 12 ** PWM12
- TIMER0A , // PB 7 ** 13 ** PWM13
- NOT_ON_TIMER , // PJ 1 ** 14 ** USART3_TX
- NOT_ON_TIMER , // PJ 0 ** 15 ** USART3_RX
- NOT_ON_TIMER , // PH 1 ** 16 ** USART2_TX
- NOT_ON_TIMER , // PH 0 ** 17 ** USART2_RX
- NOT_ON_TIMER , // PD 3 ** 18 ** USART1_TX
- NOT_ON_TIMER , // PD 2 ** 19 ** USART1_RX
- NOT_ON_TIMER , // PD 1 ** 20 ** I2C_SDA
- NOT_ON_TIMER , // PD 0 ** 21 ** I2C_SCL
- NOT_ON_TIMER , // PA 0 ** 22 ** D22
- NOT_ON_TIMER , // PA 1 ** 23 ** D23
- NOT_ON_TIMER , // PA 2 ** 24 ** D24
- NOT_ON_TIMER , // PA 3 ** 25 ** D25
- NOT_ON_TIMER , // PA 4 ** 26 ** D26
- NOT_ON_TIMER , // PA 5 ** 27 ** D27
- NOT_ON_TIMER , // PA 6 ** 28 ** D28
- NOT_ON_TIMER , // PA 7 ** 29 ** D29
- NOT_ON_TIMER , // PC 7 ** 30 ** D30
- NOT_ON_TIMER , // PC 6 ** 31 ** D31
- NOT_ON_TIMER , // PC 5 ** 32 ** D32
- NOT_ON_TIMER , // PC 4 ** 33 ** D33
- NOT_ON_TIMER , // PC 3 ** 34 ** D34
- NOT_ON_TIMER , // PC 2 ** 35 ** D35
- NOT_ON_TIMER , // PC 1 ** 36 ** D36
- NOT_ON_TIMER , // PC 0 ** 37 ** D37
- NOT_ON_TIMER , // PD 7 ** 38 ** D38
- NOT_ON_TIMER , // PG 2 ** 39 ** D39
- NOT_ON_TIMER , // PG 1 ** 40 ** D40
- NOT_ON_TIMER , // PG 0 ** 41 ** D41
- NOT_ON_TIMER , // PL 7 ** 42 ** D42
- NOT_ON_TIMER , // PL 6 ** 43 ** D43
- TIMER5C , // PL 5 ** 44 ** D44
- TIMER5B , // PL 4 ** 45 ** D45
- TIMER5A , // PL 3 ** 46 ** D46
- NOT_ON_TIMER , // PL 2 ** 47 ** D47
- NOT_ON_TIMER , // PL 1 ** 48 ** D48
- NOT_ON_TIMER , // PL 0 ** 49 ** D49
- NOT_ON_TIMER , // PB 3 ** 50 ** SPI_MISO
- NOT_ON_TIMER , // PB 2 ** 51 ** SPI_MOSI
- NOT_ON_TIMER , // PB 1 ** 52 ** SPI_SCK
- NOT_ON_TIMER , // PB 0 ** 53 ** SPI_SS
- NOT_ON_TIMER , // PF 0 ** 54 ** A0
- NOT_ON_TIMER , // PF 1 ** 55 ** A1
- NOT_ON_TIMER , // PF 2 ** 56 ** A2
- NOT_ON_TIMER , // PF 3 ** 57 ** A3
- NOT_ON_TIMER , // PF 4 ** 58 ** A4
- NOT_ON_TIMER , // PF 5 ** 59 ** A5
- NOT_ON_TIMER , // PF 6 ** 60 ** A6
- NOT_ON_TIMER , // PF 7 ** 61 ** A7
- NOT_ON_TIMER , // PK 0 ** 62 ** A8
- NOT_ON_TIMER , // PK 1 ** 63 ** A9
- NOT_ON_TIMER , // PK 2 ** 64 ** A10
- NOT_ON_TIMER , // PK 3 ** 65 ** A11
- NOT_ON_TIMER , // PK 4 ** 66 ** A12
- NOT_ON_TIMER , // PK 5 ** 67 ** A13
- NOT_ON_TIMER , // PK 6 ** 68 ** A14
- NOT_ON_TIMER , // PK 7 ** 69 ** A15
-};
-
-#endif
-
-// These serial port names are intended to allow libraries and architecture-neutral
-// sketches to automatically default to the correct port name for a particular type
-// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
-// the first hardware serial port whose RX/TX pins are not dedicated to another use.
-//
-// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
-//
-// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
-//
-// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
-//
-// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
-//
-// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
-// pins are NOT connected to anything by default.
-#define SERIAL_PORT_MONITOR Serial
-#define SERIAL_PORT_HARDWARE Serial
-#define SERIAL_PORT_HARDWARE1 Serial1
-#define SERIAL_PORT_HARDWARE2 Serial2
-#define SERIAL_PORT_HARDWARE3 Serial3
-#define SERIAL_PORT_HARDWARE_OPEN Serial1
-#define SERIAL_PORT_HARDWARE_OPEN1 Serial2
-#define SERIAL_PORT_HARDWARE_OPEN2 Serial3
-
-#endif
diff --git a/variants/standard/pins_arduino.h b/variants/standard/pins_arduino.h
deleted file mode 100644
index 2ea0190..0000000
--- a/variants/standard/pins_arduino.h
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- pins_arduino.h - Pin definition functions for Arduino
- Part of Arduino - http://www.arduino.cc/
-
- Copyright (c) 2007 David A. Mellis
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General
- Public License along with this library; if not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- Boston, MA 02111-1307 USA
-*/
-
-#ifndef Pins_Arduino_h
-#define Pins_Arduino_h
-
-#include <avr/pgmspace.h>
-
-#define NUM_DIGITAL_PINS 20
-#define NUM_ANALOG_INPUTS 6
-#define analogInputToDigitalPin(p) ((p < 6) ? (p) + 14 : -1)
-
-#if defined(__AVR_ATmega8__)
-#define digitalPinHasPWM(p) ((p) == 9 || (p) == 10 || (p) == 11)
-#else
-#define digitalPinHasPWM(p) ((p) == 3 || (p) == 5 || (p) == 6 || (p) == 9 || (p) == 10 || (p) == 11)
-#endif
-
-#define PIN_SPI_SS (10)
-#define PIN_SPI_MOSI (11)
-#define PIN_SPI_MISO (12)
-#define PIN_SPI_SCK (13)
-
-static const uint8_t SS = PIN_SPI_SS;
-static const uint8_t MOSI = PIN_SPI_MOSI;
-static const uint8_t MISO = PIN_SPI_MISO;
-static const uint8_t SCK = PIN_SPI_SCK;
-
-#define PIN_WIRE_SDA (18)
-#define PIN_WIRE_SCL (19)
-
-static const uint8_t SDA = PIN_WIRE_SDA;
-static const uint8_t SCL = PIN_WIRE_SCL;
-
-#define LED_BUILTIN 13
-
-#define PIN_A0 (14)
-#define PIN_A1 (15)
-#define PIN_A2 (16)
-#define PIN_A3 (17)
-#define PIN_A4 (18)
-#define PIN_A5 (19)
-#define PIN_A6 (20)
-#define PIN_A7 (21)
-
-static const uint8_t A0 = PIN_A0;
-static const uint8_t A1 = PIN_A1;
-static const uint8_t A2 = PIN_A2;
-static const uint8_t A3 = PIN_A3;
-static const uint8_t A4 = PIN_A4;
-static const uint8_t A5 = PIN_A5;
-static const uint8_t A6 = PIN_A6;
-static const uint8_t A7 = PIN_A7;
-
-#define digitalPinToPCICR(p) (((p) >= 0 && (p) <= 21) ? (&PCICR) : ((uint8_t *)0))
-#define digitalPinToPCICRbit(p) (((p) <= 7) ? 2 : (((p) <= 13) ? 0 : 1))
-#define digitalPinToPCMSK(p) (((p) <= 7) ? (&PCMSK2) : (((p) <= 13) ? (&PCMSK0) : (((p) <= 21) ? (&PCMSK1) : ((uint8_t *)0))))
-#define digitalPinToPCMSKbit(p) (((p) <= 7) ? (p) : (((p) <= 13) ? ((p) - 8) : ((p) - 14)))
-
-#define digitalPinToInterrupt(p) ((p) == 2 ? 0 : ((p) == 3 ? 1 : NOT_AN_INTERRUPT))
-
-#ifdef ARDUINO_MAIN
-
-// On the Arduino board, digital pins are also used
-// for the analog output (software PWM). Analog input
-// pins are a separate set.
-
-// ATMEL ATMEGA8 & 168 / ARDUINO
-//
-// +-\/-+
-// PC6 1| |28 PC5 (AI 5)
-// (D 0) PD0 2| |27 PC4 (AI 4)
-// (D 1) PD1 3| |26 PC3 (AI 3)
-// (D 2) PD2 4| |25 PC2 (AI 2)
-// PWM+ (D 3) PD3 5| |24 PC1 (AI 1)
-// (D 4) PD4 6| |23 PC0 (AI 0)
-// VCC 7| |22 GND
-// GND 8| |21 AREF
-// PB6 9| |20 AVCC
-// PB7 10| |19 PB5 (D 13)
-// PWM+ (D 5) PD5 11| |18 PB4 (D 12)
-// PWM+ (D 6) PD6 12| |17 PB3 (D 11) PWM
-// (D 7) PD7 13| |16 PB2 (D 10) PWM
-// (D 8) PB0 14| |15 PB1 (D 9) PWM
-// +----+
-//
-// (PWM+ indicates the additional PWM pins on the ATmega168.)
-
-// ATMEL ATMEGA1280 / ARDUINO
-//
-// 0-7 PE0-PE7 works
-// 8-13 PB0-PB5 works
-// 14-21 PA0-PA7 works
-// 22-29 PH0-PH7 works
-// 30-35 PG5-PG0 works
-// 36-43 PC7-PC0 works
-// 44-51 PJ7-PJ0 works
-// 52-59 PL7-PL0 works
-// 60-67 PD7-PD0 works
-// A0-A7 PF0-PF7
-// A8-A15 PK0-PK7
-
-
-// these arrays map port names (e.g. port B) to the
-// appropriate addresses for various functions (e.g. reading
-// and writing)
-const uint16_t PROGMEM port_to_mode_PGM[] = {
- NOT_A_PORT,
- NOT_A_PORT,
- (uint16_t) &DDRB,
- (uint16_t) &DDRC,
- (uint16_t) &DDRD,
-};
-
-const uint16_t PROGMEM port_to_output_PGM[] = {
- NOT_A_PORT,
- NOT_A_PORT,
- (uint16_t) &PORTB,
- (uint16_t) &PORTC,
- (uint16_t) &PORTD,
-};
-
-const uint16_t PROGMEM port_to_input_PGM[] = {
- NOT_A_PORT,
- NOT_A_PORT,
- (uint16_t) &PINB,
- (uint16_t) &PINC,
- (uint16_t) &PIND,
-};
-
-const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
- PD, /* 0 */
- PD,
- PD,
- PD,
- PD,
- PD,
- PD,
- PD,
- PB, /* 8 */
- PB,
- PB,
- PB,
- PB,
- PB,
- PC, /* 14 */
- PC,
- PC,
- PC,
- PC,
- PC,
-};
-
-const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
- _BV(0), /* 0, port D */
- _BV(1),
- _BV(2),
- _BV(3),
- _BV(4),
- _BV(5),
- _BV(6),
- _BV(7),
- _BV(0), /* 8, port B */
- _BV(1),
- _BV(2),
- _BV(3),
- _BV(4),
- _BV(5),
- _BV(0), /* 14, port C */
- _BV(1),
- _BV(2),
- _BV(3),
- _BV(4),
- _BV(5),
-};
-
-const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
- NOT_ON_TIMER, /* 0 - port D */
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- // on the ATmega168, digital pin 3 has hardware pwm
-#if defined(__AVR_ATmega8__)
- NOT_ON_TIMER,
-#else
- TIMER2B,
-#endif
- NOT_ON_TIMER,
- // on the ATmega168, digital pins 5 and 6 have hardware pwm
-#if defined(__AVR_ATmega8__)
- NOT_ON_TIMER,
- NOT_ON_TIMER,
-#else
- TIMER0B,
- TIMER0A,
-#endif
- NOT_ON_TIMER,
- NOT_ON_TIMER, /* 8 - port B */
- TIMER1A,
- TIMER1B,
-#if defined(__AVR_ATmega8__)
- TIMER2,
-#else
- TIMER2A,
-#endif
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER, /* 14 - port C */
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
-};
-
-#endif
-
-// These serial port names are intended to allow libraries and architecture-neutral
-// sketches to automatically default to the correct port name for a particular type
-// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
-// the first hardware serial port whose RX/TX pins are not dedicated to another use.
-//
-// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
-//
-// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
-//
-// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
-//
-// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
-//
-// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
-// pins are NOT connected to anything by default.
-#define SERIAL_PORT_MONITOR Serial
-#define SERIAL_PORT_HARDWARE Serial
-
-#endif