Skip to content

Support for Raspberry Pi Pico 2 - RP2350 #1673

Closed

Description

@FeuerSturm

Hi,

I'd love to see support for the recently released Raspberry Pi Pico 2 - RP2350.
https://www.raspberrypi.com/products/rp2350/

It features 12 PIO state machines and thus driving 12 pins simultaneously would be possible.

Is this already being worked on?

Thanks!

Activity

  1. zackees commented on Aug 23, 2024

    @zackees
    Member

    Have you attempted a compile for this platform? Can you point out any platformio.ini files for the chip type.

  2. FeuerSturm commented on Aug 24, 2024

    @FeuerSturm
    ContributorAuthor

    Currently there's only a WIP/draft PR to add initial support for the RP2350 for the arduino-pico core by Earle F. Philower III that I wasn't able to test yet as I have just received my Pico 2:
    earlephilhower/arduino-pico#2337

    Unfortunately I am just a generic Arduino User and besides some testing I would not be able to help much.

  3. maxgerhardt commented on Aug 24, 2024

    @maxgerhardt
    Contributor

    Supporting the RP2350 in the Arduino-Pico core is still in progress, as well as expanding PlatformIO platform to support it. It's still going to take a little bit of time to have all that ready.

  4. FeuerSturm commented on Aug 28, 2024

    @FeuerSturm
    ContributorAuthor

    @zackees
    Tried to compile a sketch for RP2040 and RP2350 with FastLED 3.7.4 and I am getting those errors for BOTH:

    In file included from c:\Users\myPC\Documents\Arduino\libraries\FastLED\src/platforms/arm/rp2040/clockless_arm_rp2040.h:7, from c:\Users\myPC\Documents\Arduino\libraries\FastLED\src/platforms/arm/rp2040/fastled_arm_rp2040.h:6, from c:\Users\myPC\Documents\Arduino\libraries\FastLED\src/platforms.h:38, from c:\Users\myPC\Documents\Arduino\libraries\FastLED\src/FastLED.h:66, from C:\Users\myPC\Downloads\SRGBmods_Pico_LED_Controller_1724706442\SRGBmods_Pico_LED_Controller_1724706442.ino:13: c:\users\myPC\documents\arduino\libraries\fastled\src\platforms\arm\common\m0clockless.h: In function 'int showLedData(volatile uint32_t*, uint32_t, const uint8_t*, uint32_t, M0ClocklessData*)': c:\users\myPC\documents\arduino\libraries\fastled\src\platforms\arm\common\m0clockless.h:316:40: error: 'SysTick' was not declared in this scope 316 | uint32_t ticksBeforeInterrupts = SysTick->VAL; | ^~~~~~~ In file included from c:\Users\myPC\Documents\Arduino\libraries\FastLED\src/FastLED.h:79: c:\Users\myPC\Documents\Arduino\libraries\FastLED\src/fastspi.h: At global scope: c:\Users\myPC\Documents\Arduino\libraries\FastLED\src/fastspi.h:172:23: note: '#pragma message: Forcing software SPI - no hardware SPI for you!' 172 | # pragma message "Forcing software SPI - no hardware SPI for you!" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Using library Adafruit TinyUSB Library at version 3.3.3 in folder: C:\Users\myPC\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\4.0.1\libraries\Adafruit_TinyUSB_Arduino Using library SPI at version 1.0 in folder: C:\Users\myPC\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\4.0.1\libraries\SPI Using library FastLED at version 3.7.4 in folder: C:\Users\myPC\Documents\Arduino\libraries\FastLED exit status 1 Compilation error: exit status 1

  5. zackees commented on Aug 28, 2024

    @zackees
    Member

    I just added RP2040 to the build list and there are no compiler errors here. I noticed that your log stream mentions "Arduino15", what version of Arduion IDE are you running?

    rp2040

  6. maxgerhardt commented on Aug 28, 2024

    @maxgerhardt
    Contributor

    When I read

    jobs:
    build:
    uses: ./.github/workflows/build_template.yml
    with:
    args: --boards nanorp2040connect

    correctly, if you use just board = nanorp2040connect with standard platform = raspberrypi, the used Arduino core is the https://github.com/arduino/ArduinoCore-mbed one, not EarlePhilhower's https://github.com/earlephilhower/arduino-pico. That needs a special platform and either different board or core setting (docs). Example

    [env:pico]
    platform = https://github.com/maxgerhardt/platform-raspberrypi.git
    board = rpipico ; earle-philhowever variant of "pico"
    framework = arduino

    or

    [env:pico]
    platform = https://github.com/maxgerhardt/platform-raspberrypi.git
    board = nanorp2040connect
    framework = arduino
    ; use EarlePhilhower core
    board_build.core = earlephilhower

    Currently when using platform = https://github.com/maxgerhardt/platform-raspberrypi.git you will get the previous Arduino-Pico 3.9.5 version (no RP2350 support yet), not the latest 4.0.1. But you can as of now already use the 4.0.1 core in the Arduino-IDE or on the Arduino CLI. I just need a little more time to finish supporting it in PlatformIO. In any case though, to use the Arduino-Pico core, you will need to use the custom platform, as the mainline platform is not going to merge it due to political reasons.

  7. FeuerSturm commented on Aug 28, 2024

    @FeuerSturm
    ContributorAuthor

    I just added RP2040 to the build list and there are no compiler errors here. I noticed that your log stream mentions "Arduino15", what version of Arduion IDE are you running?

    rp2040

    I am using ArduinoIDE 2.3.2 on Windows 11,
    latest stable FastLED lib, latest stable arduino-pico core by Earle Philhower.

    Any ideas where to look for the problem?

  8. zackees commented on Aug 28, 2024

    @zackees
    Member

    When this happened on the RP2040 it was an issue with sei() and cli() being defined when compiling Arduino. We fixed that. Others with the RP2040 said they only ran into this issue when compiling with debug information -g which Arduino does by default.

    As far as the RP2035 - there isn't much information on the internet about this.

    Here's a bug report to get your started.
    #1481

    If you want to try this yourself you can just clone the FastLED repo and replace the platformio.ini with this.

    [platformio]
    src_dir = dev ; target is ./dev/dev.ino
    
    [env:dev]
    platform = https://github.com/maxgerhardt/platform-raspberrypi.git
    framework = arduino
    board = rpipicow
    
    ; Symlink in the FastLED library so that changes to the library are reflected in the project
    ; build immediatly.
    lib_deps =
      FastLED=symlink://./
    
    board_build.filesystem_size = 0.5m
    

    And hit compile.

  9. zackees commented on Aug 28, 2024

    @zackees
    Member

    Make sure you enable git to clone paths with long file names. Run a command terminal with admin/sdo privileges and paste in:

    git config --system core.longpaths true

  10. zackees commented on Aug 28, 2024

    @zackees
    Member

    Oh, I noticed now that you are using a different pico framework git repository.

  11. zackees commented on Aug 28, 2024

    @zackees
    Member

    When I read

    jobs:
    build:
    uses: ./.github/workflows/build_template.yml
    with:
    args: --boards nanorp2040connect

    correctly, if you use just board = nanorp2040connect with standard platform = raspberrypi, the used Arduino core is the https://github.com/arduino/ArduinoCore-mbed one, not EarlePhilhower's https://github.com/earlephilhower/arduino-pico. That needs a special platform and either different board or core setting (docs). Example

    [env:pico]
    platform = https://github.com/maxgerhardt/platform-raspberrypi.git
    board = rpipico ; earle-philhowever variant of "pico"
    framework = arduino

    or

    [env:pico]
    platform = https://github.com/maxgerhardt/platform-raspberrypi.git
    board = nanorp2040connect
    framework = arduino
    ; use EarlePhilhower core
    board_build.core = earlephilhower

    Currently when using platform = https://github.com/maxgerhardt/platform-raspberrypi.git you will get the previous Arduino-Pico 3.9.5 version (no RP2350 support yet), not the latest 4.0.1. But you can as of now already use the 4.0.1 core in the Arduino-IDE or on the Arduino CLI. I just need a little more time to finish supporting it in PlatformIO. In any case though, to use the Arduino-Pico core, you will need to use the custom platform, as the mainline platform is not going to merge it due to political reasons.

    Am I to understand you that this is the correct setting for RP2350?

    [env:pico]
    platform = https://github.com/maxgerhardt/platform-raspberrypi.git
    board = nanorp2040connect
    framework = arduino
    ; use EarlePhilhower core
    board_build.core = earlephilhower
    
  12. zackees commented on Aug 28, 2024

    @zackees
    Member
  13. zackees commented on Aug 28, 2024

    @zackees
    Member

    Uh... I broke the RPXXXX builds. I'm reverting back.

    I need recommended:

    RP2350: platformio.ini + board.json
    RP2335: platformio.ini + board.json

    If I get this then I'll put it in our build system so we can track the what the compiler errors are try to fix them with a repro case.

  14. maxgerhardt commented on Aug 28, 2024

    @maxgerhardt
    Contributor

    No you're mixing up the platform and package.

    Running command: pio project init --project-dir .build/rpipico2 --board rpipico2 --project-option=platform=https://github.com/earlephilhower/arduino-pico.git "--project-option=board_build.core = earlephilhower" --project-option=board_build.filesystem_size=0.5m

    The platform should be https://github.com/maxgerhardt/platform-raspberrypi.git. If you want it, on top, to use the latest Arduino-Pico package (4.0.1 instead of 3.x), you do that with "-project-option=platform_packages=frameowork-arduinopico@https://github.com/earlephilhower/arduino-pico.git".

  15. zackees commented on Aug 28, 2024

    @zackees
    Member

    No you're mixing up the platform and package.

    Running command: pio project init --project-dir .build/rpipico2 --board rpipico2 --project-option=platform=https://github.com/earlephilhower/arduino-pico.git "--project-option=board_build.core = earlephilhower" --project-option=board_build.filesystem_size=0.5m

    The platform should be https://github.com/maxgerhardt/platform-raspberrypi.git. If you want it, on top, to use the latest Arduino-Pico package (4.0.1 instead of 3.x), you do that with "-project-option=platform_packages=frameowork-arduinopico@https://github.com/earlephilhower/arduino-pico.git".

    image

    You've got some board.json stashed in your platform io? I noticed on windows I have issues.

    I need the URL for the board.json. Our build script injects this into the ~/.platformio/boards directory using a hack.

  16. zackees commented on Aug 29, 2024

    @zackees
    Member

    I've asked Earle Philhower what I'm doing wrong. But so far it's not working for platformio and I don't want switch out build system over to arduino cli yet.

  17. zackees commented on Aug 30, 2024

    @zackees
    Member

    Okay this is the next compiler error, missing a definition of SysTick

    @maxgerhardt

  18. zackees commented on Aug 31, 2024

    @zackees
    Member

    Good news I was able to get the RP2350 to compile

    rp2350

  19. FeuerSturm commented on Aug 31, 2024

    @FeuerSturm
    ContributorAuthor

    @zackees
    RP2350 features three PIO instances compared to RP2040's two PIO instances.

    Now SysTick is defined twice!

    I created a pull request to fix both:
    #1689

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions