cancel
Showing results for 
Search instead for 
Did you mean: 

_gettimeofday_r error come while i am building with latest stm cube ide

kchin.2
Associate II

stmcube ide 1.13.1

.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.13.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+fp/hard\libc_nano.a(libc_a-gettimeofdayr.o): in function `_gettimeofday_r':

1 ACCEPTED SOLUTION

Accepted Solutions

@KnarfB wrote:

This is a warning, not an error. You can ignore it unless you want to use gettimeofday, in which case you have to implement it yourself for an embedded system :).

hth

KnarfB


I am trying to change the ld file I thought may be because of this my ld file is not refecting

View solution in original post

17 REPLIES 17
KnarfB
Principal III

error message not included?!

C:/ST/STM32CubeIDE_1.13.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.13.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+fp/hard\libc_nano.a(libc_a-gettimeofdayr.o): in function `_gettimeofday_r':

(.text._gettimeofday_r+0xe): warning: _gettimeofday is not implemented and will always fail

KnarfB
Principal III

This is a warning, not an error. You can ignore it unless you want to use gettimeofday, in which case you have to implement it yourself for an embedded system :).

hth

KnarfB


@KnarfB wrote:

This is a warning, not an error. You can ignore it unless you want to use gettimeofday, in which case you have to implement it yourself for an embedded system :).

hth

KnarfB


I am trying to change the ld file I thought may be because of this my ld file is not refecting

ETan.3
Associate II

I got the same error after performing "Check for Update" and patching CubeMX to 6.19.1 and CubeIDE to 1.13.1.

This compiling error should be fixed, but no just be ignored.

LawrenceRB
Associate

Same here. Tried rebuilding a code from prior CubeMX / CubeIDE version. Prior to the 2 of August 2023.
plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.linux64_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld:
/home/lawrence/st/stm32cubeide_1.12.1/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.linux64_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-gettimeofdayr.o):
in function `_gettimeofday_r': (.text._gettimeofday_r+0xe):
warning: _gettimeofday is not implemented and will always fail

 I checked the ID file and found no gettimeofday so I don't know where this coming from and how to make it go away or I have to wait for next revision release by ST?

is there code snips to add in gettimeofday

Den Dale
Associate

 

Guys, I have this problem after IDE upgrade to 1.13.1.

This topic is marked as "solved", but nobody specified how it was solved. Could somebody write the solution, please?


C:/ST/STM32CubeIDE_1.11.2/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.11.2/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-gettimeofdayr.o): in function `_gettimeofday_r':
(.text._gettimeofday_r+0xe): warning: _gettimeofday is not implemented and will always fail

as KnarfB wrote:

 You can ignore it unless you want to use gettimeofday, in which case you have to implement it yourself for an embedded system :).

or if you trust more in compiler :

warning: _gettimeofday is not implemented and will always fail.

solution is : write it yourself.

If you feel a post has answered your question, please click "Accept as Solution".