Author Topic: XIAO RP2040 and platformio with arduino core  (Read 1495 times)

0 Members and 1 Guest are viewing this topic.

Offline reyntjensmTopic starter

  • Regular Contributor
  • *
  • Posts: 122
  • Country: be
XIAO RP2040 and platformio with arduino core
« on: August 28, 2023, 09:12:59 pm »
I'm struggling to setup a project using PlatformIO with a XIAO RP2040 board using the arduino core. I found a few possible solutions online but none of them is working for me. I was wondering if somebody got this to work and how to do the setup.
I really need the dual core functionality but i heard this is not really supported with the arduino core. Any suggestions?
 

Offline tabemann

  • Contributor
  • Posts: 43
  • Country: us
Re: XIAO RP2040 and platformio with arduino core
« Reply #1 on: August 29, 2023, 11:19:08 pm »
I have developed a Forth for the RP2040 which supports symmetric multiprocessing (albeit that tasks are bound to particular cores, by design) which I have confirmed works on the XIAO RP2040 named zeptoforth. You can get it from https://github.com/tabemann/zeptoforth/. I highly suggest installing a prebuilt full_usb build for the RP2040 as that will give you USB support out of the box. One note - when downloading the code, make sure to get the zeptoforth-1.0.2.tar.gz (or whatever latest version instead of 1.0.2) because that will contain the binaries; the binary you want will be at the path bin/1.0.2/rp2040/zeptoforth_full_usb-1.0.2.uf2 (or whatever latest version instead of 1.0.2).

If you feel adventurous you can build from source instead of using a prebuilt binary, but I should warn you that the QSPI flash on the XIAO RP2040 is a tad slow to write incrementally, so doing a new build will be slower than on, say, an RPi Pico. Also note that zeptoforth does support the Neopixel on the XIAO RP2040, the code for which is under extra/rp2040/neopixel.fs, but this will have to be loaded manually.

As for what terminal software to use with zeptoforth, I would highly recommend zeptocom.js, which is at https://github.com/tabemann/zeptocomjs/ and is also online at https://tabemann.github.io/zeptocomjs/zeptocom.html; note that this is designed for Chrome or Chromium and apparently also works with Edge and Opera, but specifically does not work with Firefox or mobile browsers (I do not know about whether it works or not with Safari).
 
The following users thanked this post: reyntjensm

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4392
  • Country: us
Re: XIAO RP2040 and platformio with arduino core
« Reply #2 on: August 30, 2023, 04:53:09 pm »
When you say "Arduino Core", do you mean the core from Arduino themselves (which AFAIK supports only the rp2040 Connect and the RPi Pico itself), or the Earl Philhower core?  Then latter has direct support for many more boards (Including the Xiao), claims to support muti-core, and is built directly on top of the RPi SDK (making it easier to use with the SDK-documented functions.)  (The Arduino Core has MBedOS in the middle, slowing, bloating, and complicating things.)

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf