2021-08-30 19:09:48 +08:00
|
|
|
set(SUPPORTED_EMU_PLATFORMS qemu)
|
2019-02-20 00:59:40 +08:00
|
|
|
|
|
|
|
set(QEMU_CPU_TYPE_${ARCH} arc)
|
|
|
|
|
|
|
|
if(${CONFIG_SOC_QEMU_ARC_EM})
|
|
|
|
set(QEMU_CPU_TYPE_${ARCH} arcem)
|
|
|
|
set(QEMU_FLAGS_${ARCH} -cpu arcem)
|
|
|
|
elseif(${CONFIG_SOC_QEMU_ARC_HS})
|
|
|
|
set(QEMU_CPU_TYPE_${ARCH} archs)
|
|
|
|
set(QEMU_FLAGS_${ARCH} -cpu archs)
|
2022-08-05 03:08:23 +08:00
|
|
|
elseif(${CONFIG_SOC_QEMU_ARC_HS5X})
|
|
|
|
set(QEMU_ARCH arc)
|
|
|
|
set(QEMU_CPU_TYPE_${ARCH} hs5x)
|
|
|
|
set(QEMU_FLAGS_${ARCH} -cpu hs5x)
|
2021-04-19 20:26:05 +08:00
|
|
|
elseif(${CONFIG_SOC_QEMU_ARC_HS6X})
|
|
|
|
set(QEMU_ARCH arc64)
|
2022-08-20 02:15:39 +08:00
|
|
|
set(QEMU_CPU_TYPE_${ARCH} hs6x)
|
2021-04-19 20:26:05 +08:00
|
|
|
set(QEMU_FLAGS_${ARCH} -cpu hs6x)
|
2019-02-20 00:59:40 +08:00
|
|
|
endif()
|
|
|
|
|
2021-04-19 20:26:05 +08:00
|
|
|
# For old QEMU we had 'simhs' qemu board, however we are going to rename it
|
|
|
|
# to 'virt' board. It will be renamed in ARC QEMU in the nearest Zephyr SDK
|
|
|
|
# (where ARCv3 HS6x support will be added to QEMU)
|
|
|
|
# Let's rely on the QEMU defaults instead of specifying exact board name,
|
|
|
|
# until the updated Zephyr SDK will be set as default. By that we keep both SDKs
|
|
|
|
# (old and new) working for ARCv2.
|
|
|
|
# After that we can specify board explicitly with '-M virt' option.
|
2019-02-20 00:59:40 +08:00
|
|
|
list(APPEND QEMU_FLAGS_${ARCH}
|
|
|
|
-m 8M
|
|
|
|
-nographic
|
|
|
|
-no-reboot
|
|
|
|
-monitor none
|
|
|
|
-global cpu.firq=false
|
|
|
|
-global cpu.num-irqlevels=15
|
|
|
|
-global cpu.num-irq=25
|
|
|
|
-global cpu.ext-irq=20
|
2021-03-04 14:52:14 +08:00
|
|
|
-global cpu.freq_hz=10000000
|
2019-02-20 00:59:40 +08:00
|
|
|
-global cpu.timer0=true
|
|
|
|
-global cpu.timer1=true
|
2021-03-02 10:28:34 +08:00
|
|
|
-global cpu.has-mpu=true
|
|
|
|
-global cpu.mpu-numreg=16
|
2019-02-20 00:59:40 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
set(BOARD_DEBUG_RUNNER qemu)
|