Author Topic: avrdude  (Read 22366 times)

Offline fphil

  • Sr. Member
  • ****
  • Posts: 398
  • BHP: 6
Re: avrdude
« Reply #15 on: August 15, 2014, 10:35:37 am »
Hurrah, I finally suceeded to upgrade the Bootloader, but I was nearly to failed.

I bought a cheap clone of the usb avr cable USPasp.
With it when using avrdude 6.1 under win7 I had write errors on lock bits which ends to get lock bits = 0x00 000 which forbids any further writing on the chip.
So the Vems team sent to me  a bundle of fw and bootloader to flash the chip after an erase.
After the flash, the verify failed, again and again. To be sure of grounds I powered the chip from the vcc of the cable instead of the vcc of the board. Failed again and I was ready to buy the USBISP cable from the Vemsshop.

As a final try, I downloaded the  old WinAVR_20100110 which contains the
avrdude version 5.10
(bin folder) suspecting that the fw of the clone USBasp was quite old as well.
Success, no writing error anymore, I flashed, set the lock bits 0x3c, and downloaded the new bootloader through VT.

Thanks Dave for your help

Philippe



Offline VEMS

  • Administrator
  • Sr. Member
  • *****
  • Posts: 487
  • BHP: 22
Re: avrdude
« Reply #16 on: August 15, 2014, 11:11:59 am »
Wow great news Phil, thanks for the update!

Offline gunni

  • Hero Member
  • *****
  • Posts: 1492
  • BHP: 37
Re: avrdude
« Reply #17 on: August 27, 2014, 08:55:10 pm »
What will be the reason for a ecu not being locked, too old?

Offline fphil

  • Sr. Member
  • ****
  • Posts: 398
  • BHP: 6
Re: avrdude
« Reply #18 on: August 28, 2014, 07:32:14 am »
I think it was the cheap USBasp fw which was too old and so I got writing errors with the new 6.1 avrdude version. Indeed this new 6.1 version uses an automatic sync function. The5.10 version does not.
Not easy to update  the fw of the Atmega USBasp chip, you need another USBasp...

Offline gunni

  • Hero Member
  • *****
  • Posts: 1492
  • BHP: 37
Re: avrdude
« Reply #19 on: September 02, 2014, 08:14:33 pm »
Just attempted to apply the lock and got the following results below



C:\temp\avrdude>avrdude -c USBTiny -p m128 -U lfuse:w:0x2f:m -U hfuse:w:0xc4:m -
U efuse:w:0xff:m -U lock:w:0x3c:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e9702
avrdude: reading input file "0x2f"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0x2f:
avrdude: load data lfuse data from input file 0x2f:
avrdude: input file 0x2f contains 1 bytes
avrdude: reading on-chip lfuse data:

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

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: reading input file "0xc4"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xc4:
avrdude: load data hfuse data from input file 0xc4:
avrdude: input file 0xc4 contains 1 bytes
avrdude: reading on-chip hfuse data:

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

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xff"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xff:
avrdude: load data efuse data from input file 0xff:
avrdude: input file 0xff contains 1 bytes
avrdude: reading on-chip efuse data:

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

avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0x3c"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3c:
avrdude: load data lock data from input file 0x3c:
avrdude: input file 0x3c contains 1 bytes
avrdude: reading on-chip lock data:

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

avrdude: verifying ...
avrdude: 1 bytes of lock verified

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

avrdude done.  Thank you.


C:\temp\avrdude>



Do I need to apply any other command or ?






Offline mattias

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1075
  • BHP: 41
    • Sävar Turbo Site
Re: avrdude
« Reply #20 on: September 02, 2014, 10:56:17 pm »
gunni: You should be good to go as long as you're running the "1.1.94_bootloader" firmware -> time for bootloader update wizard,

Offline fphil

  • Sr. Member
  • ****
  • Posts: 398
  • BHP: 6
Re: avrdude
« Reply #21 on: September 02, 2014, 11:09:06 pm »
The lock value  "0x3c" has been verified good by avrdude, so you should keep follow the VT procedure http://vems.hu/vt/help/v3/general/bootloader_upgrade.html.
 It works straightfully. You have to let the Vems team know the serial number of your genboard  so that the new bootloader would be well dowloaded by the VT process.

Philippe


Offline gunni

  • Hero Member
  • *****
  • Posts: 1492
  • BHP: 37
Re: avrdude
« Reply #22 on: September 03, 2014, 06:26:44 pm »
I am now getting no response from the ecu at all through serial.
Seems like it´s bricked.

I do have another ecu that works on the bench so its not any cabling or anything like that.

What is the next step?

Offline fphil

  • Sr. Member
  • ****
  • Posts: 398
  • BHP: 6
Re: avrdude
« Reply #23 on: September 03, 2014, 06:41:42 pm »
Ippe thnk you should run  1.1.94_BootUpdate version before locking

"....After the correct (1.1.94_BootUpdate) firmware has been found by the Wizard, proceeding to the next step checks the ecu flash lock status, outcome can be either:
    If all requirements are met, Wizard will now download the new bootloader from upgrade server, proceed to next step.
    "Ecu not locked" manual locking of the ecu will be required, follow the following steps: ...."
See Mathias ' message as well.

Philippe

Offline gunni

  • Hero Member
  • *****
  • Posts: 1492
  • BHP: 37
Re: avrdude
« Reply #24 on: September 03, 2014, 07:46:30 pm »
Yea I had already update the firmware.

Offline fphil

  • Sr. Member
  • ****
  • Posts: 398
  • BHP: 6
Re: avrdude
« Reply #25 on: September 04, 2014, 10:02:35 am »
Can't you detect ecu from the test of the Communication Settings menu?
If not, you probably need to upload some Dave's package (bootloader+fw) as I did.

Offline gunni

  • Hero Member
  • *****
  • Posts: 1492
  • BHP: 37
Re: avrdude
« Reply #26 on: September 04, 2014, 05:02:12 pm »
I think so, dave if you read this can you send me a pm or email on what I need to do from here to sort this out.

Serial is 2695, I am not sure if I ordered this or somebody else.

Offline VEMS

  • Administrator
  • Sr. Member
  • *****
  • Posts: 487
  • BHP: 22
Re: avrdude
« Reply #27 on: September 07, 2014, 09:08:01 am »
Hello Gunni,

Whats the latests status on ecu with serial 2695 ? I was not around for a few days. Has the upgrade completed succesfully ?

Best regards, Dave

Offline gunni

  • Hero Member
  • *****
  • Posts: 1492
  • BHP: 37
Re: avrdude
« Reply #28 on: September 07, 2014, 01:00:32 pm »
No.

Vemstune does not recognise when I set it to bootloader mode, In terminal I do see some response when in bootloader mode, but can´t do anything about it, Man doesn´t get any response, Vemstune doesn´t pick up on the ecu if I just restart the ecu,

i have another ecu working through the serial so there is nothing wrong with anything but the unfortunate ecu itself now.
I need to get either a bootloader and or firmware in there, can you prepare me a package to do so?

Offline magoo

  • Jr. Member
  • **
  • Posts: 10
  • BHP: 0
Re: avrdude
« Reply #29 on: February 01, 2015, 08:15:51 pm »
Hi, sorry for lifting this old thread.

 I was about to upgrade my bootloader, I got no problems with the fuse.
But the part to get the bootloader from the server did not work.



What to do to get the file from the server.