Use ArduinoCore-mbed as an mbed library?

Has anyone compiled and flashed programs for the Portenta using the mbed build tools?

The ArduinoCore-mbed docs say:

## Using this core as an mbed library

You can use this core as a standard mbed library; all APIs are under `arduino` namespace (so they must be called like `arduino::digitalWrite()` )

Does anyone has an example of doing this, especially from command-line using mbed-cli or mbed-tools?

Thanks!

It is easier if you use the Arduino IDE and use the Mbed functions from there. Then you have the full build of Arduino + Mbed.

The Arduino functions using Mbed are pretty straightforward. I assume that they should work as a library for the Mbed build environment, but I have never tried that.

I assume that you can upload Mbed code to the Portenta ?

Yep, Arduino IDE works, and I can use some of the mbed libs from there. However, I thought running mbed by itself would allow me to to: build in Docker for hermetic builds, execute unit tests in CI, simulate the board using FVP or qemu

That is way beyond my programming skills :scream:
I replied to your post because I read that note about using the ArduinoCore as standard Mbed library as well.

Offtopic: I have a Raspberry Pi Pico and not a Portentia board. The Raspberry Pi Pico support benefited a lot from the existing Mbed core. I think that the Wokwi simulation of the Raspberry Pi Pico simulates the hardware, regardless how many software layers are on top of it: https://www.youtube.com/watch?v=myNILbIA8qU

Thanks for taking a look! I'll continue to investigate...

Any luck? Any info? I looked at MBED and was hopeless

Nope. Just fell back to using all the Arduino stuff for now ¯_(ツ)_/¯

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.