Skip to content

Add support for Mbed OS CE#117

Merged
maxgerhardt merged 6 commits intomaxgerhardt:developfrom
multiplemonomials:dev/add-mbed-ce-support
Feb 1, 2026
Merged

Add support for Mbed OS CE#117
maxgerhardt merged 6 commits intomaxgerhardt:developfrom
multiplemonomials:dev/add-mbed-ce-support

Conversation

@multiplemonomials
Copy link

Hi! You might remember my Mbed CE post on the forum a while back. Well, I have finally been able to basically fully support PlatformIO in Mbed CE, and I'd like to now add RP2040 support for Mbed CE in PlatformIO! This PR updates your core to support framework-mbed-ce. Thankfully it's not a big change, we basically just need to depend on the right packages and include the build script from the mbed-ce framework itself.

The Mbed CE framework uses some of the same DNA as the Arduino core (the Arduino core is built off an older version of Mbed), but only supports the Mbed CE API, not Arduino sketches. It brings in a number of fixes over the Arduino core, including fully working UART support and a PWM implementation that can access the best duty cycle resolution over the full frequency range.

We hope to add more RP2-related features soon, including (hopefully) SDIO, DMA, and wi-fi module support.

@multiplemonomials
Copy link
Author

@maxgerhardt had a chance to look at this yet?

@maxgerhardt
Copy link
Owner

maxgerhardt commented Jan 23, 2026

I re-ran CI with the new package, but now it fails to link something during the CMake configure step with a bunch of undefined references to __retarget_lock_acquire_recursive, __lock___sfp_recursive_mutex and friends in the lock system.

Are you sure this is compilable with Earle Philhower's toolchain? This explicitly has some patches for locks and stdio stuff, specifically removing the lock implementation and re-adding them in https://github.com/earlephilhower/arduino-pico/blob/e8e5816c66184d3e3744c5812ee2b431b8f658e9/cores/rp2040/lock.cpp#L218 for customizability. See https://github.com/earlephilhower/pico-quick-toolchain/tree/master/patches. Otherwise you can tell it to use the regular toolchain-gccarmnoneeabi package with versions from https://registry.platformio.org/tools/platformio/toolchain-gccarmnoneeabi/versions in the platform.py.

@multiplemonomials
Copy link
Author

Ah yeah, I see it. For some reason this did work locally originally, but now I get the same error. I'll need to investigate this more later, but I think Mbed OS has its own locking in its stdio routines, so it doesn't rely on newlib to lock anything. For now, changing the toolchain to the default platformio one seemed to fix it. Just have to push one more updated Mbed package to the registry as I made another dumb 1 line error 😢 . Will let you know when ready to give it another shot

@maxgerhardt maxgerhardt merged commit 24f5f5b into maxgerhardt:develop Feb 1, 2026
36 checks passed
@maxgerhardt
Copy link
Owner

maxgerhardt commented Feb 1, 2026

CI did go through and I merged it!

Will just have to take care to incorporate the addition of the mbed-ce framework in future versions of the board files, since these are autogenerated in Arduino-Pico and important here. Works for now.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants