Skip to content

Commit 6304d73

Browse files
committed
Fix platformio.ini build script for pico sdks, weird and hardcoded
1 parent 895bd13 commit 6304d73

File tree

3 files changed

+33
-19
lines changed

3 files changed

+33
-19
lines changed

platformio.ini

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -126,19 +126,14 @@ lib_compat_mode = strict
126126
lib_archive = no ; debug timer issues see https://community.platformio.org/t/choose-usb-stack-as-tiny-usb/22451/5
127127
lib_ignore = OneWire, USBHost
128128

129-
[common:rp2040]
129+
; Common build environment for Arduino-Pico platforms
130+
[common:arduinopico]
130131
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#develop
131-
; platform_packages =
132-
; framework-arduinopico @ symlink:///Users/tyeth/Projects/arduino-pico
133-
; framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#master
134-
board = rpipicow
132+
platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git
135133
framework = arduino
136134
board_build.core = earlephilhower
137-
board_build.filesystem_size = 0.5m
138-
build_flags = -DUSE_TINYUSB
139-
; Once https://github.com/platformio/platformio-core > 6.1.11 these can be removed
140135
lib_ignore = WiFiNINA, WiFi101, Adafruit Zero DMA Library, OneWire
141-
lib_compat_mode = soft ; can be strict once pio detects SleepyDog on RP2040
136+
lib_compat_mode = soft ; can be stricter once pio detects SleepyDog on RP2040
142137

143138

144139
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Individual Board Definitions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -546,16 +541,18 @@ board_build.partitions = min_spiffs.csv
546541

547542

548543
[env:raspberypi_picow]
549-
extends = common:rp2040
544+
extends = common:arduinopico
545+
board = rpipicow
550546

551547
[env:raspberypi_picow_debug_port_only]
552-
extends = common:rp2040
548+
extends = common:arduinopico
549+
board = rpipicow
553550
build_flags =
554551
-DUSE_TINYUSB
555552
-DDEBUG_RP2040_PORT=Serial
556553

557554
[env:raspberypi_picow_debug]
558-
extends = common:rp2040
555+
extends = common:arduinopico
559556
; platform = https://github.com/maxgerhardt/platform-raspberrypi.git
560557
; platform_packages =
561558
; framework-arduinopico @ symlink:///Users/tyeth/Projects/arduino-pico
@@ -597,7 +594,8 @@ build_flags =
597594

598595

599596
[env:raspberypi_pico2w]
600-
extends = common:rp2040
597+
extends = common:arduinopico
598+
boards = rpipico2w
601599
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#develop
602600
platform_packages =
603601
framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git
@@ -610,11 +608,7 @@ build_flags =
610608
; -DPICO_CYW43_SUPPORTED=1
611609

612610
[env:raspberypi_pico2w_debug]
613-
extends = common:rp2040
614-
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#develop
615-
platform_packages =
616-
framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git
617-
; ; framework-arduinopico @ symlink:///Users/tyeth/Projects/arduino-pico
611+
extends = common:arduinopico
618612
board = rpipico2w
619613
build_type = debug
620614
framework = arduino
@@ -654,3 +648,14 @@ build_flags =
654648
; ; No USB stack
655649
; build_flags = -DPIO_FRAMEWORK_ARDUINO_NO_USB
656650
; -DPIO_FRAMEWORK_ARDUINO_ENABLE_IPV6
651+
652+
[env:adafruit_fruitjam]
653+
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#develop
654+
platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git
655+
board = adafruit_fruitjam
656+
framework = arduino
657+
board_build.core = earlephilhower
658+
board_build.filesystem_size = 0.5m
659+
lib_ignore = WiFiNINA, WiFi101, Adafruit Zero DMA Library, OneWire
660+
lib_compat_mode = soft
661+
build_flags = -DUSE_TINYUSB

src/Wippersnapper_Boards.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,13 @@
223223
#define USE_TINYUSB
224224
#define USE_STATUS_LED
225225
#define STATUS_LED_PIN LED_BUILTIN
226+
#elif defined(ADAFRUIT_FRUITJAM_RP2350)
227+
#define BOARD_ID "fruitjam"
228+
#define USE_TINYUSB
229+
#define USE_STATUS_NEOPIXEL
230+
#define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
231+
#define STATUS_NEOPIXEL_NUM 5
232+
#define USE_PSRAM
226233
#else
227234
#warning "Board type not identified within Wippersnapper_Boards.h!"
228235
#endif

src/provisioning/tinyusb/Wippersnapper_FS.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S3_REVTFT) || \
2929
defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2_REVTFT) || \
3030
defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_N4R2) || \
31-
defined(ARDUINO_XIAO_ESP32S3)
31+
defined(ARDUINO_XIAO_ESP32S3) || \
32+
defined(ADAFRUIT_FRUITJAM_RP2350)
33+
3234
#include "Wippersnapper_FS.h"
3335
#include "print_dependencies.h"
3436
// On-board external flash (QSPI or SPI) macros should already

0 commit comments

Comments
 (0)