Open MarekPieta opened 1 year ago
It looks like the logic in Kconfig is flipped so when CONFIG_SYS_CLOCK_EXISTS
is set, only then section with timer driver is enabled: https://github.com/zephyrproject-rtos/zephyr/blob/fe10c0b423cabbee3f2780d1c0e7046e1d2b75f1/drivers/timer/Kconfig#L8
The fix would be to change it so that each system timer driver is selecting CONFIG_SYS_CLOCK_EXISTS
. I am not sure if there are any blockers (out of tree drivers?) @teburd @andyross what are your thoughts?
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
Describe the bug We can enable the
CONFIG_SYS_CLOCK_EXISTS
Kconfig option without actually enabling the implementation of the system clock (e.g. with explicitly disabledCONFIG_NRF_RTC_TIMER
on nRF SoC based boards). The build would succeed until the system clock API is used somewhere in the code (using the system clock API would trigger linker failures).To Reproduce Steps to reproduce the behavior:
hello_world
sample onnrf52840dk_nrf52840
withCONFIG_NRF_RTC_TIMER=n
CONFIG_SYS_CLOCK_EXISTS
.Expected behavior The
CONFIG_SYS_CLOCK_EXISTS
should depend on the fact that a driver implementation is available to avoid making impression that feature is available when it actually is not. I think we may also need to ensure that only one system clock driver implementation is enabled at a time.Impact It is quite easy to make improper application configuration and the related linker failures may remain hidden for a long time.
Environment Zephyr version:
49c7aa56fa0c1e61de95577e5fdc1877872b549c
(current main). Can be also replicated with other versions.