Atmel-ICE & Avrdude for AVR® Programming In Mass Production

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

In the application note AN2466 : "Using Atmel-ICE for AVR® Programming In Mass Production",

atprogram can be used with serial number (-s option), "when more than one programmer is used"

 

 

 

But unfortunately, I do not found how to specify this in avrdude.

 

I know that I can specify the port but this changes ...

 

So is there another way to do that ?

 

Thanks.

 

 

AVR inside

Last Edited: Sat. Aug 15, 2020 - 02:53 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

doomstar wrote:
I know that I can specify the port but this changes ...
A COM port (USB CDC ACM); Atmel-ICE is USB HID for programming.

Atmel AVRISP mkII will have a fixed COM as its serial number is in the USB device descriptor (IIRC)

Might try this :

avrdude-doc-6.3.pdf

[mid-page 14]

-P port

[third paragraph]

For the JTAG ICE mkII, if AVRDUDE has been built with libusb support, port may alternatively be specified as usb[:serialno]. In that case, the JTAG ICE mkII will be looked up on USB. If serialno is also specified, it will be matched against the serial number read from any JTAG ICE mkII found on USB. The match is done after stripping any existing colons from the given serial number, and right-to-left, so only the least significant bytes from the serial number need to be given. For a trick how to find out the serial numbers of all JTAG ICEs attached to USB, see Section 2.3 [Example Command Line Invocations], page 17.

[example on page 20 or PDF page 24]

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

gchapman wrote:

avrdude-doc-6.3.pdf

Many thanks !

 

Tested with 2 Atmel  Ice simultaneously connected to my pc and it works perfectly

 

To get all Atmel Ice connected :

avrdude -c atmelice_updi -p m4809 -P usb:xxx -v

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/usr/local/etc/avrdude.conf"
         User configuration file is "/home/doom/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb:xxx
         Using Programmer              : atmelice_updi
avrdude: usbhid_open(): Found Atmel-ICE CMSIS-DAP, serno: J42700020548
avrdude: usbhid_open(): Found Atmel-ICE CMSIS-DAP, serno: J42700018154
avrdude: usbhid_open(): No matching device found
avrdude: usbdev_open(): Found Atmel-ICE CMSIS-DAP, serno: J42700020548
avrdude: usbdev_open(): Found Atmel-ICE CMSIS-DAP, serno: J42700018154
avrdude: jtag3_open_common(): Did not find any device matching VID 0x03eb and PID list: 0x2141

avrdude done.  Thank you.

 

Then use with given serial numbers like this :

 

avrdude -c atmelice_updi -p m4809 -P usb:J42700020548

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.07s

avrdude: Device signature = 0x1e9651 (probably m4809)

avrdude: safemode: Fuses OK (E:FF, H:FF, L:FF)

avrdude done.  Thank you.

 

AVR inside