2021-04-24 08:10 PM
Build environment:
STM32CubeIDE
Version: 1.6.1
Build: 9958_20210326_1446 (UTC)
Linux Mint 19.2
arm-none-eabi-g++ (15:6.3.1+svn253039-1build1) 6.3.1 20170620
-----------------------------------------------------------------------------------------------------------
21:46:25 **** Incremental Build of configuration Release for project I2S-RXTX-F7 ****
make -j4 all
arm-none-eabi-g++ -o "I2S-RXTX-F7.elf" @"objects.list" -larm_cortexM7lfdp_math -mcpu=cortex-m7 -T"/home/jponko/opt/STM32CubeIDE/workspace/I2S-RXTX-F7/STM32F767ZITX_FLASH.ld" -Wl,-Map="I2S-RXTX-F7.map" -Wl,--gc-sections -static -Wl,--start-group -larm_cortexM7lfdp_math -Wl,--end-group -L"/home/jponko/opt/STM32CubeIDE
/workspace/I2S-RXTX-F7/lib" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb
-Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group
/opt/st/stm32cubeide_1.6.1/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.linux64_1.5.0.202011040924/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: Core/Startup/startup_stm32f767zitx.o: in function `LoopFillZerobss':
(.text.Reset_Handler+0x32): undefined reference to `main'
collect2: error: ld returned 1 exit status
make: *** [makefile:80: I2S-RXTX-F7.elf] Error 1
"make -j4 all" terminated with exit code 2. Build might be incomplete.
21:46:26 Build Failed. 3 errors, 0 warnings. (took 524ms)
2022-12-08 02:43 AM
Have the same problem here.
Debug compiles and links without errors, release does not.
I didn't change anything in the build configurations. But i looks as Release doesnt clean end compile my my own code. So functions called in main.c are not definded in object files (which are still there from Debug build since they are not cleaned in release build)
See attached files for clean and build loggings.
2022-12-08 02:46 AM
2022-12-08 02:58 AM
So now I can answer for myself. Maybe someone could help this.
In my case all my code was in an extra folder. And, however, this folder was excluded from build in release configuration.
So solution was: switch to release configuration, then right click this directory, select properties (alternat. press ALT+Enter when folder is selected), select C/C++ Build in the tree view uncheck exclude from build checkbox.
2022-12-09 07:24 PM
IAR for example does not have dual debug and releaas as it is very easy to change the compile option which is mostly modified and debugged. It keeps the mind focused on the code rather than the toolchain split workspace....