I am building an installation to test the assembly unit for an ARM system and run the tests on the host machine with qemu-system-arm. In particular, I use qemu to emulate the Evaluation Stellaris LM3S6965 platform, because it contains a Cortex M3 processor, such as my target environment. Qemu's binary launch is built using the GNU tools for ARM.
No OS. The test suite runs as a bare metal application with qemu in mode -nographic. The tool chain and the test setup itself are operating normally. And the tests run successfully to completion and give test results in qemu just fine.
The problem is ending qemu in an automated build tool (in this case Rake). Besides the keyboard commands, I have not yet found a good way to get qemu to exit after running the test suite and splashing out its results. This leads to the fact that the build environment is dependent on user intervention.
I looked high and low and did not find good sources on how to perform a simple exit after the program ends. I found a couple of suggestions about starting qemu with an option -no-reboot, and then starting the reset system from a program running in the emulator. I have tried this. It works ... curious. I write the corresponding values for the emulated processor reset vector after execution main(), and this causes a reset to fire. After starting the test suite, qemu reports a catch on the reset system. However, he reports this as a hardware error, the contents of the register are reset, and then out of anger (error message below). Although it ends after the test suite starts, it then interrupts the automatic build of the script due to qemu exiting with an error condition.
qemu: hardware error: System reset
, . qemu .
, , . qemu (. ) , .
qemu , main() , ? -no-reboot + system reset ? , , qemu ?