diff --git a/apps/microtvm/zephyr/demo_runtime/boards/nucleo_f746zg.conf b/apps/microtvm/zephyr/demo_runtime/boards/nucleo_f746zg.conf index 253ba43d8b36..eba023294894 100644 --- a/apps/microtvm/zephyr/demo_runtime/boards/nucleo_f746zg.conf +++ b/apps/microtvm/zephyr/demo_runtime/boards/nucleo_f746zg.conf @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# This file is specific to the nRF5340 DK board. +# This file is specific to the STM32F746 Nucleo board. # For intrinsics used by generated optimized operators. CONFIG_CMSIS_DSP=y diff --git a/apps/microtvm/zephyr/demo_runtime/boards/stm32f746g_disco.conf b/apps/microtvm/zephyr/demo_runtime/boards/stm32f746g_disco.conf new file mode 100644 index 000000000000..505f1babc3f4 --- /dev/null +++ b/apps/microtvm/zephyr/demo_runtime/boards/stm32f746g_disco.conf @@ -0,0 +1,28 @@ +# 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 STM32F746G Discovery board. + +# For intrinsics used by generated optimized operators. +CONFIG_CMSIS_DSP=y + +# For random number generation. +CONFIG_ENTROPY_GENERATOR=y +CONFIG_TEST_RANDOM_GENERATOR=y + +# For debugging. +CONFIG_LED=n diff --git a/apps/microtvm/zephyr/demo_runtime/src/main.c b/apps/microtvm/zephyr/demo_runtime/src/main.c index fc94e65d740a..c63d0922bd65 100644 --- a/apps/microtvm/zephyr/demo_runtime/src/main.c +++ b/apps/microtvm/zephyr/demo_runtime/src/main.c @@ -214,15 +214,11 @@ tvm_crt_error_t TVMPlatformTimerStop(double* elapsed_time_seconds) { } // Ring buffer used to store data read from the UART on rx interrupt. -#if BOARD == qemu_x86 #define RING_BUF_SIZE_BYTES 4 * 1024 -#else -#define RING_BUF_SIZE_BYTES 1 * 1024 -#endif RING_BUF_DECLARE(uart_rx_rbuf, RING_BUF_SIZE_BYTES); // Small buffer used to read data from the UART into the ring buffer. -static uint8_t uart_data[32]; +static uint8_t uart_data[8]; // UART interrupt callback. void uart_irq_cb(const struct device* dev, void* user_data) { diff --git a/tests/lint/check_file_type.py b/tests/lint/check_file_type.py index 8d8b34322de3..ce20d7838b61 100644 --- a/tests/lint/check_file_type.py +++ b/tests/lint/check_file_type.py @@ -134,6 +134,7 @@ "apps/microtvm/zephyr/demo_runtime/boards/nrf5340dk_nrf5340_cpuapp.conf", "apps/microtvm/zephyr/demo_runtime/boards/nucleo_f746zg.conf", "apps/microtvm/zephyr/demo_runtime/boards/qemu_x86.conf", + "apps/microtvm/zephyr/demo_runtime/boards/stm32f746g_disco.conf", "apps/microtvm/zephyr/demo_runtime/qemu-hack/qemu-system-i386", # microTVM Virtual Machines "apps/microtvm/reference-vm/zephyr/Vagrantfile", diff --git a/tutorials/micro/micro_tflite.py b/tutorials/micro/micro_tflite.py index f59b1c3723a8..279756b9ca43 100644 --- a/tutorials/micro/micro_tflite.py +++ b/tutorials/micro/micro_tflite.py @@ -224,7 +224,7 @@ # from tvm.micro.contrib import zephyr # # repo_root = subprocess.check_output(["git", "rev-parse", "--show-toplevel"], encoding='utf-8').strip() -# project_dir = f"{repo_root}/tests/micro/qemu/zephyr-runtime" +# project_dir = os.path.join(repo_root, "apps", "microtvm", "zephyr", "demo_runtime") # compiler = zephyr.ZephyrCompiler( # project_dir=project_dir, # board=BOARD if "stm32f746" in str(TARGET) else "qemu_x86",