Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hishambaharom opened this issue Jul 23, 2023 · 1 comment

Comments

@hishambaharom
Copy link

hishambaharom commented Jul 23, 2023

Hi,

I Get this error:
/home/shahrol/st/stm32cubeide_1.11.0_6/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/shahrol/st/stm32cubeide_1.11.0_6/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

when I upgrade the STM32CubeIde from version 1.11.0 to 1.13.0. I figure out this error is generate when I init the rclc_executor...rclc_executor_init(&main_executor, &support.context, 5, &allocator);

How to resolve this error

@DrMarkusKrug
Copy link

Hi,
the function _gettimeofday is usually not implemented for embedded targets. Actually I'm surprised that you are saying it was working in version CubeIDE 1.11.0.
Here: https://stackoverflow.com/questions/7004743/unable-to-link-to-gettimeofday-on-embedded-system-elapsed-time-suggestions you find some good explainations how to deal with this problem.
Basically you need to implement that function on your own and decide which timer to be used for incrementing the time. If you have a battery buffered RTC you certainly can use this time. In this case you have a proper time of the day. Otherwise you just have a running counter that is assumed to be the time.
Best Regards
Markus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants