2023-08-04 12:20 AM
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':
Solved! Go to Solution.
2023-08-12 05:08 PM
I would like to help other so I created the gettimeofday.c and then added a function that return just 0 since I'm not using it but it resolve compiler error with some peace of mind.
#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()
2023-09-05 05:45 AM
Same issue for me
2023-09-26 03:04 AM
Same issue here after IDE upgrade to 1.13.2.
C:/ST/STM32CubeIDE_1.13.2/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.13.2/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/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
Please help to solve. Thanks.
2023-09-26 03:37 AM
you can read...? >>
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.
2023-09-28 03:44 AM
Our application doesn't use gettimeofday. It's not clear to us why we need to implement it.
Thanks.
2023-10-21 05:13 AM - edited 2023-10-21 05:22 AM
2023-10-25 12:42 AM
The first line is an error not a warning so you can't ignore it as you suggested:
in function `_gettimeofday_r'
So is the solution provided by Lab1tr the right one?
2023-10-25 09:24 AM
Hi,
If you are using mbedTLS a solution to get rid of this warning is to not activate MBEDTLS_HAVE_TIME and MBEDTLS_HAVE_TIME_DATE in mbedtls_config.h
regards
Patrice