2019-11-11 01:43:26 +08:00
|
|
|
# Copyright (c) 2019 Carlo Caione <ccaione@baylibre.com>
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2021-08-30 19:09:48 +08:00
|
|
|
set(SUPPORTED_EMU_PLATFORMS qemu)
|
2019-11-11 01:43:26 +08:00
|
|
|
set(QEMU_ARCH aarch64)
|
|
|
|
|
|
|
|
set(QEMU_CPU_TYPE_${ARCH} cortex-a53)
|
2020-11-21 20:38:45 +08:00
|
|
|
|
|
|
|
if(CONFIG_ARMV8_A_NS)
|
|
|
|
set(QEMU_MACH virt,gic-version=3)
|
|
|
|
else()
|
|
|
|
set(QEMU_MACH virt,secure=on,gic-version=3)
|
|
|
|
endif()
|
|
|
|
|
2019-11-11 01:43:26 +08:00
|
|
|
set(QEMU_FLAGS_${ARCH}
|
|
|
|
-cpu ${QEMU_CPU_TYPE_${ARCH}}
|
|
|
|
-nographic
|
2020-11-21 20:38:45 +08:00
|
|
|
-machine ${QEMU_MACH}
|
2019-11-11 01:43:26 +08:00
|
|
|
)
|
2020-12-16 21:11:55 +08:00
|
|
|
|
|
|
|
if(CONFIG_XIP)
|
|
|
|
# This should be equivalent to
|
|
|
|
# ... -drive if=pflash,file=build/zephyr/zephyr.bin,format=raw
|
|
|
|
# without having to pad the binary file to the FLASH size
|
|
|
|
set(QEMU_KERNEL_OPTION
|
|
|
|
-bios ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2019-11-11 01:43:26 +08:00
|
|
|
board_set_debugger_ifnset(qemu)
|