diff --git a/cmake/linker/iar/config_file_script.cmake b/cmake/linker/iar/config_file_script.cmake index 2877fcaa1d3..25d14a5d12f 100644 --- a/cmake/linker/iar/config_file_script.cmake +++ b/cmake/linker/iar/config_file_script.cmake @@ -440,6 +440,8 @@ function(section_to_string) get_property(endalign GLOBAL PROPERTY ${STRING_SECTION}_ENDALIGN) get_property(vma GLOBAL PROPERTY ${STRING_SECTION}_VMA) get_property(lma GLOBAL PROPERTY ${STRING_SECTION}_LMA) + get_property(min_size GLOBAL PROPERTY ${STRING_SECTION}_MIN_SIZE) + get_property(max_size GLOBAL PROPERTY ${STRING_SECTION}_MAX_SIZE) get_property(noinput GLOBAL PROPERTY ${STRING_SECTION}_NOINPUT) get_property(noinit GLOBAL PROPERTY ${STRING_SECTION}_NOINIT) @@ -543,6 +545,12 @@ function(section_to_string) if(endalign) set(TEMP "${TEMP}, end alignment=${endalign}") endif() + if(DEFINED min_size) + set(TEMP "${TEMP}, minimum size=${min_size}") + endif() + if(DEFINED max_size) + set(TEMP "${TEMP}, maximum size=${max_size}") + endif() set(TEMP "${TEMP}\n{") @@ -597,6 +605,9 @@ function(section_to_string) get_property(flags GLOBAL PROPERTY ${STRING_SECTION}_SETTING_${idx}_FLAGS) get_property(input GLOBAL PROPERTY ${STRING_SECTION}_SETTING_${idx}_INPUT) get_property(symbols GLOBAL PROPERTY ${STRING_SECTION}_SETTING_${idx}_SYMBOLS) + get_property(i_min_size GLOBAL PROPERTY ${STRING_SECTION}_SETTING_${idx}_MIN_SIZE) + get_property(i_max_size GLOBAL PROPERTY ${STRING_SECTION}_SETTING_${idx}_MAX_SIZE) + # Get the next offset and use that as this ones size! get_property(offset GLOBAL PROPERTY ${STRING_SECTION}_SETTING_${idx_next}_OFFSET) @@ -682,6 +693,12 @@ function(section_to_string) else() list(APPEND block_attr "alignment=4") endif() + if(DEFINED i_min_size AND NOT i_min_size EQUAL 0) + list(APPEND block_attr "minimum size = ${i_min_size}") + endif() + if(DEFINED i_max_size ) + list(APPEND block_attr "maximum size = ${i_max_size}") + endif() # LD # There are two ways to include more than one section: