项目作者: popovec

项目描述 :
UPDITOOL - utility for flashing Microchip mega0/AVR DA series
高级语言: C
项目地址: git://github.com/popovec/upditool.git
创建时间: 2020-10-17T06:59:18Z
项目社区:https://github.com/popovec/upditool

开源协议:GNU General Public License v3.0

下载


upditool

tool for flashing new Microchip MCU (mega0/AVR series).


Hardware

Supports USB-SERIAL TTL adapter as programmer. Several types of USB
to serial converter can be used, here connection schematics:

  1. PL2303HX UART
  2. CP2102/CP2109 UART
  3. CH340 UART
  4. Microchip UPDI device
  5. +---------+ +--------------------+
  6. | 3.3/5V +-------------------+ Vcc |
  7. +----| | | |
  8. | U | RX +--------------+----+ UPDI |
  9. | S | | | | |
  10. | B | | +------+ | | |
  11. +----| TX +---| 2k2 |---+ | |
  12. | | +------+ | |
  13. | GND +-------------------+ GND |
  14. +---------+ +--------------------+

Status

AVR128DA(28,32,48,64):

(serial speed 115200 or 230400)

  1. CHIP ERASE OK
  2. FLASH read/write OK
  3. EEPROM read/write OK
  4. FUSES read/write OK
  5. LOCK read/write OK
  6. USERROW read/write OK
  7. USERROW write on locked device OK
  8. SIGNATURE read OK
  9. TEMPSENSE read OK
  10. SERIAL read OK

To list all available memory regions use:

  1. upditool -p avr128da32 -P /dev/null -U help:::

To list supported devices use:

  1. upditool -p help -P /dev/null

No TINY0/1 devices support for now

  1. (due missing specifications in device_avr.h)

Examples

(upditool tries to use the same command line switches as avrdude)

read flash into file flash.bin (raw)

  1. upditool -U flash:r:flash.bin:r -p avr128da32 -P /dev/ttyUSB2

read eeprom into file eeprom.hex (intel hex):

  1. upditool -U eeprom:r:eeprom.bin:i -p avr128da32 -P /dev/ttyUSB2

write userrow (only 1st two bytes) from command line immediete arguments

  1. upditool -p avr128da32 -P /dev/ttyUSB2 -U userrow:w:0x55,0xaa:m

multiple memories verify/read:

  1. upditool -U signature:v:0x1e,0x97,0x09:m -U serial:r:/dev/null:h
  2. -U eeprom:r:-:h -U TEMPSENSE0:r:-:h -U TEMPSENSE1:r:-:h
  3. -U lock:r:-:h -U userrow:r:-:h
  4. -p avr128da32 -P /dev/ttyUSB2

lock device

  1. upditool -p avr128da32 -P /dev/ttyUSB2 -U lock0:w:0x00:m

Compilation

make

copy “upditool” to your favorite directory for local executables

debian users:

fakeroot debian/rules binary

then install package

WIN 10

The preferred method is compilation in a Linux environment or you can use WSL.
https://docs.microsoft.com/en-us/windows/wsl/install-win10

Please install packages and run compilation:

  1. apt install git make mingw-w64
  2. git clone https://github.com/popovec/upditool
  3. cd upditool
  4. make upditool.exe

I wrote this software, because support for AVR DA devices is incomplete in
https://github.com/mraardvark/pyupdi (Sep 2020)

Many thanks for inspiration to:
https://github.com/mraardvark,
https://github.com/Polarisru/updiprog

Special thanks to
https://www.avrfreaks.net/forum/which-updi#comment-2391851
(BOOTDONE, OCD KEY etc..)