Skip to content

Commit 362ebbe

Browse files
soc: st: stm32: compute CONFIG_NUM_IRQS automatically
Use new Kconfig preprocessor helper to compute CONFIG_NUM_IRQS during build instead of hardcoding it based on product Reference Manual Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
1 parent cc11163 commit 362ebbe

File tree

184 files changed

+9
-1767
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+9
-1767
lines changed

soc/st/stm32/Kconfig.defconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ config CLOCK_CONTROL
2020
config CORTEX_M_SYSTICK
2121
default n if STM32_LPTIM_TIMER
2222

23+
# Compute IRQ table size automatically using DT for Cortex-M.
24+
# dt_highest_controller_irq_number() returns zero-based IRQn,
25+
# increment it to obtain the table size (= max IRQn + 1)
26+
DT_NVIC_PATH := /soc/interrupt-controller@e000e100
27+
DT_NVIC_MAX_IRQN := $(dt_highest_controller_irq_number,$(DT_NVIC_PATH),irq)
28+
29+
configdefault NUM_IRQS
30+
default $(inc,$(DT_NVIC_MAX_IRQN)) if $(dt_path_enabled,$(DT_NVIC_PATH))
31+
2332
# Reduce kernel stack sizes to fit MCUs with 8 KiB RAM or less
2433
config MAIN_STACK_SIZE
2534
default 320 if SRAM_SIZE <= 2

soc/st/stm32/stm32c0x/Kconfig.defconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
if SOC_SERIES_STM32C0X
77

8-
rsource "Kconfig.defconfig.stm32c0*"
9-
108
if PM
119

1210
config COUNTER

soc/st/stm32/stm32c0x/Kconfig.defconfig.stm32c011xx

Lines changed: 0 additions & 11 deletions
This file was deleted.

soc/st/stm32/stm32c0x/Kconfig.defconfig.stm32c031xx

Lines changed: 0 additions & 11 deletions
This file was deleted.

soc/st/stm32/stm32c0x/Kconfig.defconfig.stm32c051xx

Lines changed: 0 additions & 12 deletions
This file was deleted.

soc/st/stm32/stm32c0x/Kconfig.defconfig.stm32c071xx

Lines changed: 0 additions & 11 deletions
This file was deleted.

soc/st/stm32/stm32c0x/Kconfig.defconfig.stm32c091xx

Lines changed: 0 additions & 12 deletions
This file was deleted.

soc/st/stm32/stm32c0x/Kconfig.defconfig.stm32c092xx

Lines changed: 0 additions & 12 deletions
This file was deleted.

soc/st/stm32/stm32f0x/Kconfig.defconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
if SOC_SERIES_STM32F0X
99

10-
rsource "Kconfig.defconfig.stm32f0*"
11-
1210
config SRAM_VECTOR_TABLE
1311
default y
1412

soc/st/stm32/stm32f0x/Kconfig.defconfig.stm32f030x4

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)