mirror of https://github.com/ARMmbed/mbed-os.git
commit
6f403217c6
|
@ -8121,7 +8121,7 @@
|
|||
"public-ram-start": "0x08047600",
|
||||
"public-ram-size": "0x200"
|
||||
},
|
||||
"device_name": "CY8C6247BZI-D54",
|
||||
"sectors": [[268435456, 512]],
|
||||
"bootloader_supported": true
|
||||
},
|
||||
"CY8CMOD_062_4343W": {
|
||||
|
@ -8153,7 +8153,7 @@
|
|||
"post_binary_hook": {
|
||||
"function": "PSOC6Code.complete"
|
||||
},
|
||||
"device_name": "CY8C6347BZI-BLD53",
|
||||
"sectors": [[268443648, 512]],
|
||||
"bootloader_supported": true
|
||||
},
|
||||
"CY8CKIT_062_4343W": {
|
||||
|
|
|
@ -462778,56 +462778,5 @@
|
|||
],
|
||||
"vendor": "Nordic Semiconductor:54"
|
||||
},
|
||||
"CY8C6347BZI-BLD53": {
|
||||
"core": "Cortex-M4",
|
||||
"vendor": "Cypress",
|
||||
"sectors": [
|
||||
[
|
||||
268435456,
|
||||
512
|
||||
]
|
||||
],
|
||||
"memories": {
|
||||
"IROM1": {
|
||||
"access": {
|
||||
"execute": true,
|
||||
"non_secure": true,
|
||||
"non_secure_callable": false,
|
||||
"peripheral": false,
|
||||
"read": true,
|
||||
"secure": false,
|
||||
"write": true
|
||||
},
|
||||
"default": true,
|
||||
"start": "0x10002000",
|
||||
"size": "0x000FE000"
|
||||
}
|
||||
}
|
||||
},
|
||||
"CY8C6247BZI-D54": {
|
||||
"core": "Cortex-M4",
|
||||
"vendor": "Cypress",
|
||||
"sectors": [
|
||||
[
|
||||
268435456,
|
||||
512
|
||||
]
|
||||
],
|
||||
"memories": {
|
||||
"IROM1": {
|
||||
"access": {
|
||||
"execute": true,
|
||||
"non_secure": true,
|
||||
"non_secure_callable": false,
|
||||
"peripheral": false,
|
||||
"read": true,
|
||||
"secure": false,
|
||||
"write": true
|
||||
},
|
||||
"start": "0x10040000",
|
||||
"size": "0xB8000"
|
||||
}
|
||||
}
|
||||
},
|
||||
"version": "0.2.0"
|
||||
}
|
||||
|
|
|
@ -649,11 +649,16 @@ class Config(object):
|
|||
@property
|
||||
def sectors(self):
|
||||
"""Return a list of tuples of sector start,size"""
|
||||
try:
|
||||
return self.target.sectors
|
||||
except AttributeError:
|
||||
cache = Cache(False, False)
|
||||
if self.target.device_name not in cache.index:
|
||||
raise ConfigException("Bootloader not supported on this target: "
|
||||
raise ConfigException(
|
||||
"Bootloader not supported on this target: "
|
||||
"targets.json `device_name` not found in "
|
||||
"arm_pack_manager index.")
|
||||
"arm_pack_manager index."
|
||||
)
|
||||
cmsis_part = cache.index[self.target.device_name]
|
||||
sectors = cmsis_part['sectors']
|
||||
if sectors:
|
||||
|
@ -745,25 +750,6 @@ class Config(object):
|
|||
|
||||
try:
|
||||
cmsis_part = self._get_cmsis_part()
|
||||
except ConfigException:
|
||||
""" If the target doesn't exits in cmsis, but present in targets.json
|
||||
with ram and rom start/size defined"""
|
||||
start, size = self._get_primary_memory_override(
|
||||
active_memory.lower()
|
||||
)
|
||||
if not start:
|
||||
raise ConfigException(
|
||||
"Bootloader not supported on this target. {} "
|
||||
"start not found in targets.json.".format(active_memory)
|
||||
)
|
||||
if not size:
|
||||
raise ConfigException(
|
||||
"Bootloader not supported on this target. {} "
|
||||
"size not found in targets.json.".format(active_memory)
|
||||
)
|
||||
available_memories[active_memory] = [start, size]
|
||||
return available_memories
|
||||
|
||||
present_memories = set(cmsis_part['memories'].keys())
|
||||
valid_memories = set(memory_list).intersection(present_memories)
|
||||
|
||||
|
@ -800,7 +786,31 @@ class Config(object):
|
|||
mem_size = int(mem_size, 0)
|
||||
available_memories[memory] = [mem_start, mem_size]
|
||||
|
||||
if not available_memories:
|
||||
raise ConfigException(
|
||||
"Bootloader not supported on this target. "
|
||||
"No memories found."
|
||||
)
|
||||
return available_memories
|
||||
except ConfigException:
|
||||
""" If the target doesn't exits in cmsis, but present in targets.json
|
||||
with ram and rom start/size defined"""
|
||||
start, size = self._get_primary_memory_override(
|
||||
active_memory.lower()
|
||||
)
|
||||
if not start:
|
||||
raise ConfigException(
|
||||
"Bootloader not supported on this target. {} "
|
||||
"start not found in targets.json.".format(active_memory)
|
||||
)
|
||||
if not size:
|
||||
raise ConfigException(
|
||||
"Bootloader not supported on this target. {} "
|
||||
"size not found in targets.json.".format(active_memory)
|
||||
)
|
||||
available_memories[active_memory] = [start, size]
|
||||
return available_memories
|
||||
|
||||
|
||||
@property
|
||||
def ram_regions(self):
|
||||
|
|
Loading…
Reference in New Issue