undefined reference to `do_process_c00x

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

undefined reference to `do_process_c00x

#1 Post by moelski » 26 Sep 2020, 07:59

Hi !

Just try to compile the latest mega release with Arduino IDE. I use a custom.h for configuration.
If I just select

Code: Select all

#define USES_C002   // Domoticz MQTT
I got this errors:

Code: Select all

C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\DelayQueueElements.cpp.o:(.literal._Z24process_c003_delay_queuev+0x4): undefined reference to `do_process_c003_delay_queue(int, simple_queue_element_string_only const&, ControllerSettingsStruct&)'
C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\DelayQueueElements.cpp.o:(.literal._Z24process_c004_delay_queuev+0x8): undefined reference to `do_process_c004_delay_queue(int, C004_queue_element const&, ControllerSettingsStruct&)'
C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\DelayQueueElements.cpp.o:(.literal._Z24process_c007_delay_queuev+0x8): undefined reference to `do_process_c007_delay_queue(int, C007_queue_element const&, ControllerSettingsStruct&)'
C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\DelayQueueElements.cpp.o:(.literal._Z24process_c008_delay_queuev+0x8): undefined reference to `do_process_c008_delay_queue(int, queue_element_single_value_base const&, ControllerSettingsStruct&)'
C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\DelayQueueElements.cpp.o:(.literal._Z24process_c009_delay_queuev+0x8): undefined reference to `do_process_c009_delay_queue(int, C009_queue_element const&, ControllerSettingsStruct&)'
C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\DelayQueueElements.cpp.o:(.literal._Z24process_c010_delay_queuev+0x4): undefined reference to `do_process_c010_delay_queue(int, queue_element_single_value_base const&, ControllerSettingsStruct&)'
That´s confusing because the controller from 3-10 are not selected.

But it´s getting more strange ....
If I deselect all controller in the custom.h and use

Code: Select all

//#define CONTROLLER_SET_NONE
#define MQTT_ONLY
it will compile fine. :shock:

Any ideas whats going wrong here ?

regards
Dominik
regards
Dominik

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

Re: undefined reference to `do_process_c00x

#2 Post by TD-er » 26 Sep 2020, 13:50

What else did you define to use the Custom.h?

You must also have this defined in the ESPEasy.ino file (at the top of the file)

Code: Select all

#define USE_CUSTOM_H
What controller related defines do you have in the Custom.h?

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: undefined reference to `do_process_c00x

#3 Post by moelski » 26 Sep 2020, 15:07

Hi !

First Lines of Espeasy.ino:

Code: Select all

#define USE_CUSTOM_H
#include <Arduino.h> 
and attached is my Custom.h.

For me it looks ok ... Try to build for ESP8266.

Dominik
Attachments
Custom.zip
(4.21 KiB) Downloaded 349 times
regards
Dominik

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

Re: undefined reference to `do_process_c00x

#4 Post by TD-er » 26 Sep 2020, 19:01

I just tested using PlatformIO and your Custom.h file and it builds just fine
So I have no clue why Arduino IDE is complaining here.
I also checked, but at least C003.ino doesn't have this line split over multiple lines

Code: Select all

// Uncrustify may change this into multi line, which will result in failed builds
// *INDENT-OFF*
bool do_process_c003_delay_queue(int controller_number, const C003_queue_element& element, ControllerSettingsStruct& ControllerSettings);
// *INDENT-ON*
If that line is formatted to occupy multiple lines, then you would get build errors like you showed.

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

Re: undefined reference to `do_process_c00x

#5 Post by TD-er » 26 Sep 2020, 19:07

Can you add (as a test) this as 2nd line of the DelayQueueElements.cpp file:

Code: Select all

#include "../../ESPEasy_common.h"
It is already included in the .h file which is included in the cpp on the first line, but I've seen strange things being done by the Arduino preprocessor.

And I stronly advice you to use PlatformIO instead of ArduinoIDE.

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: undefined reference to `do_process_c00x

#6 Post by moelski » 27 Sep 2020, 08:56

Hi !
I also checked, but at least C003.ino doesn't have this line split over multiple lines
No it´s fine in one line ...
Can you add (as a test) this as 2nd line of the DelayQueueElements.cpp file:

Code: Select all

x106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\DelayQueueElements.cpp.o: in function `process_c001_delay_queue()':
C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue/DelayQueueElements.cpp:40: undefined reference to `do_process_c003_delay_queue(int, simple_queue_element_string_only const&, ControllerSettingsStruct&)'
c:/users/dominik schmidt/desktop/arduino-espeasy/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\DelayQueueElements.cpp.o: in function `process_c003_delay_queue()':
C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue/DelayQueueElements.cpp:48: undefined reference to `do_process_c003_delay_queue(int, simple_queue_element_string_only const&, ControllerSettingsStruct&)'
c:/users/dominik schmidt/desktop/arduino-espeasy/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue/DelayQueueElements.cpp:48: undefined reference to `do_process_c004_delay_queue(int, C004_queue_element const&, ControllerSettingsStruct&)'
c:/users/dominik schmidt/desktop/arduino-espeasy/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\DelayQueueElements.cpp.o: in function `process_c004_delay_queue()':
c:\users\dominik schmidt\desktop\arduino-espeasy\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\bits/stl_vector.h:773: undefined reference to `do_process_c004_delay_queue(int, C004_queue_element const&, ControllerSettingsStruct&)'
Multiple libraries were found for "Servo.h"
 Used: C:\Users\Dominik Schmidt\Desktop\Arduino-EspEasy\portable\packages\esp8266\hardware\esp8266\2.7.4\libraries\Servo
 Not used: C:\Users\Dominik Schmidt\Desktop\Arduino-EspEasy\libraries\Servo
c:/users/dominik schmidt/desktop/arduino-espeasy/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\DelayQueueElements.cpp.o:C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\../ControllerQueue/C004_queue_element.h:17: undefined reference to `do_process_c007_delay_queue(int, C007_queue_element const&, ControllerSettingsStruct&)'
c:/users/dominik schmidt/desktop/arduino-espeasy/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\DelayQueueElements.cpp.o: in function `process_c007_delay_queue()':
C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\../ControllerQueue/ControllerDelayHandlerStruct.h:56: undefined reference to `do_process_c007_delay_queue(int, C007_queue_element const&, ControllerSettingsStruct&)'
c:/users/dominik schmidt/desktop/arduino-espeasy/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\DelayQueueElements.cpp.o:c:\users\dominik schmidt\desktop\arduino-espeasy\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\ext/new_allocator.h:110: undefined reference to `do_process_c008_delay_queue(int, queue_element_single_value_base const&, ControllerSettingsStruct&)'
c:/users/dominik schmidt/desktop/arduino-espeasy/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\DelayQueueElements.cpp.o: in function `process_c008_delay_queue()':
C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue/DelayQueueElements.cpp:56: undefined reference to `do_process_c008_delay_queue(int, queue_element_single_value_base const&, ControllerSettingsStruct&)'
c:/users/dominik schmidt/desktop/arduino-espeasy/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue/DelayQueueElements.cpp:67: undefined reference to `do_process_c009_delay_queue(int, C009_queue_element const&, ControllerSettingsStruct&)'
c:/users/dominik schmidt/desktop/arduino-espeasy/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\DelayQueueElements.cpp.o: in function `process_c009_delay_queue()':
C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\../ControllerQueue/ControllerDelayHandlerStruct.h:56: undefined reference to `do_process_c009_delay_queue(int, C009_queue_element const&, ControllerSettingsStruct&)'
c:/users/dominik schmidt/desktop/arduino-espeasy/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\DelayQueueElements.cpp.o:c:\users\dominik schmidt\desktop\arduino-espeasy\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\bits/stl_list.h:108: undefined reference to `do_process_c010_delay_queue(int, queue_element_single_value_base const&, ControllerSettingsStruct&)'
c:/users/dominik schmidt/desktop/arduino-espeasy/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\DelayQueueElements.cpp.o: in function `process_c010_delay_queue()':
C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_623874\sketch\src\ControllerQueue\../ControllerQueue/ControllerDelayHandlerStruct.h:135: undefined reference to `do_process_c010_delay_queue(int, queue_element_single_value_base const&, ControllerSettingsStruct&)'
collect2.exe: error: ld returned 1 exit status
Doesn´t change that much ...
And I stronly advice you to use PlatformIO instead of ArduinoIDE.
Yes that could be an option. But there is one thing I really hate by using those tools ... It´s a lot of time to get PlatformIO up and running.
I like the Arduino IDE because of it´s portable feature. You put all the stuff you need into one folder and you are done.
If I have to do some changes for my devices I can start over in seconds - even on another or reinstalled computer.
Anyway ... I think it is a nice feature that EspEasy can be compiled in the Arduino IDE. So hope we can fix this issue :-)
regards
Dominik

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

Re: undefined reference to `do_process_c00x

#7 Post by TD-er » 27 Sep 2020, 09:45

Well this one is caused by you having the "servo" library included in the Arduino library manager

Code: Select all

Multiple libraries were found for "Servo.h"
 Used: C:\Users\Dominik Schmidt\Desktop\Arduino-EspEasy\portable\packages\esp8266\hardware\esp8266\2.7.4\libraries\Servo
 
And just to be sure, you are using the latest sources?

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: undefined reference to `do_process_c00x

#8 Post by moelski » 27 Sep 2020, 09:55

Hi !
Well this one is caused by you having the "servo" library included in the Arduino library manager
Ok but that souldn´t be a real problem ...

And just to be sure, you are using the latest sources?
I used ESPEasy-mega-20200913.
https://github.com/letscontrolit/ESPEas ... a-20200913
regards
Dominik

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

Re: undefined reference to `do_process_c00x

#9 Post by TD-er » 27 Sep 2020, 10:29

Sources of 2 weeks ago is close enough.

Right now I really don't have a clue why Arduino IDE is messing with this code.
I even tend to believe it is a bug in the Arduino code parsing. (Arduino does generate a .cpp file from .ino files)
So I guess the only way to fix it is to move those process delay queue functions into .h/.cpp files, which is quite a lot of work.

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

Re: undefined reference to `do_process_c00x

#10 Post by TD-er » 27 Sep 2020, 10:36

Can you try adding this to _CPlugin_Helper.h:

Code: Select all

#include "ESPEasy_common.h"

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

Re: undefined reference to `do_process_c00x

#11 Post by TD-er » 27 Sep 2020, 12:47

moelski wrote: 26 Sep 2020, 07:59 [...]
But it´s getting more strange ....
If I deselect all controller in the custom.h and use

Code: Select all

//#define CONTROLLER_SET_NONE
#define MQTT_ONLY
it will compile fine. :shock:
[...]
That's something I really don't understand as the only place where it is used, is in the define_plugin_sets.h:

Code: Select all

#ifdef MEMORY_ANALYSIS
  #ifdef MQTT_ONLY
    #define USES_C002   // Domoticz MQTT
    #define USES_C005   // Home Assistant (openHAB) MQTT
    #define USES_C006   // PiDome MQTT
    #define USES_C014   // homie 3 & 4dev MQTT
    #define USES_P037   // MQTTImport
  #endif
#endif
As you can see it is even wrapped in a separate #ifdef which is not defined when you build it.
So this makes even a stronger case in the suspicion this is a bug in Arduino IDE.

So please double check you have the code base only once in the directory ESPEasy (same dir name as ESPEasy.ino) and nowhere else where the Arduino IDE can look for code.
There are others out there also building using Arduino IDE and they don't report build issues like these.

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: undefined reference to `do_process_c00x

#12 Post by moelski » 27 Sep 2020, 15:24

Hi !
Can you try adding this to _CPlugin_Helper.h:
Did not fix anything. Still the same errors.
So please double check you have the code base only once in the directory ESPEasy (same dir name as ESPEasy.ino) and nowhere else where the Arduino IDE can look for code.
Ok some words about my setup ...

I created a directory for the Arduino IDE.
Created the portable folder and installes the 8266 / 32 Addons.
In the portable folder there is a sketchbook folder where I created a new ESPEasy folder.
In this folder I placed the files from the src directory of ESPEasy.
The portable\sketchbook\libraries folder contains all the ESPEasy Libs which are shipped with the github ZIP package.

Thats all. I don't think that the Arduino IDE will find any other sources with this setup ...

If it will help I can ZIP my whole Arduino setup and you can download it.
Maybe you can point out the problem ?
regards
Dominik

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: undefined reference to `do_process_c00x

#13 Post by moelski » 27 Sep 2020, 15:45

Ok just in case I broke the sources I downloaded the latest release again from github.
It compiles fine without the custom.h. But as soon as I include it the problem raises again.

So I tried the mega-20200812 release. But the results are the same.

I´ve also tried to move the ESPEasy folder out of the portable\sketchbook folder.
But again ... Same error. :cry:
regards
Dominik

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

Re: undefined reference to `do_process_c00x

#14 Post by TD-er » 27 Sep 2020, 16:57

I guess it is by far the easiest way if you share your portable directory.

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: undefined reference to `do_process_c00x

#15 Post by moelski » 27 Sep 2020, 18:05

Send you a PM ...
regards
Dominik

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: undefined reference to `do_process_c00x

#16 Post by moelski » 28 Sep 2020, 04:46

Hi !

I did some more tests ... I used the portable Arduino setup on 3 different computers in my house ...
And all report the same error. So it is reproduceable :roll:

And at the end of this topic there is an older version of Arduino IDE + Sources (ESPEasy 20020410):
viewtopic.php?f=6&t=7598
Direct Link:
http://www.letscontrolit.com/downloads/ ... Easy32.zip

I tried the custom.h setup within this portable version and it worked. :o

Some other Tests ...
ESPEasy-mega-20200801 -> did not compile
ESPEasy-mega-20200720 -> did not compile
ESPEasy-mega-20200703 -> success
ESPEasy-mega-20200608 -> success
ESPEasy-mega-20200515 -> success
ESPEasy-mega-20020410 -> success

So something was broken between 20200703 and 20200720 :?
regards
Dominik

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

Re: undefined reference to `do_process_c00x

#17 Post by TD-er » 28 Sep 2020, 09:30

I just checked the changes between 20200703 and 20200720 and one of the changes made there is to split the DelayQueueElements.h file into a .h and .cpp
It looks like the Arduino IDE does make function prototypes first and then evaluates the defines, which is a bug.
I've seen something similar in the past with PlatformIO, but managed to work around it. The issue I created for it was confirmed to be a bug, with the status "won't fix, convert to .h/.cpp instead of .ino.

So it seems those functions declared using a macro for handling the controller queue must be moved away from the .ino files to make Arduino IDE happy again.
I have to think about it.
Moving those functions to separate files isn't a big deal, but if it really is the only way to fix it, then we should have a look at ALL .ino files where code is depending on defines set in a .h file (as is done in Custom.h)
Arduino IDE doesn't seem to check for multiple levels of #ifdef when generating the function declarations.

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

Re: undefined reference to `do_process_c00x

#18 Post by TD-er » 28 Sep 2020, 09:47

OK, found a way for you to fix it, but it shouldn't be needed like this.

In ESPEasy_common.h, at the top you should also define the USE_CUSTOM_H

Like this:

Code: Select all

#ifndef ESPEASY_COMMON_H
#define ESPEASY_COMMON_H

#define USE_CUSTOM_H
It looks like what is defined in ESPEasy.ino is not defined during the rest of the compile.
So to make compiling easier in Arduino IDE, I will make sure the include of ESPEasy_common.h is done as first step in ESPEasy.ino.
This way you only need to add it once.

martinus
Normal user
Posts: 129
Joined: 15 Feb 2020, 16:57

Re: undefined reference to `do_process_c00x

#19 Post by martinus » 28 Sep 2020, 10:51

moelski wrote: 27 Sep 2020, 08:56 But there is one thing I really hate by using those tools ... It´s a lot of time to get PlatformIO up and running.
I like the Arduino IDE because of it´s portable feature. You put all the stuff you need into one folder and you are done.
If I have to do some changes for my devices I can start over in seconds - even on another or reinstalled computer.
Anyway ... I think it is a nice feature that EspEasy can be compiled in the Arduino IDE. So hope we can fix this issue :-)
I agree on that. I once tried to get PlatformIO running but i did not succeed. So i just kept using Arduino IDE portable. I also have a complete portable setup on a USB stick attached to my key-chain :ugeek:
moelski wrote: 28 Sep 2020, 04:46 And at the end of this topic there is an older version of Arduino IDE + Sources (ESPEasy 20020410):
viewtopic.php?f=6&t=7598
Direct Link:
http://www.letscontrolit.com/downloads/ ... Easy32.zip

I tried the custom.h setup within this portable version and it worked. :o
I've uploaded that zip package containing release 20200410 so people without fancy computing skills would also be able to compile a custom set of plugins without hassle, without any installation or reading long pages of instructions. Just unzip, customize the plugin selection and hit the upload button. ESPEasy plugin system was initially designed to make plugin selection as easy as possible. Just remove or add a plugin file from the root source folder. Although more recent versions also require you to patch the plugin set definitions. But still quite easy.

I tried the 20200913 source and indeed it failed using custom.h. But TD-er's fix does fix it again :D
Maybe it's time to upload a more recent zip package containing the latest release to offer "Compile for dummies" again.

I don't know if a similar simple portable approach can be done with platformIO? So just unzip a package including all tools, sources etc. and run some upload command?

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

Re: undefined reference to `do_process_c00x

#20 Post by TD-er » 28 Sep 2020, 11:04

I just added a commit which does prepare this define and also documents the Arduino IDE build process.

Currently it is possible to rename the src folder to ESPEasy and let PlatformIO know where to find the sources.
But I'm afraid we might loose all Git history on files when moving it.
I know Git does support the "rename" or "move" flags but I've seen it happen a few times where I did commit with the "move" flags but still Git/GitHub does no longer have a history on the file from before the move.

This recent file move I made did have all history retained: https://github.com/letscontrolit/ESPEas ... s/Misc.cpp
So it should be possible...

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: undefined reference to `do_process_c00x

#21 Post by moelski » 28 Sep 2020, 13:26

Maybe it's time to upload a more recent zip package containing the latest release to offer "Compile for dummies" again.
Great idea. And the option for ESP8266 should be also build in.
regards
Dominik

martinus
Normal user
Posts: 129
Joined: 15 Feb 2020, 16:57

Re: undefined reference to `do_process_c00x

#22 Post by martinus » 30 Sep 2020, 15:47

TD-er wrote: 28 Sep 2020, 11:04 I just added a commit which does prepare this define and also documents the Arduino IDE build process.

Currently it is possible to rename the src folder to ESPEasy and let PlatformIO know where to find the sources.
But I'm afraid we might loose all Git history on files when moving it.
I know Git does support the "rename" or "move" flags but I've seen it happen a few times where I did commit with the "move" flags but still Git/GitHub does no longer have a history on the file from before the move.

This recent file move I made did have all history retained: https://github.com/letscontrolit/ESPEas ... s/Misc.cpp
So it should be possible...
I tried to google instructions on "ESPEasy custom build". Found these two in the first few hits:
1) https://www.letscontrolit.com/wiki/inde ... platformio
Looks detailed with pictures and all. But this is the old wiki so ?
2) https://espeasy.readthedocs.io/en/lates ... ormIO.html
This seems to be the new documentation area but looks less suitable for starters.

I guess that someone with the right skills will be able to develop custom powershell and/or bash scripts to make everything work with a single click? (at least preparing all the requirements)
I mean check/install github, check/install python, check/install platformIO, check/install plugins, copy the right config files for ESPEasy, clone the github repo. etc
I know that Linux guru's are quite good at writing TLDR like pages of instructions and i guess Linux lovers like to endlessly type commands.

But we also have more hardware oriented users that would be served with a more Easy way to setup software.
Also for me, using the provided portable zip package based on Arduino still sounds a lot easier for the lesser skilled users in our community.

martinus
Normal user
Posts: 129
Joined: 15 Feb 2020, 16:57

Re: undefined reference to `do_process_c00x

#23 Post by martinus » 30 Sep 2020, 16:39

moelski wrote: 28 Sep 2020, 13:26
Maybe it's time to upload a more recent zip package containing the latest release to offer "Compile for dummies" again.
Great idea. And the option for ESP8266 should be also build in.
I've added the 2.7.4 ESP8266 support and updated source to 20200913 (with the small TDer patch). Verified with a custom setup on both ESP8266 and ESP32.
http://www.letscontrolit.com/downloads/ ... SPEasy.zip

So to get a custom build:
- Download and unzip to c: root drive
- Start arduino.exe from the c:\ArduinoESPEasy folder (it should automatically load the ESPEasy sketch)
- Select your board
- Adjust custom.h file
- Upload

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

Re: undefined reference to `do_process_c00x

#24 Post by TD-er » 30 Sep 2020, 17:40

If you have a GitHub account and the "gitpod" browser plugin installed, you can have a single-click build environment (literally a single click)

This Gitpod plugin is for sure for Chrome/Chromium browsers. Not sure if it also exists for other browsers.
The Gitpod button will then appear on the top of this page https://github.com/letscontrolit/ESPEasy
Right next to the green "Code" download button.

I am also working on trying to setup a web page based build environment so people can choose a set of plugins/controllers and create their own build, but that still has some work to do.
And I also have tried several other ways of making the build environment as simple as possible, so the need to have a low entrypoint is high on my priority list.

Not sure if focussing on Arduino IDE is the best idea though, as it really quickly becomes next to impossible to handle the huge amount of files in Arduino IDE.
Also you must set quite a lot of parameters yourself (flash size, etc.) so building a number of different sets is also quite some manual work in Arduino IDE.

martinus
Normal user
Posts: 129
Joined: 15 Feb 2020, 16:57

Re: undefined reference to `do_process_c00x

#25 Post by martinus » 30 Sep 2020, 19:40

TD-er wrote: 30 Sep 2020, 17:40 If you have a GitHub account and the "gitpod" browser plugin installed, you can have a single-click build environment (literally a single click)
First parts were easy, the button was there and now i'm facing a webbased IDE with the ESPEasy repo listed.
Looks promising!
But the next steps? I tried running a build task but it seems one needs to be created first, then try to create, but needs a json template.. How to proceed from here?
Is this documented somewhere?

User avatar
Ath
Normal user
Posts: 3419
Joined: 10 Jun 2018, 12:06
Location: NL

Re: undefined reference to `do_process_c00x

#26 Post by Ath » 30 Sep 2020, 21:28

TD-er wrote: 30 Sep 2020, 17:40 This Gitpod plugin is for sure for Chrome/Chromium browsers. Not sure if it also exists for other browsers.
The Gitpod button will then appear on the top of this page https://github.com/letscontrolit/ESPEasy
Right next to the green "Code" download button.
There is also a plugin/extension for Firefox available: https://addons.mozilla.org/en-US/firefox/addon/gitpod/
Installed it, and it works, but I'm not sure I want to use it, parallel to my, nicely working, VSCode/PlatformIO setup.
/Ton (PayPal.me)

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

Re: undefined reference to `do_process_c00x

#27 Post by TD-er » 30 Sep 2020, 23:08

martinus wrote: 30 Sep 2020, 19:40
TD-er wrote: 30 Sep 2020, 17:40 If you have a GitHub account and the "gitpod" browser plugin installed, you can have a single-click build environment (literally a single click)
First parts were easy, the button was there and now i'm facing a webbased IDE with the ESPEasy repo listed.
Looks promising!
But the next steps? I tried running a build task but it seems one needs to be created first, then try to create, but needs a json template.. How to proceed from here?
Is this documented somewhere?
I will make a video on how to proceed.
And I also saw we can make a pre-compiled snapshot of this so you don't need to do it all when no source code has changed.

martinus
Normal user
Posts: 129
Joined: 15 Feb 2020, 16:57

Re: undefined reference to `do_process_c00x

#28 Post by martinus » 01 Oct 2020, 10:09

Also noticed that the free account does not allow for private repos. So you should avoid using sensitive data in your custom sources or pay 8 euro per month to make a private repo (?)
I guess the free account suits collaborating on repos that are already public without issues.

martinus
Normal user
Posts: 129
Joined: 15 Feb 2020, 16:57

Re: undefined reference to `do_process_c00x

#29 Post by martinus » 01 Oct 2020, 16:35

TD-er wrote: 30 Sep 2020, 23:08 I will make a video on how to proceed.
Today i gave my earlier local install a new try and when i used Github Desktop to open the repo in Visual Studio code, i got the "alien" icon as described in the docs. From there it was just a matter of selecting "Build All" and some time later, the bin files were created. For some reason, the "alien" did not show up in earlier trials.

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

Re: undefined reference to `do_process_c00x

#30 Post by TD-er » 01 Oct 2020, 16:53

Build all is quite a long build.
You can also select per environemnt what to build.

As it also shows the Readme file at start of the VScode environment, I was thinking maybe we could add some short description on how to make a build via command line, or where to click (maybe a link to some introduction)

As said before, there's a lot of things you can configure in this Gitpod setup, so I wouldn't be surprised if you also can open a link to a page in a new tab, just like the PIO home tab that opens when you start VS code with PlatformIO installed.

Also the process of downloading the generated bin files may not be immediately clear to anyone (and where it is located), so that may also deserve some hints I guess.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 28 guests