To use the Atmel-ICE programmer on linux, make sure to add the following udev rule first:
sudo vi /etc/udev/rules.d/77-atmel-ice_jtag_swd.rules
And insert the following two lines:
# Atmel-ICE JTAG/SWD in-circuit debugger SUBSYSTEM=="usb", ATTR{idVendor}=="03eb", ATTR{idProduct}=="2141", GROUP="dialout", MODE="666"
If required, add yourself to the dialout group (First verify with the groups command if you are already listed in that group)
(Optional) usermod -a -G dialout ${USER}
Reload udev rules:
sudo udevadm control --reload-rules
The pinout from the Arduino Micro as seen from above is:
* * * * * * * * * * * * * * * * * (SWITCH) USB PORT ARDUINO (2) (4) (6) MICRO (1) (3) (5) * * * * * * * * * * * * * * * * *
The pinout from the 6-pin IDC connector from the cable that came with the Atmel-ICE as seen from the top:
+-----+-----+-----+ ! 2 ! 4 ! 6 ! +-----+-----+-----+ ! 1 ! 3 ! 5 ! +-----+-----+-----+ +++++++
To connect the Atmel-ICE to an Arduino Micro, use the cable that came with the Atmel-ICE. Insert the 50-mil 10-pin JTAG connector, at the “AVR” port (See marking at the top of the enclosure. It is the port which is at the right side, away from where the 3 LEDs are) at the Atmel-ICE and the other 6-pin IDC connector at the Arduino Micro.
Atmel-ICE | ARDUINO MICRO |
---|---|
MISO | MISO (1) |
5V | Vcc (2) |
SCK | CLK (3) |
MOSI | MOSI (4) |
CS | RESET (5) |
GND | GND (6) |
The Arduino micro cannot be powered from the Atmel-ICE. An external 5v power is required.
When connected it should look like the following picture:
"$HOME/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino18/bin/avrdude" -C"$HOME/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino18/etc/avrdude.conf" -v -patmega32u4 -catmelice_isp -Pusb -Uflash:w:/tmp/arduino_build_987637/Blink.ino.hex:i
vrdude: Version 6.3-20201216 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2014 Joerg Wunsch System wide configuration file is "$HOME/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino18/etc/avrdude.conf" User configuration file is "$HOME/.avrduderc" User configuration file does not exist or is not a regular file, skipping Using Port : usb Using Programmer : atmelice_isp avrdude: usbdev_open(): Found Atmel-ICE CMSIS-DAP, serno: J42700064543 avrdude: max packet size expected 912, but found 512 due to EP 0x01's wMaxPacketSize avrdude: Found CMSIS-DAP compliant device, using EDBG protocol AVR Part : ATmega32U4 Chip Erase delay : 9000 us PAGEL : PD7 BS2 : PA0 RESET disposition : dedicated RETRY pulse : SCK serial program mode : yes parallel program mode : yes Timeout : 200 StabDelay : 100 CmdexeDelay : 25 SyncLoops : 32 ByteDelay : 0 PollIndex : 3 PollValue : 0x53 Memory Detail : Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- eeprom 65 20 4 0 no 1024 4 0 9000 9000 0x00 0x00 flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00 lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00 signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 Programmer Type : JTAG3_ISP Description : Atmel-ICE (ARM/AVR) in ISP mode Vtarget : 5.0 V SCK period : 125.00 us avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.02s avrdude: Device signature = 0x1e9587 (probably m32u4) avrdude: safemode: lfuse reads as FF avrdude: safemode: hfuse reads as D8 avrdude: safemode: efuse reads as CB avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option. avrdude: erasing chip avrdude: reading input file "/tmp/arduino_build_987637/Blink.ino.hex" avrdude: writing flash (3958 bytes): Writing | ################################################## | 100% 16.21s avrdude: 3958 bytes of flash written avrdude: verifying flash memory against /tmp/arduino_build_987637/Blink.ino.hex: avrdude: load data flash data from input file /tmp/arduino_build_987637/Blink.ino.hex: avrdude: input file /tmp/arduino_build_987637/Blink.ino.hex contains 3958 bytes avrdude: reading on-chip flash data: Reading | ################################################## | 100% 16.24s avrdude: verifying ... avrdude: 3958 bytes of flash verified avrdude: safemode: lfuse reads as FF avrdude: safemode: hfuse reads as D8 avrdude: safemode: efuse reads as CB avrdude: safemode: Fuses OK (E:CB, H:D8, L:FF) avrdude done. Thank you.