ERSKY9X Coding

erskyTx runs on many radios and upgrade boards
ersky9x was a port of er9x for use on the sky9x board.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

Since this is in the main ersky9x release now, I'm posting this for general information.
I've completed the bootloader for the SKY board.

Main operation:
1) Plug in USB and power on - SAM-BA boot program
2) Power on with both horizontal trims held towards the centre - Bootloader with mass storage for up/down loading SD and EEPROM and flashing.
3) Power on normally - normal operation.
4) (For next release) Power on with both horizontal trims held AWAY from the centre - Main program in "Maintenance mode", allows the bootloader to be updated from the SD card.

To use the bootloader:
1) Hold both horizontal trim switches towards the center and power on to enter bootloader.
2) Plug in USB cable, the SD card appears as a disk drive on the PC
3) Create a directory on the root of the SD card called "firmware" (no quotes of course).
4) Copy your required firmware file (.bin).
5) Disconnect the USB cable.
6) You should have a list of available firmware files, use UP/DOWN to highlight the required file.
7) press MENU LONG to select.
8) You get a confirmation screen, MENU LONG to flash, EXIT LONG to cancel
9) On MENU LONG the firmware is flashed, a progress bar is displayed, only takes a few seconds
10) You get a "Flashing Complete" display.
11) press EXIT to return to the file list display
12) press EXIT LONG to reboot.

Also, while the bootloader is running you get a second disk drive with two files mapped to the EEPROM and flash. These may be used directly by eepskye/companion to read/write the EEPROM and the flash. It is even possible, as kilrah does, to simply delete one of the files and write a new EEPROM/flash image.

The bootloader protects against overwriting itself, and also validates the content being written to protect against writing a firmware file to the EEPROM, or an EEPROM file to the firmware.

For the SKY board/9XR-PRO, this should pretty much mean the end of special driver installs or the need for SAM-BA.

To use "maintenance mode:
1) Hold both horizontal trim switches away from the center and power on.
2) Select "Update Bootloader"
3) You should have a list of available firmware files, use UP/DOWN to highlight the required file.
4) press MENU LONG to select.
5) You get a confirmation screen, MENU LONG to flash, EXIT LONG to cancel
6) On MENU LONG the bootloader is flashed, a progress bar is displayed, only takes a few seconds
7) You get a "Flashing Complete" display.
8) press EXIT to return to the file list display
9) power off.

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

User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ERSKY9X Coding

Post by jhsa »

This deserves going to the wiki after the next release when all the functionality is in.

Nigel, Do you think you could fit it in the manual?? ;) :)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
Daedalus66
Posts: 1844
Joined: Tue Dec 27, 2011 8:22 pm
Country: -
Location: Ottawa

Re: ERSKY9X Coding

Post by Daedalus66 »

We've already got a small separate manual that deals with connecting to a computer, with the focus on using the bootloader approach. I'll make sure the cross references are clear and that the "Connecting " manual is up-to-date in my review of the document.

References to SAM-BA are now relegated to a separate document about how to "unbrick" a transmitter. We hope very few people will ever have to refer to it.

Speaking of which, sort of, I have just wasted quite a bit of time trying to install a USBasp driver on my Windows 7 64-bit computer to communicate with my original 9XR running Er9x. No problem installing on my Win XP laptop, but after trying every known driver and method of installation, I have given up. The irony is that I used to have eePe running nicely on this machine before I had a motherboard failure and had to reinstall the OS. I do hope Mike's method will eliminate nearly all the driver stuff on all the open source firmware (including Taranis).
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ERSKY9X Coding

Post by jhsa »

Yep, taranis as well ;)
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
skylark
Posts: 197
Joined: Mon Jul 09, 2012 6:18 pm
Country: -
Location: Oxford, England

Re: ERSKY9X Coding

Post by skylark »

Mike,
Does this mean I will have to flash the next release with sam-ba or am I good to go as is ?.
Stan.
He who knows not and knows not he knows not, is a fool: SHUN HIM.

He who knows and knows he knows, is a wise man : SEEK HIM

But he who knows not and knows he knows not, is a baby: TEACH HIM.

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

Re: ERSKY9X Coding

Post by MikeB »

No need for SAM-BA, that's the reason for doing this.
You boot in bootloader mode to be able to update the main program.
You boot in "maintenance mode" (part of the main program) to be able to update the bootoloader.
I have extra tests to to make sure the code you are going to flash as the bootloader does look to be bootloader code. I've added a special marker in the bootloader code, together with a bootloader revision, to help with this.
For the 'SKY' boards (not 9XR-PRO) I hope to add code to update the co-processor in maintenance mode.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
skylark
Posts: 197
Joined: Mon Jul 09, 2012 6:18 pm
Country: -
Location: Oxford, England

Re: ERSKY9X Coding

Post by skylark »

Thanks Mike. That's wonderful.
Stan.
He who knows not and knows not he knows not, is a fool: SHUN HIM.

He who knows and knows he knows, is a wise man : SEEK HIM

But he who knows not and knows he knows not, is a baby: TEACH HIM.
sokolum
Posts: 55
Joined: Fri Nov 09, 2012 8:52 am
Country: -

Re: ERSKY9X Coding

Post by sokolum »

Wauw.... this great news for maintenance...
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

I'll commit these changes either tomorrow or the day after. Just tested "maintenance mode" on "ersky9x for Taranis", successfully flashed the bootloader!

"ersky9x for Taranis" is now pretty well working. I need to add support for the EEPROM file system into eepskye still though.
It also only supports the internal Tx module at present.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

I've posted an update on the test versions post.
The bootloader has some minor tweaks, while the main program has a fix for COM2 being used with a DJT/DHT module and the addition of maintenance mode.
Mounting the SD card might also be faster.

To update the main firmware you can just flash it from eepskye (SAM-BA not needed).
To update the bootloader you will need to put the .bin file onto the firmware directory of the SD card. Then reboot/power on with both horizontal trims held AWAY from the centre, this gets you into "maintenance mode". Now you have something that looks very similar to the bootloader, but it lets you update the bootloader code from the SD card file, again no SAM-BA needed :D
You can, of course, just put the .bin file on the SD card and flash the main firmware from the bootloader.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
skylark
Posts: 197
Joined: Mon Jul 09, 2012 6:18 pm
Country: -
Location: Oxford, England

Re: ERSKY9X Coding

Post by skylark »

Mike,
Is the same version I installed recently to remedy the long sd mount?, If not could you give me a link please. Thanks.
Stan.
He who knows not and knows not he knows not, is a fool: SHUN HIM.

He who knows and knows he knows, is a wise man : SEEK HIM

But he who knows not and knows he knows not, is a baby: TEACH HIM.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

It's a new one, may be even quicker:
http://openrcforums.com/forum/viewtopic ... 676#p65894

I need to make that thread a sticky, not sure how though.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ERSKY9X Coding

Post by jhsa »

The sd card does mount quicker now.. ;)
On my computer 8Gb mount in a second or so.

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

Following up an idea from Pat Mackenzie, I'm looking into a new mixer source "THIS", which is the value of the mixes on THIS channel so far.
The idea is that such a mix can hold the SLOW settings for the channel. It may be more understandable than putting the mixes on a 'virtual' channel.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
skylark
Posts: 197
Joined: Mon Jul 09, 2012 6:18 pm
Country: -
Location: Oxford, England

Re: ERSKY9X Coding

Post by skylark »

Mike,
Just saw r199. Flashed it but my TX is still showing r198. I repeated the process 3 times, samr result.
Stan.
He who knows not and knows not he knows not, is a fool: SHUN HIM.

He who knows and knows he knows, is a wise man : SEEK HIM

But he who knows not and knows he knows not, is a baby: TEACH HIM.
Daedalus66
Posts: 1844
Joined: Tue Dec 27, 2011 8:22 pm
Country: -
Location: Ottawa

Re: ERSKY9X Coding

Post by Daedalus66 »

Did you try maintenance mode to update the boot loader? See Mikes instructions. I did and mine shows 199.



Sent from my Nexus 7 using Tapatalk
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

Bother, I did the commit from the wrong directory, only committed the source files.
Try it now!

Daedalus probably got his file for the 9XR-PRO test area.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
skylark
Posts: 197
Joined: Mon Jul 09, 2012 6:18 pm
Country: -
Location: Oxford, England

Re: ERSKY9X Coding

Post by skylark »

This one is coming up ersky9xr_rom it that correct ?.
Stan.

EDIT: Got it OK. Fault was at this end. Apologies for the scare. Will flash and report back.
Stan.
He who knows not and knows not he knows not, is a fool: SHUN HIM.

He who knows and knows he knows, is a wise man : SEEK HIM

But he who knows not and knows he knows not, is a baby: TEACH HIM.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

New test versions posted.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

The next revision of ersky9x will include the ability to name Flight Modes with a 6 character name. This name will appear on the "front" screen when the Filght Mode is active.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

Test version of this available on the Test versions post.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Barrsurf
Posts: 7
Joined: Sun Jan 05, 2014 4:38 pm
Country: -

Re: ERSKY9X Coding

Post by Barrsurf »

Is the current test version the one that can name flight modes? If so, where do you assign that?

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

Re: ERSKY9X Coding

Post by MikeB »

Should be!
Go to the MODES screen, step down to a particular mode, then press MENU to edit it. The name may be entered as the last item.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

Looking at an enhancement, I've got some code working that backs up a model to the SD card. The principle is OK, I need to check the filename gets created OK, and handle possible errors. I'll then need to look into displaying a list of backed up models and allowing one to be selected for restoring.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
skylark
Posts: 197
Joined: Mon Jul 09, 2012 6:18 pm
Country: -
Location: Oxford, England

Re: ERSKY9X Coding

Post by skylark »

Mike, You are amazing. That sounds brilliant. Great job.
Stan.
He who knows not and knows not he knows not, is a fool: SHUN HIM.

He who knows and knows he knows, is a wise man : SEEK HIM

But he who knows not and knows he knows not, is a baby: TEACH HIM.
User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: ERSKY9X Coding

Post by kaos »

Great! that is one thing I am hoping for since the birth of ersky9x. ;)
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

Looking promising, I've just restored a model I backed up. I hope to post a test version of this sometime over the weekend.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

I've posted a version with BACKUP and RESTORE in the test versions post.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: ERSKY9X Coding

Post by kaos »

Yee Ha! thx. only I can't test it right now. Need to get my FW upgraded 1st (saving all the calibration settings). Will get to it once I have done that.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

OK, this is a test version. Following an idea from jhsa, I'm looking into saving and restoring in .eepm format instead of the binary values as in this version. The advantage of using .eepm is that eepskye would be able to read/write the files on the SD card directly. It will take a bit of time to do, but should be more useful.

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

Post Reply

Return to “erskyTx (was ersky9x)”