-
Notifications
You must be signed in to change notification settings - Fork 8.3k
soc: st: stm32: reorganize family-wide common Kconfig #100218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mathieuchopstm
wants to merge
1
commit into
zephyrproject-rtos:main
Choose a base branch
from
mathieuchopstm:stm32_common_kconfig_reorg
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+68
−52
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -10,57 +10,29 @@ if SOC_FAMILY_STM32 | |||||||||||||||
|
|
||||||||||||||||
| rsource "*/Kconfig" | ||||||||||||||||
|
|
||||||||||||||||
| # STM32 wide symbols definitions | ||||||||||||||||
|
|
||||||||||||||||
| # Workaround for not being able to have commas in macro arguments | ||||||||||||||||
| DT_CHOSEN_Z_CCM := zephyr,ccm | ||||||||||||||||
|
|
||||||||||||||||
| config STM32_CCM | ||||||||||||||||
| def_bool $(dt_chosen_enabled,$(DT_CHOSEN_Z_CCM)) | ||||||||||||||||
|
|
||||||||||||||||
| # `common/Kconfig` declares all Kconfig options used to | ||||||||||||||||
| # configure the family-wide code found in `common/`. | ||||||||||||||||
| # | ||||||||||||||||
| # However, some Kconfig options are shared by all series but | ||||||||||||||||
| # not consumed by common code; instead, SoC-specific code, | ||||||||||||||||
| # certain drivers or the STM32Cube HAL module will make use | ||||||||||||||||
| # of them. Such Kconfig options are declared here. | ||||||||||||||||
|
Comment on lines
+16
to
+19
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||
| # | ||||||||||||||||
| # (Please indicate as a comment where each option is consumed) | ||||||||||||||||
|
|
||||||||||||||||
| # This option is consumed by the HAL module | ||||||||||||||||
| config USE_STM32_ASSERT | ||||||||||||||||
| depends on ASSERT | ||||||||||||||||
| bool "STM32Cube HAL and LL drivers asserts" | ||||||||||||||||
| help | ||||||||||||||||
| Enable asserts in STM32Cube HAL and LL drivers. | ||||||||||||||||
|
|
||||||||||||||||
| config STM32_BACKUP_SRAM | ||||||||||||||||
| bool "STM32 Backup SRAM" | ||||||||||||||||
| default y | ||||||||||||||||
| depends on DT_HAS_ST_STM32_BACKUP_SRAM_ENABLED | ||||||||||||||||
| help | ||||||||||||||||
| Enable support for STM32 backup SRAM. | ||||||||||||||||
|
|
||||||||||||||||
| config STM32_BACKUP_SRAM_INIT_PRIORITY | ||||||||||||||||
| int "STM32 Backup SRAM init priority" | ||||||||||||||||
| default APPLICATION_INIT_PRIORITY | ||||||||||||||||
| depends on STM32_BACKUP_SRAM | ||||||||||||||||
| help | ||||||||||||||||
| STM32 Backup SRAM device initialization priority. | ||||||||||||||||
|
|
||||||||||||||||
| config STM32_ENABLE_DEBUG_SLEEP_STOP | ||||||||||||||||
| bool "Allow debugger attach in stop/sleep Mode" | ||||||||||||||||
| default y if DEBUG | ||||||||||||||||
| help | ||||||||||||||||
| Some STM32 parts disable the DBGMCU in sleep/stop modes because | ||||||||||||||||
| of power consumption. As a side-effects this prevents | ||||||||||||||||
| debuggers from attaching w/o resetting the target. This | ||||||||||||||||
| effectively destroys the use-case of `west attach`. Also | ||||||||||||||||
| SEGGER RTT and similar technologies need this. | ||||||||||||||||
|
|
||||||||||||||||
| config SWJ_ANALOG_PRIORITY | ||||||||||||||||
| int "SWJ DP port to analog routine initialization priority" | ||||||||||||||||
| default 49 | ||||||||||||||||
| help | ||||||||||||||||
| Initialization priority of the routine within the PRE_KERNEL1 level. | ||||||||||||||||
| This priority must be greater than GPIO_INIT_PRIORITY and lower than | ||||||||||||||||
| UART_INIT_PRIORITY. | ||||||||||||||||
|
|
||||||||||||||||
| config HAS_STM32_FLASH_PREFETCH | ||||||||||||||||
| bool | ||||||||||||||||
| help | ||||||||||||||||
| Hidden symbol selected by SoCs which support flash prefetch. | ||||||||||||||||
|
|
||||||||||||||||
| # This option is consumed by `soc.c` of applicable series | ||||||||||||||||
| config STM32_FLASH_PREFETCH | ||||||||||||||||
| bool "Flash prefetch buffer" | ||||||||||||||||
| default y | ||||||||||||||||
|
|
@@ -70,18 +42,7 @@ config STM32_FLASH_PREFETCH | |||||||||||||||
| be enabled when flash is accessed through a cache memory. Flash | ||||||||||||||||
| prefetch also improves performances a bit. | ||||||||||||||||
|
|
||||||||||||||||
| config STM32_WKUP_PINS | ||||||||||||||||
| bool "STM32 PWR Wake-up Pins" | ||||||||||||||||
| depends on DT_HAS_ST_STM32_PWR_ENABLED | ||||||||||||||||
| help | ||||||||||||||||
| Enable support for STM32 PWR wake-up pins. | ||||||||||||||||
|
|
||||||||||||||||
| config STM32_BACKUP_PROTECTION | ||||||||||||||||
| bool "SoC has backup domain protection access" | ||||||||||||||||
| help | ||||||||||||||||
| Enabled for SoCs for which access protection to backup domain | ||||||||||||||||
| resources needs to be explicitly handled. | ||||||||||||||||
|
|
||||||||||||||||
| # This option is consumed by external flash drivers | ||||||||||||||||
| config STM32_APP_IN_EXT_FLASH | ||||||||||||||||
| bool | ||||||||||||||||
| help | ||||||||||||||||
|
|
||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,55 @@ | ||||||
| # Copyright (c) 2025 STMicroelectronics | ||||||
| # SPDX-License-Identifier: Apache-2.0 | ||||||
| # | ||||||
| # Kconfig options for STM32 family-wide common code | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Disambiguate 'common'
Suggested change
|
||||||
| # | ||||||
|
|
||||||
| # Workaround for not being able to have commas in macro arguments | ||||||
| DT_CHOSEN_Z_CCM := zephyr,ccm | ||||||
|
|
||||||
| config STM32_CCM | ||||||
| def_bool $(dt_chosen_enabled,$(DT_CHOSEN_Z_CCM)) | ||||||
|
|
||||||
| config STM32_BACKUP_SRAM | ||||||
| bool "STM32 Backup SRAM" | ||||||
| default y | ||||||
| depends on DT_HAS_ST_STM32_BACKUP_SRAM_ENABLED | ||||||
| help | ||||||
| Enable support for STM32 backup SRAM. | ||||||
|
|
||||||
| config STM32_BACKUP_SRAM_INIT_PRIORITY | ||||||
| int "STM32 Backup SRAM init priority" | ||||||
| default APPLICATION_INIT_PRIORITY | ||||||
| depends on STM32_BACKUP_SRAM | ||||||
| help | ||||||
| STM32 Backup SRAM device initialization priority. | ||||||
|
|
||||||
| config STM32_ENABLE_DEBUG_SLEEP_STOP | ||||||
| bool "Allow debugger attach in stop/sleep Mode" | ||||||
| default y if DEBUG | ||||||
| help | ||||||
| Some STM32 parts disable the DBGMCU in sleep/stop modes because | ||||||
| of power consumption. As a side-effects this prevents | ||||||
| debuggers from attaching w/o resetting the target. This | ||||||
| effectively destroys the use-case of `west attach`. Also | ||||||
| SEGGER RTT and similar technologies need this. | ||||||
|
|
||||||
| config SWJ_ANALOG_PRIORITY | ||||||
| int "SWJ DP port to analog routine initialization priority" | ||||||
| default 49 | ||||||
| help | ||||||
| Initialization priority of the routine within the PRE_KERNEL1 level. | ||||||
| This priority must be greater than GPIO_INIT_PRIORITY and lower than | ||||||
| UART_INIT_PRIORITY. | ||||||
|
|
||||||
| config STM32_WKUP_PINS | ||||||
| bool "STM32 PWR Wake-up Pins" | ||||||
| depends on DT_HAS_ST_STM32_PWR_ENABLED | ||||||
| help | ||||||
| Enable support for STM32 PWR wake-up pins. | ||||||
|
|
||||||
| config STM32_BACKUP_PROTECTION | ||||||
| bool "SoC has backup domain protection access" | ||||||
| help | ||||||
| Enabled for SoCs for which access protection to backup domain | ||||||
| resources needs to be explicitly handled. | ||||||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit unclear. what about: