PlatformIO’s LDF includes a bunch of things in the build which seem wrong. If I use
[env:nanorp2040connect]
platform = raspberrypi
board = nanorp2040connect
framework = arduino
lib_deps = khoih-prog/WiFiWebServer@^1.4.0
lib_ignore =
WiFi101
WiFiEspAT
WiFi
ESP_AT_Lib
and adapt
to
#if !(ESP32 || ESP8266) && !defined(ARDUINO_NANO_RP2040_CONNECT)
#include <avr/pgmspace.h>
#define memccpy_P(dest, src, c, n) memccpy((dest), (src), (c), (n))
#endif
(file is locally in .pio\libdeps\nanorp2040connect\WiFiWebServer\src\WiFiWebServer.h), the WebServer example compiles
elf2uf2 ".pio\build\nanorp2040connect\firmware.elf" ".pio\build\nanorp2040connect\firmware.uf2"
Checking size .pio\build\nanorp2040connect\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [== ] 19.0% (used 51388 bytes from 270336 bytes)
Flash: [ ] 4.0% (used 83616 bytes from 2097152 bytes)
Building .pio\build\nanorp2040connect\firmware.bin
============== [SUCCESS] Took 17.65 seconds ==============
Can you test whether that works?
When you build it with the Arduino IDE, do you use the Arduino core GitHub - earlephilhower/arduino-pico: Raspberry Pi Pico Arduino core, for all RP2040 boards or GitHub - arduino/ArduinoCore-mbed?