cancel
Showing results for 
Search instead for 
Did you mean: 

🛠️ Troubleshooting STM32CubeIDE Build Issues on Windows Using Command Line 🖥️

mohammadsh
Associate II

Hi,

I've faced an issue while attempting to build the project using the command line in STM32CubeIDE:

./stm32cubeide --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data "$WORKSPACE_PATH" -build "$PROJECT_NAME"

Although the build works fine when initiated directly from STM32CubeIDE, I faced the following issue:

***************************************************************************************************************

**** Build of configuration Release for project OSV3_Logic ****
make -j16 all
.
.
.
.
arm-none-eabi-gcc "../Core/Src/Test/unitTest.c" -mcpu=cortex-m4 -std=gnu11 -DUSE_HAL_DRIVER -DSTM32WB55xx -c -I../../Middlewares/Third_Party/coreJSON/core_json.c -I../Core/Inc -I../Core/Inc/Communication -I../Core/Inc/Utils -I../Drivers/STM32WBxx_HAL_Driver/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -I../Drivers/CMSIS/Device/ST/STM32WBxx/Include -I../Drivers/CMSIS/Include -I../Drivers/Third_Party/MODBUS-LIB/Inc -I../Drivers/Third_Party/MODBUS-LIB/Config -I../USB_Device/App -I../USB_Device/Target -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -I../Drivers/Third_Party/W25QXX/Inc -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/Test/unitTest.d" -MT"Core/Src/Test/unitTest.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/Test/unitTest.o"
In file included from ../Core/Src/Utils/json_handler.c:8:
../Core/Inc/Utils/json_handler.h:13:10: fatal error: core_json.h: No such file or directory
13 | #include "core_json.h"
| ^~~~~~~~~~~~~
compilation terminated.
make: *** [Core/Src/Utils/subdir.mk:28: Core/Src/Utils/json_handler.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from ../Core/Src/Uart/uart_main_mcu_task.c:10:
../Core/Inc/Utils/json_handler.h:13:10: fatal error: core_json.h: No such file or directory
13 | #include "core_json.h"
| ^~~~~~~~~~~~~
compilation terminated.
make: *** [Core/Src/Uart/subdir.mk:19: Core/Src/Uart/uart_main_mcu_task.o] Error 1
"make -j16 all" terminated with exit code 2. Build might be incomplete.

Build Failed. 5 errors, 0 warnings. (took 28s.661ms)

***************************************************************************************************************


Any insights or suggestions on how to resolve this.

Thanks in advance!

#STM32CubeIDE #Windows #Development #Troubleshooting :rocket:

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

To build a specific configuration, use this syntax: project/configuration. 

So  -build "${PROJECT_NAME}/Debug"

 

View solution in original post

6 REPLIES 6
Joe WILLIAMS
ST Employee

Hi Mohammadsh

Your case is being handled by the ST Online Support Group now.

Kind Regards

Joe WILLIAMS

STMicro Support

Pavel A.
Evangelist III

**** Build of configuration Release for project OSV3_Logic ****

When you build from the IDE, is the active configuration Debug by chance?

 

Thanks,

Mohammad Sharabati

Hi @Pavel A. ,

 

yes.

Could you please guide me on how to run the command in Debug mode via CLI?

 

Thanks,

Kind Regards,

Mohammad Sharabati

Pavel A.
Evangelist III

To build a specific configuration, use this syntax: project/configuration. 

So  -build "${PROJECT_NAME}/Debug"

 

Thanks