Flash v8 to 380.08 now TinyG not working

From the original Synthetos forum (2011–2025)

Started by areinike on in TinyG Support. 20 replies, last activity Oct 18, 2013.

#

I tried flashing with AVRDude 6.0.1 but get ***failed; scrolling down the screen.

I downgraded to 5.1.1 and it looked like it was working but got this:

C:\Firmware\380.08>avrdude -p x192a3 -c avr109 -b 115200 -P com4 -U flash:w:tinyg.hex

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

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9744
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 "tinyg.hex"
avrdude: input file tinyg.hex auto detected as raw binary
avrdude: writing flash (204800 bytes):

Writing | ################################################## | 100% 25.44s

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 | ################################################## | 100% 24.70s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x30000
0x22 != 0x0d
avrdude: verification error; content mismatch

avrdude done. Thank you.

C:\Firmware\380.08>

Now it just blinks and never loads. Any idea what happened?

#

I flashed it with AVR Studio 6.1, and now it seems to skip the bootloader. Must be something that has changed, since I'm not seeing the light blinking after reset, it just starts instantly.

#

I should mention that the board works. It just skipped the usual light blinking boot sequence I've come to expect.

Staff #

areinike,
I have seen this before when people try to save the hex file on windows. Windows inserts somenice new line characters.

Try to "download" the repo from github and unzip it then use the hex inside there.

Makerboost,
You either used the MKII to program tinyg.hex (which blows away the bootloader) or you reset your fuses where it jumps into application code vs bootloader mode.

The fuses should look like this:
http://www.flickr.com/photos/rileyporter/9426625299/

Riley

Staff #

I am searching for the correct hex file for TinyG 380.08.
If I look here

https://github.com/synthetos/TinyG/tree/master/firmware/tinyg

I see a tinyg.hex in default and Debug, nothing in Release
The two .hex files are not the same (different length.

Which is the one to download and install?

Staff #

its in default. Use that one.

ril3y

#

Thanks for the info. I thought I tried the default hex already, but I'll redownload. Is there a zip of it like you mentioned?

Staff #

Well, that's too bad.
I downloaded that TinyG.hex file to my Linux system, then ran avrdude 5.11.1. My results are the same areinike, a flashing brick.

avrdude -p x192a3 -c avr109 -b 115200 -P /dev/ttyUSB0 -U flash:w:tinyg.hex

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

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9744
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 "tinyg.hex"
avrdude: input file tinyg.hex auto detected as raw binary
avrdude: writing flash (204800 bytes):

Writing |                                                    | 0% 0.00savrdude: butterfly_recv(): programmer is not responding

It would be helpful if Alden could post what version number avrdude the downloader was tested against, since there is not a clear answer as to which version of avrdude is made available with the arduino (referenced on the wiki)

The good news is I still have your address in my Priority Mail address book, you will be seeing my TinyG V7 soon for reprogramming, I don't have a programmer.

Staff #

I suspect you have not gotten the hex file correctly somehow. The flash size should be something closer to 100K bytes, not 200K. The hex file should look something like the text lines below. You may want to confirm that yours is similar. I have updated the instructions on how to get the hex file here:
https://github.com/synthetos/TinyG/wiki/TinyG-Boot-Loader#updating-firmware-using-avrdude-and-boot-loader

The hex file should look something like this:

:100000000C942D240C944E240C9443A60C944E2452
:100010000C944E240C944E240C944E240C944E2498
:100020000C944E240C944E240C944E240C94E0A07A
:100030000C944E240C944E240C945E920C944E24FA
:100040000C944E240C944E240C944E240C944E2468
:100050000C944E240C944E240C944E240C944E2458
:100060000C944E240C9465A60C94D3A50C944E24A9
:100070000C941EA90C94A6A80C94EEA80C944E24E3
:100080000C943DA10C944E240C944E240C944E24BC
:100090000C944E240C944E240C944E240C944E2418
:1000A0000C944E240C944E240C944E240C9465F421
:1000B0000C9429F50C944E240C944E240C946E94BC
:1000C0000C944E240C944E240C944E240C944E24E8
:1000D0000C944E240C944E240C944E240C944E24D8
:1000E0000C942FB00C944E240C944E240C944E245B
:1000F0000C944E240C944E240C944E240C944E24B8
:100100000C9434F40C94F8F40C9403F40C94C7F4A9
:100110000C944E240C944E240C944E240C944E2497
:100120000C944E240C944E240C944E240C944E2487
:100130000C944E240C941C940C944E240C944E2439
:100140000C944E240C944E240C944E240C944E2467
:100150000C944E240C944E240C941FB00C944E24FA
:100160000C944E240C944E240C944E240C944E2447
:100170000C944E240C944E240C944E240C944E2437
:100180000C944E240C944E240C944E240C944E2427
:100190000C944E240C944E240C944E240C944E2417
:1001A0000C9496F40C945AF50C944E240C944E2412
:1001B0000C94A1940C944E240C944E240C944E2434
:1001C0000C944E240C944E240C944E240C944E24E7
:1001D0000C944E240C944E240C944E240C944E24D7
:1001E0000C944E240C944E24084AD73B3BCE016E0F
:1001F00084BCBFFDC12F3D6C74319ABD56833DDA7E
:100200003D00C77F11BED9E4BB4C3E916BAAAABE8C
:10021000000000803F05A84CCDB2D44EB93836A9B5
(continues for pages and pages...)

Staff #

OK, now I see the error in my ways.

In Linux, the easiest way to get such a file is the cli command
wget https://raw.github.com/synthetos/TinyG/master/firmware/tinyg/default/tinyg.hex
Probably same in IOS, sorry, not sure for Windows.

Ran Avrdude 5.11.1

avrdude -p x192a3 -c avr109 -b 115200 -P /dev/ttyUSB0 -U flash:w:tinyg.hex

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

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9744
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 "tinyg.hex"
avrdude: input file tinyg.hex auto detected as Intel Hex
avrdude: writing flash (102724 bytes):

Writing | ################################################## | 100% 11.23s

avrdude: 102724 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 Intel Hex
avrdude: input file tinyg.hex contains 102724 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 9.42s

avrdude: verifying ...
avrdude: 102724 bytes of flash verified

avrdude done.  Thank you.

On connection via Putty, I get

$
[fb]  firmware build            380.08
[fv]  firmware version            0.96
[hv]  hardware version            8.00
[id]  TinyG ID                    9H3906-P2T
[ja]  junction acceleration  100000 mm
[ct]  chordal tolerance           0.001 mm
[st]  switch type                 0 [0=NO,1=NC]
[mt]  motor disble timeout       60 Sec
[ej]  enable json mode            0 [0=text,1=JSON]
[jv]  json verbosity              4 [0=silent,1=footer,2=messages,3=configs,4=linenum,5=verbose]
[tv]  text verbosity              1 [0=silent,1=verbose]
[qv]  queue report verbosity      0 [0=off,1=filtered,2=verbose]
[sv]  status report verbosity     1 [0=off,1=filtered,2=verbose]
[si]  status interval           250 ms
[ic]  ignore CR or LF on RX       0 [0=off,1=CR,2=LF]
[ec]  expand LF to CRLF on TX     0 [0=off,1=on]
[ee]  enable echo                 0 [0=off,1=on]
[ex]  enable flow control         1 [0=off,1=XON/XOFF, 2=RTS/CTS]
[baud] USB baud rate              5 [1=9600,2=19200,3=38400,4=57600,5=115200,6=230400]
[gpl] default gcode plane         0 [0=G17,1=G18,2=G19]
[gun] default gcode units mode    1 [0=G20,1=G21]
[gco] default gcode coord system  1 [1-6 (G54-G59)]
[gpa] default gcode path control  2 [0=G61,1=G61.1,2=G64]
[gdi] default gcode distance mode 0 [0=G90,1=G91]
tinyg [mm] ok> 

Looks like I live to fight another few hours, at least.

Big day: Ready to connect my ShapeOko

Staff #

Sorry, too late to edit prior post.

I should have commented that wget is most likely available in OSx, not IOS in addition to Linux.

A quick Google search on "wget windows" finds several free downloads for a similar utility, should someone wish to experiment.

#

Interesting. I downloaded by Save Page as and it's still 283K. Pleh.

Staff #

You probably have the right file. The confusion may be coming from what's being counted.

- The memory flashed onto the chip is about 100K. AVRdude reports this number
- The Intel hex that contains that information is an ASCII and is about 2.5x
- The HTML is about 800K, and is not usable

So you probably have the right hex file. Just open it in a text editor and see if it looks like what I posted earlier

Staff #

areinike
Try to grab the file from my dropbox

https://dl.dropboxusercontent.com/u/50261731/tinyg.hex

The size should be close to 282.2 KB, may not be exact because of differences between Linux and Windows interpretation of "K".

If , in running avrdude, you see

avrdude: writing flash (102724 bytes):

you will probably be good.

Good Luck

Just reread your post - 283K is probably the right Windows size.
You could read it, so it is probably ASCII.
My guess is that avrdude does the ASCII-->Hex conversion before sending to the bootloader

#

Thanks for that! I'll try it. When it flashed it said it was flashing 204K so it probably didn't convert correctly if it's supposed to flash 100K right?

Staff #

Thanks for that! I’ll try it. When it flashed it said it was flashing 204K so it probably didn’t convert correctly if it’s supposed to flash 100K right?

You are correct, that number looks bad - I flashed 102724 bytes.

Was that with your file or my file?

What version of avrdude do you have.
I ran with 5.11.1 on Linux.

This topic is from the original forum (October 2013). Your reply starts a new discussion linked to it.

Reply

Different problem? Ask a new question

Back to TinyG Support or latest activity.