Arduino Portenta H7

After ordering it around January 2020, I just got an email saying my Arduino Portenta H7 board is in the mail. Anyone on PlatformIO got one of these brand new boards? I am looking to use the Javascript ability and of course get it working on PlatformIO

You mean program the board with JavaScript in the PlatformIO IDE? Or running native C/C++ applications?

I think for the JavaScript the board has an interpreter to which you just hav a CLI interface (or you push your .js file on its flash memory). Writing JavaScript would be much easier with just direct JavaScript IDEs or plugins.

@maxgerhardt curious about your ideas since no one else seems to have any. Not really expecting it to work well just wanting to give it a try. Also curious how the Cortex M7 talks to the M4.

Re: Javascript on the new 160 PIN Arduino (well 22 PINS easy to access) Portenta H7. (2 x 80 PIN connectors on the under belly )

Yeah I got my preorder a couple of days ago. So far I have not seen a ton of ways to actually write code for this thing using any tool. It is (barely) supported in the Arduino IDE but does not contain any SDK documentation specific to Portenta.

It does look like you can push to either the M4 or the M7 core as they both show up as options. In addition since this board is running mbed, it should work with Mbed Studio but I’m still working on figuring out adapting a generic board profile for it. This seems to be the best short term option as the mbed 6.0 APIs should give access to most of the boards capabilities.

1 Like

Interesting board indeed. The Arduino tutorials (part 1, part 2) give some insight here on how the board is board programmed, regarding the M4 and M7 core for example. The Portenta H7’s Arduino core is also here: GitHub - arduino/ArduinoCore-mbed (see e.g. in boards.txt). This repo seems to be pretty much based on the Nano33BLE core (it is even in that core’s boards.txt as an available option), being mbed-os based etc. PlatformIO already supports the Nano 33 BLE board, so maybe the changes to get another board added in the same style (mbed-os build but for a STM32 chip) isn’t so difficult. PlatformIO has the Arduino (with mbed-os) build script for that already.

CC @valeros for new board request

Thanks @maxgerhardt I did not clue in that the tutorials actually had 4 parts. I had only looked at part 1 and you are right, part 2 shows how to work with both cores.

I already know the Nano 33 BLE so that is a start, would be great if PlatformIO Nano33BLE could be adapted to work with the PortentaH7 .

Looks like I would put javascript on the M4 core while the M7 does the normal Arduino stuff. Still not understanding how to install Javascript onto the M4, but I assume more tutorials are coming as they work out the bugs.

This is all for updating my High School Robotics course to Arduino, with PlatformIO.

Thanks for your help.

This might also be relevant. Check out the first reply.

This also is interesting has anyone put jerryscript onto an mBed device?

And another one here called lowjs

Could not get it installed on my PC or LInux, but did get the websocket working on gitpod

cd examples

node index.js

ctrl-click  the http localhost 

Looks like Arduino has finally made a PortentaH7 community thread

Above URL: Portenta - Arduino Forum

There has been user-initiated progress on this topic (by @lpham) by writing a new board definition and adapting a bit of code in the platform-ststm32 platform at Platformio supports Arduino Portenta H7.

Since I don’t have the hardware I can’t verify it. Only upload to the M7 core of the H7 is working atm. (actually uploading to the M4 core should work too with board = arduino_h7m4)

You can e.g. test it with a platformio.ini

platform =
board = arduino_h7m7
framework = arduino

and a basic src\main.cpp

#include <Arduino.h>

void setup() {

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  digitalWrite(LED_BUILTIN, LOW);

Which should compile just fine

Linking .pio\build\arduino_h7m7\firmware.elf
Checking size .pio\build\arduino_h7m7\firmware.elf
Building .pio\build\arduino_h7m7\firmware.bin
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]  10.5% (used 55176 bytes from 523624 bytes)
Flash: [=         ]  14.5% (used 114376 bytes from 786432 bytes)
========================== [SUCCESS] Took 12.85 seconds ==========================
1 Like

I will test it out I have several Portenta’s. Unfortunately been almost a year since I used platformIO and I have forgotten everything.

I can compile Nano33Ble

but then when I switch the environment I get a lot of errors. Any suggestions

Which errors exactly?

I think you should generally update the core first (see “Upgrade PlatformIO core” in that menu). If in doubt, delete ~/.platformio/platforms/ststm32@src-* and retry.

Compilation confirmed works on my Windows machine and the original author’s Mac.

This looks promising a PR for Portenta support Support Arduino Portenta H7:… by long-pham · Pull Request #494 · platformio/platform-ststm32 · GitHub

Indeed, this is the exact PR that comes from the modified platform that I referenced in the above example :smiley:

So impressed. It works great, well done :smiley: :smile: :grinning:

The code has also been merged into the STM32 platform now but some bugfixes regarding uploading only exist in the dev branch, you can test it via Support Arduino Portenta H7:… by long-pham · Pull Request #494 · platformio/platform-ststm32 · GitHub :slight_smile:

1 Like