Skip to content

Commit

Permalink
[microTVM][Cortex-R5] Add zephyr cortex-r5 board to Zephyr (apache#8519)
Browse files Browse the repository at this point in the history
* cortex r5 added

* add aot demo
  • Loading branch information
mehrdadh authored and ylc committed Sep 29, 2021
1 parent ac89765 commit 33638ee
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 1 deletion.
25 changes: 25 additions & 0 deletions apps/microtvm/zephyr/aot_demo/boards/qemu_cortex_r5.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# This file is specific to the QEMU-emulated Cortex R5 microTVM board.

# For TVMPlatformGenerateRandom(). Remember, these values do not need to be truly random.
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_TIMER_RANDOM_GENERATOR=y

# Default stack size is 1k, this is required for debug mode.
CONFIG_MAIN_STACK_SIZE=2000
25 changes: 25 additions & 0 deletions apps/microtvm/zephyr/host_driven/boards/qemu_cortex_r5.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# This file is specific to the QEMU-emulated Cortex R5 microTVM board.

# For TVMPlatformGenerateRandom(). Remember, these values do not need to be truly random.
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_TIMER_RANDOM_GENERATOR=y

# Default stack size is 1k, this is required for debug mode.
CONFIG_MAIN_STACK_SIZE=1536
2 changes: 1 addition & 1 deletion apps/microtvm/zephyr/qemu-hack/qemu-system-arm
1 change: 1 addition & 0 deletions apps/microtvm/zephyr/qemu-hack/qemu-system-xilinx-aarch64
1 change: 1 addition & 0 deletions python/tvm/target/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ def intel_graphics(model="unknown", options=None):
"nrf5340dk": ["-mcpu=cortex-m33"],
"stm32f746xx": ["-mcpu=cortex-m7", "-march=armv7e-m"],
"stm32l4r5zi": ["-mcpu=cortex-m4"],
"zynq_mp_r5": ["-mcpu=cortex-r5"],
}


Expand Down
3 changes: 3 additions & 0 deletions tests/lint/check_file_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
"apps/microtvm/zephyr/qemu-hack/qemu-system-arm",
"apps/microtvm/zephyr/qemu-hack/qemu-system-riscv32",
"apps/microtvm/zephyr/qemu-hack/qemu-system-riscv64",
"apps/microtvm/zephyr/qemu-hack/qemu-system-xilinx-aarch64",
"apps/microtvm/zephyr/host_driven/prj.conf",
"apps/microtvm/zephyr/host_driven/boards/qemu_x86.conf",
"apps/microtvm/zephyr/host_driven/boards/qemu_riscv32.conf",
Expand All @@ -145,6 +146,7 @@
"apps/microtvm/zephyr/host_driven/boards/stm32f746g_disco.conf",
"apps/microtvm/zephyr/host_driven/boards/mps2_an521.conf",
"apps/microtvm/zephyr/host_driven/boards/nucleo_l4r5zi.conf",
"apps/microtvm/zephyr/host_driven/boards/qemu_cortex_r5.conf",
"apps/microtvm/zephyr/host_driven/qemu-hack",
"apps/microtvm/zephyr/aot_demo/prj.conf",
"apps/microtvm/zephyr/aot_demo/boards/qemu_x86.conf",
Expand All @@ -155,6 +157,7 @@
"apps/microtvm/zephyr/aot_demo/boards/stm32f746g_disco.conf",
"apps/microtvm/zephyr/aot_demo/boards/mps2_an521.conf",
"apps/microtvm/zephyr/aot_demo/boards/nucleo_l4r5zi.conf",
"apps/microtvm/zephyr/aot_demo/boards/qemu_cortex_r5.conf",
"apps/microtvm/zephyr/aot_demo/qemu-hack",
# microTVM Virtual Machines
"apps/microtvm/reference-vm/zephyr/Vagrantfile",
Expand Down
1 change: 1 addition & 0 deletions tests/micro/zephyr/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"stm32f746xx_disco": ("stm32f746xx", "stm32f746g_disco"),
"stm32f746xx_nucleo": ("stm32f746xx", "nucleo_f746zg"),
"stm32l4r5zi_nucleo": ("stm32l4r5zi", "nucleo_l4r5zi"),
"zynq_mp_r5": ("zynq_mp_r5", "qemu_cortex_r5"),
}


Expand Down

0 comments on commit 33638ee

Please sign in to comment.