ERSky9x Brd on OpenTx- Updating CoProcessor and bootloader ?

openTx has introduced a range of new features, ideas and bling. It is fast becoming the firmware of choice for many users. openTx will run on ALL current hardware platforms, including the gruvin9x and sky9x boards. Work has already started to support the new FrSky X9D radio!
Post Reply
th9xer
9x Developer
Posts: 167
Joined: Fri Jan 20, 2012 11:09 pm
Country: -
Location: Beside the seaside

ERSky9x Brd on OpenTx- Updating CoProcessor and bootloader ?

Post by th9xer »

Hi,

I've not used my ERSky9x board for a while and I wonder what is the current recommended procedure for updating the CoProcessor and the bootloader when using OpenTx ?

Does the bootloader update when flashing the firmware via Companion ? EDIT No
What about the CoProcessor ? EDIT No

Through faffing about with SAM-BA etc. I suspect I am up to date, Firmware V2.0.15, Bootloader V1.3, CoProcessor 7, but I wonder if a cleaner solution via Companion exists. (Obviously I know I can do the main firmware via Companion).

EDIT: See [anchor=a3 goto=p95519]here[/anchor] for the easiest solution

Thanks.
Cam.
Last edited by th9xer on Wed Apr 08, 2015 2:40 pm, edited 2 times in total.

bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by bertrand35 »

You may update your bootloader using SAM-BA (with a script that Mike wrote), if you don't find it in your SAM-BA, just fire an email. If I am not mistaken there is an extra tab in SAM-BA when this script is there (but it's so long I didn't flash this radio I might be wrong)
th9xer
9x Developer
Posts: 167
Joined: Fri Jan 20, 2012 11:09 pm
Country: -
Location: Beside the seaside

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by th9xer »

Hi Bertrand,

Part of the problem is once the bootloader is installed access to DFU mode disappears (which SAM-BA uses), you have to install the ERASE jumper to get it back, then install everything again. It's not a neat solution. Also where is the OpenTX bootloader, which file ? [anchor=a6 goto=p95488]Answer here[/anchor] Do I just use the standard BIN and SAM-BA extracts the bootloader ? EDIT: SAM-BA burns both bootloader and main firmware in one shot.

Cam.
Last edited by th9xer on Wed Apr 08, 2015 2:45 pm, edited 1 time in total.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by MikeB »

Does openTx on the SKY board not include the bootloader update from a file on the SD card? On ersky9x, "maintenance mode" includes this, as well as updating the co-processor from a file on the SD card.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
th9xer
9x Developer
Posts: 167
Joined: Fri Jan 20, 2012 11:09 pm
Country: -
Location: Beside the seaside

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by th9xer »

I presume ersky9x maintenance mode can't update OpenTx's bootloader, and that the bootloaders are different ? EDIT: yes it can, and the bootloaders are the same, [anchor=a2 goto=p95529]see below.[/anchor]

I also have a growing suspicion that my ersky9x board has SDcard problems, but that's possibly another thread. I currently have ErSky9x r214 (V. 683-Mike) installed and a folder in the root directory of my SDcard called "Models", yet trying to backup a model yields a "CREATE ERROR". That and the presence of an SDcard crashes OpenTx.
Last edited by th9xer on Wed Apr 08, 2015 2:37 pm, edited 2 times in total.

User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by MikeB »

ersky9x in "maintenance mode" will update the bootloader with whatever file you specify, so it will update the openTx bootloader.
Both ersky9x and openTx .bin files have both the bootloader and the application in the single file.
To update the openTx bootloader simply put the openTx .bin file in the "firmware" (not firmwares) directory on the SD card, then start ersky9x in "maintenance mode" (both horizontal switches held APART), select the option "update bootloader", then select the file you put on the SD card and confirm the flashing. To prevent accidental flashing, some operations need a LONG MENU press before they respond.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
th9xer
9x Developer
Posts: 167
Joined: Fri Jan 20, 2012 11:09 pm
Country: -
Location: Beside the seaside

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by th9xer »

"firmware" not "Firmware" as suggested here ? and in the root directory ?
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by MikeB »

I think the case doesn't actually matter. I just checked on my SKY board and the directory I have, and works with "maintenance mode" is "firmware" (all lower case).

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
th9xer
9x Developer
Posts: 167
Joined: Fri Jan 20, 2012 11:09 pm
Country: -
Location: Beside the seaside

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by th9xer »

Bugger, it would appear I have an SDCard problem. It's 2GB and formatted FAT16, "opentx.bin placed in "firmware" directory. Other cards tried, made no difference. Meter set to continuity and off I go.

Cam.
th9xer
9x Developer
Posts: 167
Joined: Fri Jan 20, 2012 11:09 pm
Country: -
Location: Beside the seaside

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by th9xer »

It would seem my SD slot needed a cleaning, very odd. Still Maintenance mode updated the OpenTx bootloader no problem.

Can I ask is "0107" as reported by ERSky9x the current CoProcessor firmware ? EDIT Yes

Also to those in the know at OpenTx, my original question stands, can this been done via Companion ? EDIT Sort of see [anchor=a1 goto=p95519]here[/anchor]
Last edited by th9xer on Wed Apr 08, 2015 2:38 pm, edited 5 times in total.
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by bertrand35 »

Yes it could be possible to do it from Companion, but it's not implemented!
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by MikeB »

Yes '7' is the latest revision of the co-processor firmware.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
th9xer
9x Developer
Posts: 167
Joined: Fri Jan 20, 2012 11:09 pm
Country: -
Location: Beside the seaside

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by th9xer »

bertrand35 wrote:Yes it could be possible to do it from Companion, but it's not implemented!
Do you mean the CoProcessor ? I am guessing not enough interest these days to implement it.

Does Companion or the OpenTx bootloader allow for flashing of the bootloader on an ERSky9x board ? As we don't have the "Flash BootLoader" option in the SDCard menu. EDIT: Only via SAM-BA and holding the TRN switch in while plugging the USB in. [anchor=a7 goto=p95527]See here[/anchor]


. Companion flashes the bootloader but that is the only option.
. The OpenTx Bootloader only flashes the main code.

And thanks Mike for the help. Just in case I need it in the future was Bertrand right and you had a script for SAM-BA to update the bootloader only ?

Cam.
Last edited by th9xer on Wed Apr 08, 2015 2:51 pm, edited 6 times in total.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by MikeB »

No, I've never done an option for that. It isn't a script in fact, but a small application that is loaded into the RAM of the board, then SAM-BA communicates with that to carry out the task.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
th9xer
9x Developer
Posts: 167
Joined: Fri Jan 20, 2012 11:09 pm
Country: -
Location: Beside the seaside

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by th9xer »

Sounds interesting, is it in the public domain ? No worries if not it's probably an outside chance I would need it.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by MikeB »

The source for all the applets I've written for use with SAM-BA are here: https://code.google.com/p/ersky9x/sourc ... %2Fersky9x.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
th9xer
9x Developer
Posts: 167
Joined: Fri Jan 20, 2012 11:09 pm
Country: -
Location: Beside the seaside

Summary of findings

Post by th9xer »

Having played about some more I don't think Companion / OpenTx offers any method of flashing the bootloader or CoProcessor on ERSky9x. (I messed about that much yesterday the sequence of events got lost, so I have gone through it again.)

For the bootloader you can:
. Use the ERASE jumper and SAM-BA to install new OpenTx firmware and bootloader via DFU mode.
. Use Companion and you can only install the main firmware. (Hold horizontal trims toward centre and switch on).
. Use ERSky9x firmware and the maintenance mode. (Hold horizontal trims away from centre and switch on).
. No "Flash BootLoader" option exists in the OpenTx SDCard menu
. No option to use USB without switching the Tx on exists in the presence of an existing OpenTx bootloader. (As it does on the Taranis)

For the CoProcessor you can:
. Use the ERASE jumper and SAM-BA to install new firmware and bootloader and CoProcessor via DFU mode.
. Use ERSky9x firmware and the maintenance mode (Hold horizontal trims away from centre and switch on).

Notes for use of maintenance mode: Both ersky9x and opentx .bin files have both the bootloader and the application in the single file.
To update the openTx bootloader simply put the openTx .bin file in the "firmware" (not firmwares) directory on the SD card.

However to install the ERSky9x firmware you are going to have to use the ERASE jumper and SAM-BA, so you may as well use this method to update OpenTx.
Also if you use ERSky9x maintenance mode I guess you will have to update the main firmware last as maintenance mode is part of the firmware so by over righting it you will loose access to it.
Last edited by th9xer on Wed Apr 08, 2015 12:02 pm, edited 1 time in total.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by MikeB »

You may flash ersky9x using the bootloader. Both companion and eepskye are able to write the application using the bootloader so you shouldn't need to use the ERASE button and go back to SAM-BA.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
th9xer
9x Developer
Posts: 167
Joined: Fri Jan 20, 2012 11:09 pm
Country: -
Location: Beside the seaside

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by th9xer »

MikeB wrote:You may flash ersky9x using the bootloader. Both companion and eepskye are able to write the application using the bootloader so you shouldn't need to use the ERASE button and go back to SAM-BA.
Yes, but they can't update the bootloader and so far the only way I can find to do this with OpenTx installed is via SAM-BA (or installing ERSky9x with SAM-BA).

Sorry your saying use the bootloader to install ERSky9x via Companion or eepskye then use the maintenance mode to flash the boot loader and the coprocessor, then use Companion or eepskye to flash back to OpenTx, thus avoiding the ERASE jumper ?

Point of note: When installing the ERSky9x application, updating, then flashing back to OpenTx if you let ERSky9x application load, i.e. don't hold the trims apart when switching on it will hose your EEPROM. So BACKUP !
Last edited by th9xer on Wed Apr 08, 2015 2:54 pm, edited 1 time in total.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by MikeB »

Yes.

The bootloader that comes with the ersky9x for the SKY board also has the following features:
1. If you plug the USB cable in, then power on it starts in bootloader mode and connects to the computer without using the trim switches.
2. If you plug the USB cable in, then power on while holding the TRAINER switch on, then it starts in SAM-BA USB mode, no need for the ERASE button.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
th9xer
9x Developer
Posts: 167
Joined: Fri Jan 20, 2012 11:09 pm
Country: -
Location: Beside the seaside

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by th9xer »

Well that will avoid taking the back off which is a plus.

So then two questions cross my mind:
1) Is there a problem using the OpenTx application with the ERSky9x bootloader as permanent option ? EDIT: No they are the same, [anchor=a4 goto=p95529]see below[/anchor]
2) Can the ERSky9x bootloader in SAM-BA mode overwrite the bootloader ? I guess it can.

MikeB wrote: The bootloader that comes with the ersky9x for the SKY board also has the following features:
1. If you plug the USB cable in, then power on it starts in bootloader mode and connects to the computer without using the trim switches.
2. If you plug the USB cable in, then power on while holding the TRAINER switch on, then it starts in SAM-BA USB mode, no need for the ERASE button.
EDIT: It appears the OpenTx bootloader does both of your points also, I ERASED to make sure I wasn't still using the ERSky9x bootloader.
Last edited by th9xer on Wed Apr 08, 2015 2:53 pm, edited 5 times in total.
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by Kilrah »

th9xer wrote:1) Is there a problem using the OpenTx application with the ERSky9x bootloader as permanent option ?
We (openTX team) have never made our own version of bootloader for the sky9x/9XR Pro. OpenTX binaries simply pack Mike's version, so in essence they are identical.
th9xer
9x Developer
Posts: 167
Joined: Fri Jan 20, 2012 11:09 pm
Country: -
Location: Beside the seaside

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by th9xer »

That would be why they appear to have the same features then :) Well I guess that's every corner of that subject explored, hopefully others will find this thread useful one day !
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSky9x Brd on OpenTx- Updating CoProcessor and bootload

Post by MikeB »

The ersky9x bootloader changed to V1.4 when I added the trainer switch option to get into SAM-BA mode, and will change to V1.5 on the next release of ersky9x when a minor bug fix relating to holding the trainer switch on is fixed. This bug was only noticed when someone had either a faulty trainer switch, or had swapped the trainer switch for the THR switch so the trainer switch could be left stuck on.

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

Post Reply

Return to “openTx”