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