Mbed-os-example-blinky does not work on the Arduino portenta board

Hi,

I recently got my Arduino Portenta board and started evaluating the board if it fits our purpose. I have setup the board using the Arduino Ide and everything is working in that environment. I’m interested to use native mbed-os environment and tools with Portenta board. I built successfully the mbed-os-example-blinky using mbed-os studio and OS version 6.15.1. I used Arduino bootloader and dfu-util to program the application using following command:

dfu-util.exe -w -d 2341:035b -a 0 -s 0x8040000:leave -D …\mbed-os-example-blinky.bin

When staring the board after programming the green led is just glowing not blinking. If I use -R option during the programming the mbed-os is crashing.

My questions are:

  1. Can I use the Arduino bootloader for flash the mbed-os application?
  2. Do I need to change application region somehow?
  3. Is there other bootloader to use?
  4. How to debug the issue?

Best Regards
Juha

Hello,

I remeber few questions about Portenta, but no solution. Maybe you can try contacting people from this topic - Arduino Portenta H7 - Flashing mbed-os binary file with DFU tool not working

However, Arduino Portenta H7, as the name suggests, was ported by Arduino developers for Arduino world and not for the Mbed one. Probably similar, maybe more impossible, it will be for a RP2040, but I do not know the background, so I can be wrong.

BR, Jan

Hi Jan,

Thanks for the answer. I’m a little disappointed if that is the case.
Maybe I post a message on the Arduino forum, but I don’t expect too much.
The reason I’m looking for alternative environments is Arduino Ide, and I want to avoid
unnecessary software layers. Anyway, I can use the mbed-os APIs using the Arduino mbed library and there is also an alternative idea to use. I don’t want to put too much effort at this point into researching
how to use the native mbed environment.

Regards
Juha

In general Portenta H7 is not Mbed enabled board (its design is not meet with Mbed world), it was made as a custom target that inherits from H747 (made under Mbed by ST before).

Portenta H7 - pure mbed access? - Using Arduino / Project Guidance - Arduino Forum

Some links:

BR, Jan

Can we re-visit this thread. I think the Portenta with the breakout board has a pin that allows pure MBED boot, but not really sure. Also with a J-Tag device shouldn’t we be able to force the mbed STM32H747XI bootloader onto the Portenta?

Does anyone know where the .bin .elf and .hex files are for the PortentaH7 as an MBED device. I notice the Kiel Studio supports the Portenta but not the Arduino Portenta. Anyone any words of wisdom?

If you ever wanted to convert the board back to Arduino-mbed the bootloaders are here

Hmm, I don’t believe it’s a matter of changing out the bootloader on the Arduino. It’s probably a matter of adjusting the linker script to coexist with the Arduino bootloader, plus applying whatever downstream patches Arduino is using for their build of Mbed. I did exactly this process for the Nano 33 BLE in Mbed CE a while back. It isn’t terribly hard, it’s just a matter of getting the device, merging the changes, and hacking away until it works.

Thanks @MultipleMonomials would I need something like that PR pushed for the Portenta? Does the Nano33Ble now work on Keil-studio out of the box. (I have several of those)

If I did want to load the MBED bootloader does anyone know where I could find one for the PortentaH7. I can easily force the Arduino bootloader back onto the Portenta. (I have a segger j-link mini edu which has a free license for segger j-link-flash-lite.)

Does anyone know where the .bin or .hex MBED bootloader for the PortentaH7 is stored for download. The chip is the STM32H474XI I think.

If using the .bin file I think you install to location (0x08000000)

Hello,

Carefull, Jamie wrote about Mbed-CE , that is community fork of ARM Mbed and has nothing together with official Mbed tools.

I do not know what do you mean with that. Nothing like that does not exist I think.

BR, Jan

Hello Juha,

How did you do that? The PORTENTA_H7 target is not public in Mbed OS 6.15.1 neither in Mbed OS 6.16.0.
In the targets.json file it is not defined as public:

    "PORTENTA_H7": {
        "public": false,
    ...
    }

However, the Mbed enabled DISCO-H747I board seems to be equipped with the same MPU as the ARDUINO PORTENTA H7. So you can try to

  • build your blinky program for the DISCO_H747I target
  • flash it to the ARDUINO PORTENTA H7 using the built-in bootloader (over the UART1 port). Make sure your USB to TTL UART converter is 3.3V compliant (the signals on the Tx and Rx pins do not exceed 3.3V)!

When designing a program it is also important to apply the ARDUINO PORTENTA H7 pinout.
For example, define the LED1 digital output (the green RGB LED) as DigitalOut led1(PC_7); rather than DigitalOut led1(LED1), etc.

Please note that the DISCO-H747I board is not equipped with an external 25MHz crystal as opposed to the ARDUINO PORTENTA H7. So the program built for the DISCO-H747I running on an ARDUINO PORTENTA H7 will use the internal RC oscillator.

2 Likes