What is the definitive platformio.ini configuration for the pico-w?

Hi all,

I’ve searched extensively online, through forums, and even consulted ChatGPT, but I still can’t find a definitive configuration for the Raspberry Pi Pico W with the Arduino framework.

Here are some examples I’ve tried:
(The current config sort-of works, though it can’t connect to WiFi – even though it can using the Arduino IDE)

Any guidance or direction pointing most welcomed :slight_smile:

[env:pico]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = pico
framework = arduino
board_build.core = earlephilhower
board_build.filesystem_size = 0.5m


; [env:pico]
; platform = raspberrypi
; ; platform = https://github.com/maxgerhardt/platform-raspberrypi.git
; ; https://github.com/platformio/platform-raspberrypi.git
; board = pico
; framework = arduino
; board_build.core = earlephilhower
; board_build.filesystem_size = 0.5m
; upload_port = /dev/cu.usbmodem11401
; monitor_port = /dev/cu.usbmodem11401
; monitor_speed = 115200
; upload_protocol = picoprobe
; debug_tool = picoprobe
; debug_init_break = tbreak loop

lib_deps = 
     WiFi

; build_flags =
;     -D ARDUINO_RASPBERRY_PI_PICO_W
;     -D ARDUINO_ARCH_RP2040
;     -D USBD_MAX_POWER_MA=250

; build_flags =
;     -D PICO_DEFAULT_LED_PIN=25
;     -D USBD_STACK=2
;     -D ARDUINO_USB_STACK_PICO
;     -D ARDUINO_ARCH_RP2040
;     -D ARDUINO_RP2040_PICO
;     -D DEBUG_LEVEL_NONE
;     -D F_CPU=133000000L
;     -D FS_SIZE=128KB
;     -D IP_STACK_IPV4
;     -D PICO_FLASH_SIZE_BYTES=2097152
;     -D PICO_FLOAT_SUPPORT_ROM_V1
;     -D WIFI_REGION_WORLDWIDE
;     -Os

; board_build.flash_mode = dio
; board_build.f_cpu = 133000000L
; board_build.usb_product = "Raspberry Pi Pico W"
; board_build.usb_manufacturer = "Raspberry Pi"
; board_build.arduino.memory_type = "default"

I’d say

[env:picow]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = rpipicow
framework = arduino
board_build.filesystem_size = 0.5m

See Using this core with PlatformIO — Arduino-Pico 3.6.0 documentation and available boards.

1 Like

Saving that link in favorites… cheers :slight_smile:

Yup yup yup. That works a treat @maxgerhardt
And as for the WiFi not connecting, discovered rookie mistake of having
#include “WifiSetup.h”
in both the .h and .cpp files… doh!