QEMU emulation of MbedOS for Cortex-M3 DesignStart

Just checked QEMU has the ARM Cortex-M3 DesignStart board emulated under the mps2-an511 target.
QEMU docs about that here

I thought about compiling an example for that board and flashing it into QEMU, namely this one:
Socket example
Just to check how easy it is to load MbedOS onto QEMU.

Compiling the example is easy, however, I’m novice at best with Mbed OS and need some clarification:

1- I’m guessing the .elf binary the compile process generates is the compiled example right? Not Mbed OS itself + the example.

2- If (1) is true, I guess I should find a way to flash Mbed OS itself onto QEMU first.

3- To solve (2), is there any way in which I can compile Mbed OS into a binary file?

Once I got that I will update this with all the steps I’ve taken to get the emulation running.

1 Like

Hi,

I am not 100% sure I understand your question. Mbed OS itself is statically linked to your application (= mbed-os-example-sockets). The .elf binary file contains your application code + Mbed OS code and their memory allocation has been already resolved in link time.

Thanks,
Toyo

1 Like

My bad on the explanation part :sweat_smile:. Guess I was thinking too far ahead and tripped on the most basic of things.

But yeah, your answer is what I was looking for. The “.elf” file I compile is the application code with Mbed OS statically linked to it. Somehow I either did not find the answer on the docs or glossed over it.

Thanks a bunch.

1 Like