|
From: | James Gutbub |
Subject: | Hello world example with qemu-system-arm |
Date: | Wed, 11 May 2022 12:48:37 -0700 |
Hello,
I am digging into qemu-system-arm to try and execute some simulation environment unit tests with no underlying board/device interaction, at most I need semihosting to print out some results.
The intended target for my hello world using arm-none-eabi-gcc is Cortex-R5F (e.g. -mcpu=cortex-r5 -mfpu=vfpv3-d16 -mfloat-abi=hard).
I am not finding a way to successfully execute my hello world example using ‘qemu-system-arm -cpu cortex-r5f -M none -nographic -semihosting’ and the payload variants below:
-bios hello.bin (hello.bin created using arm-none-eabi-objcopy -O binary hello.elf hello.bin)
-bios hello.elf
-device loader,file=hello.elf
I also did try using ‘-M virt’ (without -cpu=cortex-r5f because it is not supported by the virt board) and connected to an arm-none-eabi-gdb session (added ‘-S -s’ to qemu-system-arm and arm-none-eabi-gdb hello.elf -> target remote localhost:1234) but c/s doesn’t progress my execution successfully.
I am trying to achieve CPU simulation and avoid board modeling or if there is some basic board which can support Cortex-R5F in which I can run my hello world (and eventually my unit tests) I believe qemu-system-arm is more than capable to provide this type of testing environment.
Are there any examples you could refer me to to complete a basic hello world test using Cortex-R5F with qemu-system-arm?
Or if qemu-arm might be an option I could use that instead (I faced some issues when trying to use it), are there any examples I could refer to? I am running in CentOS Stream 8 if it matters here on an x86_64 host.
Kind Regards,
James G
[Prev in Thread] | Current Thread | [Next in Thread] |