Hi @areusch,
I am trying to deploy a basic perceptron on stml552zeq board but I am getting following error from the build process.
[ 96%] Linking CXX executable zephyr_prebuilt.elf /home/vagrant/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/10.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld: zephyr_prebuilt.elf section
bss' will not fit in region
SRAM’ /home/vagrant/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/10.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld: section .intList VMA [0000000020030000,0000000020030117] overlaps section bss VMA [00000000200001f0,000000002003ea5b] /home/vagrant/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/10.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld: region `SRAM’ overflowed by 63392 bytes collect2: error: ld returned 1 exit status zephyr/CMakeFiles/zephyr_prebuilt.dir/build.make:119: recipe for target ‘zephyr/zephyr_prebuilt.elf’ failed make[2]: *** [zephyr/zephyr_prebuilt.elf] Error 1 CMakeFiles/Makefile2:2543: recipe for target ‘zephyr/CMakeFiles/zephyr_prebuilt.dir/all’ failed make[1]: *** [zephyr/CMakeFiles/zephyr_prebuilt.dir/all] Error 2 make: *** [all] Error 2 Makefile:90: recipe for target ‘all’ failed
To give you more information, I am providing the code snippet below.
def _make_session(temp_dir, zephyr_board, west_cmd, mod):
config_main_stack_size = None
proj_dir = temp_dir + "/project"
if config_main_stack_size is not None:
project_options["config_main_stack_size"] = config_main_stack_size
# Remove existing project directory containing board specific build files
if os.path.isdir(proj_dir):
shutil.rmtree(proj_dir, ignore_errors=True)
project_options = {
"project_type": "host_driven",
"west_cmd": west_cmd,
"verbose": False,
"zephyr_board": zephyr_board,
}
project = tvm.micro.generate_project(
temp_dir,
mod,
proj_dir,
project_options,
)
project.build()
project.flash()
return tvm.micro.Session(project.transport(), timeout_override=tvm.micro.transport.debug_transport_timeouts(30))
TARGET = tvm.target.target.micro("mps2_an521")
BOARD = "nucleo_l552ze_q"
with tvm.transform.PassContext(opt_level=3, config={"tir.disable_vectorize": True}):
# Compiles the relay model passed into C code using TVM compiler
c_mod = relay.build(mod, target=TARGET, runtime=RUNTIME, params=params)
with _make_session(project_dir, BOARD, "west", c_mod) as session:
#Use debug executor mode to enable latency profiling from on chip timer.
#Dump the logs in a json file.
graph_mod = tvm.micro.create_local_debug_executor(c_mod.get_graph_json(), session.get_system_lib(), session.device, dump_root= temp_file_directory)
graph_mod.set_input(**c_mod.get_params())
graph_mod.run() # Executes the network on the chip
tvm_output = graph_mod.get_output(0).asnumpy()# Extracts output from the on chip memory
Do you have any idea what might cause this issue?