Can't compile Mega with P35 IR plugin

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Bram81
New user
Posts: 8
Joined: 16 Feb 2016, 13:54

Can't compile Mega with P35 IR plugin

#1 Post by Bram81 » 09 Jul 2020, 12:12

Hi,

For days now I've been trying to compile a custom build of Mega in Arduino ide. Actually the only two plugins I would need are P35, the IRTX one and P74 for a TSL2591. That last one is still in test. I'm using Arduino ide 1.8.13 and the latest mega build, Release mega-20200703.

I succeed in compiling whatever custom build I try, accept when I try to add P35 IRTX, which is ruled out by default in define_plugin_sets.h (probably because of the IR library size) I get a compile error:

'st' was not declared in this scope - regarding this line:
st.protocol = strToDecodeType(sprotocol.c_str());

I was able to get rid of that error by adding
stdAc::state_t st, prev;
to that section of the code, but after that it keeps comming up with other 'was not declared in this scope' errors.

Does this make any sense to one of you?

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Can't compile Mega with P35 IR plugin

#2 Post by TD-er » 09 Jul 2020, 15:03

Well the build of the IR plugins is indeed split into a number of options.

For some defines we also created a wrapper.
So it is best for you to define PLUGIN_BUILD_IR

To fix the build issues:
In _P035_IRTX.ino you need to add this define wrapping the handle_AC_IRremote function like this:

Code: Select all

#ifdef P016_P035_Extended_AC
boolean handle_AC_IRremote(const String &cmd) {
....
}
#endif
I will make a pull request for it.

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Can't compile Mega with P35 IR plugin

#3 Post by TD-er » 09 Jul 2020, 16:27

I noticed a few more build issues when building via Arduino IDE, when I tried to create a custom build via just a few defines in the file ESPEasy.ino.

See pull request: https://github.com/letscontrolit/ESPEasy/pull/3162

Build output in Arduino IDE:

Code: Select all

WARNING: library LiquidCrystal_I2C claims to run on avr architecture(s) and may be incompatible with your current board which runs on esp8266 architecture(s).
Executable segment sizes:
IROM   : 901796          - code in flash         (default or ICACHE_FLASH_ATTR) 
IRAM   : 31024   / 32768 - code in IRAM          (ICACHE_RAM_ATTR, ISRs...) 
DATA   : 1764  )         - initialized variables (global, static) in RAM/HEAP 
RODATA : 5708  ) / 81920 - constants             (global, static) in RAM/HEAP 
BSS    : 35008 )         - zeroed variables      (global, static) in RAM/HEAP 
Sketch uses 940292 bytes (90%) of program storage space. Maximum is 1044464 bytes.
Global variables use 42480 bytes (51%) of dynamic memory, leaving 39440 bytes for local variables. Maximum is 81920 bytes.
With these 2 defines in ESPEasy.ino:

Code: Select all

#define PLUGIN_BUILD_NORMAL_IR
#define USES_P074

Bram81
New user
Posts: 8
Joined: 16 Feb 2016, 13:54

Re: Can't compile Mega with P35 IR plugin

#4 Post by Bram81 » 10 Jul 2020, 10:45

Thank you very much! That indeed did the trick!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 96 guests