1# Copyright (c) 2019 Carlo Caione <ccaione@baylibre.com> 2# Copyright (c) 2022 Huawei France Technologies SASU 3# SPDX-License-Identifier: Apache-2.0 4 5set(SUPPORTED_EMU_PLATFORMS qemu) 6set(QEMU_ARCH aarch64) 7 8set(QEMU_MACH virt,gic-version=3,accel=kvm) 9 10if(NOT CONFIG_ARMV8_A_NS) 11 set(QEMU_MACH ${QEMU_MACH},secure=on) 12endif() 13 14set(QEMU_FLAGS_${ARCH} 15 -cpu host 16 -nographic 17 -machine ${QEMU_MACH} 18 ) 19 20if(CONFIG_XIP) 21 # This should be equivalent to 22 # ... -drive if=pflash,file=build/zephyr/zephyr.bin,format=raw 23 # without having to pad the binary file to the FLASH size 24 set(QEMU_KERNEL_OPTION 25 -bios ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin 26 ) 27endif() 28 29board_set_debugger_ifnset(qemu) 30