Can't get qemu to run aarch64/xilinx_zynqmp_lp64_qemu example app
Jens Schweikhardt
schweikh at schweikhardt.net
Sun Apr 9 20:45:46 UTC 2023
Hello world,
I've installed an aarch64 toolchain and the xilinx_zynqmp_lp64_qemu BSP
from current sources with waf (on FreeBSD 14).
The docs on https://docs.rtems.org/branches/master/user/bsps/bsps-aarch64.html?highlight=qemu#aarch64-aarch64
tell me to run
qemu-system-aarch64 -no-reboot -nographic -serial mon:stdio \
-machine virt,gic-version=3 -cpu cortex-a53 -m 4096 \
-kernel build/aarch64-rtems6-xilinx_zynqmp_lp64_qemu/kernel.exe
which just sits there with no output (I expect a repeated greeting).
Here are my hello.c, init.c, wscript:
/*
* Hello world example
*/
#include <rtems.h>
#include <stdio.h>
rtems_task Init(rtems_task_argument ignored) {
for (;;) {
puts("Hello World\n");
rtems_task_wake_after(100);
}
}
---------------init.c:
/*
* Simple RTEMS configuration
*/
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_UNLIMITED_OBJECTS
#define CONFIGURE_UNIFIED_WORK_AREAS
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT
#define CONFIGURE_INIT_TASK_STACK_SIZE 65536
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
--------wscript:
#
# Hello world Waf script
#
from __future__ import print_function
rtems_version = "6"
try:
import rtems_waf.rtems as rtems
except:
print('error: no rtems_waf git submodule')
import sys
sys.exit(1)
def init(ctx):
rtems.init(ctx, version = rtems_version, long_commands = True)
def bsp_configure(conf, arch_bsp):
# Add BSP specific configuration checks
pass
def options(opt):
rtems.options(opt)
def configure(conf):
rtems.configure(conf, bsp_configure = bsp_configure)
def build(bld):
rtems.build(bld)
bld(features = 'c cprogram',
target = 'kernel.exe',
cflags = '-g -O2',
source = ['hello.c',
'init.c'])
I've tried many variations on the qemu options but never got any output.
This is with
# qemu-system-aarch64 --version
QEMU emulator version 7.2.50
What am I doing wrong? Has anyone else gotten the example in the RTEMS docs to work
with the described procedure?
Regards,
Jens
More information about the users
mailing list