7

Does QEMU support Cortex M4 emulation? Also the controller(hardware) I am trying to emulate is bare metal implementation ( FreeRTOS ), is it possible to implement such scenario in QEMU? or a OS image is must?

Edit: The better question would be does QEMU support Cortex-M4 emulation with STM32.

2 Answers2

6

QEMU Documentation/Platforms/ARM says that it does:

As well as the more common "A-profile" CPUs (which have MMUs and will run Linux) we also support the Cortex-M3 and Cortex-M4 "M-profile" CPUs (which are microcontrollers used in very embedded boards. We only have two boards which use the M-profile CPU at the moment: "lm3s811evb" and "lm3s6965evb" (which are both TI Stellaris evaluation boards).

If you are looking to run a program without ISO, this requires some work. See for a similar case the article Hello world for bare metal ARM using QEMU .

harrymc
  • 498,455
2

The above answer was quite helpful to me. Moving on to precisely answer my own question, I did some digging throughout my literature survey and found cortex m4 is supported by QEMU but with TI Stellaris board. If you are implementing with this board and bare metal then all you have to do is write some startup ,linker code and convert to .bin (pass as argument for kernel in QEMU command) If not, like in my case, I had to build a "custom machine" for STM32 , implementing the peripherals and memory.Explore one such example here