Flash IAP over Ethernet

Hello everyone!

I am new to Mbed but would really like to master this interesting operating system and development environment. This is my first post on this forum and site!

Mbed interested me primarily in the fact that I can do complex things simply!
One of the tasks is to update the firmware over the network (IAP).
Searching the forum gives links to Flash IAP which in turn gives a link to Mbed Stress Test
I tried compiling this code under https://ide.mbed.com/
and the code did not compile absolutely correctly, since there is no file main.cpp and function main.
There is a usage description in the README.md file, but it’s probably for Linux, and I’m using Windows.

How can this example be compiled under Windows for board types Nucleo-F411+Net shield or/and Nucleo-F767, both with external memory card?
How can I test the example over the network?
What do you recommend to read on this site and beyond on this topic?

Best regards!


Before you start something complicated, it would be cool to read something about how Mbed works in general - Introduction - Introduction to Mbed OS 6 | Mbed OS 6 Documentation

Mbed Stress Test of course contains a main (not only one), you need to look into the TESTS folder. But anyway it was not updated for more than year, so I do not think it is good for start.

Something to start with on the context of your topic

BR, Jan

Hello, Jan!

Thanks for the links to the documentation and code examples.
The documentation is really very helpful for understanding how Mbed works.

However, in your examples, there is a code for writing one of the files on demand from an SD card. In this case, the software update via Ethernet will be in two stages:

  1. Accept the firmware file using one of the file transfer protocols and write it to the SD card.
  2. On command, write the firmware file from the SD card to the memory of the target controller and restart the program.

In the example from ST, an update is implemented without an intermediate file storage, this is more interesting, because there is not always an SD card or external SPI memory of the required size.
STM32Cube Ethernet IAP example
I don’t know how correct this is from the point of view of the integrity of the firmware. Is it possible to implement such an algorithm in Mbed?

I studied the Mbed Stress Test example, it was an unforgettable few hours with a Linux-style command line. :slight_smile:
But I managed to install and configure the CLI, connect the compiler from Keil MDK ARM, compile the Mbed Stress Test project and understand what its meaning is and what it is for. I’ve never heard of automated testing in embedded systems before, it’s really cool!
What would you recommend to read about testing in general and its application in embedded systems?

I understood what you wanted. I only shared links to a material what can be helpful for starting of your project.

Yeah, probably it is possible, I already read something about it, but I have no experiences with it. I read about MCUboot in this discussion - Mbed OS Bootloader. · Issue #15156 · ARMmbed/mbed-os (github.com).
@aglass0fmilk already made an example - AGlass0fMilk/mbed-mcuboot-demo: Demo of mcuboot with Mbed (github.com)

Mbed had already complete solution for update firmware over network, It was called Pelion, but now it is not a part of Mbed I think, but it is probably still based on it - Home - Pelion.

Automated testing is a part of MbedOS release mechanism with Testfarm, I think, but I do not know much about this - Greentea for testing applications

BR, Jan

Hello, Jan!

Thanks for the useful information.
I will continue to study the issue, if there are interesting results - I will share.
I looked at the option with Pelion, but I was confused by the option with a paid service and transferring firmware through a third party.


Both the IAP code and the application code are reside in the embedded Flash memory of the microcontroller.

Thanks for the useful information..

In fact, not always.
You can see the \bootloader folder and mbed_app.json in the Pelion example.
The loader, the application and the update candidate can be placed in the built-in memory, if this memory is enough, this is not the case for my F411.

Thanks for the useful information..