khoih-prog / RP2040_RTC

This library enables you to use RTC from RP2040-based boards such as Nano_RP2040_Connect, RASPBERRY_PI_PICO. This RP2040-based RTC, using Interrupt, has no battery backup. Time will be lost when powered down. To need NTP-client to update RTC every start-up.
MIT License
23 stars 4 forks source link

Cannot build with PlatformIO #1

Closed efpe closed 2 years ago

efpe commented 2 years ago

Describe the bug

First of all, I am pretty new to electronics and the whole world of microcontrollers, please let me know if I should open a topic / bug report with PlatformIO. It is probably my lack of knowledge :)

I am trying to run the WifiNINA example from Platform.IO IDE (vscode) and from the Arduino ide, the latter succeeds while the former fails. I looked at the verbose build output for more than an hour and could not figure out where things go south.

The error seems to be the lack of definition of the struct datetime_t (RP2040_RTC.h uses it). However, this is defined in the pico-sdk (please correct me if I'm wrong) along with other types (like uint, etc).

In file included from include/defines.h:69,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/RP2040_RTC.h:48:28: error: 'datetime_t' was not declared in this scope
   48 |   bool rtc_set_datetime   (datetime_t *t);

If I try to create the struct by hand the compiler says there's a conflicting declaration of said struct.

In file included from /Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/common/pico_base/include/pico.h:16,
                 from /Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/objects.h:30,
                 from /Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/device.h:35,
                 from /Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/platform/include/platform/platform.h:28,
                 from /Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/platform/include/platform/FileHandle.h:25,
                 from /Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino/macros.h:41,
                 from /Users/efpe/.platformio/packages/framework-arduino-mbed/variants/NANO_RP2040_CONNECT/pins_arduino.h:2,
                 from /Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino/Arduino.h:76,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiClient_Generic.h:56,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:76,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/common/pico_base/include/pico/types.h: At global scope:
/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/common/pico_base/include/pico/types.h:77:3: error: conflicting declaration 'typedef struct datetime_t datetime_t'
   77 | } datetime_t;
      |   ^~~~~~~~~~

I tried to build the same code with the Arduino IDE (1.8.15) using the same example and it works like a charm. The Arduino ide uses a newer version of the Arduino MBED core (2.5.2) but even after downgrading it to the same version what PlarformIO uses (2.4.1) everything works.

Please let me know if I forgot something out and many thanks for the help!

Steps to Reproduce

  1. Use platformio version 5.2.1
  2. Create a new project with RP2040 connect board
  3. Use the following platformio.ini config:
    
    [platformio]
    default_envs = nanorp2040connect

[env:nanorp2040connect] platform = raspberrypi board = nanorp2040connect framework = arduino upload_port = /dev/cu.usbmodem145201 ; change this to yours lib_ldf_mode = deep+ lib_compat_mode = off ; I had to turn this off to be able to install RP2040_RTC (see platforms in library.json) lib_deps = paulstoffregen/Time@^1.6.1 khoih-prog/WiFiNINA_Generic@^1.8.13 khoih-prog/RP2040_RTC@^1.0.5 khoih-prog/Timezone_Generic@^1.7.1

4. If dependencies are not installed, run `pio lib install`.
5. `cp .pio/libdeps/nanorp2040connect/RP2040_RTC/examples/Time/RP2040_RTC_Time_WiFiNINA/RP2040_RTC_Time_WiFiNINA.ino src/main.cpp`
6. `cp .pio/libdeps/nanorp2040connect/RP2040_RTC/examples/Time/RP2040_RTC_Time_WiFiNINA/defines.h include/`
7. Modify wifi settings in `define.h`
8. `pio run --target upload` --> build will fail

### Expected behavior

Build to succeed and see logs in Serial output.

### Actual behavior

See below.

### Information

* Platform.io version: 5.2.1
* `RP2040` Core Version: Arduino-mbed 2.4.1
* `RP2040` Board type NANO_RP2040_CONNECT
* `Darwin Viktors-MBP.localdomain 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64`

```bash
pio --version
PlatformIO Core, version 5.2.1
cat platformio.ini
; PlatformIO Project Configuration File

[platformio]
default_envs = nanorp2040connect

[env:nanorp2040connect]
platform = raspberrypi
board = nanorp2040connect
framework = arduino
upload_port = /dev/cu.usbmodem145201
lib_ldf_mode = deep+
lib_compat_mode = off ; I had to turn this off to be able to install RP2040_RTC (see platforms in library.json)
lib_deps =
    paulstoffregen/Time@^1.6.1
    khoih-prog/WiFiNINA_Generic@^1.8.13
    khoih-prog/RP2040_RTC@^1.0.5
    khoih-prog/Timezone_Generic@^1.7.1

Additional context

Log output

pio run -t upload -v
Processing nanorp2040connect (platform: raspberrypi; board: nanorp2040connect; framework: arduino; upload_port: /dev/cu.usbmodem145201; lib_ldf_mode: deep+; lib_compat_mode: off; lib_deps: paulstoffregen/Time@^1.6.1, khoih-prog/WiFiNINA_Generic@^1.8.13, khoih-prog/RP2040_RTC@^1.0.5, khoih-prog/Timezone_Generic@^1.7.1)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/raspberrypi/nanorp2040connect.html
PLATFORM: Raspberry Pi RP2040 (1.3.0) > Arduino Nano RP2040 Connect
HARDWARE: RP2040 133MHz, 264KB RAM, 2MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, jlink, raspberrypi-swd)
PACKAGES:
 - framework-arduino-mbed 2.4.1
 - tool-openocd-raspberrypi 2.1100.0 (11.0)
 - tool-rp2040tools 1.0.2
 - toolchain-gccarmnoneeabi 1.90201.191206 (9.2.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ deep+, Compatibility ~ off
Found 37 compatible libraries
Scanning dependencies...
Warning: Ignored `DS323x_Generic` dependency for `Timezone_Generic` library
Warning: Ignored `FlashStorage_SAMD` dependency for `Timezone_Generic` library
Warning: Ignored `FlashStorage_STM32` dependency for `Timezone_Generic` library
Warning: Ignored `FlashStorage_RTL8720` dependency for `Timezone_Generic` library
Warning: Ignored `EthernetWebServer` dependency for `Timezone_Generic` library
Warning: Ignored `EthernetWebServer_STM32` dependency for `Timezone_Generic` library
Warning: Ignored `WiFiWebServer` dependency for `Timezone_Generic` library
Warning: Ignored `WebServer_WT32_ETH01` dependency for `Timezone_Generic` library
Warning: Ignored `WiFiWebServer_RTL8720` dependency for `Timezone_Generic` library
Warning: Ignored `ESP8266_AT_WebServer` dependency for `Timezone_Generic` library
Warning: Ignored `STM32duino LwIP` dependency for `Timezone_Generic` library
Warning: Ignored `STM32Ethernet` dependency for `Timezone_Generic` library
Warning: Ignored `STM32duino RTC` dependency for `Timezone_Generic` library
Warning: Ignored `UIPEthernet` dependency for `Timezone_Generic` library
Warning: Ignored `EthernetENC` dependency for `Timezone_Generic` library
Warning: Ignored `WiFiEspAT` dependency for `Timezone_Generic` library
Warning: Ignored `Ethernet2` dependency for `Timezone_Generic` library
Warning: Ignored `Ethernet3` dependency for `Timezone_Generic` library
Warning: Ignored `EthernetLarge` dependency for `Timezone_Generic` library
Dependency Graph
|-- <Time> 1.6.1 (/Users/efpe/src/arduino/rtc/.pio/libdeps/nanorp2040connect/Time)
|-- <WiFiNINA_Generic> 1.8.13 (/Users/efpe/src/arduino/rtc/.pio/libdeps/nanorp2040connect/WiFiNINA_Generic)
|   |-- <SPI> (/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SPI)
|-- <RP2040_RTC> 1.0.5 (/Users/efpe/src/arduino/rtc/.pio/libdeps/nanorp2040connect/RP2040_RTC)
|   |-- <Time> 1.6.1 (/Users/efpe/src/arduino/rtc/.pio/libdeps/nanorp2040connect/Time)
|-- <Timezone_Generic> 1.7.1 (/Users/efpe/src/arduino/rtc/.pio/libdeps/nanorp2040connect/Timezone_Generic)
|   |-- <Time> 1.6.1 (/Users/efpe/src/arduino/rtc/.pio/libdeps/nanorp2040connect/Time)
|   |-- <WiFiNINA_Generic> 1.8.13 (/Users/efpe/src/arduino/rtc/.pio/libdeps/nanorp2040connect/WiFiNINA_Generic)
|   |   |-- <SPI> (/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SPI)
|   |-- <Ethernet> 1.0.0 (/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/Ethernet)
|   |   |-- <SocketWrapper> 1.0 (/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper)
Building in release mode
arm-none-eabi-g++ -o .pio/build/nanorp2040connect/src/main.cpp.o -c -Wvla -fno-rtti -std=gnu++14 -DMBED_TRAP_ERRORS_ENABLED=1 -Os -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -c -fdata-sections -ffunction-sections -fmessage-length=0 -fno-exceptions -fomit-frame-pointer -funsigned-char -mcpu=cortex-m0plus -mthumb -iprefix/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino @/Users/efpe/.platformio/packages/framework-arduino-mbed/variants/NANO_RP2040_CONNECT/includes.txt -nostdlib -DPLATFORMIO=50201 -DARDUINO_NANO_RP2040_CONNECT -DARDUINO_ARCH_RP2040 -DARM_MATH_CM0PLUS -D__CMSIS_RTOS -DCOMPONENT_FLASHIAP=1 -D__CORTEX_M0PLUS -DDEVICE_ANALOGIN=1 -DDEVICE_FLASH=1 -DDEVICE_I2C=1 -DDEVICE_I2CSLAVE=1 -DDEVICE_INTERRUPTIN=1 -DDEVICE_PORT_IN=1 -DDEVICE_PORT_OUT=1 -DDEVICE_PWMOUT=1 -DDEVICE_RESET_REASON=1 -DDEVICE_SERIAL=1 -DDEVICE_SERIAL_FC=1 -DDEVICE_SPI=1 -DDEVICE_USBDEVICE=1 -DDEVICE_USTICKER=1 -DDEVICE_WATCHDOG=1 -D__MBED__=1 -DMBED_BUILD_TIMESTAMP=1628678379.4710288 -D__MBED_CMSIS_RTOS_CM -DMBED_MPU_CUSTOM -DPICO_FLASH_SIZE_BYTES=16*1024*1024 -DPICO_NO_BINARY_INFO=1 -DPICO_ON_DEVICE=1 -DPICO_RP2040_USB_DEVICE_ENUMERATION_FIX=1 -DPICO_TIME_DEFAULT_ALARM_POOL_DISABLED -DPICO_UART_ENABLE_CRLF_SUPPORT=0 -DTARGET_CORTEX -DTARGET_CORTEX_M -DTARGET_LIKE_CORTEX_M0 -DTARGET_LIKE_MBED -DTARGET_M0P -DTARGET_memmap_default -DTARGET_NAME=NANO_RP2040_CONNECT -DTARGET_NANO_RP2040_CONNECT -DTARGET_RASPBERRYPI -DTARGET_RELEASE -DTARGET_RP2040 -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -DMBED_NO_GLOBAL_USING_DIRECTIVE=1 -DUSE_ARDUINO_PINOUT -DARDUINO=10810 -DARDUINO_ARCH_MBED -Iinclude -Isrc -I.pio/libdeps/nanorp2040connect/Timezone_Generic/src -I/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/Ethernet/src -I/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper/src -I.pio/libdeps/nanorp2040connect/RP2040_RTC/src -I.pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src -I/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SPI -I.pio/libdeps/nanorp2040connect/Time -I/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino -I/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino/api/deprecated -I/Users/efpe/.platformio/packages/framework-arduino-mbed/variants/NANO_RP2040_CONNECT src/main.cpp
arm-none-eabi-g++ -o .pio/build/nanorp2040connect/lib178/Time/DateStrings.cpp.o -c -Wvla -fno-rtti -std=gnu++14 -DMBED_TRAP_ERRORS_ENABLED=1 -Os -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -c -fdata-sections -ffunction-sections -fmessage-length=0 -fno-exceptions -fomit-frame-pointer -funsigned-char -mcpu=cortex-m0plus -mthumb -iprefix/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino @/Users/efpe/.platformio/packages/framework-arduino-mbed/variants/NANO_RP2040_CONNECT/includes.txt -nostdlib -DPLATFORMIO=50201 -DARDUINO_NANO_RP2040_CONNECT -DARDUINO_ARCH_RP2040 -DARM_MATH_CM0PLUS -D__CMSIS_RTOS -DCOMPONENT_FLASHIAP=1 -D__CORTEX_M0PLUS -DDEVICE_ANALOGIN=1 -DDEVICE_FLASH=1 -DDEVICE_I2C=1 -DDEVICE_I2CSLAVE=1 -DDEVICE_INTERRUPTIN=1 -DDEVICE_PORT_IN=1 -DDEVICE_PORT_OUT=1 -DDEVICE_PWMOUT=1 -DDEVICE_RESET_REASON=1 -DDEVICE_SERIAL=1 -DDEVICE_SERIAL_FC=1 -DDEVICE_SPI=1 -DDEVICE_USBDEVICE=1 -DDEVICE_USTICKER=1 -DDEVICE_WATCHDOG=1 -D__MBED__=1 -DMBED_BUILD_TIMESTAMP=1628678379.4710288 -D__MBED_CMSIS_RTOS_CM -DMBED_MPU_CUSTOM -DPICO_FLASH_SIZE_BYTES=16*1024*1024 -DPICO_NO_BINARY_INFO=1 -DPICO_ON_DEVICE=1 -DPICO_RP2040_USB_DEVICE_ENUMERATION_FIX=1 -DPICO_TIME_DEFAULT_ALARM_POOL_DISABLED -DPICO_UART_ENABLE_CRLF_SUPPORT=0 -DTARGET_CORTEX -DTARGET_CORTEX_M -DTARGET_LIKE_CORTEX_M0 -DTARGET_LIKE_MBED -DTARGET_M0P -DTARGET_memmap_default -DTARGET_NAME=NANO_RP2040_CONNECT -DTARGET_NANO_RP2040_CONNECT -DTARGET_RASPBERRYPI -DTARGET_RELEASE -DTARGET_RP2040 -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -DMBED_NO_GLOBAL_USING_DIRECTIVE=1 -DUSE_ARDUINO_PINOUT -DARDUINO=10810 -DARDUINO_ARCH_MBED -I.pio/libdeps/nanorp2040connect/Time -I/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino -I/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino/api/deprecated -I/Users/efpe/.platformio/packages/framework-arduino-mbed/variants/NANO_RP2040_CONNECT .pio/libdeps/nanorp2040connect/Time/DateStrings.cpp
In file included from src/main.cpp:24:
include/defines.h:27:4: warning: #warning Using WiFiNINA using WiFiNINA_Generic Library [-Wcpp]
   27 |   #warning Using WiFiNINA using WiFiNINA_Generic Library
      |    ^~~~~~~
arm-none-eabi-g++ -o .pio/build/nanorp2040connect/lib178/Time/Time.cpp.o -c -Wvla -fno-rtti -std=gnu++14 -DMBED_TRAP_ERRORS_ENABLED=1 -Os -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -c -fdata-sections -ffunction-sections -fmessage-length=0 -fno-exceptions -fomit-frame-pointer -funsigned-char -mcpu=cortex-m0plus -mthumb -iprefix/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino @/Users/efpe/.platformio/packages/framework-arduino-mbed/variants/NANO_RP2040_CONNECT/includes.txt -nostdlib -DPLATFORMIO=50201 -DARDUINO_NANO_RP2040_CONNECT -DARDUINO_ARCH_RP2040 -DARM_MATH_CM0PLUS -D__CMSIS_RTOS -DCOMPONENT_FLASHIAP=1 -D__CORTEX_M0PLUS -DDEVICE_ANALOGIN=1 -DDEVICE_FLASH=1 -DDEVICE_I2C=1 -DDEVICE_I2CSLAVE=1 -DDEVICE_INTERRUPTIN=1 -DDEVICE_PORT_IN=1 -DDEVICE_PORT_OUT=1 -DDEVICE_PWMOUT=1 -DDEVICE_RESET_REASON=1 -DDEVICE_SERIAL=1 -DDEVICE_SERIAL_FC=1 -DDEVICE_SPI=1 -DDEVICE_USBDEVICE=1 -DDEVICE_USTICKER=1 -DDEVICE_WATCHDOG=1 -D__MBED__=1 -DMBED_BUILD_TIMESTAMP=1628678379.4710288 -D__MBED_CMSIS_RTOS_CM -DMBED_MPU_CUSTOM -DPICO_FLASH_SIZE_BYTES=16*1024*1024 -DPICO_NO_BINARY_INFO=1 -DPICO_ON_DEVICE=1 -DPICO_RP2040_USB_DEVICE_ENUMERATION_FIX=1 -DPICO_TIME_DEFAULT_ALARM_POOL_DISABLED -DPICO_UART_ENABLE_CRLF_SUPPORT=0 -DTARGET_CORTEX -DTARGET_CORTEX_M -DTARGET_LIKE_CORTEX_M0 -DTARGET_LIKE_MBED -DTARGET_M0P -DTARGET_memmap_default -DTARGET_NAME=NANO_RP2040_CONNECT -DTARGET_NANO_RP2040_CONNECT -DTARGET_RASPBERRYPI -DTARGET_RELEASE -DTARGET_RP2040 -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -DMBED_NO_GLOBAL_USING_DIRECTIVE=1 -DUSE_ARDUINO_PINOUT -DARDUINO=10810 -DARDUINO_ARCH_MBED -I.pio/libdeps/nanorp2040connect/Time -I/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino -I/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino/api/deprecated -I/Users/efpe/.platformio/packages/framework-arduino-mbed/variants/NANO_RP2040_CONNECT .pio/libdeps/nanorp2040connect/Time/Time.cpp
arm-none-eabi-g++ -o .pio/build/nanorp2040connect/libaef/SPI/SPI.cpp.o -c -Wvla -fno-rtti -std=gnu++14 -DMBED_TRAP_ERRORS_ENABLED=1 -Os -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -c -fdata-sections -ffunction-sections -fmessage-length=0 -fno-exceptions -fomit-frame-pointer -funsigned-char -mcpu=cortex-m0plus -mthumb -iprefix/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino @/Users/efpe/.platformio/packages/framework-arduino-mbed/variants/NANO_RP2040_CONNECT/includes.txt -nostdlib -DPLATFORMIO=50201 -DARDUINO_NANO_RP2040_CONNECT -DARDUINO_ARCH_RP2040 -DARM_MATH_CM0PLUS -D__CMSIS_RTOS -DCOMPONENT_FLASHIAP=1 -D__CORTEX_M0PLUS -DDEVICE_ANALOGIN=1 -DDEVICE_FLASH=1 -DDEVICE_I2C=1 -DDEVICE_I2CSLAVE=1 -DDEVICE_INTERRUPTIN=1 -DDEVICE_PORT_IN=1 -DDEVICE_PORT_OUT=1 -DDEVICE_PWMOUT=1 -DDEVICE_RESET_REASON=1 -DDEVICE_SERIAL=1 -DDEVICE_SERIAL_FC=1 -DDEVICE_SPI=1 -DDEVICE_USBDEVICE=1 -DDEVICE_USTICKER=1 -DDEVICE_WATCHDOG=1 -D__MBED__=1 -DMBED_BUILD_TIMESTAMP=1628678379.4710288 -D__MBED_CMSIS_RTOS_CM -DMBED_MPU_CUSTOM -DPICO_FLASH_SIZE_BYTES=16*1024*1024 -DPICO_NO_BINARY_INFO=1 -DPICO_ON_DEVICE=1 -DPICO_RP2040_USB_DEVICE_ENUMERATION_FIX=1 -DPICO_TIME_DEFAULT_ALARM_POOL_DISABLED -DPICO_UART_ENABLE_CRLF_SUPPORT=0 -DTARGET_CORTEX -DTARGET_CORTEX_M -DTARGET_LIKE_CORTEX_M0 -DTARGET_LIKE_MBED -DTARGET_M0P -DTARGET_memmap_default -DTARGET_NAME=NANO_RP2040_CONNECT -DTARGET_NANO_RP2040_CONNECT -DTARGET_RASPBERRYPI -DTARGET_RELEASE -DTARGET_RP2040 -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -DMBED_NO_GLOBAL_USING_DIRECTIVE=1 -DUSE_ARDUINO_PINOUT -DARDUINO=10810 -DARDUINO_ARCH_MBED -I/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SPI -I/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino -I/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino/api/deprecated -I/Users/efpe/.platformio/packages/framework-arduino-mbed/variants/NANO_RP2040_CONNECT /Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SPI/SPI.cpp
In file included from /Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino/Arduino.h:76,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiClient_Generic.h:56,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:76,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
/Users/efpe/.platformio/packages/framework-arduino-mbed/variants/NANO_RP2040_CONNECT/pins_arduino.h:84: warning: "BOARD_NAME" redefined
   84 | #define BOARD_NAME   "Nano RP2040 Connect"
      |
In file included from src/main.cpp:24:
include/defines.h:44: note: this is the location of the previous definition
   44 |       #define BOARD_NAME      "MBED NANO_RP2040_CONNECT"
      |
In file included from .pio/libdeps/nanorp2040connect/Timezone_Generic/src/Timezone_Generic.h:136,
                 from src/main.cpp:26:
.pio/libdeps/nanorp2040connect/Timezone_Generic/src/Timezone_Generic_Impl.h:232:4: warning: #warning Use MBED RP2040 (such as NANO_RP2040_CONNECT, RASPBERRY_PI_PICO) and LittleFS [-Wcpp]
  232 |   #warning Use MBED RP2040 (such as NANO_RP2040_CONNECT, RASPBERRY_PI_PICO) and LittleFS
      |    ^~~~~~~
In file included from .pio/libdeps/nanorp2040connect/Timezone_Generic/src/Timezone_Generic.h:136,
                 from src/main.cpp:26:
.pio/libdeps/nanorp2040connect/Timezone_Generic/src/Timezone_Generic_Impl.h:352:4: warning: #warning MBED_RP2040_TO_BE_INITIALIZED locally in Timezone_Generic [-Wcpp]
  352 |   #warning MBED_RP2040_TO_BE_INITIALIZED locally in Timezone_Generic
      |    ^~~~~~~
.pio/libdeps/nanorp2040connect/Timezone_Generic/src/Timezone_Generic_Impl.h:1291:4: warning: #warning Using MBED RP2040 LittleFS in Timezone_Generic [-Wcpp]
 1291 |   #warning Using MBED RP2040 LittleFS in Timezone_Generic
      |    ^~~~~~~
In file included from include/defines.h:69,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/RP2040_RTC.h:36:28: error: 'datetime_t' was not declared in this scope
   36 |   bool rtc_set_datetime   (datetime_t *t);
      |                            ^~~~~~~~~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/RP2040_RTC.h:36:40: error: 't' was not declared in this scope
   36 |   bool rtc_set_datetime   (datetime_t *t);
      |                                        ^
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/RP2040_RTC.h:37:28: error: 'datetime_t' was not declared in this scope
   37 |   bool rtc_get_datetime   (datetime_t *t);
      |                            ^~~~~~~~~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/RP2040_RTC.h:37:40: error: 't' was not declared in this scope
   37 |   bool rtc_get_datetime   (datetime_t *t);
      |                                        ^
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/RP2040_RTC.h:38:28: error: variable or field 'rtc_set_alarm' declared void
   38 |   void rtc_set_alarm      (datetime_t *t, rtc_callback_t user_callback);
      |                            ^~~~~~~~~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/RP2040_RTC.h:38:28: error: 'datetime_t' was not declared in this scope
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/RP2040_RTC.h:38:40: error: 't' was not declared in this scope
   38 |   void rtc_set_alarm      (datetime_t *t, rtc_callback_t user_callback);
      |                                        ^
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/RP2040_RTC.h:38:58: error: expected primary-expression before 'user_callback'
   38 |   void rtc_set_alarm      (datetime_t *t, rtc_callback_t user_callback);
      |                                                          ^~~~~~~~~~~~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/RP2040_RTC.h:42:26: error: 'datetime_t' was not declared in this scope
   42 |   bool rtc_alarm_repeats(datetime_t *t);
      |                          ^~~~~~~~~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/RP2040_RTC.h:42:38: error: 't' was not declared in this scope
   42 |   bool rtc_alarm_repeats(datetime_t *t);
      |                                      ^
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/RP2040_RTC.h:44:35: error: 'uint' has not been declared
   44 |   void datetime_to_str(char *buf, uint buf_size, const datetime_t *t);
      |                                   ^~~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/RP2040_RTC.h:44:56: error: 'datetime_t' does not name a type
   44 |   void datetime_to_str(char *buf, uint buf_size, const datetime_t *t);
      |                                                        ^~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/RP2040_RTC/src/RP2040_RTC.h:47,
                 from include/defines.h:69,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:205:21: error: 'datetime_t' does not name a type; did you mean 'DateTime'?
  205 |     DateTime (const datetime_t &tm)
      |                     ^~~~~~~~~~
      |                     DateTime
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:345:5: error: 'String' does not name a type
  345 |     String timestamp(timestampOpt opt = TIMESTAMP_FULL)
      |     ^~~~~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h: In constructor 'DateTime::DateTime(const int&)':
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:207:17: error: request for member 'year' in 'tm', which is of non-class type 'const int'
  207 |       yOff = tm.year - 2000;
      |                 ^~~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:208:16: error: request for member 'month' in 'tm', which is of non-class type 'const int'
  208 |       m   = tm.month;
      |                ^~~~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:209:16: error: request for member 'day' in 'tm', which is of non-class type 'const int'
  209 |       d   = tm.day;
      |                ^~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:210:16: error: request for member 'hour' in 'tm', which is of non-class type 'const int'
  210 |       hh  = tm.hour;
      |                ^~~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:211:16: error: request for member 'min' in 'tm', which is of non-class type 'const int'
  211 |       mm  = tm.min;
      |                ^~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:212:16: error: request for member 'sec' in 'tm', which is of non-class type 'const int'
  212 |       ss  = tm.sec;
      |                ^~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h: At global scope:
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:455:36: error: 'bool rtc_set_datetime(DateTime)' redeclared as different kind of entity
  455 |   bool rtc_set_datetime(DateTime dt)
      |                                    ^
In file included from include/defines.h:69,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/RP2040_RTC.h:36:8: note: previous declaration 'bool rtc_set_datetime'
   36 |   bool rtc_set_datetime   (datetime_t *t);
      |        ^~~~~~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/RP2040_RTC/src/RP2040_RTC.h:47,
                 from include/defines.h:69,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h: In function 'bool rtc_set_datetime(DateTime)':
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:457:5: error: 'datetime_t' was not declared in this scope; did you mean 'DateTime'?
  457 |     datetime_t tm;
      |     ^~~~~~~~~~
      |     DateTime
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:459:5: error: 'tm' was not declared in this scope
  459 |     tm.year   = dt.year();
      |     ^~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:475:33: error: 'rtc_set_datetime' cannot be used as a function
  475 |     return (rtc_set_datetime(&tm));
      |                                 ^
arm-none-eabi-g++ -o .pio/build/nanorp2040connect/lib207/WiFiNINA_Generic/WiFiClient_Generic.cpp.o -c -Wvla -fno-rtti -std=gnu++14 -DMBED_TRAP_ERRORS_ENABLED=1 -Os -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -c -fdata-sections -ffunction-sections -fmessage-length=0 -fno-exceptions -fomit-frame-pointer -funsigned-char -mcpu=cortex-m0plus -mthumb -iprefix/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino @/Users/efpe/.platformio/packages/framework-arduino-mbed/variants/NANO_RP2040_CONNECT/includes.txt -nostdlib -DPLATFORMIO=50201 -DARDUINO_NANO_RP2040_CONNECT -DARDUINO_ARCH_RP2040 -DARM_MATH_CM0PLUS -D__CMSIS_RTOS -DCOMPONENT_FLASHIAP=1 -D__CORTEX_M0PLUS -DDEVICE_ANALOGIN=1 -DDEVICE_FLASH=1 -DDEVICE_I2C=1 -DDEVICE_I2CSLAVE=1 -DDEVICE_INTERRUPTIN=1 -DDEVICE_PORT_IN=1 -DDEVICE_PORT_OUT=1 -DDEVICE_PWMOUT=1 -DDEVICE_RESET_REASON=1 -DDEVICE_SERIAL=1 -DDEVICE_SERIAL_FC=1 -DDEVICE_SPI=1 -DDEVICE_USBDEVICE=1 -DDEVICE_USTICKER=1 -DDEVICE_WATCHDOG=1 -D__MBED__=1 -DMBED_BUILD_TIMESTAMP=1628678379.4710288 -D__MBED_CMSIS_RTOS_CM -DMBED_MPU_CUSTOM -DPICO_FLASH_SIZE_BYTES=16*1024*1024 -DPICO_NO_BINARY_INFO=1 -DPICO_ON_DEVICE=1 -DPICO_RP2040_USB_DEVICE_ENUMERATION_FIX=1 -DPICO_TIME_DEFAULT_ALARM_POOL_DISABLED -DPICO_UART_ENABLE_CRLF_SUPPORT=0 -DTARGET_CORTEX -DTARGET_CORTEX_M -DTARGET_LIKE_CORTEX_M0 -DTARGET_LIKE_MBED -DTARGET_M0P -DTARGET_memmap_default -DTARGET_NAME=NANO_RP2040_CONNECT -DTARGET_NANO_RP2040_CONNECT -DTARGET_RASPBERRYPI -DTARGET_RELEASE -DTARGET_RP2040 -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -DMBED_NO_GLOBAL_USING_DIRECTIVE=1 -DUSE_ARDUINO_PINOUT -DARDUINO=10810 -DARDUINO_ARCH_MBED -I.pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src -I/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SPI -I/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino -I/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino/api/deprecated -I/Users/efpe/.platformio/packages/framework-arduino-mbed/variants/NANO_RP2040_CONNECT .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiClient_Generic.cpp
arm-none-eabi-ar rc .pio/build/nanorp2040connect/lib178/libTime.a .pio/build/nanorp2040connect/lib178/Time/DateStrings.cpp.o .pio/build/nanorp2040connect/lib178/Time/Time.cpp.o
arm-none-eabi-ranlib .pio/build/nanorp2040connect/lib178/libTime.a
arm-none-eabi-g++ -o .pio/build/nanorp2040connect/lib207/WiFiNINA_Generic/WiFiSSLClient_Generic.cpp.o -c -Wvla -fno-rtti -std=gnu++14 -DMBED_TRAP_ERRORS_ENABLED=1 -Os -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -c -fdata-sections -ffunction-sections -fmessage-length=0 -fno-exceptions -fomit-frame-pointer -funsigned-char -mcpu=cortex-m0plus -mthumb -iprefix/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino @/Users/efpe/.platformio/packages/framework-arduino-mbed/variants/NANO_RP2040_CONNECT/includes.txt -nostdlib -DPLATFORMIO=50201 -DARDUINO_NANO_RP2040_CONNECT -DARDUINO_ARCH_RP2040 -DARM_MATH_CM0PLUS -D__CMSIS_RTOS -DCOMPONENT_FLASHIAP=1 -D__CORTEX_M0PLUS -DDEVICE_ANALOGIN=1 -DDEVICE_FLASH=1 -DDEVICE_I2C=1 -DDEVICE_I2CSLAVE=1 -DDEVICE_INTERRUPTIN=1 -DDEVICE_PORT_IN=1 -DDEVICE_PORT_OUT=1 -DDEVICE_PWMOUT=1 -DDEVICE_RESET_REASON=1 -DDEVICE_SERIAL=1 -DDEVICE_SERIAL_FC=1 -DDEVICE_SPI=1 -DDEVICE_USBDEVICE=1 -DDEVICE_USTICKER=1 -DDEVICE_WATCHDOG=1 -D__MBED__=1 -DMBED_BUILD_TIMESTAMP=1628678379.4710288 -D__MBED_CMSIS_RTOS_CM -DMBED_MPU_CUSTOM -DPICO_FLASH_SIZE_BYTES=16*1024*1024 -DPICO_NO_BINARY_INFO=1 -DPICO_ON_DEVICE=1 -DPICO_RP2040_USB_DEVICE_ENUMERATION_FIX=1 -DPICO_TIME_DEFAULT_ALARM_POOL_DISABLED -DPICO_UART_ENABLE_CRLF_SUPPORT=0 -DTARGET_CORTEX -DTARGET_CORTEX_M -DTARGET_LIKE_CORTEX_M0 -DTARGET_LIKE_MBED -DTARGET_M0P -DTARGET_memmap_default -DTARGET_NAME=NANO_RP2040_CONNECT -DTARGET_NANO_RP2040_CONNECT -DTARGET_RASPBERRYPI -DTARGET_RELEASE -DTARGET_RP2040 -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -DMBED_NO_GLOBAL_USING_DIRECTIVE=1 -DUSE_ARDUINO_PINOUT -DARDUINO=10810 -DARDUINO_ARCH_MBED -I.pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src -I/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SPI -I/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino -I/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino/api/deprecated -I/Users/efpe/.platformio/packages/framework-arduino-mbed/variants/NANO_RP2040_CONNECT .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiSSLClient_Generic.cpp
arm-none-eabi-ar rc .pio/build/nanorp2040connect/libaef/libSPI.a .pio/build/nanorp2040connect/libaef/SPI/SPI.cpp.o
arm-none-eabi-ranlib .pio/build/nanorp2040connect/libaef/libSPI.a
arm-none-eabi-g++ -o .pio/build/nanorp2040connect/lib207/WiFiNINA_Generic/WiFiServer_Generic.cpp.o -c -Wvla -fno-rtti -std=gnu++14 -DMBED_TRAP_ERRORS_ENABLED=1 -Os -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -c -fdata-sections -ffunction-sections -fmessage-length=0 -fno-exceptions -fomit-frame-pointer -funsigned-char -mcpu=cortex-m0plus -mthumb -iprefix/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino @/Users/efpe/.platformio/packages/framework-arduino-mbed/variants/NANO_RP2040_CONNECT/includes.txt -nostdlib -DPLATFORMIO=50201 -DARDUINO_NANO_RP2040_CONNECT -DARDUINO_ARCH_RP2040 -DARM_MATH_CM0PLUS -D__CMSIS_RTOS -DCOMPONENT_FLASHIAP=1 -D__CORTEX_M0PLUS -DDEVICE_ANALOGIN=1 -DDEVICE_FLASH=1 -DDEVICE_I2C=1 -DDEVICE_I2CSLAVE=1 -DDEVICE_INTERRUPTIN=1 -DDEVICE_PORT_IN=1 -DDEVICE_PORT_OUT=1 -DDEVICE_PWMOUT=1 -DDEVICE_RESET_REASON=1 -DDEVICE_SERIAL=1 -DDEVICE_SERIAL_FC=1 -DDEVICE_SPI=1 -DDEVICE_USBDEVICE=1 -DDEVICE_USTICKER=1 -DDEVICE_WATCHDOG=1 -D__MBED__=1 -DMBED_BUILD_TIMESTAMP=1628678379.4710288 -D__MBED_CMSIS_RTOS_CM -DMBED_MPU_CUSTOM -DPICO_FLASH_SIZE_BYTES=16*1024*1024 -DPICO_NO_BINARY_INFO=1 -DPICO_ON_DEVICE=1 -DPICO_RP2040_USB_DEVICE_ENUMERATION_FIX=1 -DPICO_TIME_DEFAULT_ALARM_POOL_DISABLED -DPICO_UART_ENABLE_CRLF_SUPPORT=0 -DTARGET_CORTEX -DTARGET_CORTEX_M -DTARGET_LIKE_CORTEX_M0 -DTARGET_LIKE_MBED -DTARGET_M0P -DTARGET_memmap_default -DTARGET_NAME=NANO_RP2040_CONNECT -DTARGET_NANO_RP2040_CONNECT -DTARGET_RASPBERRYPI -DTARGET_RELEASE -DTARGET_RP2040 -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -DMBED_NO_GLOBAL_USING_DIRECTIVE=1 -DUSE_ARDUINO_PINOUT -DARDUINO=10810 -DARDUINO_ARCH_MBED -I.pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src -I/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SPI -I/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino -I/Users/efpe/.platformio/packages/framework-arduino-mbed/cores/arduino/api/deprecated -I/Users/efpe/.platformio/packages/framework-arduino-mbed/variants/NANO_RP2040_CONNECT .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiServer_Generic.cpp
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_spi.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_drv.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiStorage_Generic.h:56,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:79,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper/src/utility/wl_definitions.h: At global scope:
/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper/src/utility/wl_definitions.h:48:17: error: 'WL_NO_SHIELD' conflicts with a previous declaration
   48 |  WL_NO_SHIELD = 255,
      |                 ^~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:70,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wl_definitions.h:92:3: note: previous declaration 'wl_status_t WL_NO_SHIELD'
   92 |   WL_NO_SHIELD      = 255,
      |   ^~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_spi.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_drv.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiStorage_Generic.h:56,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:79,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper/src/utility/wl_definitions.h:49:18: error: 'WL_NO_MODULE' conflicts with a previous declaration
   49 |   WL_NO_MODULE = 255,
      |                  ^~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:70,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wl_definitions.h:93:3: note: previous declaration 'wl_status_t WL_NO_MODULE'
   93 |   WL_NO_MODULE      = WL_NO_SHIELD,
      |   ^~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_spi.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_drv.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiStorage_Generic.h:56,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:79,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper/src/utility/wl_definitions.h:50:20: error: 'WL_IDLE_STATUS' conflicts with a previous declaration
   50 |   WL_IDLE_STATUS = 0,
      |                    ^
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:70,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wl_definitions.h:94:3: note: previous declaration 'wl_status_t WL_IDLE_STATUS'
   94 |   WL_IDLE_STATUS    = 0,
      |   ^~~~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_spi.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_drv.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiStorage_Generic.h:56,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:79,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper/src/utility/wl_definitions.h:51:3: error: 'WL_NO_SSID_AVAIL' conflicts with a previous declaration
   51 |   WL_NO_SSID_AVAIL,
      |   ^~~~~~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:70,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wl_definitions.h:95:3: note: previous declaration 'wl_status_t WL_NO_SSID_AVAIL'
   95 |   WL_NO_SSID_AVAIL,
      |   ^~~~~~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_spi.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_drv.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiStorage_Generic.h:56,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:79,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper/src/utility/wl_definitions.h:52:3: error: 'WL_SCAN_COMPLETED' conflicts with a previous declaration
   52 |   WL_SCAN_COMPLETED,
      |   ^~~~~~~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:70,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wl_definitions.h:96:3: note: previous declaration 'wl_status_t WL_SCAN_COMPLETED'
   96 |   WL_SCAN_COMPLETED,
      |   ^~~~~~~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_spi.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_drv.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiStorage_Generic.h:56,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:79,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper/src/utility/wl_definitions.h:53:3: error: 'WL_CONNECTED' conflicts with a previous declaration
   53 |   WL_CONNECTED,
      |   ^~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:70,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wl_definitions.h:97:3: note: previous declaration 'wl_status_t WL_CONNECTED'
   97 |   WL_CONNECTED,
      |   ^~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_spi.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_drv.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiStorage_Generic.h:56,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:79,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper/src/utility/wl_definitions.h:54:3: error: 'WL_CONNECT_FAILED' conflicts with a previous declaration
   54 |   WL_CONNECT_FAILED,
      |   ^~~~~~~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:70,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wl_definitions.h:98:3: note: previous declaration 'wl_status_t WL_CONNECT_FAILED'
   98 |   WL_CONNECT_FAILED,
      |   ^~~~~~~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_spi.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_drv.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiStorage_Generic.h:56,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:79,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper/src/utility/wl_definitions.h:55:3: error: 'WL_CONNECTION_LOST' conflicts with a previous declaration
   55 |   WL_CONNECTION_LOST,
      |   ^~~~~~~~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:70,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wl_definitions.h:99:3: note: previous declaration 'wl_status_t WL_CONNECTION_LOST'
   99 |   WL_CONNECTION_LOST,
      |   ^~~~~~~~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_spi.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_drv.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiStorage_Generic.h:56,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:79,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper/src/utility/wl_definitions.h:56:3: error: 'WL_DISCONNECTED' conflicts with a previous declaration
   56 |   WL_DISCONNECTED,
      |   ^~~~~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:70,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wl_definitions.h:100:3: note: previous declaration 'wl_status_t WL_DISCONNECTED'
  100 |   WL_DISCONNECTED,
      |   ^~~~~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_spi.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_drv.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiStorage_Generic.h:56,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:79,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper/src/utility/wl_definitions.h:57:3: error: 'WL_AP_LISTENING' conflicts with a previous declaration
   57 |   WL_AP_LISTENING,
      |   ^~~~~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:70,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wl_definitions.h:101:3: note: previous declaration 'wl_status_t WL_AP_LISTENING'
  101 |   WL_AP_LISTENING,
      |   ^~~~~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_spi.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_drv.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiStorage_Generic.h:56,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:79,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper/src/utility/wl_definitions.h:58:3: error: 'WL_AP_CONNECTED' conflicts with a previous declaration
   58 |   WL_AP_CONNECTED,
      |   ^~~~~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:70,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wl_definitions.h:102:3: note: previous declaration 'wl_status_t WL_AP_CONNECTED'
  102 |   WL_AP_CONNECTED,
      |   ^~~~~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_spi.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_drv.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiStorage_Generic.h:56,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:79,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper/src/utility/wl_definitions.h:59:3: error: 'WL_AP_FAILED' conflicts with a previous declaration
   59 |   WL_AP_FAILED
      |   ^~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:70,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wl_definitions.h:103:3: note: previous declaration 'wl_status_t WL_AP_FAILED'
  103 |   WL_AP_FAILED
      |   ^~~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_spi.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_drv.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiStorage_Generic.h:56,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:79,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper/src/utility/wl_definitions.h:60:3: error: conflicting declaration 'typedef enum wl_status_t wl_status_t'
   60 | } wl_status_t;
      |   ^~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:70,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wl_definitions.h:104:3: note: previous declaration as 'typedef enum wl_status_t wl_status_t'
  104 | } wl_status_t;
      |   ^~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_spi.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wifi_drv.h:57,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiStorage_Generic.h:56,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:79,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
/Users/efpe/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper/src/utility/wl_definitions.h:63:6: error: multiple definition of 'enum wl_enc_type'
   63 | enum wl_enc_type {  /* Values map to 802.11 encryption suites... */
      |      ^~~~~~~~~~~
In file included from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFi_Generic.h:70,
                 from .pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/WiFiNINA_Generic.h:60,
                 from include/defines.h:70,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/WiFiNINA_Generic/src/utility/wl_definitions.h:107:6: note: previous definition here
  107 | enum wl_enc_type
      |      ^~~~~~~~~~~
src/main.cpp: In function 'void getNTPTime()':
src/main.cpp:148:50: error: 'rtc_set_datetime' cannot be used as a function
  148 |       rtc_set_datetime(DateTime((uint32_t) epoch));
      |                                                  ^
src/main.cpp:152:84: error: 'rtc_set_datetime' cannot be used as a function
  152 |       while( (loopCount++ < 10 ) && ( ! rtc_set_datetime(DateTime((uint32_t) epoch)) ) )
      |                                                                                    ^
src/main.cpp: In function 'void displayTime()':
src/main.cpp:254:29: error: 'rtc_get_datetime' cannot be used as a function
  254 |   rtc_get_datetime(&currTime);
      |                             ^
src/main.cpp:257:35: error: no matching function for call to 'DateTime::DateTime(datetime_t&)'
  257 |   DateTime now = DateTime(currTime);
      |                                   ^
In file included from .pio/libdeps/nanorp2040connect/RP2040_RTC/src/RP2040_RTC.h:47,
                 from include/defines.h:69,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:205:5: note: candidate: 'DateTime::DateTime(const int&)'
  205 |     DateTime (const datetime_t &tm)
      |     ^~~~~~~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:205:33: note:   no known conversion for argument 1 from 'datetime_t' to 'const int&'
  205 |     DateTime (const datetime_t &tm)
      |               ~~~~~~~~~~~~~~~~~~^~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:197:5: note: candidate: 'DateTime::DateTime(const time_t&)'
  197 |     DateTime (const time_t& timeInput)
      |     ^~~~~~~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:197:29: note:   no known conversion for argument 1 from 'datetime_t' to 'const time_t&' {aka 'const long long int&'}
  197 |     DateTime (const time_t& timeInput)
      |               ~~~~~~~~~~~~~~^~~~~~~~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:192:5: note: candidate: 'DateTime::DateTime(const tmElements_t&)'
  192 |     DateTime (const tmElements_t& tm)
      |     ^~~~~~~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:192:35: note:   no known conversion for argument 1 from 'datetime_t' to 'const tmElements_t&'
  192 |     DateTime (const tmElements_t& tm)
      |               ~~~~~~~~~~~~~~~~~~~~^~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:158:5: note: candidate: 'DateTime::DateTime(const DateTime&)'
  158 |     DateTime (const DateTime& copy)
      |     ^~~~~~~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:158:31: note:   no known conversion for argument 1 from 'datetime_t' to 'const DateTime&'
  158 |     DateTime (const DateTime& copy)
      |               ~~~~~~~~~~~~~~~~^~~~
In file included from .pio/libdeps/nanorp2040connect/RP2040_RTC/src/RP2040_RTC.h:47,
                 from include/defines.h:69,
                 from src/main.cpp:24:
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:144:5: note: candidate: 'DateTime::DateTime(uint16_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)'
  144 |     DateTime (const uint16_t year, const uint8_t month, const uint8_t day, const uint8_t hour = 0, const uint8_t min = 0, const uint8_t sec = 0)
      |     ^~~~~~~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:144:5: note:   candidate expects 6 arguments, 1 provided
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:104:5: note: candidate: 'DateTime::DateTime(uint32_t)'
  104 |     DateTime (uint32_t t = SECONDS_FROM_1970_TO_2000)
      |     ^~~~~~~~
.pio/libdeps/nanorp2040connect/RP2040_RTC/src/DateTime_Generic.h:104:24: note:   no known conversion for argument 1 from 'datetime_t' to 'uint32_t' {aka 'long unsigned int'}
  104 |     DateTime (uint32_t t = SECONDS_FROM_1970_TO_2000)
      |               ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*** [.pio/build/nanorp2040connect/src/main.cpp.o] Error 1
=============================================================================================================================== [FAILED] Took 17.06 seconds ===============================================================================================================================
khoih-prog commented 2 years ago

Hi @efpe

Thanks for your interest in the library and your best try so far.

I'm sorry but the library is designed mainly for Arduino IDE, where PIO requires much more knowledge and skills to understand and manually modify and change the settings and might not good for you yet. I don't have time to spend on your PIO issue and it's better that you ask for help in PIO forum.

Good Luck,

efpe commented 2 years ago

Hey @khoih-prog,

Thanks for getting back. I'll try my luck on the PIO forum and update this issue when I have something.

khoih-prog commented 2 years ago

Also check if there is some bug in PIO, similar to Compile issue for RP2040 Connect #11.

Many users as well as I'd appreciate if you'd post the issue on PIO forum and update the solution here as well.

efpe commented 2 years ago

PlatformIO community forum topic & solution

khoih-prog commented 2 years ago

Hi @efpe

Please check

  1. RP2040_RTC_Time crashes Pico, does not work #3
  2. Library converts datetime_t incorrectly, causing example to fail #4

and update to the latest releases of libraries.

These libraries are updated recently to fix the crashing bug happening to a board with cleared flash or discussed in your PIO forum RP2040 Connect + PlatformIO + RP2040_RTC build failure

  1. LittleFS_Mbed_RP2040
  2. Timezone_Generic
  3. RP2040_RTC

All the fixes started thanks to your initial issue, so don't hesitate to report any issue next time.

efpe commented 2 years ago

Great :) Many thanks to everyone involved.