Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[µTVM] Add ST STM32F746 disco board to tflite tutorial script #7254

Merged
merged 1 commit into from
Jan 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions tutorials/micro/micro_tflite.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,17 @@

# %%
# Compiling for physical hardware
# When running on physical hardware, choose a target that describes
# the hardware. The STM32F746 Nucleo target is chosen in this commented
# code:
# When running on physical hardware, choose a target and a board that
# describe the hardware. The STM32F746 Nucleo target and board is chosen in
# this commented code. Another option would be to choose the same target but
# the STM32F746 Discovery board instead. The disco board has the same
# microcontroller as the Nucleo board but a couple of wirings and configs
# differ, so it's necessary to select the "stm32f746g_disco" board below.
#
# .. code-block:: python
#
# TARGET = tvm.target.target.micro("stm32f746xx")
# BOARD = "nucleo_f746zg" # or "stm32f746g_disco"

######################################################################
# Now, compile the model for the target:
Expand Down Expand Up @@ -217,12 +221,12 @@
# repo_root = subprocess.check_output(["git", "rev-parse", "--show-toplevel"], encoding='utf-8').strip()
# project_dir = f"{repo_root}/tests/micro/qemu/zephyr-runtime"
# compiler = zephyr.ZephyrCompiler(
# project_dir=project_dir,
# board="nucleo_f746zg" if "stm32f746" in str(TARGET) else "qemu_x86",
# zephyr_toolchain_variant="zephyr",
# )
# project_dir=project_dir,
# board=BOARD if "stm32f746" in str(TARGET) else "qemu_x86",
# zephyr_toolchain_variant="zephyr",
# )
#
# opts = tvm.micro.default_options(os.path.join(tvm.micro.CRT_ROOT_DIR, "host"))
# opts = tvm.micro.default_options(f"{project_dir}/crt")

workspace = tvm.micro.Workspace()
micro_binary = tvm.micro.build_static_runtime(
Expand Down