Skip to content

Conversation

@maxgerhardt
Copy link
Contributor

@maxgerhardt maxgerhardt commented Oct 15, 2025

Fixes #3202

Adding this library.json corrects compilation failures when the user choses an explicit LDF mode that has no preprocessor defines checking, although the WiFi lirbary definitely requires it.

Reproducing with this platformio.ini

[env]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = rpipicow
framework = arduino

[env:no_additional_settings]

[env:chain]
lib_ldf_mode = chain

[env:deep]
lib_ldf_mode = deep

[env:chainplus]
lib_ldf_mode = chain+

[env:deepplus]
lib_ldf_mode = deep+

And src/main.cpp of

#include <Arduino.h>
#include <WiFi.h>

void setup() {
  Serial.begin(115200);
  WiFi.begin("your-SSID", "your-PASSWORD");
}

void loop() {}

Leads to these results.

Results with library.json

Environment             Status    Duration
----------------------  --------  ------------
no_additional_settings  SUCCESS   00:00:21.318
chain                   SUCCESS   00:00:20.926
deep                    SUCCESS   00:00:21.336
chainplus               SUCCESS   00:00:22.134
deepplus                SUCCESS   00:00:22.348

Results without library.json

Environment             Status    Duration
----------------------  --------  ------------
no_additional_settings  SUCCESS   00:00:20.382
chain                   FAILED    00:00:12.717
deep                    FAILED    00:00:12.653
chainplus               SUCCESS   00:00:21.010
deepplus                SUCCESS   00:00:20.931

So while we add a tiny bit of overhead in the default case, we are now correct for all other cases as well.

Copy link
Owner

@earlephilhower earlephilhower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx!

@earlephilhower earlephilhower merged commit e93eb24 into earlephilhower:master Oct 15, 2025
28 checks passed
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

Successfully merging this pull request may close these issues.

Adjust WiFi library to work with P.IO default "chain" mode

2 participants