-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AVRDUDE flashing eeprom with error using "Arduino as ISP" for ATMEGA128 #1337
Comments
What if you try the latest git version? You can either build from source, or use github action version. |
BTW, if you use Before I got the shield I used ribbon cables and I often had connection issues. After I got the shield, it becomes much more stable. One example of the AVR ISP Shield. There are other versions. BTW, you can also boost the ISP speed to 57600 bps by optimizing the "Arduino as ISP" sketch. You can also use the ScratchMonkey to use Ref: #1088 |
I use the nightly build from : https://github.com/avrdudes/avrdude/wiki/Getting-Nightly-Builds-for-AVRDUDE About the bad connection, it's unlikly because i works fine in windows (i keep the same board / link / wires). In my case i have soldered some wire to the uC. |
I see. No problem. I can check on myside as well to see if I can reproduce the issue or not. |
Do all .eep hex files trigger this error? Does the error only appear on sections with 0xff? If it's only specific files, please share a problematic one. Please share a log with higher verbosity ( |
Hi, Yes all files (not empty) triggers the issue. |
I should be able to test this over the weekend on my Raspberry Pi 400. |
Sorry I can not find my ATmega128A breakout board so this will be delayed. I will leave this issue as |
I have switch to my pickit4 now without issues (drop to use my ardunio uno as programmer). |
That is certainly a much better choice than |
What is the host (as well as OS version)? Is this a normal Intel/AMD Windows PC or Windoes on ARM? Take note the original report shows that there is no issue on Windows PC, but only on Raspberry Pi 64. What kind of setup do you use? "Arduino as ISP" can be not so stable if you use wires to connect to the target. |
I use Intel Windows 10 PC. Command for writing eeprom: |
@Tim666 Try |
@stefanrueger Thanks a lot!!!! |
@Tim666 If |
@stefanrueger As I understand... now... the command |
Just wondering which "Arduino as ISP" sketch do you use? Are you using the version comes as an Example from Arduino IDE? Last time there is a report of using the Adfruit version which does not work with EEPROM. |
No issues here under Windows 11.
As mentioned before, the "Arduino as ISP" sketech is a bit fragile and you need good connections. Here is my setup. |
All in all "Arduino as ISP" should not be used as a regular programmer, rather you can use it occassionally. I will recommend getting a more proper programmer. For hobbist, usbasp is a good one to use. usbtinyisp can be used as well but it is not as good as usbasp. You can also get clones of STK500v2 and AVRIP mkii. If you are interested in modern UPDI AVR chip as well, then Microchip SNAP or PICKit 4 is a good investment. But if there is a budget constraint, then you can use things like serialupdi. If you still want to use the Uno/Nano as a programmer, you may want to check out this discussion. |
I have found my ATmgea128A breakout board.
|
1024B and 2048B are okay.
3072B failed.
|
All in all, I do not consider this to be an avrdude problem. Rather this |
I will close this issue now. @Tim666 |
BTW, I can reproduce the issue under Linux as well.
Same for ATmega328PB, 512B EEPROM write is okay but not 1024B.
Same for another ATmega16U2+ATmega328P Uno Clone (previous tests using CH340G based clone).
|
Please take note Arduino does not really care about EEPROM uploading at all from their AVR bootloaders.
Therefore I will not feel surprised that this "Arduino as ISP" does not work with EEPROM very well. Reference: |
@Tim666 Only because Basically Maybe we should give |
I thought there is a bug in the PR #1383 works well and fixed my issues with ATmega328P and ATmega128A when programming higher amount of EEPROM. |
You may want to try PR #1383 as well. I tested ATmega128A using your hex file and it works.
|
Close this one as #1383 has been merged. |
Looking at the logfiles for EEPROM reading shows the difference: This is part of the log for
And this is part of the log for
Reason: |
Please use avrdude 7.2 release or latest git main. Thanks. |
As expected nothing has changed from my reported 7.1 logging.
This is the correct behaviour because the Remark: EDIT: EDIT_2: |
Hi,
When i try to burn a complete eeprom dump with AVRDUDE 7.1 (ARM64) on my rasp4 64b os, on the verification it show some errors (corrupt data) which is confirmed when i dump back the eeprom.
I tried the debian version
When i do the same on WIN10, it's complete without any error. 100% working. (same board, same programmer, same dump).
uC : ATMEGA128
programmer : arduino uno with ISP sketch loaded.
AVRDUDE on ARM64 (with error) log file:
pi@Rasp4:~/Documents/avrdude $ ./avrdude -p m128 -P /dev/ttyACM0 -c avrisp -b 19200 -U eeprom:w:/home/pi/Documents/avrdude/firmwarem128ok.eep:i -v
avrdude: Version 7.1
Copyright the AVRDUDE authors;
see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9702 (probably m128)
avrdude: reading input file /home/pi/Documents/avrdude/firmwarem128ok.eep for eeprom
with 4096 bytes in 1 section within [0, 0xfff]
using 512 pages and 0 pad bytes
avrdude: writing 4096 bytes eeprom ...
Writing | ################################################## | 100% 192.94 s
avrdude: 4096 bytes of eeprom written
avrdude: verifying eeprom memory against /home/pi/Documents/avrdude/firmwarem128ok.eep
Reading | ################################################## | 100% 6.49 s
avrdude avr_verify() warning: verification mismatch
device 0x00 != input 0xff at addr 0x0339 (error)
device 0x72 != input 0xff at addr 0x033a (error)
device 0x73 != input 0xff at addr 0x033b (error)
device 0x74 != input 0xff at addr 0x033c (error)
device 0x75 != input 0xff at addr 0x033d (error)
device 0x76 != input 0xff at addr 0x033e (error)
device 0x77 != input 0xff at addr 0x033f (error)
device 0x80 != input 0xff at addr 0x0340 (error)
device 0x81 != input 0xff at addr 0x0341 (error)
device 0x82 != input 0xff at addr 0x0342 (error)
suppressing further verification errors
avrdude do_op() error: verification mismatch
avrdude done. Thank you.
On WIN10: (working)
./avrdude -p m128 -P COM21 -c arduino -b 19200 -U eeprom:w:firmwarem128ok.eep:i -v
avrdude: Version 7.1
Copyright the AVRDUDE authors;
see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9702 (probably m128)
avrdude: reading input file firmwarem128ok.eep for eeprom
with 4096 bytes in 1 section within [0, 0xfff]
using 512 pages and 0 pad bytes
avrdude: writing 4096 bytes eeprom ...
Writing | ################################################## | 100% 193.02 s
avrdude: 4096 bytes of eeprom written
avrdude: verifying eeprom memory against firmwarem128ok.eep
Reading | ################################################## | 100% 7.77 s
avrdude: 4096 bytes of eeprom verified
avrdude done. Thank you.
I have only issue with EEPROM, with FLASH it's fine (no corrupt data).
Best regards
The text was updated successfully, but these errors were encountered: