gruvin9x board and companion flash problem

Help with any software/desktop related issues. e.g. companion9x, eePe, etc
Post Reply
Koarl
Posts: 203
Joined: Sun Jul 01, 2012 5:08 pm
Country: -

gruvin9x board and companion flash problem

Post by Koarl »

Greetings gents,

I have some problems flashing my gruvin9x board with companion.
First I had some trouble with flashing the transmitter at all. But this was covered in this thread: viewtopic.php?f=95&t=7804

In short I had to flash my usbasp with another firmware first, then I was able to flash the transmitter with this command: avrdude -c usbasp -P usb -p m2560 -U flash:w:opentx-gruvin9x-templates-nocurves-PXX-ppmca-gvars-potscroll-autosource-autoswitch-dblkeys-battgraph-pgbar-ppmus-de-2.1.3.hex

It worked without problems when I used that command in terminal on my mac but when I try it with companion I always get this output from avrdude and the transmitter stays dead.


ocalhost:~ carloskammerlander$ avrdude -c usbasp -P usb -p m2560 -U flash:w:opentx-gruvin9x-templates-nocurves-PXX-ppmca-gvars-potscroll-autosource-autoswitch-dblkeys-battgraph-pgbar-ppmus-de-2.1.3.hex

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9801
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 "opentx-gruvin9x-templates-nocurves-PXX-ppmca-gvars-potscroll-autosource-autoswitch-dblkeys-battgraph-pgbar-ppmus-de-2.1.3.hex"
avrdude: input file opentx-gruvin9x-templates-nocurves-PXX-ppmca-gvars-potscroll-autosource-autoswitch-dblkeys-battgraph-pgbar-ppmus-de-2.1.3.hex auto detected as Intel Hex
avrdude: writing flash (74580 bytes):

Writing | ################################################## | 100% 36.46s



avrdude: 74580 bytes of flash written
avrdude: verifying flash memory against opentx-gruvin9x-templates-nocurves-PXX-ppmca-gvars-potscroll-autosource-autoswitch-dblkeys-battgraph-pgbar-ppmus-de-2.1.3.hex:
avrdude: load data flash data from input file opentx-gruvin9x-templates-nocurves-PXX-ppmca-gvars-potscroll-autosource-autoswitch-dblkeys-battgraph-pgbar-ppmus-de-2.1.3.hex:
avrdude: input file opentx-gruvin9x-templates-nocurves-PXX-ppmca-gvars-potscroll-autosource-autoswitch-dblkeys-battgraph-pgbar-ppmus-de-2.1.3.hex auto detected as Intel Hex
avrdude: input file opentx-gruvin9x-templates-nocurves-PXX-ppmca-gvars-potscroll-autosource-autoswitch-dblkeys-battgraph-pgbar-ppmus-de-2.1.3.hex contains 74580 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 18.09s



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

avrdude: safemode: Fuses OK

avrdude done. Thank you.

localhost:~ carloskammerlander$


It would be great if someone could help me please!

Thanks!

User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: gruvin9x board and companion flash problem

Post by rperkins »

the output of that flash looks good. I am surprised it doesnt work

maybe you have 2 versions of avrdude on your computer.
I notice from the other thread you are using /usr/local/bin/avrdude.
the output here is using your $PATH to find avrdude.

I would check the entire computer for multiple versions of avrdude.
I do not know if companion includes a version of avrdude for mac.
I would also check for a configuration option in companion regarding the location of avrdude. maybe if you put the full path it /usr/local/bin/avrdude it will work
Koarl
Posts: 203
Joined: Sun Jul 01, 2012 5:08 pm
Country: -

Re: gruvin9x board and companion flash problem

Post by Koarl »

Thanks for your answer!


My bad, I copied the wrong output from the thread.
This is the right one:


/usr/local/bin/avrdude -c usbasp -p m2560 -U flash:r:/var/folders/l0/vd5nvhv53wnfjxqr7kbshmy40000gn/T/13564-flash-check.bin:r
=================================================================================

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9801
avrdude: reading flash memory:

Reading | ################################################## | 100% 53.13s

avrdude: writing output file "/var/folders/l0/vd5nvhv53wnfjxqr7kbshmy40000gn/T/13564-flash-check.bin"

avrdude done. Thank you.


=================================================================================
/usr/local/bin/avrdude -c usbasp -p m2560 -U flash:w:/Users/carloskammerlander/Desktop/opentx-gruvin9x-templates-nocurves-PXX-ppmca-gvars-potscroll-autosource-autoswitch-dblkeys-battgraph-pgbar-de-2.1.511111.hex:i
=================================================================================

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9801
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 "/Users/carloskammerlander/Desktop/opentx-gruvin9x-templates-nocurves-PXX-ppmca-gvars-potscroll-autosource-autoswitch-dblkeys-battgraph-pgbar-de-2.1.511111.hex"
avrdude: writing flash (74442 bytes):

Writing | ################################################## | 100% 23.79s

avrdude: 74442 bytes of flash written
avrdude: verifying flash memory against /Users/carloskammerlander/Desktop/opentx-gruvin9x-templates-nocurves-PXX-ppmca-gvars-potscroll-autosource-autoswitch-dblkeys-battgraph-pgbar-de-2.1.511111.hex:
avrdude: load data flash data from input file /Users/carloskammerlander/Desktop/opentx-gruvin9x-templates-nocurves-PXX-ppmca-gvars-potscroll-autosource-autoswitch-dblkeys-battgraph-pgbar-de-2.1.511111.hex:
avrdude: input file /Users/carloskammerlander/Desktop/opentx-gruvin9x-templates-nocurves-PXX-ppmca-gvars-potscroll-autosource-autoswitch-dblkeys-battgraph-pgbar-de-2.1.511111.hex contains 74442 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 14.98s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0x0c != 0x08
avrdude: verification error; content mismatch



I have indeed several files and folders named with avrdude. At least when I do a search with avrdude in finder. There is a configuration option with exactly that path in it.
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: gruvin9x board and companion flash problem

Post by rperkins »

Ok this makes more sense.

I see a mismatch but it isnt at 0x0100 it is at 0x0000. So same type of error but probably caused by something else.

also I notice that when you manually flash you are installing opentx 2.1.3 and when you use companion it is grabbing 2.1.511111 .

it also looks like companion is reading your tx and saving it to a temp file before it does the write and calling it xxxxflash-check.bin. I'm sure they have a good reason for doing that, I just dont know what it is.

I would look closer at those multiple avrdude files you have. are they executable. you could go in each directory where you have an executable and run

Code: Select all

./avrdude -v
I think this will work on mac. yes that is a dot, then a slash, then avrdude , a space and then -v.
hopefully that will print out the version for the avrdude that is in that directory

Hopefully a gruvin/opentx user will see this post and give you their experience

can you open the installer ( the .dmg file ) that you downloaded for companion. does it have a version of avrdude in it ?
oh and how bout the eepe you used earlier. did it come with a version of avrdude ?
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: gruvin9x board and companion flash problem

Post by rperkins »

just getting ready to take my nap :D and thought of this.

open your terminal like you do when you have been manually flashing your radio. type this command

Code: Select all

which avrdude
I dont even know if mac has this command but if it does it will tell you which version of avrdude is working for you.

Koarl
Posts: 203
Joined: Sun Jul 01, 2012 5:08 pm
Country: -

Re: gruvin9x board and companion flash problem

Post by Koarl »

You know what I did?
I searched in Finder again for avrdude. There I found an executable, copied the file path and added it to the configuration. And now guess what? It works!!!
Once again, you´re a god damn genius!
Thank you so much!

And sleep well!
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: gruvin9x board and companion flash problem

Post by rperkins »

you're welcome. glad you got it working.

Post Reply

Return to “Software”