Affinite wrote: ↑31 Dec 2024, 18:57
OK so Ive used ESPEASY for years with standard builds but not ventured into custom builds until now.
Ive setup the Platform IO build environment on my laptop and I can build a simple custom ESP32 bin but I can only define a couple of plugins in Custom.h
If I try to define more than 2 or 3 plugins or add a couple of controllers, the build process fails.
What am I missing ?
For starters, I hope (assume?) you have used
this Development guide (just start reading at the top, and work your way down, if you didn't already), including creating a fork in your own Github account?
What exact Custom environment are you trying to build?
Part of the process (though optional) is creating your own Custom.h file, by copying Custom-sample.h, in the same folder, and adjusting that Custom.h. Especially for an ESP32 (either 4MB, 8MB or 16MB Flash) should leave ample room for a couple of dozen plugins.
Affinite wrote: ↑31 Dec 2024, 18:57
My second question is what does
3) define USE_CUSTOM_H as a build flags. ie : export PLATFORMIO_BUILD_FLAGS="'-DUSE_CUSTOM_H'"
in Custom.h mean? Should I be doing something here ?
That instruction is part of the Arduino IDE manual, that's also written down in some of the source files. That should be ignored when using VSCode/PlatformIO (I'll see if I can remove that from the source code).
Affinite wrote: ↑31 Dec 2024, 18:57
Third question - how to I include a recently released plugin such as P176. Simply defining it in Custom.h doesn't wok.
Enabling a plugin should be the simple process of enabling (or adding if that's missing) a #define USES_P176 on a separate line of the Custom.h file (I've corrected that omission in an open PR that will be merged soon)
Affinite wrote: ↑31 Dec 2024, 18:57
The above is very frustrating as my PC is very slow to build/compile and I have to wait 45 minutes for a build to complete (or fail)
Hm, what kind of laptop do you use? If it's Windows, be sure to exclude the folder with the ESPEasy source code from any Anti-virus action, as the number of files opened during the build process is heavily crippled by all Windows AV products (and partially by Windows itself). With a fittingly capable computer you could possibly configure for using WSL (Windows Subsystem for Linux, also described in that documentation), that should reduce build-times by up to 50%. On my current Windows laptop with an AMD Ryzen 7 5000 series mobile CPU an ESP32 MAX build takes ~6.5 minutes in Windows, and less than 4 minutes when using WSL.
Keeping the laptop on net-power instead of running from the battery will also improve (shorten) the build-time.
Affinite wrote: ↑31 Dec 2024, 18:57
Thanks and Happy New Year to all.
Thanks, the same to you and your loved ones
