Skip to content

Commit 9a65131

Browse files
carlescufirlubos
authored andcommitted
[nrf fromtree] kernel: Guard SYS_CLOCK_HW_CYCLES_PER_SEC to avoid spurious empty macro
If SYS_CLOCK_EXISTS is not enabled, then the SYS_CLOCK_HW_CYCLES_PER_SEC still gets created, but with no value. This causes the code generation in misc/generated/CMakeLists.txt to create an empty assembly macro: `.equ  CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC,` which then causes a build error. Disable SYS_CLOCK_HW_CYCLES_PER_SEC entirely when SYS_CLOCK_EXISTS is disabled to fix this. This is a follow-up to 03f46db. Signed-off-by: Carles Cufi <[email protected]> (cherry picked from commit 61cdcb3)
1 parent ae4468c commit 9a65131

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,7 @@ config SYS_CLOCK_TICKS_PER_SEC
829829
config SYS_CLOCK_HW_CYCLES_PER_SEC
830830
int "System clock's h/w timer frequency"
831831
default 0 if TIMER_READS_ITS_FREQUENCY_AT_RUNTIME
832+
depends on SYS_CLOCK_EXISTS
832833
help
833834
This option specifies the frequency of the hardware timer used for the
834835
system clock (in Hz). This option is set by the SOC's or board's Kconfig file

0 commit comments

Comments
 (0)