updating the firmware

Home Forums TinyG TinyG Support updating the firmware

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #5131
    tomking505
    Member

    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?

    #5134
    Makerboost
    Member

    Which 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.

    #5168
    tomking505
    Member

    Thanks 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.hex

    If that’s not the right one, which one should I use, and where is it?

    #5201
    tomking505
    Member

    Here 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.

    #5202
    tomking505
    Member

    I 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?

    #5203
    alden
    Member

    THe 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
    :100170000C94803F0C94803F0C94803F0C94803F03

    #5211
    cmcgrath5035
    Moderator

    tomking505 – 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.

    #5219
    tomking505
    Member

    Yes, it certainly does sound familiar. Thanks, cmcgrath5035.

    I will have a closer look.

    Tom

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.