Skip to content

Nordic: nRF54L: nordic/validate_base_addresses.c:266:19: error: 'NRF_RTC' undeclared here on RTC-less Nordic SoC with external RTC #101686

@afeatherstone-pa

Description

@afeatherstone-pa

Describe the bug

Relates to #70135 .

Regression

  • This is a regression.

Steps to reproduce

This fails when a custom (out-of-tree) board has an external RTC (e.g. on I2C), and it has a node label of rtc. Example .overlay:

&i2c30 {
	rtc: pcf85063a@51 {
		compatible = "nxp,pcf85063a";
		reg = <0x51>;
	};
};

Example output when building samples/drivers/rtc

soc/nordic/validate_base_addresses.c:266:19: error: 'NRF_RTC' undeclared here (not in a function); did you mean 'NRF_GRTC'?
  266 | CHECK_DT_REG(rtc, NRF_RTC);

The same problem will occur with anything listed in validate_base_addresses.c:

CHECK_DT_REG(rtc, NRF_RTC);
CHECK_DT_REG(rtc0, NRF_RTC0);
CHECK_DT_REG(rtc1, NRF_RTC1);
CHECK_DT_REG(rtc2, NRF_RTC2);

Changing the node label to something not listed in soc/nordic/validate_base_addresses.c works around this problem:

&i2c30 {
	ext_rtc: pcf85063a@51 {
		compatible = "nxp,pcf85063a";
		reg = <0x51>;
	};
};

Relevant log output

Impact

Annoyance – Minor irritation; no significant impact on usability or functionality.

Environment

No response

Additional Context

No response

Metadata

Metadata

Assignees

Labels

bugThe issue is a bug, or the PR is fixing a bugplatform: nRFNordic nRFxpriority: lowLow impact/importance bug

Type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions