Skip to content

Commit 59e96e0

Browse files
authored
[microTVM][Cortex-R5] Add zephyr cortex-r5 board to Zephyr (#8519)
* cortex r5 added * add aot demo
1 parent e95f10f commit 59e96e0

File tree

7 files changed

+57
-1
lines changed

7 files changed

+57
-1
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# This file is specific to the QEMU-emulated Cortex R5 microTVM board.
19+
20+
# For TVMPlatformGenerateRandom(). Remember, these values do not need to be truly random.
21+
CONFIG_TEST_RANDOM_GENERATOR=y
22+
CONFIG_TIMER_RANDOM_GENERATOR=y
23+
24+
# Default stack size is 1k, this is required for debug mode.
25+
CONFIG_MAIN_STACK_SIZE=2000
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# This file is specific to the QEMU-emulated Cortex R5 microTVM board.
19+
20+
# For TVMPlatformGenerateRandom(). Remember, these values do not need to be truly random.
21+
CONFIG_TEST_RANDOM_GENERATOR=y
22+
CONFIG_TIMER_RANDOM_GENERATOR=y
23+
24+
# Default stack size is 1k, this is required for debug mode.
25+
CONFIG_MAIN_STACK_SIZE=1536
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
./qemu-system-i386
1+
qemu-system-i386
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
qemu-system-i386

python/tvm/target/target.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ def intel_graphics(model="unknown", options=None):
285285
"nrf5340dk": ["-mcpu=cortex-m33"],
286286
"stm32f746xx": ["-mcpu=cortex-m7", "-march=armv7e-m"],
287287
"stm32l4r5zi": ["-mcpu=cortex-m4"],
288+
"zynq_mp_r5": ["-mcpu=cortex-r5"],
288289
}
289290

290291

tests/lint/check_file_type.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
"apps/microtvm/zephyr/qemu-hack/qemu-system-arm",
137137
"apps/microtvm/zephyr/qemu-hack/qemu-system-riscv32",
138138
"apps/microtvm/zephyr/qemu-hack/qemu-system-riscv64",
139+
"apps/microtvm/zephyr/qemu-hack/qemu-system-xilinx-aarch64",
139140
"apps/microtvm/zephyr/host_driven/prj.conf",
140141
"apps/microtvm/zephyr/host_driven/boards/qemu_x86.conf",
141142
"apps/microtvm/zephyr/host_driven/boards/qemu_riscv32.conf",
@@ -145,6 +146,7 @@
145146
"apps/microtvm/zephyr/host_driven/boards/stm32f746g_disco.conf",
146147
"apps/microtvm/zephyr/host_driven/boards/mps2_an521.conf",
147148
"apps/microtvm/zephyr/host_driven/boards/nucleo_l4r5zi.conf",
149+
"apps/microtvm/zephyr/host_driven/boards/qemu_cortex_r5.conf",
148150
"apps/microtvm/zephyr/host_driven/qemu-hack",
149151
"apps/microtvm/zephyr/aot_demo/prj.conf",
150152
"apps/microtvm/zephyr/aot_demo/boards/qemu_x86.conf",
@@ -155,6 +157,7 @@
155157
"apps/microtvm/zephyr/aot_demo/boards/stm32f746g_disco.conf",
156158
"apps/microtvm/zephyr/aot_demo/boards/mps2_an521.conf",
157159
"apps/microtvm/zephyr/aot_demo/boards/nucleo_l4r5zi.conf",
160+
"apps/microtvm/zephyr/aot_demo/boards/qemu_cortex_r5.conf",
158161
"apps/microtvm/zephyr/aot_demo/qemu-hack",
159162
# microTVM Virtual Machines
160163
"apps/microtvm/reference-vm/zephyr/Vagrantfile",

tests/micro/zephyr/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"stm32f746xx_disco": ("stm32f746xx", "stm32f746g_disco"),
3030
"stm32f746xx_nucleo": ("stm32f746xx", "nucleo_f746zg"),
3131
"stm32l4r5zi_nucleo": ("stm32l4r5zi", "nucleo_l4r5zi"),
32+
"zynq_mp_r5": ("zynq_mp_r5", "qemu_cortex_r5"),
3233
}
3334

3435

0 commit comments

Comments
 (0)