This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 75a01553660 arch/arm/src/common/stm32: include the RTCC register
header on the STM32G4
75a01553660 is described below
commit 75a01553660c99b8f4d7b642c34933e2802a2517
Author: Daniel P. Carvalho <[email protected]>
AuthorDate: Sun Oct 25 15:33:01 2026 -0300
arch/arm/src/common/stm32: include the RTCC register header on the STM32G4
stm32_rtc.h selects the RTCC register definitions per chip family, and
the STM32G4 is not in the list. With CONFIG_STM32_RTC=y the build
fails in stm32_rcc.c:
stm32_rtc.h:101: error: implicit declaration of function
'STM32_RTC_BKR'
The G4 already builds stm32_rtcc_m3m4_v1.c, so only the header was
missing. Add the G4 to the list.
Tested on an STM32G474: the RTC builds, date -s sets the time and it
is kept across a reset and a power cycle.
Assisted-by: Claude Code:claude-sonnet-5-5
Signed-off-by: Daniel P. Carvalho <[email protected]>
---
arch/arm/src/common/stm32/stm32_rtc.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/src/common/stm32/stm32_rtc.h
b/arch/arm/src/common/stm32/stm32_rtc.h
index 96c8e4f5b8b..332c8d448ce 100644
--- a/arch/arm/src/common/stm32/stm32_rtc.h
+++ b/arch/arm/src/common/stm32/stm32_rtc.h
@@ -47,7 +47,8 @@
*/
#elif defined(CONFIG_STM32_STM32L15XX) || defined(CONFIG_STM32_STM32F20XX) || \
- defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F4XXX)
+ defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F4XXX) || \
+ defined(CONFIG_STM32_STM32G4XXX)
# include "hardware/stm32_rtcc.h"
#endif