Problem using avrdude 6.0.x to program 9x/9xr

Help with any software/desktop related issues. e.g. companion9x, eePe, etc

Problem using avrdude 6.0.x to program 9x/9xr

Postby rperkins » Tue Feb 11, 2014 2:25 am

Hi

Has anyone tried to use avrdude 6.0.x to program their radios? I am getting mismatch errors trying to load er9x.hex into a 9x/9xr using avrdude 6. Thanks for any insight on this issue.

summary of avrdude output. complete output at end of post. The mismatch repeats every 0x100 bytes
Code: Select all
avrdude: verification error, first mismatch at byte 0x0100
         0xff != 0x3d


Why use avrdude 6 ?
  1. avrdude 6 has been released as of this post. It is not beta software
    http://savannah.nongnu.org/forum/forum. ... um_id=7719
  2. I am working on a bootable .iso that has open source RC tools on it. Mainly to help users on win8/win7 that have trouble installing usbasp drivers. the KKmulitcopter flash tool is one of the apps I plan on including and that tool has already been using avrdude 6 because of the additional programmers it supports

Affected versions of avrdude
  1. Using the latest svn of avrdude -r 1275
  2. I have also tried the tagged release of svn://svn.sv.gnu.org/avrdude/tags/RELEASE_6_0_1
  3. I have compiled on 64bit Fedora19 and TinyCore 4.7.7
  4. Have also used the avrdude binaries (6.0.1) compiled by kkmulticopter flash tool at http://lazyzero.de/en/modellbau/kkmulticopterflashtool

Hex files used for testing
  1. er9x.hex rev 809 as downloaded through eepe. attached here
  2. er9x.hex rev 809 in a 32 byte format. attached here
    • created by uploading file to target(tx) using avrdude 5.11
      then read the data back to file .
    • avrdude uses 32 byte format to store data read from target (tx)
    • this file made it possible to to a diff of the mismatch to highlight the pattern of mismatch

Hardware considerations
  1. Can repeatedly successfully write hexfile using avrdude 5.11 and repeatedly fails in a consistent manner using avrdude 6.0.x utilizing the same hardware
  2. Programmers
    • usbasp with stock 2011 firmware binary supplied from http://www.fischl.de/usbasp/ .
    • usbasp with modified 2009 usbasp firmware in popular use on this forum.
    • My first fear was a change in avrdude that didnt work with the modified 2009 usbasp firmware. I dont think that is the case as I loaded stock 2011 usbasp firmware and got the same results.
  3. Targets
    • Turnigy 9x with m64 mcu
    • Turnigy 9xr with m64 mcu

Other observations
  1. I want to post this here before reporting on the avrdude-devel mailing list as I am probably overlooking something
  2. I can use avrdude 6 to program smaller target like m328 or m8 without an issue
  3. If anyone knows a good editor , byte length converter for intel hex files, please let me know. Linux, shell script, windows, whatever.
  4. avrdude 6 is coming and I would like to get to the bottom of this now. Am especially worried about the patched 2009 usbasp firmware not working in avrdude 6. I ship that firmware on my usbasp's


Details of recurring mismatch
  1. every 0x100 bytes 0x10 bytes are at FF
  2. My asssumption is these bytes are not being written after a chip/page erase
  3. output of head -n 40 avrdude_6_failed_write_m64.diff follows
  4. entire diff of error is attached as avrdude_6_failed_write_m64.diff

This error pattern repeats for the entire hex file. see attached file
Code: Select all
--- er9x_32byte_format.hex   2014-02-10 18:57:04.211676270 -0500
+++ er9x_32byte_avrdude_6_failed_write.hex   2014-02-10 18:59:24.148587317 -0500
@@ -9 +9 @@
-:200100003D663F66416646664A6656665A66626669666D666F6673667566776679667D6686
+:20010000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF69666D666F6673667566776679667D6625
@@ -17 +17 @@
-:200200007920746F20736B697000032D2D2D783E30783C307C787C663E30663C307C667CC3
+:20020000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF30783C307C787C663E30663C307C667C66
@@ -25 +25 @@
-:200300004348313343483134434831354348313633504F5347563120475632204756332029
+:20030000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF33504F53475631204756322047563320FB
@@ -33 +33 @@
-:2004000000000000000000000000000000000000000000000000000000000080C0E0E0F0EC
+:20040000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000080C0E0E0F0FC
@@ -41 +41 @@
-:2005000031313171616161E1C1C1C18100000080E0F8FCFFFFFFFF2F170F038180C0E0F0D6
+:20050000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0F8FCFFFFFFFF2F170F038180C0E0F032
@@ -49 +49 @@
-:20060000000000000000000000000000000000000101010101030707070301000000E0FCDD
+:20060000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0101010101030707070301000000E0FCED
@@ -57 +57 @@
-:2007000000000000000000000000000000000000000000000000000000C0F8BFFFFFFF1F46
+:20070000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000C0F8BFFFFFFF1F56
@@ -65 +65 @@
-:200800003A2032322E30312E3230313400564552533A2056312E3130342D4D696B650022DD
+:20080000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF533A2056312E3130342D4D696B6500221C
@@ -73 +73 @@
-:20090000004D656D6F7279205761726E696E670044656661756C74205377005468726F74A8
+:20090000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF44656661756C74205377005468726F7427
@@ -81 +81 @@
-:200A00006B657220506974636800566F6C756D65000A4265657065722020202050695370AB
+:200A0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000A42656570657220202020506953708D
@@ -89 +89 @@
-:200B0000204578697420446F776E20202055705269676874204C656674004449414700126E
+:200B0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF69676874204C6566740044494147001267
@@ -97 +97 @@
-:200C000072696D7300537769746368000003464C204D4F444500015245544100032D2D2D16
+:200C0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF204D4F444500015245544100032D2D2DE8
@@ -105 +105 @@
-:200D0000203843482031304348313243483134434831364348001375530011755365630098



complete avrdude output of mismatch
Code: Select all
./avrdude -C ./avrdude.conf -c usbasp -p m64 -U flash:w:/home/rperkins/src/eepe-read-only/er9x.hex:i

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9602
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 "/home/rperkins/src/eepe-read-only/er9x.hex"
avrdude: writing flash (54410 bytes):

Writing | ################################################## | 100% 17.48s

avrdude: 54410 bytes of flash written
avrdude: verifying flash memory against /home/rperkins/src/eepe-read-only/er9x.hex:
avrdude: load data flash data from input file /home/rperkins/src/eepe-read-only/er9x.hex:
avrdude: input file /home/rperkins/src/eepe-read-only/er9x.hex contains 54410 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 9.80s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0100
         0xff != 0x3d
avrdude: verification error; content mismatch

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

avrdude done.  Thank you.
Attachments
avrdude_6_failed_write_m64.diff
diff -u0 er9x_32byte_format.hex er9x_32byte_avrdude_6_failed_write.hex
(35.48 KiB) Downloaded 14 times
er9x_32byte_format.hex
er9x rev 809 in 32 byte record format
(126.21 KiB) Downloaded 14 times
er9x.hex
er9x rev 809
(149.47 KiB) Downloaded 16 times
http://usbasp.us - 9XR/9X Usbasp programmers - http://9xrprogrammer.com
Usbasp Programmer for 9X,9XR, KKMulticopter, Simonk atmel ESC's, arduino
Price including shipping - $7.50 USA , $12.50 INT --- THANKS
User avatar
rperkins
 
Cleveland Ohio
United States
 
Posts: 1193
Joined: Sun Jan 08, 2012 12:51 pm
Has thanked: 95 times
Been thanked: 46 times

Re: Problem using avrdude 6.0.x to program 9x/9xr

Postby rperkins » Tue Feb 11, 2014 8:59 pm

Tried to flash opentx using avrdude 6 and got a similar error.

It flashed fine using avrdude 5.11. Can even verify the flash using avrdude 6.
Just can not write flash using avrdude 6.

I looked at the m64 sections of the avrdude.conf files for both versions of avrdude. Didnt see anything jump out at me as different.

attached the opentx hex file that failed to flash to target using avrdude 6
Attachments
opentx-9x-heli-templates-en.hex
opentx-9x-heli-templates-en=2940
(142.26 KiB) Downloaded 17 times
http://usbasp.us - 9XR/9X Usbasp programmers - http://9xrprogrammer.com
Usbasp Programmer for 9X,9XR, KKMulticopter, Simonk atmel ESC's, arduino
Price including shipping - $7.50 USA , $12.50 INT --- THANKS
User avatar
rperkins
 
Cleveland Ohio
United States
 
Posts: 1193
Joined: Sun Jan 08, 2012 12:51 pm
Has thanked: 95 times
Been thanked: 46 times

Re: Problem using avrdude 6.0.x to program 9x/9xr

Postby rperkins » Wed Feb 12, 2014 2:43 am

This was posted on the avrdude-devel mailing list and has been reported as a possible bug affecting linux versions of avrdude 6 only

https://savannah.nongnu.org/bugs/index.php?41561
http://lists.nongnu.org/archive/html/av ... 00007.html

I have also compiled avrdude 5.11 on the same build environment ( Fedora 19) and verified that 5.11 compiles and does not show this error
http://usbasp.us - 9XR/9X Usbasp programmers - http://9xrprogrammer.com
Usbasp Programmer for 9X,9XR, KKMulticopter, Simonk atmel ESC's, arduino
Price including shipping - $7.50 USA , $12.50 INT --- THANKS
User avatar
rperkins
 
Cleveland Ohio
United States
 
Posts: 1193
Joined: Sun Jan 08, 2012 12:51 pm
Has thanked: 95 times
Been thanked: 46 times


Return to Software

 

Who is online

Users browsing this forum: No registered users and 1 guest

PayPal The safer, easier way to pay online
Like these forums? Like the firmwares?
Show your support by donating.
openTx manual
openTx manual
er9x manual
er9x manual
video guides
video guides
Wiki
Visit the wiki

Radio Control Gliders
and Accessories.