Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/pico2w' into uat-xmas2024
Browse files Browse the repository at this point in the history
  • Loading branch information
tyeth committed Dec 20, 2024
2 parents e78470e + 4546124 commit bcd502d
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-clang-doxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ jobs:
strategy:
fail-fast: false
matrix:
arduino-platform: ["picow_rp2040_tinyusb"]
arduino-platform: ["picow_rp2040_tinyusb", "picow_rp2350_tinyusb"]
steps:
- uses: actions/setup-python@v5
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions examples/Wippersnapper_demo/.picow_rp2350_tinyusb.generate
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

66 changes: 63 additions & 3 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ lib_archive = no ; debug timer issues see https://community.platformio.org/t/cho
lib_ignore = OneWire

[common:rp2040]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#develop
; platform_packages =
; framework-arduinopico @ symlink:///Users/tyeth/Projects/arduino-pico
; framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#master
Expand Down Expand Up @@ -473,7 +473,7 @@ extends = common:rp2040

[env:raspberypi_picow_debug]
extends = common:rp2040
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
; platform = https://github.com/maxgerhardt/platform-raspberrypi.git
; platform_packages =
; framework-arduinopico @ symlink:///Users/tyeth/Projects/arduino-pico
; framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#master
Expand All @@ -494,7 +494,7 @@ build_flags =
-DDEBUG_RP2040_CORE
-DDEBUG_RP2040_WIFI
-DNDEBUG
-DLWIP_DEBUG
-DLWIP_DEBUG=1
-DDEBUG_RP2040_PORT=Serial1
-DDEBUG_RP2040_UART_1
-DDEBUG_RP2040_UART=1
Expand All @@ -511,3 +511,63 @@ build_flags =
; ; No USB stack
; build_flags = -DPIO_FRAMEWORK_ARDUINO_NO_USB
; -DPIO_FRAMEWORK_ARDUINO_ENABLE_IPV6


[env:raspberypi_pico2w]
extends = common:rp2040
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#develop
platform_packages =
framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git
board = rpipico2w
build_flags =
-DWIFICC=CYW43_COUNTRY_UK
-DUSE_TINYUSB
; -DARDUINO_ARCH_RP2040
; -DUSBD_MAX_POWER_MA=250
; -DPICO_CYW43_SUPPORTED=1

[env:raspberypi_pico2w_debug]
extends = common:rp2040
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#develop
platform_packages =
framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git
; ; framework-arduinopico @ symlink:///Users/tyeth/Projects/arduino-pico
board = rpipico2w
build_type = debug
framework = arduino
debug_tool = cmsis-dap
upload_protocol = cmsis-dap
; board can use both Arduino cores -- we select Arduino-Pico here
board_build.core = earlephilhower
board_build.filesystem_size = 0.5m
debug_init_break = tbreak runNetFSM
build_flags =
; -UARDUINO
; -DPICO_BUILD
-DARDUINO_ARCH_RP2040
-DUSBD_MAX_POWER_MA=250
-DPICO_CYW43_SUPPORTED=1
-DWIFICC=CYW43_COUNTRY_UK
; -DDEBUG
; -DDEBUG_RP2040_WIRE
; -DDEBUG_RP2040_SPI
; -DDEBUG_RP2040_CORE
; -DDEBUG_RP2040_WIFI
; -DNDEBUG
; -DLWIP_DEBUG
; -DDEBUG_RP2040_PORT=Serial1
; -DDEBUG_RP2040_UART_1
; -DDEBUG_RP2040_UART=1
-Og
; Enable debug stack protection
-fstack-protector
; Enable Exceptions
-DPIO_FRAMEWORK_ARDUINO_ENABLE_EXCEPTIONS
; Enable RTTI
-DPIO_FRAMEWORK_ARDUINO_ENABLE_RTTI
; ; Enable default USB Stack of Pico SDK USB Stack with none of below usb options
; Adafruit TinyUSB
-DUSE_TINYUSB
; ; No USB stack
; build_flags = -DPIO_FRAMEWORK_ARDUINO_NO_USB
; -DPIO_FRAMEWORK_ARDUINO_ENABLE_IPV6
7 changes: 6 additions & 1 deletion src/Wippersnapper_Boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,12 @@
#define BOARD_ID "rpi-pico-w"
#define USE_TINYUSB
#define USE_STATUS_LED
#define STATUS_LED_PIN 32
#define STATUS_LED_PIN LED_BUILTIN
#elif defined(ARDUINO_RASPBERRY_PI_PICO_2W)
#define BOARD_ID "rpi-pico-2w"
#define USE_TINYUSB
#define USE_STATUS_LED
#define STATUS_LED_PIN LED_BUILTIN
#else
#warning "Board type not identified within Wippersnapper_Boards.h!"
#endif
Expand Down
6 changes: 3 additions & 3 deletions src/components/statusLED/Wippersnapper_StatusLED.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void initStatusLED() {
#elif defined(ARDUINO_ARCH_ESP32)
WS._pwmComponent->attach(STATUS_LED_PIN, LEDC_BASE_FREQ, LEDC_TIMER_12_BIT);
WS._pwmComponent->writeDutyCycle(STATUS_LED_PIN, 0); // turn OFF
#elif defined(ARDUINO_RASPBERRY_PI_PICO_W)
#elif defined(ARDUINO_ARCH_RP2040)
digitalWrite(STATUS_LED_PIN, 0);
#else
analogWrite(STATUS_LED_PIN, 0);
Expand Down Expand Up @@ -177,7 +177,7 @@ void setStatusLEDColor(uint32_t color) {
#ifdef USE_STATUS_LED
if (!WS.lockStatusLED)
return; // status pixel is in-use elsewhere
#ifdef ARDUINO_RASPBERRY_PI_PICO_W
#ifdef ARDUINO_ARCH_RP2040
digitalWrite(STATUS_LED_PIN, color > 0);
#else
if (color != BLACK)
Expand Down Expand Up @@ -236,7 +236,7 @@ void setStatusLEDColor(uint32_t color, int brightness) {
if (!WS.lockStatusLED)
return;

#ifdef ARDUINO_RASPBERRY_PI_PICO_W
#ifdef ARDUINO_ARCH_RP2040
digitalWrite(STATUS_LED_PIN, color > 0);
#else
if (color != BLACK) {
Expand Down
2 changes: 1 addition & 1 deletion src/provisioning/tinyusb/Wippersnapper_FS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_NOPSRAM) || \
defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S3) || \
defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S3_TFT) || \
defined(ARDUINO_RASPBERRY_PI_PICO_W) || \
defined(ARDUINO_ARCH_RP2040) || \
defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S3_REVTFT) || \
defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2_REVTFT) || \
defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_N4R2)
Expand Down

0 comments on commit bcd502d

Please sign in to comment.