Skip to content

Commit 5949236

Browse files
author
Bradley Bolen
committed
boards: qemu_cortex_r5: Add qemu test board for the Cortex-R series
This adds a qemu test board using the Xilinx ZynqMP SoC. Signed-off-by: Bradley Bolen <[email protected]>
1 parent 7c14465 commit 5949236

File tree

6 files changed

+139
-0
lines changed

6 files changed

+139
-0
lines changed
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (c) 2019 Lexmark International, Inc.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
config BOARD_QEMU_CORTEX_R5
6+
bool "Cortex-R5 Emulation (QEMU)"
7+
depends on SOC_XILINX_ZYNQMP
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright (c) 2019 Lexmark International, Inc.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
if BOARD_QEMU_CORTEX_R5
6+
7+
config BUILD_OUTPUT_BIN
8+
default n
9+
10+
config BOARD
11+
default "qemu_cortex_r5"
12+
13+
endif # BOARD_QEMU_CORTEX_R5

boards/arm/qemu_cortex_r5/board.cmake

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (c) 2019 Lexmark International, Inc.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
set(EMU_PLATFORM qemu)
6+
set(QEMU_ARCH aarch64)
7+
8+
set(QEMU_CPU_TYPE_${ARCH} cortex-r5)
9+
set(QEMU_FLAGS_${ARCH}
10+
-nographic
11+
-machine xlnx-zcu102
12+
-global xlnx,zynqmp.boot-cpu="rpu-cpu[0]"
13+
-smp 6
14+
)
15+
16+
set(QEMU_KERNEL_OPTION
17+
"-device;loader,file=$<TARGET_FILE:zephyr_final>,cpu-num=4"
18+
)
19+
20+
board_set_debugger_ifnset(qemu)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (c) 2019 Lexmark International, Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
*/
7+
8+
/dts-v1/;
9+
#include <arm/xilinx/zynqmp.dtsi>
10+
11+
/ {
12+
model = "QEMU Cortex-R5";
13+
compatible = "xlnx,zynqmp-qemu";
14+
15+
chosen {
16+
zephyr,sram = &sram0;
17+
zephyr,flash = &flash0;
18+
zephyr,console = &uart0;
19+
zephyr,shell-uart = &uart0;
20+
};
21+
};
22+
23+
&uart0 {
24+
status = "okay";
25+
current-speed = <115200>;
26+
clock-frequency = <99999901>;
27+
};
28+
29+
&ttc0 {
30+
status = "okay";
31+
clock-frequency = <100000000>;
32+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
identifier: qemu_cortex_r5
2+
name: QEMU Emulation for Cortex-R5
3+
type: qemu
4+
simulation: qemu
5+
arch: arm
6+
toolchain:
7+
- zephyr
8+
- gccarmemb
9+
- xtools
10+
ram: 64
11+
flash: 256
12+
testing:
13+
default: false
14+
ignore_tags:
15+
- base64
16+
- benchmark
17+
- clib
18+
- cmsis_rtos_v1
19+
- cmsis_rtos_v1_philosopher
20+
- cmsis_rtos_v1_synchronization
21+
- cmsis_rtos_v2
22+
- cmsis_rtos_v2_philosopher
23+
- cmsis_rtos_v2_synchronization
24+
- cpp
25+
- crypto
26+
- drivers
27+
- external
28+
- fdtable
29+
- gen_inc_file
30+
- interrupt
31+
- introduction
32+
- json
33+
- libc
34+
- logging
35+
- kernel
36+
- memory_protection
37+
- net
38+
- posix
39+
- rbtree
40+
- ring_buffer
41+
- shell
42+
- sleep
43+
- test_framework
44+
- timeutils
45+
- timer
46+
- userspace
47+
- util
48+
- xip
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
CONFIG_ARM=y
2+
CONFIG_SOC_XILINX_ZYNQMP=y
3+
CONFIG_BOARD_QEMU_CORTEX_R5=y
4+
CONFIG_XIP=n
5+
6+
CONFIG_ISR_STACK_SIZE=512
7+
CONFIG_THREAD_STACK_INFO=y
8+
9+
# enable uart driver
10+
CONFIG_SERIAL=y
11+
12+
# enable console
13+
CONFIG_CONSOLE=y
14+
CONFIG_UART_CONSOLE=y
15+
16+
# enable serial port
17+
CONFIG_UART_XLNX_PS=y
18+
19+
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000

0 commit comments

Comments
 (0)