2023-11-13 10:05 PM
Hi
I have this strange problem which manifest itself using headless build and also inside CubeID when I git clone my project for the first time.
Build Settings : I have 4 custom build configuration. I also removed Debug and Release configurations that came default by CubeID
Problem :I`m building following project \STM32Cube_FW_WB_V1.12.0\Projects\P-NUCLEO-WB55.Nucleo\Applications\BLE\BLE_p2pClient
inside CubeIDE
When I Build the project for the first time , I receive this
05:30:17 **** Clean-only build of configuration SPIRO-MODBUS for project BLE_p2pClient ****
make -j16 clean
make: *** No rule to make target 'clean'. Stop.
"make -j16 clean" terminated with exit code 2. Build might be incomplete.
05:30:17 Build Failed. 1 errors, 0 warnings. (took 467ms)
05:30:18 **** Clean-only build of configuration SPIRO-MODBUS for project BLE_p2pClient ****
make -j16 clean
make: *** No rule to make target 'clean'. Stop.
"make -j16 clean" terminated with exit code 2. Build might be incomplete.
05:30:18 Build Failed. 1 errors, 0 warnings. (took 234ms)
05:30:19 **** Build of configuration SPIRO-MODBUS for project BLE_p2pClient ****
make -j16 all
arm-none-eabi-gcc "../EEPROM_Emul/Porting/STM32WB/flash_interface.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DUSE_HAL_DRIVER -DUSE_STM32WBXX_NUCLEO -DDEBUG -DSTM32WB55xx -DUSE_FULL_LL_DRIVER -DLWIP_DISABLE -DBACSTAC_CONFIG_DL_MSTP -DOBEO_PRODUCT=3 -c -I../../Core/Inc -I../../STM32_WPAN/App -I../../../../../../../Drivers/STM32WBxx_HAL_Driver/Inc -I../../../../../../../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy -I../../../../../../../Utilities/lpm/tiny_lpm -I../../../../../../../Middlewares/ST/STM32_WPAN -I../../../../../../../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread -I../../../../../../../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl -I../../../../../../../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci -I../../../../../../../Middlewares/ST/STM32_WPAN/utilities -I../../../../../../../Middlewares/ST/STM32_WPAN/ble/core -I../../../../../../../Middlewares/ST/STM32_WPAN/ble/core/auto -I../../../../../../../Middlewares/ST/STM32_WPAN/ble/core/template -I../../../../../../../Middlewares/ST/STM32_WPAN/ble/svc/Inc -I../../../../../../../Middlewares/ST/STM32_WPAN/ble/svc/Src -I../../../../../../../Drivers/CMSIS/Device/ST/STM32WBxx/Include -I../../../../../../../Utilities/sequencer -I../../../../../../../Middlewares/ST/STM32_WPAN/ble -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/BSP/P-NUCLEO-WB55.Nucleo -I"C:/projects/Spiro-BACNET_MODBUS/STM32Cube_FW_WB_V1.12.0/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_p2pClient/STM32CubeIDE/EEPROM_Emul/Core" -I../../Core/src -I../../../../../../../Middlewares/Third_Party/FreeRTOS/Source/include -I../../../../../../../Middlewares/Third_Party/MODBUS-LIB/Src -I../../../../../../../Middlewares/Third_Party/MODBUS-LIB/Inc -I../../../../../../../Middlewares/Third_Party/MODBUS-LIB/Config -I"../../../../../../../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"../../../../../../../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"EEPROM_Emul/Porting/STM32WB/flash_interface.d" -MT"EEPROM_Emul/Porting/STM32WB/flash_interface.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "EEPROM_Emul/Porting/STM32WB/flash_interface.o"
I have not pasted all the build log but at the end I start to receive hundreds of linker errors like this
arm-none-eabi-gcc -o "BLE_p2pClient.elf" @"objects.list" -mcpu=cortex-m4 -T"C:\projects\Spiro-BACNET_MODBUS\STM32Cube_FW_WB_V1.12.0\Projects\P-NUCLEO-WB55.Nucleo\Applications\BLE\BLE_p2pClient\STM32CubeIDE\STM32WB55RGVX_FLASH.ld" --specs=nosys.specs -Wl,-Map="BLE_p2pClient.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -u _printf_float -Wl,--start-group -lc -lm -Wl,--end-group
c:\st\stm32cubeide_1.12.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.200.202301161003\tools\arm-none-eabi\bin\ld.exe: ./Application/User/Startup/startup_stm32wb55rgvx.o: in function `Reset_Handler':
C:/projects/Spiro-BACNET_MODBUS/STM32Cube_FW_WB_V1.12.0/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_p2pClient/STM32CubeIDE/SPIRO-MODBUS/../Application/User/Startup/startup_stm32wb55rgvx.s:105: undefined reference to `SystemInit'
When this happens I run git status . And observer that project settings file at C:\projects\Spiro-BACNET_MODBUS\STM32Cube_FW_WB_V1.12.0\Projects\P-NUCLEO-WB55.Nucleo\Applications\BLE\BLE_p2pClient\STM32CubeIDE\.project
has been changed. And the references to source files have been removed. This explains the "undefined reference" errors in linker.
If I do git reset --hard , project file is restored and running build works just fine.
using headless
I eall headless build with -cleanBuild param. Behaviour is exactly the same. When the first build fails , perform git reset and call build again just to see this time it works.
I have not had this problem until adding new build configurations and removing Debug , Release. Also I changed my .gitignore to ignore build folders
I was wondering if anyone has similar issues in the past and managed to fix it
Thanks