diff --git a/cmake/linker/iar/config_file_script.cmake b/cmake/linker/iar/config_file_script.cmake index 60332fb5d7e..e77c44739cf 100644 --- a/cmake/linker/iar/config_file_script.cmake +++ b/cmake/linker/iar/config_file_script.cmake @@ -98,7 +98,7 @@ function(process_region) ) endif() # Treat BSS to be noinit - if(type STREQUAL BSS) + if(CONFIG_IAR_ZEPHYR_INIT AND type STREQUAL BSS) set_property(GLOBAL PROPERTY ${section}_NOINIT TRUE) endif() endforeach() # all sections