Skip to content

Commit

Permalink
Fix MBED_RAM_START/MBED_RAM_SIZE symbol generation
Browse files Browse the repository at this point in the history
1. Fix MBED_RAM_START/MBED_RAM_SIZE are not generated when there are
   target.mbed_ram_start/target.mbed_ram_size overrides
2. Fix MBED_RAM_START/MBED_RAM_SIZE are duplicated.
  • Loading branch information
ccli8 committed Mar 26, 2019
1 parent f87a3e9 commit da7035e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions tools/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,8 +768,6 @@ def get_all_active_memories(self, memory_list):
mem_size = size
memory = 'ROM'
elif memory in ['IRAM1', 'SRAM_OC', 'SRAM_UPPER', 'SRAM']:
if (self.has_ram_regions):
continue
start, size = self._get_primary_memory_override("ram")
if start:
mem_start = start
Expand Down
4 changes: 2 additions & 2 deletions tools/toolchains/mbed_toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ def _add_defines_from_region(
def _add_all_regions(self, region_list, active_region_name):
for region in region_list:
self._add_defines_from_region(region)
if region.active:
if region.active and active_region_name:
for define in [
("%s_START" % active_region_name,
"0x%x" % region.start),
Expand Down Expand Up @@ -874,7 +874,7 @@ def add_regions(self):
"s" if len(regions) > 1 else "",
", ".join(r.name for r in regions)
))
self._add_all_regions(regions, "MBED_RAM")
self._add_all_regions(regions, None)
except ConfigException:
pass

Expand Down

0 comments on commit da7035e

Please sign in to comment.