Raspberry Pi Pico - Errors during installation, then compilation with earlephilhower core

I’ve been having persistent problems with the Raspberry Pi Pico ever since the latest PlatformIO update (6.1.14).

I’ve uninstalled, then re-installed the " Raspberry Pi RP2040" platform. Un-installing, then compiling gives me these errors:

Tool Manager: Error: Please read https://bit.ly/package-manager-ioerror
Tool Manager: Warning! Package Mirror: HTTPSConnectionPool(host='usc1.contabostorage.com', port=443): Max retries exceeded with url: /250040e607e8431abaff8727621872f9:pioregmirrorus/tools/db/33/a2a30b711166f3c06e6dc02939641af84ddd8f0db938811208e93c27cc7f/toolchain-gccarmnoneeabi-windows_amd64-1.90201.191206.tar.gz (Caused by SSLError(SSLError(1, '[SSL] unknown error (_ssl.c:1006)')))
Tool Manager: Looking for another mirror...

This loops continuously until I abort the compilation.

What finally worked was installing via the command line, separate from VSCode:

PS C:\Users\admin\Documents\PlatformIO\Projects\Test RPI> pio pkg install -p https://github.com/platformio/platform-raspberrypi.git
Resolving pico dependencies...
Platform Manager: Installing git+https://github.com/platformio/platform-raspberrypi.git
git version 2.30.1.windows.1
Cloning into 'C:\Users\admin\.platformio\.cache\tmp\pkg-installing-6kx1bo7_'...
remote: Enumerating objects: 40, done.
remote: Counting objects: 100% (40/40), done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 40 (delta 3), reused 20 (delta 0), pack-reused 0
Receiving objects: 100% (40/40), 109.44 KiB | 1.23 MiB/s, done.
Resolving deltas: 100% (3/3), done.
Submodule 'builder/frameworks/arduino/mbed-core' (https://github.com/platformio/builder-framework-arduino-core-mbed.git) registered for path 'builder/frameworks/arduino/mbed-core'
Cloning into 'C:/Users/admin/.platformio/.cache/tmp/pkg-installing-6kx1bo7_/builder/frameworks/arduino/mbed-core'...
remote: Enumerating objects: 40, done.
remote: Counting objects: 100% (40/40), done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 40 (delta 11), reused 33 (delta 10), pack-reused 0
Receiving objects: 100% (40/40), 11.98 KiB | 191.00 KiB/s, done.
Resolving deltas: 100% (11/11), done.
Submodule path 'builder/frameworks/arduino/mbed-core': checked out '66ff9c5ecf64e0ce6360cbf2d8769228bb1294b4'
Platform Manager: raspberrypi@1.12.0+sha.510a979 has been installed!
Tool Manager: Installing platformio/toolchain-gccarmnoneeabi @ ~1.90201.0
Tool Manager: Error: Please read https://bit.ly/package-manager-ioerror
Tool Manager: Warning! Package Mirror: HTTPSConnectionPool(host='usc1.contabostorage.com', port=443): Max retries exceeded with url: /250040e607e8431abaff8727621872f9:pioregmirrorus/tools/db/33/a2a30b711166f3c06e6dc02939641af84ddd8f0db938811208e93c27cc7f/toolchain-gccarmnoneeabi-windows_amd64-1.90201.191206.tar.gz (Caused by SSLError(SSLError(1, '[SSL] unknown error (_ssl.c:1006)')))
Tool Manager: Looking for another mirror...
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Tool Manager: toolchain-gccarmnoneeabi@1.90201.191206 has been installed!
Tool Manager: Installing platformio/framework-arduino-mbed @ ~4.1.1
Tool Manager: Error: Please read https://bit.ly/package-manager-ioerror
Tool Manager: Warning! Package Mirror: HTTPSConnectionPool(host='usc1.contabostorage.com', port=443): Max retries exceeded with url: /250040e607e8431abaff8727621872f9:pioregmirrorus/tools/c0/c3/5e36c5edadb2a7e9735cc02bf5e4844918169adc1c5fabad148c1c745e9f/framework-arduino-mbed-4.1.1.tar.gz (Caused by SSLError(SSLError(1, '[SSL] unknown error (_ssl.c:1006)')))
Tool Manager: Looking for another mirror...
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Tool Manager: framework-arduino-mbed@4.1.1 has been installed!
Tool Manager: Installing platformio/tool-rp2040tools @ ~1.0.2
Tool Manager: Error: Please read https://bit.ly/package-manager-ioerror
Tool Manager: Warning! Package Mirror: HTTPSConnectionPool(host='usc1.contabostorage.com', port=443): Max retries exceeded with url: /250040e607e8431abaff8727621872f9:pioregmirrorus/tools/6c/7e/e6b57561c7d777ba35b0c1848febb53a88bb1ea1be2ae5af8f9e1c382a2a/tool-rp2040tools-windows-1.0.2.tar.gz (Caused by SSLError(SSLError(1, '[SSL] unknown error (_ssl.c:1006)')))
Tool Manager: Looking for another mirror...
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Tool Manager: tool-rp2040tools@1.0.2 has been installed!

The “default” code (when a new project is created) compiles just fine.
However, when compiled with:

board_build.core = earlephilhower

In the platformio.ini file, I get a ton of errors saying that “Arduino.h” could not be found.
Here is the verbose output:

PS C:\Users\admin\Documents\PlatformIO\Projects\Test RPI> pio run -v
Processing pico (platform: raspberrypi; framework: arduino; board: pico; board_build.core: earlephilhower)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/raspberrypi/pico.html
PLATFORM: Raspberry Pi RP2040 (1.12.0+sha.510a979) (git+https://github.com/platformio/platform-raspberrypi.git) > Raspberry Pi Pico
HARDWARE: RP2040 133MHz, 264KB RAM, 2MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, jlink, raspberrypi-swd)
PACKAGES:
 - framework-arduino-mbed @ 4.1.1
 - tool-rp2040tools @ 1.0.2
 - toolchain-gccarmnoneeabi @ 1.90201.191206 (9.2.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 42 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
arm-none-eabi-g++ -o .pio\build\pico\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 -iprefixC:\Users\admin\.platformio\packages\framework-arduino-mbed\cores\earlephilhower @C:\Users\admin\.platformio\packages\framework-arduino-mbed\variants\RASPBERRY_PI_PICO\includes.txt -nostdlib -DPLATFORMIO=60114 -DARDUINO_RASPBERRY_PI_PICO -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_RTC=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=1707125159.6448777 -D__MBED_CMSIS_RTOS_CM -DMBED_MPU_CUSTOM -DMBEDTLS_ENTROPY_NV_SEED -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=RASPBERRY_PI_PICO -DTARGET_RASPBERRYPI -DTARGET_RASPBERRY_PI_PICO -DTARGET_RELEASE -DTARGET_RP2040 -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -DMBED_NO_GLOBAL_USING_DIRECTIVE=1 -DCORE_MAJOR=4 -DCORE_MINOR=1 -DCORE_PATCH=1 -DUSE_ARDUINO_PINOUT -DARDUINO=10810 -DARDUINO_ARCH_MBED -Iinclude -Isrc -IC:\Users\admin\.platformio\packages\framework-arduino-mbed\cores\earlephilhower -IC:\Users\admin\.platformio\packages\framework-arduino-mbed\cores\earlephilhower\api\deprecated -IC:\Users\admin\.platformio\packages\framework-arduino-mbed\cores\earlephilhower\api\deprecated-avr-comp -IC:\Users\admin\.platformio\packages\framework-arduino-mbed\variants\RASPBERRY_PI_PICO src\main.cpp
arm-none-eabi-g++ -o .pio\build\pico\FrameworkArduinoVariant\double_tap_usb_boot.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 -iprefixC:\Users\admin\.platformio\packages\framework-arduino-mbed\cores\earlephilhower @C:\Users\admin\.platformio\packages\framework-arduino-mbed\variants\RASPBERRY_PI_PICO\includes.txt -nostdlib -DPLATFORMIO=60114 -DARDUINO_RASPBERRY_PI_PICO -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_RTC=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=1707125159.6448777 -D__MBED_CMSIS_RTOS_CM -DMBED_MPU_CUSTOM -DMBEDTLS_ENTROPY_NV_SEED -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=RASPBERRY_PI_PICO -DTARGET_RASPBERRYPI -DTARGET_RASPBERRY_PI_PICO -DTARGET_RELEASE -DTARGET_RP2040 -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -DMBED_NO_GLOBAL_USING_DIRECTIVE=1 -DCORE_MAJOR=4 -DCORE_MINOR=1 -DCORE_PATCH=1 -DUSE_ARDUINO_PINOUT -DARDUINO=10810 -DARDUINO_ARCH_MBED -IC:\Users\admin\.platformio\packages\framework-arduino-mbed\cores\earlephilhower -IC:\Users\admin\.platformio\packages\framework-arduino-mbed\cores\earlephilhower\api\deprecated -IC:\Users\admin\.platformio\packages\framework-arduino-mbed\cores\earlephilhower\api\deprecated-avr-comp -IC:\Users\admin\.platformio\packages\framework-arduino-mbed\variants\RASPBERRY_PI_PICO C:\Users\admin\.platformio\packages\framework-arduino-mbed\variants\RASPBERRY_PI_PICO\double_tap_usb_boot.cpp
arm-none-eabi-g++ -o .pio\build\pico\FrameworkArduinoVariant\variant.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 -iprefixC:\Users\admin\.platformio\packages\framework-arduino-mbed\cores\earlephilhower @C:\Users\admin\.platformio\packages\framework-arduino-mbed\variants\RASPBERRY_PI_PICO\includes.txt -nostdlib -DPLATFORMIO=60114 -DARDUINO_RASPBERRY_PI_PICO -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_RTC=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=1707125159.6448777 -D__MBED_CMSIS_RTOS_CM -DMBED_MPU_CUSTOM -DMBEDTLS_ENTROPY_NV_SEED -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=RASPBERRY_PI_PICO -DTARGET_RASPBERRYPI -DTARGET_RASPBERRY_PI_PICO -DTARGET_RELEASE -DTARGET_RP2040 -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -DMBED_NO_GLOBAL_USING_DIRECTIVE=1 -DCORE_MAJOR=4 -DCORE_MINOR=1 -DCORE_PATCH=1 -DUSE_ARDUINO_PINOUT -DARDUINO=10810 -DARDUINO_ARCH_MBED -IC:\Users\admin\.platformio\packages\framework-arduino-mbed\cores\earlephilhower -IC:\Users\admin\.platformio\packages\framework-arduino-mbed\cores\earlephilhower\api\deprecated -IC:\Users\admin\.platformio\packages\framework-arduino-mbed\cores\earlephilhower\api\deprecated-avr-comp -IC:\Users\admin\.platformio\packages\framework-arduino-mbed\variants\RASPBERRY_PI_PICO C:\Users\admin\.platformio\packages\framework-arduino-mbed\variants\RASPBERRY_PI_PICO\variant.cpp
src\main.cpp:1:10: fatal error: Arduino.h: No such file or directory

*****************************************************************
* Looking for Arduino.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Arduino.h"
* Web  > https://registry.platformio.org/search?q=header:Arduino.h
*
*****************************************************************

    1 | #include <Arduino.h>
      |          ^~~~~~~~~~~
compilation terminated.
C:\Users\admin\.platformio\packages\framework-arduino-mbed\variants\RASPBERRY_PI_PICO\double_tap_usb_boot.cpp:2:14: fatal error: pico.h: No such file or directory

**************************************************************
* Looking for pico.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:pico.h"
* Web  > https://registry.platformio.org/search?q=header:pico.h
*
**************************************************************

    2 |     #include "pico.h"
      |              ^~~~~~~~
compilation terminated.
*** [.pio\build\pico\src\main.cpp.o] Error 1
C:\Users\admin\.platformio\packages\framework-arduino-mbed\variants\RASPBERRY_PI_PICO\variant.cpp:1:10: fatal error: Arduino.h: No such file or directory

*****************************************************************
* Looking for Arduino.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Arduino.h"
* Web  > https://registry.platformio.org/search?q=header:Arduino.h
*
*****************************************************************

    1 | #include "Arduino.h"
      |          ^~~~~~~~~~~
compilation terminated.
*** [.pio\build\pico\FrameworkArduinoVariant\double_tap_usb_boot.cpp.o] Error 1
*** [.pio\build\pico\FrameworkArduinoVariant\variant.cpp.o] Error 1
========================================================================================================================= [FAILED] Took 0.74 seconds =========================================================================================================================

I can tell from the “.vscode/c_cpp_properties.json” file that it wants to include files from:

"C:/Users/admin/.platformio/packages/framework-arduino-mbed/cores/earlephilhower",
"C:/Users/admin/.platformio/packages/framework-arduino-mbed/cores/earlephilhower/api/deprecated",
"C:/Users/admin/.platformio/packages/framework-arduino-mbed/cores/earlephilhower/api/deprecated-avr-comp",

However, these directories don’t exist.

I’m not sure what exactly to do from here, so any help would be appreciated!