er9x development

er9x is the best known firmware. It has a superb range of features and is well supported by the community. Well worth trying out.
User avatar
mhotar
Posts: 198
Joined: Wed May 16, 2012 9:57 pm
Country: -
Location: Jemnice, Vysocina

Re: er9x development

Post by mhotar »

Well. I am back. I knocked up an external frequency source to m2561 and fixed FUSES. I also unplugged/ plugged back LCD cable and all seems to work now. I am not sure my LCD failure was relevant to firmware flash, but radio worked before, I have internal Usbasp with cable in the battery bay - so I did not open the radio prior to flash. I flashed It many times before with no problem.

Er9x seems to work correctly now, sound (I do not have voice module installed yet) and haptic works.

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

Re: er9x development

Post by jhsa »

very strange problem.. so actually the LCD is working again, right?

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
LTMNO
Posts: 1049
Joined: Fri Nov 30, 2012 9:31 pm
Country: Canada
Location: Toronto, Canada

Re: er9x development

Post by LTMNO »

That is very promising.. glad you got it working again... I shall take the plunge next week.. Cheers to your success!
Custom 9x with M64/Telemetry Mod
Iksbob
Posts: 121
Joined: Wed Dec 28, 2011 1:06 pm
Country: -

Re: er9x development

Post by Iksbob »

Would the 2561 bin work on a 1281? If so, I've got a 1281, spare 9X and rework equipment on hand to install it. I guess I could just order a 2561, but I'd rather not throw the money at it until the additional flash (4x the m64 chip) is needed.
csurf
Posts: 107
Joined: Sat Aug 17, 2013 9:13 am
Country: -

Re: er9x development

Post by csurf »

Hi, Im new here.
Im trying to compile er9x on my linux box, but Im running into a persistent error.

I just built up my compiler toolchain with all the latest versions of everything (gcc, binutils, avrlibc, etc.).

The error Im getting is when trying to compile lcd.cpp:

Compiling C++: lcd.cpp
avr-gcc -c -mmcu=atmega64 -I. -x c++ -gdwarf-2 -DF_CPU=16000000UL -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DJETI -DPHASES -Os -
mrelax -mstrict-X -fshort-enums -Wall -MD -MP -MF .dep/lcd.o.d lcd.cpp -o obj/lcd.o
In file included from lcd.cpp:17:0:
er9x.h:83:13: error: expected primary-expression before '__attribute__'
#define APM __attribute__(( section(".progmem.data") ))

It appears that gcc doesnt like that macro replacement of the __attribute__ directive. Ive googled the issue like crazy, but haven't been able to find a solution. Everything else seems to compile fine; its just the lcd c++ file that's having issues (so far...).


Can someone please help me out? Im not a gcc guru, so I'm stuck on how to get it to work...

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

Re: er9x development

Post by MikeB »

What version is your GCC? I'm using 4.8 under Windows.

It may be your version has already defined AMP. Try adding:
#undef APM
on the line above:
#define APM __attribute__(( section(".progmem.data") ))

Since er9x.h is included in just about everything it would be surprising if it was only lcd.cpp that has the problem.

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: er9x development

Post by MikeB »

Iksbob wrote:Would the 2561 bin work on a 1281?
I think it should work OK. The chips are the same except for the amount of flash I believe.
I'll add an er9x-2561.hex to the build for when I do a release.

I'll also try to get eepe updated to allow selection of the 2561!

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: er9x development

Post by jhsa »

And here we go again.. :)
Before I do it, and just to be sure ;) Is there any ARM processor that is pin compatible?? :D :mrgreen:
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: er9x development

Post by MikeB »

Not that I know of!

I've got this idea of using something with an ARM on it and using a high speed serial connection to the M64. Then use the M64 just as hardware I/O and having all the real work done in the ARM. With the Taranis, and other things, I'm not sure if the effort will be worth it. The main problem is getting an ARM board with things like SD card and audio output on it ready to use. It's then another platform to maintain.

The ideal would be a custom board that plugs in like the TelemetrEZ does and just works, but this will need quite a bit of effort to achieve. At the end of the day, how many users will want the expense of such an upgrade to the 9X when there are other, ready made, TXs available running the open source firmware.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Iksbob
Posts: 121
Joined: Wed Dec 28, 2011 1:06 pm
Country: -

Re: er9x development

Post by Iksbob »

MikeB wrote:At the end of the day, how many users will want the expense of such an upgrade to the 9X when there are other, ready made, TXs available running the open source firmware.
Yep, that's pretty much how I feel. While an upgrade board would likely be less expensive, the ARM-based Taranis boasts other "upgrades" such as a larger display, shoulder pots, built-in FrSky module w/model match features and reduced latency (though this could probably be implemented, provided FrSky module firmware that accepts channel data over the serial bus rather than PPM), better ADC resolution (a reason to replace the atmega chip, even as a simple I/O controller) and so on.

I can't help but shake my head every time somebody has an issue at the field with their (intentionally software feature-limited) DSM radio. Having a superior (in price and functionality) out-of-the-box radio to show off would make me feel better. :)
csurf
Posts: 107
Joined: Sat Aug 17, 2013 9:13 am
Country: -

Re: er9x development

Post by csurf »

MikeB wrote:What version is your GCC? I'm using 4.8 under Windows.

It may be your version has already defined AMP. Try adding:
#undef APM
on the line above:
#define APM __attribute__(( section(".progmem.data") ))

Since er9x.h is included in just about everything it would be surprising if it was only lcd.cpp that has the problem.

Mike.
tried both 4.8.1 and 4.9 experimental version.
running it on fedora 16 x64 linux box.

I actually did try undefining APM, but it still didnt work.
I even tried doing something like this:

#define APM ( __attribute__(( section(".progmem.data") )) )

...and...

#define APM() ( __attribute__(( section(".progmem.data") )) )

neither worked.
any other ideas?

FYI, the main reason Im trying to re-compile is because I just did the speaker mod, and I was hoping to get the options for new alert sounds (on my version1 T9x). It seems that the downloadable builds dont include the optional alert tones.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: er9x development

Post by MikeB »

I'll need to get a copy of 4.8.1 to see if something has changed. I just had a quick look on the web and didn't find anything obvious.
Obviously, the line of code works on 4.8.0.
For compiler testing, you could try changing the APM text into something else (XAPM?). This might tell us if APM is known by the compiler specifically.

Where are you looking for the alert tones for the speaker?
Suppose you want an alert when the A1 voltage drops low.
Set a custom switch:
S1 v<ofs A1 4.7
Now go to the SAFETY SWITCHES (I need to rename this I think)
On any channel you are NOT using as a safety switch, change the TYPE to 'A', set the switch to the custom switch you have set up, and then select the warning tone you require.

er9x did have the ability to use these tones instead of the FrSky module tones for A1, A2, RSSI and TSSI, but it used up a lot of flash space. After that had been implemented, the above method was added. I recently chose to remove the dedicated method in favour of using the above method. The above method has to be used for other telemetry values anyway so it seemed consistent to have them all done this way, as well as saving flash space.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
csurf
Posts: 107
Joined: Sat Aug 17, 2013 9:13 am
Country: -

Re: er9x development

Post by csurf »

I saw a youtube video of the custom alert tones such as tadaa and scifi. the vid is linked from the speaker mod tutorial page. those are the tones I'm referring to. the video clearly shows being able to select the different tones from telemetry and radio setup menus I believe. I didn't see anything having to do with setting up custom switches.

ill try changing the macro name to something else as soon as I can get back near a computer, and ill post back with the results...
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: er9x development

Post by Kilrah »

csurf wrote:the video clearly shows being able to select the different tones from telemetry and radio setup menus I believe
That would be what has been removed in the meantime :)
csurf
Posts: 107
Joined: Sat Aug 17, 2013 9:13 am
Country: -

Re: er9x development

Post by csurf »

MikeB wrote:I'll need to get a copy of 4.8.1 to see if something has changed. I just had a quick look on the web and didn't find anything obvious.
Obviously, the line of code works on 4.8.0.
For compiler testing, you could try changing the APM text into something else (XAPM?). This might tell us if APM is known by the compiler specifically.
...
Mike.
ok, I don't know what (if anything) changed recently in the repo, but I was finally able to compile succesfully. This time around, though, I ran into another error which was more of a syntax error; the issue was with the file "font_dblsize.lbm"...the '#include' for that file within lcd.cpp is meant to be wrapped by an array definition, but the array is *also* defined in the fond_dblsize.lbm source file. So, the solution was to comment out the relevant code so that only the actual array values are included:

//prog_uchar APM font_dblsize[] = {
160,96,128,...

Now that I've managed to get passed the compile step, I've run into an issue when the 'avr-size' command gets called; the linux version of avr-size doesnt support the '-C --mcu=atmega*' options. These appear to be specific to version of avr-size that's included with WinAVR. So, Im not sure how to get this last issue solved. Any ideas?
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: er9x development

Post by jhsa »

Mike, I just flashed the latest 803 and here is what I found..
Splash screen name:

It is not possible to edit the name with the encoder.
it is possible to do it with the stick scroll and the keys but you can only start scrolling the letters in one direction, up through all the capital letters first. if you want to start by scrolling down, is not possible.

Model select menu:

It is now possible to scroll up and down with the encoder through all the models and select it. that is great thank you.
But to go to the edit menu you must press the right key. not with the encoder..
Also to enter edit the model, now you must first enter the model select menu by either pressing long the center button or the menu button, and then press right to edit the model..
IMO that doesn't feel right. I think that if it is intended to separate the model select menu from the others, then there should be a way of entering edit directly. What do you think?

GVARS menu.. by default some GVARS have some values. shouldn't them be all zero? Please see the picture.

Thanks for all your work on this firmware

João
Attachments
190820132588.jpg
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: er9x development

Post by MikeB »

csurf wrote:This time around, though, I ran into another error which was more of a syntax error; the issue was with the file "font_dblsize.lbm"...the '#include' for that file within lcd.cpp is meant to be wrapped by an array definition, but the array is *also* defined in the fond_dblsize.lbm source file.
Did you use the font file direct from the repo? Or did you get the .XBM file converted?
I don't have RUBY installed, so I don't use the XBM file. Get the LBM file directly from the repo.
csurf wrote:Now that I've managed to get passed the compile step, I've run into an issue when the 'avr-size' command gets called; the linux version of avr-size doesnt support the '-C --mcu=atmega*' options. These appear to be specific to version of avr-size that's included with WinAVR. So, Im not sure how to get this last issue solved. Any ideas?
Not immediately, I haven't ever used linux to compile. While useful, avr-size is not vital to getting a successful compile to a hex file.

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: er9x development

Post by MikeB »

jhsa wrote:It is not possible to edit the name with the encoder.
but you can only start scrolling the letters in one direction,
I don't think I've done the encoder for that (yet). I can't reproduce the scrolling problem, both keys and stick change letters both up and down.
jhsa wrote:Model select menu:
But to go to the edit menu you must press the right key. not with the encoder..
Also to enter edit the model, now you must first enter the model select menu by either pressing long the center button or the menu button
These actually take you to the 'last' menu you were in.
jhsa wrote:IMO that doesn't feel right. I think that if it is intended to separate the model select menu from the others, then there should be a way of entering edit directly. What do you think?
I'm not sure we have the keys to allow that without losing something else.
jhsa wrote:GVARS menu.. by default some GVARS have some values. shouldn't them be all zero? Please see the picture./quote]

Again, mine are all zero. Your display isn't correct, the text isn't a valid name. It is as though you had something in the EEPROM that has been picked up. Did you have zeroes and --- in them before you loaded 803?

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: er9x development

Post by jhsa »

well, I never used GVARS on er9x.. let me create a new model to see what happens..
You're right, a new model doesn't show those values on the GVARS.
Will have to check them all..

About the name. If you have a name inserted, try to scroll down to the space. you will see that it stops there and don't go down anymore to the normal letters..
a new name does the same. starts on the space but if you want to insert a small letter you can't go down to do it. you have to go through all the capital letters before..

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: er9x development

Post by MikeB »

I thought that is how it has always been, going through the UPPER case letters before you get to the lower case ones. Same as on the model name editing.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Re: er9x development

Post by gohsthb »

I remember always having to go through upper case before getting to lower case and finally numbers.
When Gvars first came out and I loaded er9x with them, my gvars weren't zero. I haven't checked after creating a new model latetly, what they get set to.
-Gohst
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: er9x development

Post by jhsa »

ok, maybe the letters were always like that. I confess I can't really remember :oops:

maybe there would there be a better way of doing it? I mean without going through all the normal and capital letters..
maybe start with normal letters and for example pressing menu long displaying the capital letters?

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: er9x development

Post by MikeB »

As a result of other changes I've already done, I can get the encoder working with the owner name, the same as it works with the model name.
Surprisingly, this saves 274 bytes flash! I've tested the changes in ersky9x, I'll test the er9x changes later tonight.

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: er9x development

Post by jhsa »

thank you Mike..

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: er9x development

Post by MikeB »

Tested OK on the '128 version. I'll do the '64 version tomorrow, I want to use that Tx for flying tomorrow so I don't want to put test firmware on it until afterwards.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: er9x development

Post by ReSt »

Suggestion for Vario setup:

In the setup menu for the variosink tones, you have to switch ON to get the tones OFF and OFF to get it ON.
That is irritating and not really logical.

Change the wording and the action of the "No Sink Tones - ON/OFF" to "Sink Tones - ON/OFF" that means ON is sink tones ON and OFF is OFF.

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

Re: er9x development

Post by MikeB »

I'll have a look into that!

I think I did it that way so the default when creating a model was sink tones sounding.

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: er9x development

Post by jhsa »

ReSt wrote:"Sink Tones - ON/OFF" that means ON is sink tones ON and OFF is OFF.

Reinhard
+1 to that ;)

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: er9x development

Post by MikeB »

I hope to post a test version of er9x soon. It will include XJT support and also fix the stick mode problems.
The plan for the mode is to have each stored model include a flag to indicate whether it it is 'before' or 'after' this change. On loading the model, if it is 'before' then the mix sources will be changed to the new standard, based on the currently selected stick mode. The model will then be saved as 'after'. An ALERT will also be raised for the user to check th mixes are correct.
Enough flash is saved by doing the changes that this extra code doesn't make the total flash usage increase.

I'll be updating eepe to handle either type of model, and, hopefully convert between them.

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: er9x development

Post by MikeB »

A few things have delayed me, but I also thought users with '128 or '2561 radios would like some extras.
I think I have 6 extra custom switches and 8 extra voice only switches working on these processors. The extra custom switches cause a slight problem as any 'momentary' switches are logically moved. You will notice this if, for example, you use TRNm to trigger the timer, it turns into ELEm.

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

Post Reply

Return to “er9x”