Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dissolve Makefile-based build tooling. Move on to PlatformIO. Thanks for all the fish! #58

Closed
amotl opened this issue May 27, 2023 · 6 comments

Comments

@amotl
Copy link
Member

amotl commented May 27, 2023

About

With GH-57, we are modernizing our first-generation multi-hop ISM packet radio firmwares, effectively dissolving the previous Makefile-based build tooling using dependency management based on Git submodules, and move on to use PlatformIO exclusively.

Acknowledgements

We want to send big shoutouts to all the authors of the excellent build tooling which supported the programs in this repository for such a long time, sharing the same spirit that none of us wants to actually use the Arduino IDE, focusing on AVR/Espressif/SAMD/Arduino HAL toolchain setup automation, and reproducible builds instead. Thank you so much! -- with special thanks to the PlatformIO creators and contributors.

/cc @einsiedlerkrebs, @amperka, @nkrkv, @mjoldfield, @sudar, @tuna-f1sh, @peplin, @rpavlik, @matthijskooijman, @ladislas, @plerup, @hoijui, @ivankravets, @valeros

@amotl amotl changed the title Dissolve previous build tooling. Move on to PlatformIO. Dissolve previous build tooling. Move on to PlatformIO. Thanks for All the fish. May 27, 2023
@amotl amotl changed the title Dissolve previous build tooling. Move on to PlatformIO. Thanks for All the fish. Dissolve Makefile-based build tooling. Move on to PlatformIO. Thanks for all the fish! May 27, 2023
@ivankravets
Copy link

Thanks for using PlatformIO! 🙏

We see you use outdated EPS32 dev-platform. Do you have any issues with the latest 6.x version https://github.com/platformio/platform-espressif32/releases ?

@amotl
Copy link
Member Author

amotl commented May 29, 2023

Dear Ivan,

thanks for your swift response, and your suggestion to use more recent packages.

I've been conservative in bringing in the PlatformIO configuration, and nailed the SDKs roughly to versions they had at the time the corresponding programs have been conceived. Now, upgrading the ESP32 platform SDK works well, see GH-68.

However, upgrading ESP8266 with GH-67 failed at 1. It is probably our fault, because we are using other outdated libraries, or such.

After looking into the details, it turns out joaolopesf/SerialDebug might trip the build, as we receive similar error messages like outlined in JoaoLopesF/SerialDebug#20 when updating to espressif8266@^3.

SerialDebug.cpp:2384:46: error: reference to 'byte' is ambiguous
SerialDebug.cpp:2384:46: error: 'byte' has not been declared
SerialDebug.cpp:2486:61: error: reference to 'byte' is ambiguous
SerialDebug.cpp:5608:21: error: expected primary-expression before '(' token

Regarding this SerialDebug library, I can find those comments in the changelog of the node-wifi-mqtt.ino program we are trying to build here.

 2017-04-07 Silence debug output by using SerialDebugger to reduce battery drain even more.
 2021-05-02 Modernize code by using the SerialDebug library by Joao Lopes and
            add build environment based on PlatformIO.

Is it sane? Do we need it for the purposes outlined there, to reduce battery drain even more, or do you think it can be safely removed? Maybe there are better techniques "to turn off logging" in a similar manner. On the other hand, it may have been utter nonsense ;]. Please advise, if you have the patience for our naivity.

With kind regards,
Andreas.

P.S.: Those commands should get anyone interested to the right spot quickly.

git clone https://github.com/hiveeyes/arduino hiveeyes-arduino --branch amo/update-esp8266-sdk
cd hiveeyes-arduino/backdoor/node-wifi-mqtt
make

Footnotes

  1. https://github.com/hiveeyes/arduino/actions/runs/5113724917/jobs/9193256917?pr=67#step:8:130

@amotl
Copy link
Member Author

amotl commented May 29, 2023

The next spot are the firmwares based on Homie, where this happens when updating to espressif8266@^3 or higher:

Homie/Boot/BootConfig.cpp:282:20: error: call to 'HTTPClient::begin' declared with attribute error: obsolete API, use ::begin(WiFiClient, url)
  282 |   _httpClient.begin(url);
      |   ~~~~~~~~~~~~~~~~~^~~~~
*** [.pio/build/esp07/lib5c7/Homie/Homie/Boot/BootConfig.cpp.o] Error 1

-- https://github.com/hiveeyes/arduino/actions/runs/5113969818/jobs/9193750333?pr=67#step:9:267

They are still using marvinroger/Homie@^2, while marvinroger/Homie@^3 is already available. Updating the programs in this repository to use the most recent version of Homie may help on this matter. /cc @Gulaschcowboy, @marvinroger

P.S.: Those commands should get anyone interested to the right spot quickly.

git clone https://github.com/hiveeyes/arduino hiveeyes-arduino --branch amo/update-esp8266-sdk
cd hiveeyes-arduino/homie/node-homie-basic
make

@amotl
Copy link
Member Author

amotl commented May 29, 2023

Hi again. 4b45797 and 6d72ad6 were needed to stay on espressif8266@^2 on both of the occasions reported above. Other than this, all other updates, effectively not nailing platform SDK versions any longer, succeeded on CI, and have been merged. Thanks again.

@amotl
Copy link
Member Author

amotl commented May 29, 2023

With GH-69, I tried to update the platform SDK for AVR, and it also failed. However, after investing a bit here, I can surely say 22c6da6 makes me happy, by being able to dissolve another StandardCplusplus library fork we needed to use the other day, because mike-matera/ArduinoSTL did not work for us back then. Now, it does -- this is excellent. 💯

@amotl
Copy link
Member Author

amotl commented May 29, 2023

Hi. I've created GH-71 and GH-72 to follow up on this. Closing this now, in order not to send too many notifications to all people tagged here. Thanks, and keep up the spirit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants