cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with version 1.9.0?

andre239955_stm1_stmicro
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions
CButz.1
Associate III

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

View solution in original post

9 REPLIES 9
mattias norlander
ST Employee

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?

Hi,
All errors occur with ld.exe and they are all type multiple definition
….
c:\st\stm32cubeide_1.9.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.0.202111181127\tools\arm-none-eabi\bin\ld.exe: ./mbedtls/library/error.o:D:/DocTA/Software/SmartValve/Embedded/BACDEL_Stack/Api/Inc/bacDELPropertyDef.h:6803: multiple definition of `BACnetConfigData'; ./AteccLib/UnitTest_ATECC.o:D:/DocTA/Software/SmartValve/Embedded/BACDEL_Stack/Api/Inc/bacDELPropertyDef.h:6803: first defined here
c:\st\stm32cubeide_1.9.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.0.202111181127\tools\arm-none-eabi\bin\ld.exe: SV-F777.elf section `.bss' will not fit in region `SRAM'
c:\st\stm32cubeide_1.9.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.0.202111181127\tools\arm-none-eabi\bin\ld.exe: region `SRAM' overflowed by 50008 bytes
collect2.exe: error: ld returned 1 exit status
make[1]: *** [makefile:169: SV-F777.elf] Error 1
make: *** [makefile:162: all] Error 2
"make -j12 all" terminated with exit code 2. Build might be incomplete.
14:07:12 Build Failed. 2017 errors, 18 warnings. (took 57s.756ms)
Regarding the available space in processor with version 1.8.0
[cid:image001.png@01D832F9.FFBBE8A0]
Thank-you
André
mattias norlander
ST Employee

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.

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

HShey.1
Associate

I have same problem with new version 0693W00000KbwzkQAB.png

CButz.1
Associate III

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

@CButz.1​ thanks!!

I alsmot lost my mind

we dont need to firmware by ourselves, lets talk

How can I use the

-fcommon

on the CubeIDE. I can't find it

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.