Skip to content

Commit e8bec34

Browse files
committed
[nrf fromlist] arch: kconfig: Deprecatee SRAM_SIZE and SRAM_BASE_ADDRESS
Deprecates these Kconfigs and emits a deprecated warning when either of them are changed from their defaults (on a different symbol, due to Kconfig limitations) Upstream PR #: 107874 Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
1 parent bec9d2d commit e8bec34

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

arch/Kconfig

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@ config 64BIT
225225

226226
config SRAM_DEPRECATED_KCONFIG_SET
227227
bool
228+
default y if SRAM_SIZE != $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_SRAM),0,K)
229+
default y if SRAM_BASE_ADDRESS != $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_SRAM))
230+
default n
231+
select DEPRECATED
228232
help
229233
Indicates that either `CONFIG_SRAM_SIZE` or `CONFIG_SRAM_BASE_ADDRESS` have been
230234
manually set, these Kconfigs are now deprecated and should be replaced by referencing
@@ -234,7 +238,7 @@ config SRAM_DEPRECATED_KCONFIG_SET
234238
DT_CHOSEN_Z_SRAM := zephyr,sram
235239

236240
config SRAM_SIZE
237-
int "SRAM Size in kB"
241+
int "SRAM Size in kB [DEPRECATED]"
238242
default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_SRAM),0,K)
239243
help
240244
The SRAM size in kB. The default value comes from /chosen/zephyr,sram in
@@ -243,7 +247,7 @@ config SRAM_SIZE
243247
the devicetree `zephyr,sram` chosen node instead.
244248

245249
config SRAM_BASE_ADDRESS
246-
hex "SRAM Base Address"
250+
hex "SRAM Base Address [DEPRECATED]"
247251
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_SRAM))
248252
help
249253
The SRAM base address. The default value comes from

0 commit comments

Comments
 (0)