I am trying to compile, build, flash and run AOT-Demo microTVM project using TVM CLI (tvmc) as follows:
tvmc compile tvm/explored_models/cnn_class_channel_h_w_3_1_4_1.onnx --target "c -keys=cpu -march=armvv7e-m -mcpu=cortex-m7 -model=stm32f746xx" --runtime crt --runtime-crt-system-lib=0 --executor 'aot' --executor-aot-workspace-byte-alignment=1 --executor-aot-unpacked-api=1 --executor-aot-interface-api=1 --output cnn_test.tar --output-format mlf --pass-config tir.disable_vectorize=1 --disabled-pass="AlterOpLayout"
tvmc micro create --force ./tvm/apps/microtvm/zephyr/template_project/project_cnn ./cnn_test.tar zephyr --project-option project_type=aot_demo zephyr_board=nucleo_f746zg
tvmc micro build --force tvm/apps/microtvm/zephyr/template_project/project_cnn zephyr --project-option zephyr_board=nucleo_f746zg west_cmd=west
tvmc micro flash tvm/apps/microtvm/zephyr/template_project/project_cnn zephyr --project-option zephyr_board=nucleo_f746zg
However, I am getting an error from “tvmc micro build command…” as follows:
[ 91%] Building C object modules/stm32/stm32cube/CMakeFiles/..__modules__hal__stm32__stm32cube.dir/stm32f7xx/drivers/src/stm32f7xx_ll_rng.c.obj [ 92%] Building C object modules/stm32/stm32cube/CMakeFiles/..__modules__hal__stm32__stm32cube.dir/stm32f7xx/drivers/src/stm32f7xx_ll_utils.c.obj [ 92%] Linking C static library lib..__modules__hal__stm32__stm32cube.a /home/vagrant/tvm/apps/microtvm/zephyr/template_project/project_cnn/src/main.c:32:10: fatal error: input_data.h: No such file or directory 32 | #include "input_data.h" | ^~~~~~~~~~~~~~ compilation terminated. CMakeFiles/app.dir/build.make:75: recipe for target 'CMakeFiles/app.dir/src/main.c.obj' failed make[2]: *** [CMakeFiles/app.dir/src/main.c.obj] Error 1 CMakeFiles/Makefile2:2109: recipe for target 'CMakeFiles/app.dir/all' failed make[1]: *** [CMakeFiles/app.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 92%] Built target ..__modules__hal__stm32__stm32cube Makefile:90: recipe for target 'all' failed make: *** [all] Error 2 The following error occured on the Project API server side: calling method build: JSON-RPC error # -32000: calling method build Traceback (most recent call last): File "/home/vagrant/tvm/python/tvm/micro/project_api/server.py", line 481, in serve_one_request # <--- Outermost server-side stack frame self._dispatch_request(request) File "/home/vagrant/tvm/python/tvm/micro/project_api/server.py", line 593, in _dispatch_request return_value = dispatch_method(**params) File "/home/vagrant/tvm/apps/microtvm/zephyr/template_project/project_cnn/microtvm_api_server.py", line 515, in build check_call(args, cwd=BUILD_DIR) File "/home/vagrant/tvm/apps/microtvm/zephyr/template_project/project_cnn/microtvm_api_server.py", line 85, in check_call return subprocess.check_call(cmd_args, *args, **kwargs) File "/usr/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['make', '-j2']' returned non-zero exit status 2.
I would like to know if I am doing anything in a wrong way. And what can I do to resolve this build error?