Closed mjs513 closed 2 years ago
Thank you for figuring this out :-)
The drawback might be a reduced resolution for things that use gettimeofday()
like std::chrono
or std::thread
. But I think it's fine as a workaround, at least as long as Teensyduino 1.58 is still beta.
Teensyduino 1.58-beta2 now adds a gettimeofday() function in rtc.c of the Teensy4 core which now causes a linker error when using the library with the T4.
This was reported in a thread on the forum: https://forum.pjrc.com/threads/71198-Linker-issue-about-gettimeofday()-on-Teensy-4-0-with-FreeRTOS along with the recommended solution by @PaulStoffregen which this PR incorporates. I did test it with the BLINK sketch and it works, ie. not linker error and the sketch runs correctly.