QEMU as a built-in simulator for testing firmware

I’ve been looking at QEMU for some time now and I’ve been trying to figure out if I can use it to simulate the device we are developing.

The device will be powered by ARM Cortex M3, and QEMU is well suited for emulating its software.

What do I want to know if someone used QEMU in the past as a simulator?

The goal is to use QEMU to test Black Box software before pumping it to devices in the field.

This may be due to the ability to monitor and change the location of the memory in which your parallel input / output (PIO) contacts are configured and configured, as well as the locations of other external peripherals.

Now, given that some of the peripheral devices will be PWM and UART, it is clear that there will be a need to solve synchronization problems. However, I would like to avoid this topic for a while and stick to just a simple PIO.

QEMU Monitor is approaching, but not quite there yet.

So, we summarize:

I need to know if there is a way to interrupt QEMU after each processor clock cycle and read / write to a small number of memory locations in the code memory.

+6
source share
1 answer

Have you tried using the GDB stub ? You can use -s -S and connect via gdb to target remote :1234 . This will give you control over the program running inside vm and access to the registers and memory.

+3
source

Source: https://habr.com/ru/post/943924/


All Articles