Home › Forums › TinyG › TinyG Support › updating the firmware
Tagged: avrdude bootload firmware
- This topic has 7 replies, 4 voices, and was last updated 10 years, 11 months ago by tomking505.
-
AuthorPosts
-
January 11, 2014 at 3:04 pm #5131tomking505Member
The stuttering bug has reared its head again, and TinyG damaged an expensive hunk of nylon. I’ve tried for the past two hours to figure out how to update the firmware, but I hit several roadblocks.
First, you suggest using AVRdude that came with Arduino. I have Arduino, but no AVRdude. I can see the TinyG in the Arduino serial window. I can trigger boot mode by issuing $boot=1 from inside Arduino. But no idea how to use it to update the firmware.
I installed AVRdude. After some path variable issues, and figuring out that I have to issue $boot=1 in CoolTerm, then immediately close it and issue the AVRdude command. But it crashes during the loading process. Ends in Failed, Failed, Failed a thousand times so that any useful info flies off the screen. And the logfile switch doesn’t work. If I redirect the STDERR to a file, it contains nothing. Frustrating.
How to proceed?
January 12, 2014 at 5:15 am #5134MakerboostMemberWhich tinyg.hex file did you flash it with?
I’ve bought an STK500 compatible programmer that I’ve used to program AVR chips with successfully in the past, and now more recently I’m using an AVR Dragon that comes with debugging capabilities.
I know you can use the arduino as an ISP device, but it’s much easier to just use Atmel Studio 6.1 and for example Olimex AVR-ISP-MK2 to program new firmware.
January 16, 2014 at 12:01 am #5168tomking505MemberThanks for responding.
Which firmware? I went here:
https://github.com/synthetos/TinyG/wiki/TinyG-Boot-Loader
It lists this link:
https://raw.github.com/synthetos/TinyG/master/firmware/tinyg/default/tinyg.hexIf that’s not the right one, which one should I use, and where is it?
January 18, 2014 at 8:10 pm #5201tomking505MemberHere is the AVRdude command I issue:
C:\Program Files (x86)\AVRDude>avrdude -p x192a3 -c avr109 -b 115200 -P COM7 -U flash:w:tinyg.hex
After that is how AVRdude responds, until I hit control-c:
Connecting to programmer: . Found programmer: Id = "XBoot++"; type = S Software Version = 1.7; No Hardware Version given. Programmer supports auto addr increment. Programmer supports buffered memory access with buffersize=512 bytes. Programmer supports the following devices: Device code: 0x7b
If I don’t hit control-c, then everything sails off the screen with thousands of
***failed; ***failed; ***failed; ***failed; ***failed; ***failed; ***failed; ***failed;
As I said on another message to which no one responded, I can’t redirect the debug output, and the debug switch produces a zero length file. I seem to be following the AVRdude instructions, such as they are, at this link.
January 18, 2014 at 8:19 pm #5202tomking505MemberI tried dozens of times to hit control-c before the screen scrolled away. I even tried shooting a video at 120 FPS, and slowing it down, but nothing. Finally, I got this:
Writing | ################################################## | 100% 32.81s avrdude: 204800 bytes of flash written avrdude: verifying flash memory against tinyg.hex: avrdude: load data flash data from input file tinyg.hex: avrdude: input file tinyg.hex auto detected as raw binary avrdude: input file tinyg.hex contains 204800 bytes avrdude: reading on-chip flash data: Reading | | 0% 0.00savrdude: error: programmer did not respond to command: set addr
What is the reason I can’t flash my TinyG?
January 18, 2014 at 8:34 pm #5203aldenMemberTHe hex file is not that large. Look at the file with a text editor to see if it really looks like a hex file. I think you have to right-click the file to download it. It should look like something this:
:100000000C945F3F0C94803F0C9493940C94803F2D
:100010000C94803F0C94803F0C94803F0C94803F64
:100020000C94803F0C94803F0C94803F0C94F7908C
:100030000C94803F0C94803F0C941A860C94803F63
:100040000C94803F0C94803F0C94803F0C94803F34
:100050000C94803F0C94803F0C94803F0C94803F24
:100060000C94803F0C94BD940C943A940C94803F73
:100070000C949B960C943B960C9479960C94803F30
:100080000C9441910C94803F0C94803F0C94803FE1
:100090000C94803F0C94803F0C94803F0C94803FE4
:1000A0000C94803F0C94803F0C94803F0C9470C063
:1000B0000C94CCBF0C94803F0C94803F0C94AF8583
:1000C0000C94803F0C94803F0C94803F0C94803FB4
:1000D0000C94803F0C94803F0C94803F0C94803FA4
:1000E0000C94FD990C94803F0C94803F0C94803FBD
:1000F0000C94803F0C94803F0C94803F0C94803F84
:100100000C9499C00C94F5BF0C94C2C00C941EC002
:100110000C94803F0C94803F0C94803F0C94803F63
:100120000C94803F0C94803F0C94803F0C94803F53
:100130000C94803F0C94D9850C94803F0C94803FA4
:100140000C94803F0C94803F0C94803F0C94803F33
:100150000C94803F0C94803F0C94F3990C94803F56
:100160000C94803F0C94803F0C94803F0C94803F13
:100170000C94803F0C94803F0C94803F0C94803F03January 19, 2014 at 8:40 am #5211cmcgrath5035Moderatortomking505 – Your problems seem similar to what I had a couple months back. You might benefit from this thread
Note that I am programming from linux, and it appears to me you are running Windows, so your procedure for getting a correctly formatted binary will be different.
January 22, 2014 at 12:54 am #5219tomking505MemberYes, it certainly does sound familiar. Thanks, cmcgrath5035.
I will have a closer look.
Tom
-
AuthorPosts
- You must be logged in to reply to this topic.