toggle quoted messageShow quoted text
Thank you for your investigation. In that case REQUIRES_FULL_LIBC
really does not make sense for STM32H7xx SOC. Actually I do not need
the RTC driver so good for me :)
čt 18. 6. 2020 v 14:50 odesílatel Andy Ross <andrew.j.ross@...> napsal:
That sounded curious, so I checked. It looks like the STM32 RTC driver you found is an old-style y/m/d/h/m/s device with separate fields, and the driver is using mktime() to convert those to a linear value for use by the rest of the system. Zephyr's minimal libc doesn't have mktime().
But mktime() is pretty small and simple on its own, even with leap day handling (if the device does that). Dealing with timezones gets crazy, but I don't see any zone management in the driver and am guessing the device doesn't bother to store one (i.e. the value isn't "real" anyway, it just presents a number relative to some consistent zero). It seems like it would be very feasible for someone to add that logic to the driver, or even contribute a generic GMT-based mktime() to Zephyr.
On 6/18/2020 5:14 AM, Jan Pohanka wrote:
current implementation for stm32h7 soc has REQUIRES_FULL_LIBC enabled
in soc/arm/st_stm32/stm32h7/Kconfig.series. Can someone tell me a
reason for this? I have found that it is also in
drivers/counter/Kconfig.stm32_rtc so I expect that stm32 HAL (or LL)
for counter depends on full libc?