_gettimeofday_r error come while i am building with latest stm cube ide
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-12 5: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()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-09-05 5:45 AM
Same issue for me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-09-26 3: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-09-26 3: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-09-28 3:44 AM
Our application doesn't use gettimeofday. It's not clear to us why we need to implement it.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-21 5:13 AM - edited ‎2023-10-21 5:22 AM
Made a new gettimeofday.c source file in src folder and this worked, thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-25 9: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

- « Previous
-
- 1
- 2
- Next »