mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-04 10:41:57 +00:00
Enable icount mode for qemu_riscv32 platform, The icount shift value is selectd based on cpu clock frequency of this platform. The virtual cpu will execute one instruction every 2^shift ns of virtual time. Signed-off-by: Wentong Wu <wentong.wu@intel.com>
17 lines
337 B
CMake
17 lines
337 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
set(EMU_PLATFORM qemu)
|
|
|
|
set(QEMU_binary_suffix riscv32)
|
|
set(QEMU_CPU_TYPE_${ARCH} riscv32)
|
|
|
|
set(QEMU_FLAGS_${ARCH}
|
|
-nographic
|
|
-machine sifive_e
|
|
)
|
|
|
|
if(CONFIG_QEMU_ICOUNT)
|
|
list(APPEND QEMU_EXTRA_FLAGS -icount shift=6,align=off,sleep=off -rtc clock=vm)
|
|
endif()
|
|
board_set_debugger_ifnset(qemu)
|