Skip to content

Commit bcd502d

Browse files
committed
Merge remote-tracking branch 'upstream/pico2w' into uat-xmas2024
2 parents e78470e + 4546124 commit bcd502d

File tree

8 files changed

+77
-9
lines changed

8 files changed

+77
-9
lines changed

.github/workflows/build-clang-doxy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ jobs:
498498
strategy:
499499
fail-fast: false
500500
matrix:
501-
arduino-platform: ["picow_rp2040_tinyusb"]
501+
arduino-platform: ["picow_rp2040_tinyusb", "picow_rp2350_tinyusb"]
502502
steps:
503503
- uses: actions/setup-python@v5
504504
with:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

platformio.ini

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ 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 =
117117
; framework-arduinopico @ symlink:///Users/tyeth/Projects/arduino-pico
118118
; framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#master
@@ -473,7 +473,7 @@ extends = common:rp2040
473473

474474
[env:raspberypi_picow_debug]
475475
extends = common:rp2040
476-
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
476+
; platform = https://github.com/maxgerhardt/platform-raspberrypi.git
477477
; platform_packages =
478478
; framework-arduinopico @ symlink:///Users/tyeth/Projects/arduino-pico
479479
; framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#master
@@ -494,7 +494,7 @@ build_flags =
494494
-DDEBUG_RP2040_CORE
495495
-DDEBUG_RP2040_WIFI
496496
-DNDEBUG
497-
-DLWIP_DEBUG
497+
-DLWIP_DEBUG=1
498498
-DDEBUG_RP2040_PORT=Serial1
499499
-DDEBUG_RP2040_UART_1
500500
-DDEBUG_RP2040_UART=1
@@ -511,3 +511,63 @@ 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/maxgerhardt/platform-raspberrypi.git#develop
519+
platform_packages =
520+
framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git
521+
board = rpipico2w
522+
build_flags =
523+
-DWIFICC=CYW43_COUNTRY_UK
524+
-DUSE_TINYUSB
525+
; -DARDUINO_ARCH_RP2040
526+
; -DUSBD_MAX_POWER_MA=250
527+
; -DPICO_CYW43_SUPPORTED=1
528+
529+
[env:raspberypi_pico2w_debug]
530+
extends = common:rp2040
531+
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#develop
532+
platform_packages =
533+
framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git
534+
; ; framework-arduinopico @ symlink:///Users/tyeth/Projects/arduino-pico
535+
board = rpipico2w
536+
build_type = debug
537+
framework = arduino
538+
debug_tool = cmsis-dap
539+
upload_protocol = cmsis-dap
540+
; board can use both Arduino cores -- we select Arduino-Pico here
541+
board_build.core = earlephilhower
542+
board_build.filesystem_size = 0.5m
543+
debug_init_break = tbreak runNetFSM
544+
build_flags =
545+
; -UARDUINO
546+
; -DPICO_BUILD
547+
-DARDUINO_ARCH_RP2040
548+
-DUSBD_MAX_POWER_MA=250
549+
-DPICO_CYW43_SUPPORTED=1
550+
-DWIFICC=CYW43_COUNTRY_UK
551+
; -DDEBUG
552+
; -DDEBUG_RP2040_WIRE
553+
; -DDEBUG_RP2040_SPI
554+
; -DDEBUG_RP2040_CORE
555+
; -DDEBUG_RP2040_WIFI
556+
; -DNDEBUG
557+
; -DLWIP_DEBUG
558+
; -DDEBUG_RP2040_PORT=Serial1
559+
; -DDEBUG_RP2040_UART_1
560+
; -DDEBUG_RP2040_UART=1
561+
-Og
562+
; Enable debug stack protection
563+
-fstack-protector
564+
; Enable Exceptions
565+
-DPIO_FRAMEWORK_ARDUINO_ENABLE_EXCEPTIONS
566+
; Enable RTTI
567+
-DPIO_FRAMEWORK_ARDUINO_ENABLE_RTTI
568+
; ; Enable default USB Stack of Pico SDK USB Stack with none of below usb options
569+
; Adafruit TinyUSB
570+
-DUSE_TINYUSB
571+
; ; No USB stack
572+
; build_flags = -DPIO_FRAMEWORK_ARDUINO_NO_USB
573+
; -DPIO_FRAMEWORK_ARDUINO_ENABLE_IPV6

src/Wippersnapper_Boards.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,12 @@
189189
#define BOARD_ID "rpi-pico-w"
190190
#define USE_TINYUSB
191191
#define USE_STATUS_LED
192-
#define STATUS_LED_PIN 32
192+
#define STATUS_LED_PIN LED_BUILTIN
193+
#elif defined(ARDUINO_RASPBERRY_PI_PICO_2W)
194+
#define BOARD_ID "rpi-pico-2w"
195+
#define USE_TINYUSB
196+
#define USE_STATUS_LED
197+
#define STATUS_LED_PIN LED_BUILTIN
193198
#else
194199
#warning "Board type not identified within Wippersnapper_Boards.h!"
195200
#endif

src/components/statusLED/Wippersnapper_StatusLED.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void initStatusLED() {
8383
#elif defined(ARDUINO_ARCH_ESP32)
8484
WS._pwmComponent->attach(STATUS_LED_PIN, LEDC_BASE_FREQ, LEDC_TIMER_12_BIT);
8585
WS._pwmComponent->writeDutyCycle(STATUS_LED_PIN, 0); // turn OFF
86-
#elif defined(ARDUINO_RASPBERRY_PI_PICO_W)
86+
#elif defined(ARDUINO_ARCH_RP2040)
8787
digitalWrite(STATUS_LED_PIN, 0);
8888
#else
8989
analogWrite(STATUS_LED_PIN, 0);
@@ -177,7 +177,7 @@ void setStatusLEDColor(uint32_t color) {
177177
#ifdef USE_STATUS_LED
178178
if (!WS.lockStatusLED)
179179
return; // status pixel is in-use elsewhere
180-
#ifdef ARDUINO_RASPBERRY_PI_PICO_W
180+
#ifdef ARDUINO_ARCH_RP2040
181181
digitalWrite(STATUS_LED_PIN, color > 0);
182182
#else
183183
if (color != BLACK)
@@ -236,7 +236,7 @@ void setStatusLEDColor(uint32_t color, int brightness) {
236236
if (!WS.lockStatusLED)
237237
return;
238238

239-
#ifdef ARDUINO_RASPBERRY_PI_PICO_W
239+
#ifdef ARDUINO_ARCH_RP2040
240240
digitalWrite(STATUS_LED_PIN, color > 0);
241241
#else
242242
if (color != BLACK) {

src/provisioning/tinyusb/Wippersnapper_FS.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_NOPSRAM) || \
2525
defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S3) || \
2626
defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S3_TFT) || \
27-
defined(ARDUINO_RASPBERRY_PI_PICO_W) || \
27+
defined(ARDUINO_ARCH_RP2040) || \
2828
defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S3_REVTFT) || \
2929
defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2_REVTFT) || \
3030
defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_N4R2)

0 commit comments

Comments
 (0)