2022-03-08 04:30 AM
I updated from version 1.8.0 (compilation was ok) to version 1.9.0 where I get 2017 errors :-o.
Apparently and issue with ld.exe
..tools\arm-none-eabi\bin\ld.exe: SV-F777.elf section `.bss' will not fit in region `SRAM'
Processor STM32F777VITx
Do you have any idea how to investigate this?
Solved! Go to Solution.
2022-03-09 07:11 AM
This is the same issue as https://community.st.com/s/question/0D53W00001Pv3zASAR/multiple-definition-error-after-stm32cubeide-190-update.
But heres the answer:
the toolchain changed to gcc 10 and therefore tentative definitions in header files are no longer ignored.
You should not define variables in headers, but rather use extern in header files and define it in one source file. This was always a error, but was ignored in gcc 9. So to fix this either use -fcommon
to compile or the better solution is to declare the variables in the header as "extern" and define them in one source file. Heres the link to the GNU GCC 10 source:
https://gcc.gnu.org/gcc-10/porting_to.html
As this problematic isnt bound to cubeide but rather C and gcc 10 here is a external link that maybe helps:
https://stackoverflow.com/questions/1164167/variable-declaration-in-a-header-file
2022-03-08 04:55 AM
Hi,
Could you elaborate the "2017 errors". unable to comment without more details.
Do you see any trend in terms of error messages? What are the error messages? Please analyze that and post the type of issues you found and the count if you want...
About the linker error. Take a look in the 1.8.0 environment and check specifically the Build Analyzer to see how much RAM usage that is reported.
Then compare that result with the same report in 1.9.0.
Maybe you were already really close to a full RAM in 1.8.0?
2022-03-08 05:37 AM
2022-03-09 02:19 AM
Could you try to just "delete" the Debug or Release folder and let the toolchain re-build everything?
Would not fix the "will not fit in region SRAM" issue. But maybe the multiple definitions...
Do you have the possibility to send me the project as an exported zip-file?
The screenshot link for some reason does not work.
2022-03-09 04:06 AM
i can confirm. I had the same issue!
I am working on STM32F1/F4/G0 projects with C and CubeIDE.
All projects, that worked fine yesterday with CubeID 1.8.0 now throw lots of linker errors "first defined here" and "multiple definition".
For me it looks like a bit the
#ifndef HEADERFILENAME_H__
#define HEADERFILENAME_H__
{code in header file ...}
#endif // HEADERFILENAME_H__
is no longer interpreted correctly.
The list of "multiple definition" & "first defined here" is huge, it seems like allmost every exported variable of the project is affected
My workaround is: uninstall CubeID 1.9, reinstall Version 1.8.0 and pull the Projects out of the backup - i LUCKILY made before upgrading to 1.9
2022-03-09 05:03 AM
I have same problem with new version
2022-03-09 07:11 AM
This is the same issue as https://community.st.com/s/question/0D53W00001Pv3zASAR/multiple-definition-error-after-stm32cubeide-190-update.
But heres the answer:
the toolchain changed to gcc 10 and therefore tentative definitions in header files are no longer ignored.
You should not define variables in headers, but rather use extern in header files and define it in one source file. This was always a error, but was ignored in gcc 9. So to fix this either use -fcommon
to compile or the better solution is to declare the variables in the header as "extern" and define them in one source file. Heres the link to the GNU GCC 10 source:
https://gcc.gnu.org/gcc-10/porting_to.html
As this problematic isnt bound to cubeide but rather C and gcc 10 here is a external link that maybe helps:
https://stackoverflow.com/questions/1164167/variable-declaration-in-a-header-file
2022-03-22 09:08 AM
@CButz.1 thanks!!
I alsmot lost my mind
2022-07-06 12:50 AM
How can I use the
-fcommon
on the CubeIDE. I can't find it
2022-07-06 02:04 AM
Under project properties (right click on poject->properties)->C/C++ Build->Settings->MCU GCC Compiler->Miscellaneous top right you should have a green "add", then just enter -fcommon.