Multi use AVR-ISP-mkII not possible because same serial

Started by Fred71, February 03, 2015, 02:26:31 PM

Previous topic - Next topic

Fred71

Hi,

Windows 7 32 bit and avrdude 5.11 (i use devices with libusb and libUSB-AVRISP-MKII.hex).

I want to programm Atmel with the nice AVR-ISP-mk2 of olimex and avrdude.

But each device have the same serial, so it is not possibel to speak to each programmer seperatly.

Like:

avrdude -p m328p -b 115200 -c avrispmkII -P usb:000200012345 -e -U flash:w:optiboot_atmega328.hex

How is it possible to change the serial for each programmer?

JohnS

Reading the product page it says you have to use AVR Studio.

John

Fred71

? i donĀ“t get the sense of your post.

avr456-studio-avrisp-mkII software on programmer = avr studio
libUSB-AVRISP-MKII software on programmer = avrdude.

This works.

But not with serial because each programmer have the SAME serial. (200012345)

i want to use more than one programmer with avrdude.

JohnS

I don't see where they say you can do what you wish (they appear to avoid saying it) but I do see where they say you can do it using AVR Studio.

John

Fred71

ok, problem solved.

I opened flip, selected "AT90USB162", opened "libUSB-AVRISP-MKII.hex" (load hex File) and then you can go to Buffer - edit and at the first few lines there is the serial inside like

00080  00 02 01 02 03 01 04 03 09 04 0C 03 41 00 54 00  ............A.T.
00090  4D 00 45 00 4C 00 00 00 18 03 41 00 56 00 52 00  M.E.L.....A.V.R.
000A0  49 00 53 00 50 00 20 00 6D 00 6B 00 49 00 49 00  I.S.P. .m.k.I.I.
000B0  00 00 1C 03 30 00 30 00 30 00 32 00 30 00 30 00  ....0.0.0.2.0.0.
000C0  30 00 31 00 32 00 33 00 34 00 35 00 00 00 00 00  0.1.2.3.4.5.....

and i edited it like

00080  00 02 01 02 03 01 04 03 09 04 0C 03 41 00 54 00  ............A.T.
00090  4D 00 45 00 4C 00 00 00 18 03 41 00 56 00 52 00  M.E.L.....A.V.R.
000A0  49 00 53 00 50 00 20 00 6D 00 6B 00 49 00 49 00  I.S.P. .m.k.I.I.
000B0  00 00 1C 03 30 00 30 00 30 00 32 00 30 00 30 00  ....0.0.0.2.0.0.
000C0  30 00 31 00 32 00 33 00 34 00 37 00 00 00 00 00  0.1.2.3.4.7.....

and now it is possible to use more than one programmer with arvdude and usb:serial.

of course each programmer needs its own serial^^



LubOlimex

#5
That is great work Fred71, thank you for sharing!

Thank you John S, the product page really needed a mention about AVRDUDE.
Technical support and documentation manager at Olimex

venkat2k

I have a need to use 2/3 AVR-ISP-MKII devices.. I bought a few, and was stumped with the same issue.
Even though AVRDUDE is a possible solution, I prefer to use STK500 ie., ATMEL Studio 4.X How can I get different serial numbers ? Does Olimex provide them for a cost.
What hex editor should I use to be able to make this fix, as suggested earlier in this thread.
If it is possible to change the HEX in the FW, (AVR456-studio-AVRISP-MKII.hex FW).


venkat2k

Quote from: venkat2k on April 19, 2015, 01:25:00 AM
I have a need to use 2/3 AVR-ISP-MKII devices.. I bought a few, and was stumped with the same issue.
Even though AVRDUDE is a possible solution, I prefer to use STK500 ie., ATMEL Studio 4.X How can I get different serial numbers ? Does Olimex provide them for a cost.
What hex editor should I use to be able to make this fix, as suggested earlier in this thread.
If it is possible to change the HEX in the FW, (AVR456-studio-AVRISP-MKII.hex FW).

In an attempt to answer my own question  :)
After looking at Fred71's solution, I opened the HEX file in a notepad editor and other hex editors,
I was not able to simply look at the serial number. The intel HEX format if modified when saving needs to have the check sum at the end to be correct.

from what I found line 643 requires to be edited.
Standard Serial number ends in 5
:102820003100320033003400350000000000415612

for serial ending in 6
:102820003100320033003400360000000000415611

for serial ending in 7
:102820003100320033003400370000000000415610

the checksum in green is the 2's complement of the sum of all the bytes.

I am going to try it and see how this works, on one of the many I AVR-ISP-MK2's I have bought, and post back.


venkat2k

Quote from: venkat2k on April 19, 2015, 05:08:06 PM
Quote from: venkat2k on April 19, 2015, 01:25:00 AM
I have a need to use 2/3 AVR-ISP-MKII devices.. I bought a few, and was stumped with the same issue.
Even though AVRDUDE is a possible solution, I prefer to use STK500 ie., ATMEL Studio 4.X How can I get different serial numbers ? Does Olimex provide them for a cost.
What hex editor should I use to be able to make this fix, as suggested earlier in this thread.
If it is possible to change the HEX in the FW, (AVR456-studio-AVRISP-MKII.hex FW).

In an attempt to answer my own question  :)
After looking at Fred71's solution, I opened the HEX file in a notepad editor and other hex editors,
I was not able to simply look at the serial number. The intel HEX format if modified when saving needs to have the check sum at the end to be correct.

from what I found line 643 requires to be edited.
Standard Serial number ends in 5
:102820003100320033003400350000000000415612

for serial ending in 6
:102820003100320033003400360000000000415611

for serial ending in 7
:102820003100320033003400370000000000415610

the checksum in green is the 2's complement of the sum of all the bytes.

I am going to try it and see how this works, on one of the many I AVR-ISP-MK2's I have bought, and post back.

** SOLVED **
Works Great. AVR-ISP-MK2 user manual was clear and helpful..
Fired off 2 programming shells at the same time on 2 Programmers, by individually calling their serial numbers..

STK500.EXE -dATmega328P -e -fD9E2 -FD9E2 -EFF -ifTEST.HEX -pf -vf -cUSB:000200212345

STK500.EXE -dATmega328P -e -fD9E2 -FD9E2 -EFF -ifTEST1.HEX -pf -vf -cUSB:000200212346

each of these on 2 seperate command windows in WIN 7.
Will try to post some screen caps and pics shortly.

Fred71

i think you flash the programmers with flip? For that i postet this solution to edit serial.

Quote from: Fred71 on February 03, 2015, 07:07:11 PM
ok, problem solved.

I opened flip, selected "AT90USB162", opened "libUSB-AVRISP-MKII.hex" (load hex File) and then you can go to Buffer - edit and at the first few lines there is the serial inside like

00080  00 02 01 02 03 01 04 03 09 04 0C 03 41 00 54 00  ............A.T.
00090  4D 00 45 00 4C 00 00 00 18 03 41 00 56 00 52 00  M.E.L.....A.V.R.
000A0  49 00 53 00 50 00 20 00 6D 00 6B 00 49 00 49 00  I.S.P. .m.k.I.I.
000B0  00 00 1C 03 30 00 30 00 30 00 32 00 30 00 30 00  ....0.0.0.2.0.0.
000C0  30 00 31 00 32 00 33 00 34 00 35 00 00 00 00 00  0.1.2.3.4.5.....

and i edited it like

00080  00 02 01 02 03 01 04 03 09 04 0C 03 41 00 54 00  ............A.T.
00090  4D 00 45 00 4C 00 00 00 18 03 41 00 56 00 52 00  M.E.L.....A.V.R.
000A0  49 00 53 00 50 00 20 00 6D 00 6B 00 49 00 49 00  I.S.P. .m.k.I.I.
000B0  00 00 1C 03 30 00 30 00 30 00 32 00 30 00 30 00  ....0.0.0.2.0.0.
000C0  30 00 31 00 32 00 33 00 34 00 37 00 00 00 00 00  0.1.2.3.4.7.....

and now it is possible to use more than one programmer with arvdude and usb:serial.

of course each programmer needs its own serial^^

concrain

Where did you download the AVR456-studio-AVRISP-MKII.hex?  I have looked all over this site with no luck.

Fred71

you find it at the product: https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/open-source-hardware

there is software - Firmware files and drivers for AVR/Atmel Studio and/or Arduino/AVRDUDE and inside the zip File there it is...