Skip to main content
PJose.4
Senior
March 4, 2025
Solved

Compilation Error when Using STM Cube IDE V 1.18

  • March 4, 2025
  • 6 replies
  • 5941 views

Hi All
Greetings

Im using the SBSFU folder from b-U585-IOT2A and was successfully running the codes. When updated the cube ide to latest version v1.18 from version v1.17, the following compilation is occuring in the Secure Application
Error message:

"C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+fp/hard\libc_nano.a(libc_a-gettimeofdayr.o): note: the message above does not take linker garbage collection into account"



and the compilation is failing. Anyone could you suggest a fix to this issue

Thanks for the support in advance
Regards
Philip

Best answer by Souhaib MAZHOUD

Hello @PJose.4 @path321 

Actually, STM32CubeIDE v1.18.0 was updated to GCC 13.2 version as default toolchain.
Try to install the older GCC version you were using from the "Toolchain Manager" in STM32CubeIDE and re-build the project.

KR,

Souhaib

6 replies

TDK
Super User
March 4, 2025

> note: the message above does not take linker garbage collection into account

and what is the message above? Post the full error message.

"If you feel a post has answered your question, please click ""Accept as Solution""."
PJose.4
PJose.4Author
Senior
March 5, 2025

Hi 

posting full error message again

"C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+fp/hard\libc_nano.a(libc_a-gettimeofdayr.o): note: the message above does not take linker garbage collection into account"

 

Thanks 
Philip

Souhaib MAZHOUDBest answer
Technical Moderator
March 5, 2025

Hello @PJose.4 @path321 

Actually, STM32CubeIDE v1.18.0 was updated to GCC 13.2 version as default toolchain.
Try to install the older GCC version you were using from the "Toolchain Manager" in STM32CubeIDE and re-build the project.

KR,

Souhaib

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
path321
Associate II
March 5, 2025

Same error as @PJose.4 here, appeared after updating STM32CubeIDE to 1.18 version.
After hitting 'Build' button, the message in the Console says 'Build Failed. 1 errors' with the following message lines ( the 1st and the 3rd lines are marked with yellow background, while the 2nd is marked with red :

 

 

(.text._gettimeofday_r+0xe): warning: _gettimeofday is not implemented and will always fail
C:/ST/STM32CubeIDE_1.17.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.17.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard\libc_nano.a(libc_a-gettimeofdayr.o): note: the message above does not take linker garbage collection into account
C:/ST/STM32CubeIDE_1.17.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: warning: evdos_leakage.elf has a LOAD segment with RWX permissions

 

 

However, there are output files (.elf ) created in the Debug folder (in my case), so I suppose that is something with the IDE and not critical. Also, if I hit the 'Build' button again, the error clears.

After updating CubeIDE, a message appeared saying if I wanted to update the current workspace or create a new one. I chose to update the current workspace, could that be the issue ?

PJose.4
PJose.4Author
Senior
March 5, 2025

Hi @Souhaib MAZHOUD 
Thanks for your solution with GNU Tool 12.3 rel1 in the STM32Cube IDE V1.18 the compilation is working.

Thanks for your support
Best Regards
Philip

Sany
Associate III
April 28, 2025

Hey @PJose.4  and @Souhaib MAZHOUD 

i got the same problem, after including WolfSSL and ITTIA_DB, but i have a solution for the Problem.

simply create in your project src folder the file gettimeofday.c and paste this:

#include <sys/time.h>

int _gettimeofday( struct timeval *tv, void *tzvp )
{
 // you can add code here there many example in google search. 
 return 0; // return non-zero for error
} // end _gettimeofday()

you can extend the function over chatgpt or something, but, the compiler error is gone and you can you the new 13.2 GCC toolchain.

Visitor II
April 30, 2025

Hubert1_0-1746004164208.png

Just adding on here, https://youtu.be/HCT_0mA8Sss?si=KTtSoIz6VaNrM4vC&t=1402 there is a presenation on how to build wolfSSH. It is mentioned that by defining WOLFSSH_NO_TIMESTAMP, the _gettimeofday error can be bypassed.