Possibly vricked 9XR with Mac 1.41?

A fork of eePe. It's aim is to provide one tool that works with ALL firmwares!
Post Reply
amelluk
Posts: 15
Joined: Sat Jul 27, 2013 1:39 pm
Country: -

Possibly vricked 9XR with Mac 1.41?

Post by amelluk »

I thought I would try open9x instead of stock 9xr firmware.

So I downloaded avrdude and Mac version 1.41 of companion9x. Understand that when I read eeprom from the standard 9xr it cannot be understood by companion9x.

Seems to have bricked my radio. can anyone help? it was shipped in June, so will be m128. The signature from avrdude identifies it as an m128 too.

Any ideas?


=================================================================================
Started AVRDUDE
/usr/local/bin/avrdude -c usbasp -p m128 -U flash:w:/Users/amell/Documents/9XR firmware/opentx-9xr128-heli-templates-en-r2647.hex:i
=================================================================================

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9702
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: current erase-rewrite cycle count is -50462977 (if being tracked)
avrdude: erasing chip
avrdude: reading input file "/Users/amell/Documents/9XR firmware/opentx-9xr128-heli-templates-en-r2647.hex"
avrdude: writing flash (57268 bytes):

Writing | ################################################## | 100% 32.33s

avrdude: 57268 bytes of flash written
avrdude: verifying flash memory against /Users/amell/Documents/9XR firmware/opentx-9xr128-heli-templates-en-r2647.hex:
avrdude: load data flash data from input file /Users/amell/Documents/9XR firmware/opentx-9xr128-heli-templates-en-r2647.hex:
avrdude: input file /Users/amell/Documents/9XR firmware/opentx-9xr128-heli-templates-en-r2647.hex contains 57268 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 21.32s

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

avrdude done. Thank you.


=================================================================================
AVRDUDE done - exit code 1
=================================================================================

Romolo
9x Developer
Posts: 1109
Joined: Sat Dec 31, 2011 12:11 am
Country: -
Location: Massa (MS), Tuscany, Italy

Re: Possibly vricked 9XR with Mac 1.41?

Post by Romolo »

try to reflash the radio again...
or eventually to slow down writing by adding a -B 50 in the advanced parameters
amelluk
Posts: 15
Joined: Sat Jul 27, 2013 1:39 pm
Country: -

Re: Possibly vricked 9XR with Mac 1.41?

Post by amelluk »

Got it working in the end but using Windows via Parallels on my Mac. It flashed correctly using Windows companion9x

There is a problem with the Mac version of companion9x which makes it fail with 9XR and m128 chip. Windows works just fine.

I suggest that a warning is put in the Mac version to stop people doing this until the cause is found.

I seem to be able to read/write eeprom fine using Mac version, just cant write firmware.
Romolo
9x Developer
Posts: 1109
Joined: Sat Dec 31, 2011 12:11 am
Country: -
Location: Massa (MS), Tuscany, Italy

Re: Possibly vricked 9XR with Mac 1.41?

Post by Romolo »

well companion on mac (as in all other OS) just calls avrdude for performing the write/read operation:
so I presume it's avrdude or a programmer driver issue.

which version of avrdude are you running ?

Which programmer are you using ?

Maybe only need a slowdown by adding the -B parameter
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Possibly vricked 9XR with Mac 1.41?

Post by MikeB »

amelluk wrote:IUnderstand that when I read eeprom from the standard 9xr it cannot be understood by companion9x
It appears that the 9XR comes with the LOCK bits set preventing reading of either the flash or the EEPROM.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

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

Re: Possibly vricked 9XR with Mac 1.41?

Post by rperkins »

amelluk wrote:I
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x8000
Looks like the verification failed at the 32kB boundary. I would lead towards the firmware on the usbasp or avrdude. he didnt have a 'can not set SCK error' so he probably has real usbasp firmware.,EDIT-because he was using a very old version of avrdude. see his followup. My first guess would have been the usbasp firmware but it wouldnt have worked differently in windows. I dont think the lock bits would fail in this manner.

I'd be curious of the version of avrdude on the mac and the version of usbasp firmware, if known.

Glad he got it sorted out
Last edited by rperkins on Thu Aug 08, 2013 11:27 pm, edited 1 time in total.
amelluk
Posts: 15
Joined: Sat Jul 27, 2013 1:39 pm
Country: -

Re: Possibly vricked 9XR with Mac 1.41?

Post by amelluk »

Hello, I am back again. I thought it was a one off but I am still having the same problem getting reliable flashing of my 9XR with m128 chip on Mac OSX. Same error every time at 0x8000

I'm now on companion9x 1.45 for the Mac
avrdude: Version 5.3.1.osxintelhack, compiled on Feb 1 2007 at 22:30:12 - which is the version that comes in the Mac 0.97 installer package for companion9x (subsequent updates are copied over the top of this)

USBasp: (from Mac system report)

Product ID: 0x05dc
Vendor ID: 0x16c0
Version: 1.02
Speed: Up to 1.5 Mb/sec
Manufacturer: http://www.fischl.de
Location ID: 0xfd130000 / 5
Current Available (mA): 500
Current Required (mA): 50

Flashing the 9XR using Windows via Parallels works fine... (scratches head)

In Windows the versions are:
companion9x 1.45
avrdude: Version 5.11-Patch#7610, compiled on Aug 31 2011 at 08:02:19
libusb-win32 driver 4/8/2011 version 1.2.4.0

Interestingly, I -do- get a Can not set SCK error on windows avrdude, but the firmware still flashes fine.

Any ideas? Happy to try a newer mac avrdude if someone can point me to a location where I can download this.
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Possibly vricked 9XR with Mac 1.41?

Post by rperkins »

Hi
you are on the right track looking for a newer avrdude. Sorry I am unfamiliar with mac.

UGH . this is way to painful to just get an avrdude binary :)
http://www.ladyada.net/learn/avr/setup-mac.html
The Mac instructions here arent as detailed but probably follow the same path
https://code.google.com/p/eepe/

About the 'Can not set SCK error' . Dont worry about it.
The old version of avrdude you have on your Mac probably couldnt even set the clock speed ( SCK), hence there was no warning about it. The newer version has the ability to set the SCK speed, but your firmware isnt allowing it. Most chinese usbsap firmwares control the speed themselves and do not respond to requests from avrdude to adjust the SCK speed.

I'm gonna edit my post to reflect the information you provided regarding your old avrdude version
Last edited by rperkins on Thu Aug 08, 2013 11:37 pm, edited 1 time in total.
amelluk
Posts: 15
Joined: Sat Jul 27, 2013 1:39 pm
Country: -

Re: Possibly vricked 9XR with Mac 1.41?

Post by amelluk »

You'll all be pleased to know I have just fixed the issue.

Turns out that there is a problem with the avrdude in the Mac Companion9x installer....

Steps to fix are:

Download and install Crosspack from http://www.obdev.at/products/crosspack/ ... leasenotes
go to terminal

su to root

sh-3.2# mv /usr/local/bin/avrdude /usr/local/bin/avrdude.old
sh-3.2# cp /usr/local/CrossPack-AVR/bin/avrdude /usr/local/bin/avrdude
sh-3.2# avrdude -v

avrdude: Version 5.11.1, compiled on Feb 12 2013 at 01:24:54

Try companion9x again, and the 9xr flashes just fine.

I think we need to get a new Mac installer package made up - Happy to do this if someone has the project files.
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Possibly vricked 9XR with Mac 1.41?

Post by rperkins »

I'd expect the C9x developers to check in afore too long. I didnt even think avrdude was bundled with the mac or linux version but I am probably wrong. I do know it is bundled with the windows version

these may help you
Here is the source
https://code.google.com/p/companion9x/source/browse/
https://code.google.com/p/companion9x/s ... Build.wiki
amelluk
Posts: 15
Joined: Sat Jul 27, 2013 1:39 pm
Country: -

Re: Possibly vricked 9XR with Mac 1.41?

Post by amelluk »

The instructions I was following are at http://code.google.com/p/companion9x/wiki/MacInstall

I've put a note to cover the issue on the comments. That should cover it until someone gets round to it.

Cheers
shondo34
Posts: 1
Joined: Sat Dec 07, 2013 9:52 pm
Country: -

Re: Possibly vricked 9XR with Mac 1.41?

Post by shondo34 »

amelluk wrote:You'll all be pleased to know I have just fixed the issue.

Turns out that there is a problem with the avrdude in the Mac Companion9x installer....

Steps to fix are:

Download and install Crosspack from http://www.obdev.at/products/crosspack/ ... leasenotes
go to terminal

su to root

sh-3.2# mv /usr/local/bin/avrdude /usr/local/bin/avrdude.old
sh-3.2# cp /usr/local/CrossPack-AVR/bin/avrdude /usr/local/bin/avrdude
sh-3.2# avrdude -v

avrdude: Version 5.11.1, compiled on Feb 12 2013 at 01:24:54

Try companion9x again, and the 9xr flashes just fine.

I think we need to get a new Mac installer package made up - Happy to do this if someone has the project files.


Thanks for the info this works perfect! I wiped out my wifes TX by mistake and couldn't get any computer I own to fix it as we dont own any windows products here. One thing I did notice is that it has to be installed exactly like you stated! If you try and install the newest version of CrossPack, it will not work. It has to be Version 5.11.1 compiled on Feb 12 2013. Also when you try and type (su to root) it asks for a password. If you have a problem with the password for your system not working, just type into terminal (su passwd root) this allows you to change password to a new one. type the new password in then it will ask to confirm password then all you need to do is type (su) and you are in! Then follow the directions exactly like posted above and type it into terminal and then restart companion9x and you wont have anymore problems! Thanks again for your post, I was in big trouble with the wifey until you came to the rescue!
amelluk
Posts: 15
Joined: Sat Jul 27, 2013 1:39 pm
Country: -

Re: Possibly vricked 9XR with Mac 1.41?

Post by amelluk »

Glad it worked for you! I noticed a new mac installer has been posted. It's not clear to me if the problem is fixed in that installer.
User avatar
Geoffs
Posts: 7
Joined: Sun Dec 22, 2013 5:43 pm
Country: United States
Location: New York, NY

Re: Possibly vricked 9XR with Mac 1.41?

Post by Geoffs »

I know this is an old post, but I just installed 1.52 of the Mac Companion 9x installer, and it did not appear to update my avrdude.

$ avrdude -v

showed the super old version from 2007.

So I did the crosspack install as mentioned above, and it worked great. I see that they just created a new release for companion 9x today, but no mac build is up yet, so maybe it will be fixed? Who knows! Just update avrdude if you have this problem.

Post Reply

Return to “companion9x”