From 9c042eb388073ae2a55856efbeddd5f9adb58e3d Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Wed, 6 May 2020 20:23:04 +0200 Subject: [PATCH] boards/atmega1284p: Default programmer, fix doc The AVR Dragon, previously the cheapest debugger/programmer for AVR, is out of production. The default debugger for AVR devices has been changed to the Atmel ICE, the now cheapest debugger option. The commit updates the documentation accordingly. Additionally the default programmer is changed to the Atmel ICE for consistency. The doc is updated accordingly. --- boards/atmega1284p/Makefile.include | 2 +- boards/atmega1284p/doc.txt | 25 ++++++++++++------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/boards/atmega1284p/Makefile.include b/boards/atmega1284p/Makefile.include index 0959205d35..bc1a2dfce4 100644 --- a/boards/atmega1284p/Makefile.include +++ b/boards/atmega1284p/Makefile.include @@ -5,7 +5,7 @@ BAUD ?= 9600 ATMEGA1284P_CLOCK ?= # Allow overwriting programmer via env variables without affecting other boards -PROGRAMMER_BOARD_ATMEGA1284P ?= dragon_isp +PROGRAMMER_BOARD_ATMEGA1284P ?= atmelice # ICSP programmer to use for avrdude PROGRAMMER ?= $(PROGRAMMER_BOARD_ATMEGA1284P) diff --git a/boards/atmega1284p/doc.txt b/boards/atmega1284p/doc.txt index fd9f263290..f76bc7a729 100644 --- a/boards/atmega1284p/doc.txt +++ b/boards/atmega1284p/doc.txt @@ -46,10 +46,10 @@ fuse is set, so that the clock is divided down to 1MHz. By disabling the can be done with: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -avrdude -c dragon_isp -p m1284p -B 32 -U lfuse:w:0xc2:m +avrdude -c atmelice -p m1284p -B 32 -U lfuse:w:0xc2:m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -(Replace `dragon_isp` with the programmer you are using. The -B 32 might be +(Replace `atmelice` with the programmer you are using. The -B 32 might be needed for some programmers to successfully communicate with ATmegas clocked at less than 2MHz. It will no longer be needed after disabling `CKDIV8`.) @@ -80,8 +80,8 @@ needed. Connect the programmer as follows: | RESET | 9/RESET | | Ground | 11/GND | -The tool `avrdude` needs to be installed. When using the AVR Dragon for -programming, running +The tool `avrdude` needs to be installed. When using the Atmel ICE for +connected via JTAG for programming, running make BOARD=atmega1284p flash @@ -100,21 +100,20 @@ the TTL adapter. Usually everything between 3.3 V and 5 V should work. ## On-Chip Debugging -In order to debug the ATmega1284P, an compatible debugger is needed. The AVR -Dragon is the ~~cheapest~~ least expensive option currently available. (But at -least it can program and debug pretty much all AVRs and can even be used to -de-brick ATmega MCUs using high voltage programming.) +In order to debug the ATmega1284P, an compatible debugger is needed. The Atmel +ICE is the ~~cheapest~~ least expensive option currently available. (But at +least it can program and debug pretty much all Atmel AVR and ARM chips.) -Once the AVR Dragon is correctly connected, the ATmega1284P has the JTAG +Once the Atmel ICE is correctly connected, the ATmega1284P has the JTAG interface enabled, and the required software is installed, debugging can be started using make debug -@note If you are using a different debugger than the AVR Dragon, you have +@note If you are using a different debugger than the Atmel ICE, you have to export the `AVR_DEBUGDEVICE` environment variable to the required - flag to pass to AVaRICE, e.g. when using the Atmel-ICE you have to - export `AVR_DEBUGDEVICE=--edbg`. If the debug device is not + flag to pass to AVaRICE, e.g. when using the AVR Dragon you have to + export `AVR_DEBUGDEVICE=--dragon`. If the debug device is not connected via USB, you also need to export `AVR_DEBUGINTERFACE` to the correct value. @@ -128,7 +127,7 @@ version of AVaRICE, you'll have to build the tool from source. ### JTAG Pin Mapping -| Pin Name | Pin | Signal | AVR Dragon Pin | +| Pin Name | Pin | Signal | Atmel ICE Pin | |:----------|:------|:----------|:------------------| | PC5 | 27 | TDI | JTAG-9 | | PC4 | 26 | TDO | JTAG-3 |