Error compiling er9x on macOS

er9x is the best known firmware. It has a superb range of features and is well supported by the community. Well worth trying out.
Post Reply
Efrieh
Posts: 10
Joined: Fri Jun 02, 2017 3:20 pm
Country: Germany

Error compiling er9x on macOS

Post by Efrieh » Sat Jun 30, 2018 9:03 pm

Hi,
I'm trying to compile er9x on macOS with serial LCD enabled for an Atmega128. But I get the error message:

Code: Select all

menus.cpp: In function 'int16_t calc_scaler(uint8_t, uint8_t*, uint8_t*)':
menus.cpp:283:3: error: 'store_telemetry_scaler' was not declared in this scope
   store_telemetry_scaler( epscaler->dest, value ) ;
   ^~~~~~~~~~~~~~~~~~~~~~
menus.cpp:283:3: note: suggested alternative: 'get_telemetry_value'
   store_telemetry_scaler( epscaler->dest, value ) ;
   ^~~~~~~~~~~~~~~~~~~~~~
   get_telemetry_value
menus.cpp:976: confused by earlier errors, bailing out
make: *** [obj/menus.o] Error 1
Is there a way to fix this?

P.S: This is the first time I'm trying to compile er9x myself so I'm a complete newby :roll:

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

Re: Error compiling er9x on macOS

Post by MikeB » Sat Jun 30, 2018 10:45 pm

What command line are you using?
You need:
make CPU=128 EXT=FRSKY

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

Efrieh
Posts: 10
Joined: Fri Jun 02, 2017 3:20 pm
Country: Germany

Re: Error compiling er9x on macOS

Post by Efrieh » Sat Jun 30, 2018 10:52 pm

Hi Mike,

I tried that and now I get the following error:

Code: Select all

menus.cpp:976:56: internal compiler error: in type_hash_canon, at tree.c:6619
 typedef PROGMEM void (*MenuFuncP_PROGMEM)(uint8_t event);
Oh and I just stumbled on flybabos post about custom lcds on rcgroups (https://www.rcgroups.com/forums/showthr ... custom-LCD) but it somehow doesn't work for me :(

But I've tried a old build posted by midelic on the core9x thread and that does work. (https://www.rcgroups.com/forums/showthr ... %21/page65)

Efrieh
Posts: 10
Joined: Fri Jun 02, 2017 3:20 pm
Country: Germany

Re: Error compiling er9x on macOS

Post by Efrieh » Sun Jul 01, 2018 12:16 pm

Essentially I just need the "normal", latest er9x-128 configured for serial LCD. But if I follow flybabos tutorial I just get a blank screen (even after changing the contrast). The older version from midelic (for an Atmega64) does work on my Atmgea128 devboard and core9x prototype (also 128).

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

Re: Error compiling er9x on macOS

Post by MikeB » Sun Jul 01, 2018 5:37 pm

That may be a problem with the compiler you are using. It looks like that typedef is a copy of the one in "menus.h", so you might try commenting out that line in "menus.cpp".

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


Efrieh
Posts: 10
Joined: Fri Jun 02, 2017 3:20 pm
Country: Germany

Re: Error compiling er9x on macOS

Post by Efrieh » Sun Jul 01, 2018 7:06 pm

Thank you, will try that when I get home.

Efrieh
Posts: 10
Joined: Fri Jun 02, 2017 3:20 pm
Country: Germany

Re: Error compiling er9x on macOS

Post by Efrieh » Sun Jul 01, 2018 8:06 pm

Ok, now I get a few other errors :shock:

Code: Select all

In file included from menus.cpp:17:
menus.cpp: In function 'void menuProcModelIndex(uint8_t)':
en.h:231:28: error: unable to find string literal operator 'operator""STR_THR_REVERSE' with 'const char [55]', 'unsigned int' arguments
 #define STR_T_EXPO         "T-Expo-Dr"
                            ^~~~~~~~~~~
er9x.h:162:69: note: in definition of macro 'PSTR'
 #define PSTR(s) (__extension__({const static prog_char APM __c[] = (s);&__c[0];}))
                                                                     ^
en.h:274:119: note: in expansion of macro 'STR_T_EXPO'
 #define STR_VOL_PAGE    STR_E_LIMITS"\037""Thr. Default\037"STR_THR_REVERSE"\037""Throttle Open""\037"STR_T_TRIM"\037"STR_T_EXPO
                                                                                                                       ^~~~~~~~~~
menus.cpp:11643:34: note: in expansion of macro 'STR_VOL_PAGE'
       lcd_puts_Pleft(    y, PSTR(STR_VOL_PAGE));
                                  ^~~~~~~~~~~~
en.h:238:97: error: inconsistent user-defined literal suffixes 'STR_TRIM_SWITCH' and 'STR_BEEP_CENTRE' in string literal
 #define STR_TRIM_PAGE    STR_TRIM_INC"\037"STR_TRIM_SWITCH"\037Hi.Res Slow/Delay\037"STR_TRAINER"\037"STR_BEEP_CENTRE
                                                                                                 ^~~~~~~~~~~~~~~~~~~~~
er9x.h:162:69: note: in definition of macro 'PSTR'
 #define PSTR(s) (__extension__({const static prog_char APM __c[] = (s);&__c[0];}))
                                                                     ^
menus.cpp:11696:34: note: in expansion of macro 'STR_TRIM_PAGE'
       lcd_puts_Pleft(    y, PSTR(STR_TRIM_PAGE));
                                  ^~~~~~~~~~~~~
en.h:238:97: error: unable to find string literal operator 'operator""STR_TRIM_SWITCH' with 'const char [37]', 'unsigned int' arguments
 #define STR_TRIM_PAGE    STR_TRIM_INC"\037"STR_TRIM_SWITCH"\037Hi.Res Slow/Delay\037"STR_TRAINER"\037"STR_BEEP_CENTRE

Just to confirm that my wiring for flybabos custom hex is not wrong: I need to connect the display (standard Zolen) in the following order, right?
PC5 -> SI (DB7)
PC4 -> SCL (DB6)
PC3 -> A0
PC2 -> RES
PC1 -> CS
and obviously GND and VCC

Could you compile a standard 128-version with serial LCD enabled? :oops:
That would fix the problem for me

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

Re: Error compiling er9x on macOS

Post by MikeB » Sun Jul 01, 2018 8:21 pm

Try this version of en.h. I think some compilers require a space between multiple strings in a define.

I'll need to investigate what the serial connectins are, I've never used one and flybabo did the changes to support them.
I'll also need to check what defines need to be set for a serial LCD compile.

Mike
Attachments
en.zip
(7.81 KiB) Downloaded 17 times
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

Efrieh
Posts: 10
Joined: Fri Jun 02, 2017 3:20 pm
Country: Germany

Re: Error compiling er9x on macOS

Post by Efrieh » Sun Jul 01, 2018 8:30 pm

That worked, thanks!
Still got the blank screen though :roll:
Edit: It WORKRS! Now I'm all set for testing :D

Here is the original post by flybabo: https://www.rcgroups.com/forums/showpos ... tcount=917 ;)

Post Reply

Return to “er9x”