Olimex STM32-E407 target added to Mbed OS

Started by rohfle, October 19, 2019, 03:48:05 AM

Previous topic - Next topic


I have recently been working on adding support for the Olimex STM32-E407 board in Mbed OS, which is an OS for IoT devices based on 32-bit ARM Cortex-M MCUs. Mbed OS is developed by ARM and its friends and is licensed under Apache 2.0. The pull request for STM32-E407 has now been merged into master and should be part of the next release.

I started working on adding support due to frustration with the GUI tools available for STM32. I have a preference for working from the command-line, and I found the process of working with STM32Cube and STM32CubeMX to be complicated and tedious. Having USER CODE BEGIN etc every 4 lines diluted the code down making it harder to digest, and STM32CubeMX is not optimised for 13 inch laptop screens.

Another thing that frustrated me into adding support for Mbed OS was the complexity of working with the STM32 libraries. Despite finding multiple examples, I found using Ethernet TCP/IP and USB to be quite difficult and messy. On the the other hand, Mbed OS has great documentation, and is really simple to use. It feels to me like a grown up Arduino, with RTOS, networking, USB and more included out of the box.

Anyway heres the code

Link to pull request:

Tutorial on how to get started with STM32-E407 on Mbed:

Edit: 2019-12-20 - Olimex STM32-E407 support has been merged and is now included in Mbed release 5.15.0


Is it really the case that just to read the tutorial it's necessary to sign up to Gitlab?



Argh no thats not intended. I threw it up yesterday and access to pages was restricted by default. You should be able to view the tutorial now (as well as the rest of the site).



Olimex STM32-E407 support has been merged and is now included in Mbed release 5.15.0


I have installed mbed for the STM32-E407 as per instructions. I want to connect a host to OTG1 or 2. I specify in the main.cpp

Serial pc(USBTX,USBRX);

I am using OSX Mojave 10.14.6, but I cannot see a valid tty* or cu* device in the /dev folder.

What am I doing wrong?



Hi Phil,

Sorry for the late reply. I think the issue is that you need to use USBSerial as the class instead of Serial.

Example code below from https://os.mbed.com/docs/mbed-os/v5.15/apis/usbserial.html

#include "mbed.h"
#include "USBSerial.h"

//Virtual serial port over USB
USBSerial serial;

int main(void) {

        serial.printf("I am a virtual serial port\r\n");


Thanks. It works nicely, but under mbed 6.0 I cannot prevent it from blocking and waiting for the terminal program to be running on the Mac.



Are there plans to add the STM32E407 to Mbed studio ?

Many other suppliers provide support for embed by default. It's certainly a cheap way for customers to get their designs up and running.




It was already added... look at the links in the first post.



If there are issues with newer versions, report to Mbed OS team and post in their forums.
Technical support and documentation manager at Olimex