STM32Cube IDE build error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-11 4:16 AM
I am working with STM32U575, When building my project I am facing an issue.
The error is as follows:
C:/ST/STM32CubeIDE_1.13.1/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':
Could somebody please help me how to resolve the issue.
Solved! Go to Solution.
- Labels:
-
STM32U5 series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-11 5:06 AM - edited ‎2023-10-11 5:39 AM
Hello @Mathil
maybe this post could help you :
https://community.st.com/t5/stm32cubeide-mcus/gettimeofday-r-error-come-while-i-am-building-with-latest-stm/td-p/579637
This issue will be fixed soon. At that time you have to define your own function. You can define it as "empty" and return 0, just to get rid of this warning message if you don't want to use it.
Else you can implement a function using the RTC to get the date and time after you have programming correctly the RTC calendar and time.
So you can add a file named time.c if not having one and then add the following empty function :
#include <sys/time.h>
int _gettimeofday( struct timeval *tv, void *tzvp )
{
// you can add code here.
return 0; // return non-zero for error
} // end _gettimeofday()
best regards
Mikael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-11 5:06 AM - edited ‎2023-10-11 5:39 AM
Hello @Mathil
maybe this post could help you :
https://community.st.com/t5/stm32cubeide-mcus/gettimeofday-r-error-come-while-i-am-building-with-latest-stm/td-p/579637
This issue will be fixed soon. At that time you have to define your own function. You can define it as "empty" and return 0, just to get rid of this warning message if you don't want to use it.
Else you can implement a function using the RTC to get the date and time after you have programming correctly the RTC calendar and time.
So you can add a file named time.c if not having one and then add the following empty function :
#include <sys/time.h>
int _gettimeofday( struct timeval *tv, void *tzvp )
{
// you can add code here.
return 0; // return non-zero for error
} // end _gettimeofday()
best regards
Mikael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-10-12 2:28 AM
@MikaelM Thank you for the solution.
