Why do I get these errors when doing a release build but no errors when doing a debug build?
A clean before building has no effect..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-24 8: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)
- Labels:
-
Bug-report
-
STM32CubeIDE
-
STM32F7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-08 2: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-08 2:46 AM
Since I could only attach one file, here comes the debug build:
I'm not familiar to eclipse, so I dont want to change something I do not understand well. But there seemsto be something missing in the release build configuration.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-08 2: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-09 7: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....
