2025-10-26 12:18 PM - edited 2025-10-26 1:22 PM
Hello,
I'm following the instructions here: https://github.com/STMicroelectronics/stm32ai-modelzoo-services/blob/main/object_detection/docs/README_DEPLOYMENT_STM32N6.md after creating a virtual environment and installed all the packages from requirements.txt, but after running this command:
python stm32ai_main.py --config-path ./src/config_file_examples/ --config-name deployment_n6_ssd_mobilenet_v2_fpnlite_config.yaml
I am getting this error:
STM32CubeIDE build failed: ""
Error executing job with overrides: []
Traceback (most recent call last):
File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\object_detection\stm32ai_main.py", line 234, in <module>
main()
File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\st_zoo\lib\site-packages\hydra\main.py", line 94, in decorated_main
_run_hydra(
File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\st_zoo\lib\site-packages\hydra\_internal\utils.py", line 394, in _run_hydra
_run_app(
File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\st_zoo\lib\site-packages\hydra\_internal\utils.py", line 457, in _run_app
run_and_report(
File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\st_zoo\lib\site-packages\hydra\_internal\utils.py", line 223, in run_and_report
raise ex
File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\st_zoo\lib\site-packages\hydra\_internal\utils.py", line 220, in run_and_report
return func()
File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\st_zoo\lib\site-packages\hydra\_internal\utils.py", line 458, in <lambda>
lambda: hydra.run(
File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\st_zoo\lib\site-packages\clearml\binding\hydra_bind.py", line 91, in _patched_hydra_run
return PatchHydra._original_hydra_run(self, config_name, task_function, overrides, *args, **kwargs)
File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\st_zoo\lib\site-packages\hydra\_internal\hydra.py", line 132, in run
_ = ret.return_value
File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\st_zoo\lib\site-packages\hydra\core\utils.py", line 260, in return_value
raise self._return_value
File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\st_zoo\lib\site-packages\hydra\core\utils.py", line 186, in run_job
ret.return_value = task_function(task_cfg)
File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\st_zoo\lib\site-packages\clearml\binding\hydra_bind.py", line 230, in _patched_task_function
return task_function(a_config, *a_args, **a_kwargs)
File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\object_detection\stm32ai_main.py", line 220, in main
process_mode(cfg)
File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\object_detection\stm32ai_main.py", line 93, in process_mode
deploy(cfg)
File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\object_detection\src\deployment\deploy.py", line 122, in deploy
stm32ai_deploy_stm32n6(target=board,
File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\common\deployment\common_deploy.py", line 505, in stm32ai_deploy_stm32n6
stmaic.build(session, user_files=user_files, serial_number=stlink_serial_number)
File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\common\stm32ai_local\build.py", line 526, in cmd_build
_cube_ide_builder(cube_ide_exe[0], session, used_conf,
File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\common\stm32ai_local\build.py", line 478, in _cube_ide_builder
raise STMAICToolsError('STM32CubeIDE build failed!')
common.stm32ai_local.utils.STMAICToolsError: E400: STM32CubeIDE build failed!
The config file and full terminal output are attached.
Any help would be greatly appreciated.
Solved! Go to Solution.
2025-10-27 6:52 AM
I think that it is because the model doesn't fit the memory of the Nucleo N6 board.
Can you open the project in C:\Users\ettariaj\dev\stm32ai-modelzoo-services\application_code\object_detection\STM32N6\Application\NUCLEO-N657X0-Q\STM32CubeIDE
Then compile it and tell me what error you see. I believe you will see something like this:
C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: NUCLEO-N657X0-Q_GettingStarted_ObjectDetection.elf section `.bss' will not fit in region `AXISRAM1_S'
C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: region `AXISRAM1_S' overflowed by 331952 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:80: NUCLEO-N657X0-Q_GettingStarted_ObjectDetection.elf] Error 1
Have a good day,
Julian
2025-10-27 6:52 AM
I think that it is because the model doesn't fit the memory of the Nucleo N6 board.
Can you open the project in C:\Users\ettariaj\dev\stm32ai-modelzoo-services\application_code\object_detection\STM32N6\Application\NUCLEO-N657X0-Q\STM32CubeIDE
Then compile it and tell me what error you see. I believe you will see something like this:
C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: NUCLEO-N657X0-Q_GettingStarted_ObjectDetection.elf section `.bss' will not fit in region `AXISRAM1_S'
C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: region `AXISRAM1_S' overflowed by 331952 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:80: NUCLEO-N657X0-Q_GettingStarted_ObjectDetection.elf] Error 1
Have a good day,
Julian
2025-10-27 7:58 AM
Hi Julian,
That is precisely the error I am getting. I have successfully deployed the Tiny YoloV2 model.
Thank you for your assistance.