This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
Compiling test.c In file included from /Users/trunet/src/ChibiOS-RT/os/hal/include/rtc.h:97:0, from /Users/trunet/src/ChibiOS-RT/os/hal/include/hal.h:59, from /Users/trunet/src/ChibiOS-RT/test/rt/test.c:26: /Users/trunet/src/ChibiOS-RT/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.h:169:3: error: unknown type name 'RTCTime' void rtc_lld_set_time(RTCDriver *rtcp, const RTCTime *timespec); ^ /Users/trunet/src/ChibiOS-RT/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.h:170:42: error: unknown type name 'RTCTime' void rtc_lld_get_time(RTCDriver *rtcp, RTCTime *timespec);
I could't find "typedef RTCTime RTCTime" anywhere, only the struct, so I guess it's missing.
Compiling rtc.c /Users/trunet/src/ChibiOS-RT/os/hal/src/rtc.c: In function 'rtcSetTime': /Users/trunet/src/ChibiOS-RT/os/hal/src/rtc.c:82:3: warning: passing argument 2 of 'rtc_lld_set_time' from incompatible pointer type [enabled by default] rtcSetTimeI(rtcp, timespec); ^ In file included from /Users/trunet/src/ChibiOS-RT/os/hal/include/rtc.h:97:0, from /Users/trunet/src/ChibiOS-RT/os/hal/include/hal.h:59, from /Users/trunet/src/ChibiOS-RT/os/hal/src/rtc.c:33: /Users/trunet/src/ChibiOS-RT/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.h:174:8: note: expected 'const struct RTCTime *' but argument is of type 'const struct RTCDateTime *' void rtc_lld_set_time(RTCDriver *rtcp, const RTCTime *timespec); ^ /Users/trunet/src/ChibiOS-RT/os/hal/src/rtc.c: In function 'rtcGetTime': /Users/trunet/src/ChibiOS-RT/os/hal/src/rtc.c:99:3: warning: passing argument 2 of 'rtc_lld_get_time' from incompatible pointer type [enabled by default] rtcGetTimeI(rtcp, timespec); ^ In file included from /Users/trunet/src/ChibiOS-RT/os/hal/include/rtc.h:97:0, from /Users/trunet/src/ChibiOS-RT/os/hal/include/hal.h:59, from /Users/trunet/src/ChibiOS-RT/os/hal/src/rtc.c:33: /Users/trunet/src/ChibiOS-RT/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.h:175:8: note: expected 'struct RTCTime *' but argument is of type 'struct RTCDateTime *' void rtc_lld_get_time(RTCDriver *rtcp, RTCTime *timespec); ^
Hi Giovanny, i have the same issue with F4 , as i see it use RTCv2 driver, but i found RTCTime only in RTCv1, cat you tell any hack for succesfully compilation?
There is no RTCTime in the new driver, only RTCDateTime. You are right that it is RTC_v2, v1 will have to wait until the RTC driver model is "final" or somebody starts porting it.
Compiling rtc_lld.c In file included from /Users/trunet/src/ChibiOS-RT/os/hal/include/rtc.h:102:0, from /Users/trunet/src/ChibiOS-RT/os/hal/include/hal.h:60, from /Users/trunet/src/ChibiOS-RT/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.c:29: /Users/trunet/src/ChibiOS-RT/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.h:169:3: error: unknown type name 'RTCTime' void rtc_lld_set_time(RTCDriver *rtcp, const RTCTime *timespec); ^ /Users/trunet/src/ChibiOS-RT/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.h:170:42: error: unknown type name 'RTCTime' void rtc_lld_get_time(RTCDriver *rtcp, RTCTime *timespec); ^ /Users/trunet/src/ChibiOS-RT/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.c: In function 'rtc_lld_init': /Users/trunet/src/ChibiOS-RT/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.c:166:3: warning: implicit declaration of function 'CORTEX_PRIORITY_MASK' [-Wimplicit-function-declaration] nvicEnableVector(RTC_IRQn, CORTEX_PRIORITY_MASK(STM32_RTC_IRQ_PRIORITY)); ^ /Users/trunet/src/ChibiOS-RT/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.c: At top level: /Users/trunet/src/ChibiOS-RT/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.c:179:1: error: unknown type name 'RTCTime' void rtc_lld_set_time(RTCDriver *rtcp, const RTCTime *timespec) { ^ /Users/trunet/src/ChibiOS-RT/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.c: In function 'rtc_lld_set_time': /Users/trunet/src/ChibiOS-RT/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.c:184:34: error: request for member 'tv_sec' in something not a structure or union RTC->CNTH = (uint16_t)(timespec->tv_sec >> 16); ^ /Users/trunet/src/ChibiOS-RT/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.c:185:34: error: request for member 'tv_sec' in something not a structure or union RTC->CNTL = (uint16_t)(timespec->tv_sec & 0xFFFF); ^ /Users/trunet/src/ChibiOS-RT/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.c: At top level: /Users/trunet/src/ChibiOS-RT/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.c:197:40: error: unknown type name 'RTCTime' void rtc_lld_get_time(RTCDriver *rtcp, RTCTime *timespec) { ^ make: *** [build/obj/rtc_lld.o] Error 1
[cc] C:\Work\CoIDE\ChibiOS_3.0_Test\os\hal\ports\STM32\LLD\RTCv2\rtc_lld.c:338:25: error: 'RTC_CR_ALRBE' undeclared (first use in this function) [cc] C:\Work\CoIDE\ChibiOS_3.0_Test\os\hal\ports\STM32\LLD\RTCv2\rtc_lld.c:339:33: error: 'RTC_ISR_ALRBWF' undeclared (first use in this function) [cc] C:\Work\CoIDE\ChibiOS_3.0_Test\os\hal\ports\STM32\LLD\RTCv2\rtc_lld.c:341:16: error: 'RTC_TypeDef' has no member named 'ALRMBR' [cc] C:\Work\CoIDE\ChibiOS_3.0_Test\os\hal\ports\STM32\LLD\RTCv2\rtc_lld.c:343:24: error: 'RTC_CR_ALRBIE' undeclared (first use in this function) [cc] C:\Work\CoIDE\ChibiOS_3.0_Test\os\hal\ports\STM32\LLD\RTCv2\rtc_lld.c:367:33: error: 'RTC_TypeDef' has no member named 'ALRMBR' [cc] C:\Work\CoIDE\ChibiOS_3.0_Test\os\hal\ports\STM32\LLD\RTCv2\rtc_lld.c:388:23: error: 'RTC_CR_WUTE' undeclared (first use in this function) [cc] C:\Work\CoIDE\ChibiOS_3.0_Test\os\hal\ports\STM32\LLD\RTCv2\rtc_lld.c:389:31: error: 'RTC_ISR_WUTWF' undeclared (first use in this function) [cc] C:\Work\CoIDE\ChibiOS_3.0_Test\os\hal\ports\STM32\LLD\RTCv2\rtc_lld.c:391:14: error: 'RTC_TypeDef' has no member named 'WUTR' [cc] C:\Work\CoIDE\ChibiOS_3.0_Test\os\hal\ports\STM32\LLD\RTCv2\rtc_lld.c:393:22: error: 'RTC_CR_WUTIE' undeclared (first use in this function) [cc] C:\Work\CoIDE\ChibiOS_3.0_Test\os\hal\ports\STM32\LLD\RTCv2\rtc_lld.c:415:32: error: 'RTC_TypeDef' has no member named 'WUTR'