Skip to content

Commit 99ece2f

Browse files
committed
Add RPi Pico2W build
1 parent b75aae3 commit 99ece2f

File tree

4 files changed

+491
-415
lines changed

4 files changed

+491
-415
lines changed

platformio.ini

Lines changed: 79 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ lib_deps =
7171
adafruit/Adafruit TouchScreen
7272
adafruit/Adafruit MQTT Library
7373
bblanchon/ArduinoJson
74-
https://github.com/pstolarz/OneWireNg.git
74+
https://github.com/tyeth/pstolarz_OneWireNg.git#pico2w
7575
https://github.com/milesburton/Arduino-Temperature-Control-Library.git
7676
https://github.com/Sensirion/arduino-sht.git
7777
https://github.com/Sensirion/arduino-i2c-scd4x.git
@@ -112,9 +112,9 @@ lib_archive = no ; debug timer issues see https://community.platformio.org/t/cho
112112
lib_ignore = OneWire
113113

114114
[common:rp2040]
115-
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
115+
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#develop
116116
; platform_packages =
117-
; framework-arduinopico @ symlink:///Users/tyeth/Projects/arduino-pico
117+
; ; framework-arduinopico @ symlink:///Users/tyeth/Projects/arduino-pico
118118
; framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#master
119119
board = rpipicow
120120
framework = arduino
@@ -511,3 +511,79 @@ build_flags =
511511
; ; No USB stack
512512
; build_flags = -DPIO_FRAMEWORK_ARDUINO_NO_USB
513513
; -DPIO_FRAMEWORK_ARDUINO_ENABLE_IPV6
514+
515+
516+
[env:raspberypi_pico2w]
517+
extends = common:rp2040
518+
platform = https://github.com/tyeth/maxgerhardt_platform-raspberrypi.git#pico2w
519+
; platform = https://github.com/maxgerhardt/platform-raspberrypi.git#develop
520+
platform_packages =
521+
framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git
522+
board = rpipico2w
523+
build_flags =
524+
-DWIFICC=CYW43_COUNTRY_UK
525+
; -DARDUINO_ARCH_RP2040
526+
; -DUSBD_MAX_POWER_MA=500
527+
; -DPICO_CYW43_SUPPORTED=1
528+
529+
[env:raspberypi_pico2w_debug]
530+
extends = common:rp2040
531+
platform = https://github.com/tyeth/maxgerhardt_platform-raspberrypi.git#pico2w
532+
; platform = https://github.com/maxgerhardt/platform-raspberrypi.git#develop
533+
platform_packages =
534+
framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git
535+
; ; framework-arduinopico @ symlink:///Users/tyeth/Projects/arduino-pico
536+
board = rpipico2w
537+
build_type = debug
538+
framework = arduino
539+
debug_tool = cmsis-dap
540+
upload_protocol = cmsis-dap
541+
; board can use both Arduino cores -- we select Arduino-Pico here
542+
board_build.core = earlephilhower
543+
board_build.filesystem_size = 0.5m
544+
debug_init_break = tbreak runNetFSM
545+
build_flags =
546+
; -UARDUINO
547+
; -DPICO_BUILD
548+
-DARDUINO_ARCH_RP2040
549+
-DUSBD_MAX_POWER_MA=500
550+
-DPICO_CYW43_SUPPORTED=1
551+
-DWIFICC=CYW43_COUNTRY_UK
552+
; -DDEBUG
553+
; -DDEBUG_RP2040_WIRE
554+
; -DDEBUG_RP2040_SPI
555+
; -DDEBUG_RP2040_CORE
556+
; -DDEBUG_RP2040_WIFI
557+
; -DNDEBUG
558+
; -DLWIP_DEBUG
559+
; -DDEBUG_RP2040_PORT=Serial1
560+
; -DDEBUG_RP2040_UART_1
561+
; -DDEBUG_RP2040_UART=1
562+
-Og
563+
; Enable debug stack protection
564+
-fstack-protector
565+
; Enable Exceptions
566+
-DPIO_FRAMEWORK_ARDUINO_ENABLE_EXCEPTIONS
567+
; Enable RTTI
568+
-DPIO_FRAMEWORK_ARDUINO_ENABLE_RTTI
569+
; ; Enable default USB Stack of Pico SDK USB Stack with none of below usb options
570+
; Adafruit TinyUSB
571+
-DUSE_TINYUSB
572+
; ; No USB stack
573+
; build_flags = -DPIO_FRAMEWORK_ARDUINO_NO_USB
574+
; -DPIO_FRAMEWORK_ARDUINO_ENABLE_IPV6
575+
576+
577+
[env:pimoroni_pico_plus_2w]
578+
extends = common:rp2040
579+
platform = https://github.com/tyeth/maxgerhardt_platform-raspberrypi.git#pico2w
580+
; platform = https://github.com/maxgerhardt/platform-raspberrypi.git#develop
581+
platform_packages =
582+
framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git
583+
board = pimoroni_pico_plus_2w
584+
build_flags =
585+
-DWIFICC=CYW43_COUNTRY_UK
586+
-DUSE_TINYUSB
587+
; -DARDUINO_ARCH_RP2040
588+
; -DUSBD_MAX_POWER_MA=500
589+
; -DPICO_CYW43_SUPPORTED=1

src/Wippersnapper_Boards.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
#define BOARD_ID "mkrwifi1010"
186186
#define USE_STATUS_LED
187187
#define STATUS_LED_PIN 6
188-
#elif defined(ARDUINO_RASPBERRY_PI_PICO_W)
188+
#elif defined(ARDUINO_RASPBERRY_PI_PICO_W) || defined(ARDUINO_ARCH_RP2040)
189189
#define BOARD_ID "rpi-pico-w"
190190
#define USE_TINYUSB
191191
#define USE_STATUS_LED

0 commit comments

Comments
 (0)