diff --git a/templates/base.lds b/templates/base.lds index 7bba3f0..6a9f61b 100644 --- a/templates/base.lds +++ b/templates/base.lds @@ -87,22 +87,10 @@ SECTIONS * certain core features */ PROVIDE(__metal_chicken_bit = {{ chicken_bit|default(0) }}); -{% if eccscrub_en %} +{% if eccscrub_bit != 0 %} /* The memory_ecc_scrub bit is used by _entry code to enable/disable * memories scrubbing to zero */ - PROVIDE(__metal_eccscrub_bit = {{ eccscrub_bit|default(0) }}); - - /* The RAM memories map for ECC scrubbing */ -{% for memory in ram_memories %} - {% if '0x10000' in memory["length_hex"]: %} - /* Default zero-scrub to at most 64KB, for limiting RTL simulation run time. */ - /* User is recommended to enable the full size for manual RTL simulation run! */ - {% endif %} - PROVIDE( metal_{{ memory.name }}_memory_start = {{ memory.base_hex }} ); - PROVIDE( metal_{{ memory.name }}_memory_end = {{ memory.base_hex }} + {{ memory.length_hex }} ); -{% endfor %} -{% else %} - PROVIDE(__metal_eccscrub_bit = 0); + PROVIDE(__metal_eccscrub_bit = {{ eccscrub_bit }}); {% endif %} /* ROM SECTION diff --git a/templates/default.lds b/templates/default.lds index bf9b576..8f65bc8 100644 --- a/templates/default.lds +++ b/templates/default.lds @@ -11,4 +11,3 @@ # Set layout options #} {% set ramrodata = False %} -{% set eccscrub_en = True %} diff --git a/templates/freertos.lds b/templates/freertos.lds index 6ff2fb1..df90c93 100644 --- a/templates/freertos.lds +++ b/templates/freertos.lds @@ -15,7 +15,6 @@ #} {% set ramrodata = False %} {% set privilege_en = True %} -{% set eccscrub_en = True %} {% block privileged_function_section %} .privileged_functions : ALIGN (32) { diff --git a/templates/ramrodata.lds b/templates/ramrodata.lds index f01d563..80d18c7 100644 --- a/templates/ramrodata.lds +++ b/templates/ramrodata.lds @@ -15,7 +15,6 @@ # Set layout options #} {% set ramrodata = True %} -{% set eccscrub_en = True %} {% block force_itim %} {% if text_in_itim %} diff --git a/templates/scratchpad.lds b/templates/scratchpad.lds index dfb4cc0..b57b922 100644 --- a/templates/scratchpad.lds +++ b/templates/scratchpad.lds @@ -12,4 +12,3 @@ # Set layout options #} {% set ramrodata = False %} -{% set eccscrub_en = False %}