Merge pull request #12059 from 0xc0170/JammuKekkonen-remove_hiding_config_errors

Config: fix bootloader config errors - propagate errors
pull/12080/head
Anna Bridge 2019-12-10 18:33:59 +00:00 committed by GitHub
commit 0c227a0756
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 59 additions and 70 deletions

View File

@ -26,7 +26,7 @@ ITCM-RAM: 16K (0x3FFF) @0x00000000
if (!isdefinedsymbol(MBED_ROM_START)) { define symbol MBED_ROM_START = 0x8000000; }
if (!isdefinedsymbol(MBED_ROM_SIZE)) { define symbol MBED_ROM_SIZE = 0x200000; }
if (!isdefinedsymbol(MBED_RAM_START)) { define symbol MBED_RAM_START = 0x20010000; }
if (!isdefinedsymbol(MBED_RAM_START)) { define symbol MBED_RAM_SIZE = 0x40000; }
if (!isdefinedsymbol(MBED_RAM_SIZE)) { define symbol MBED_RAM_SIZE = 0x40000; }
if (!isdefinedsymbol(MBED_RAM1_START)) { define symbol MBED_RAM1_START = 0x20000000; }
if (!isdefinedsymbol(MBED_RAM1_SIZE)) { define symbol MBED_RAM1_SIZE = 0x10000; }

View File

@ -26,7 +26,7 @@ ITCM-RAM: 16K (0x3FFF) @0x00000000
if (!isdefinedsymbol(MBED_ROM_START)) { define symbol MBED_ROM_START = 0x8000000; }
if (!isdefinedsymbol(MBED_ROM_SIZE)) { define symbol MBED_ROM_SIZE = 0x200000; }
if (!isdefinedsymbol(MBED_RAM_START)) { define symbol MBED_RAM_START = 0x20010000; }
if (!isdefinedsymbol(MBED_RAM_START)) { define symbol MBED_RAM_SIZE = 0x40000; }
if (!isdefinedsymbol(MBED_RAM_SIZE)) { define symbol MBED_RAM_SIZE = 0x40000; }
if (!isdefinedsymbol(MBED_RAM1_START)) { define symbol MBED_RAM1_START = 0x20000000; }
if (!isdefinedsymbol(MBED_RAM1_SIZE)) { define symbol MBED_RAM1_SIZE = 0x10000; }

View File

@ -26,7 +26,7 @@ ITCM-RAM: 16K (0x3FFF) @0x00000000
if (!isdefinedsymbol(MBED_ROM_START)) { define symbol MBED_ROM_START = 0x8000000; }
if (!isdefinedsymbol(MBED_ROM_SIZE)) { define symbol MBED_ROM_SIZE = 0x200000; }
if (!isdefinedsymbol(MBED_RAM_START)) { define symbol MBED_RAM_START = 0x20020000; }
if (!isdefinedsymbol(MBED_RAM_START)) { define symbol MBED_RAM_SIZE = 0x60000; }
if (!isdefinedsymbol(MBED_RAM_SIZE)) { define symbol MBED_RAM_SIZE = 0x60000; }
if (!isdefinedsymbol(MBED_RAM1_START)) { define symbol MBED_RAM1_START = 0x20000000; }
if (!isdefinedsymbol(MBED_RAM1_SIZE)) { define symbol MBED_RAM1_SIZE = 0x20000; }

View File

@ -26,7 +26,7 @@ ITCM-RAM: 16K (0x3FFF) @0x00000000
if (!isdefinedsymbol(MBED_ROM_START)) { define symbol MBED_ROM_START = 0x8000000; }
if (!isdefinedsymbol(MBED_ROM_SIZE)) { define symbol MBED_ROM_SIZE = 0x200000; }
if (!isdefinedsymbol(MBED_RAM_START)) { define symbol MBED_RAM_START = 0x20020000; }
if (!isdefinedsymbol(MBED_RAM_START)) { define symbol MBED_RAM_SIZE = 0x60000; }
if (!isdefinedsymbol(MBED_RAM_SIZE)) { define symbol MBED_RAM_SIZE = 0x60000; }
if (!isdefinedsymbol(MBED_RAM1_START)) { define symbol MBED_RAM1_START = 0x20000000; }
if (!isdefinedsymbol(MBED_RAM1_SIZE)) { define symbol MBED_RAM1_SIZE = 0x20000; }

View File

@ -5878,7 +5878,7 @@
"device_has_add": ["USBDEVICE", "EMAC", "FLASH", "LPTICKER"],
"release_versions": ["2", "5"],
"device_name": "R7S72100",
"bootloader_supported": true
"bootloader_supported": false
},
"VK_RZ_A1H": {
"inherits": ["RZ_A1XX"],
@ -5895,7 +5895,7 @@
"device_has_remove": ["ETHERNET"],
"release_versions": ["2", "5"],
"device_name": "R7S72103",
"bootloader_supported": true,
"bootloader_supported": false,
"overrides": {
"network-default-interface-type": null
}
@ -6753,7 +6753,8 @@
},
"overrides": {
"network-default-interface-type": "MESH"
}
},
"bootloader_supported": false
},
"EFM32PG12B500F1024GL125": {
"inherits": ["EFM32"],
@ -8475,7 +8476,7 @@
"MPU"
],
"release_versions": ["2", "5"],
"bootloader_supported": true
"bootloader_supported": false
},
"NUCLEO_WB55RG": {
"inherits": ["FAMILY_STM32"],
@ -8509,7 +8510,7 @@
],
"features": ["BLE"],
"release_versions": ["2", "5"],
"bootloader_supported": true
"bootloader_supported": false
},
"VBLUNO52": {
"supported_form_factors": ["ARDUINO"],
@ -9184,7 +9185,7 @@
"post_binary_hook": {
"function": "PSOC6Code.complete"
},
"bootloader_supported": true,
"bootloader_supported": false,
"sectors": [[268435456, 512]],
"overrides": {
"network-default-interface-type": "WIFI"
@ -9197,7 +9198,7 @@
"post_binary_hook": {
"function": "PSOC6Code.complete"
},
"bootloader_supported": true,
"bootloader_supported": false,
"sectors": [[268435456, 512]]
},
"CY8CPROTO_062S3_4343W": {
@ -9229,7 +9230,7 @@
"function": "PSOC6Code.complete"
},
"sectors": [[268443648, 512]],
"bootloader_supported": true
"bootloader_supported": false
},
"CY8CPROTO_063_BLE": {
"inherits": ["MCU_PSOC6_M4"],
@ -9245,7 +9246,7 @@
"function": "PSOC6Code.complete"
},
"sectors": [[268443648, 512]],
"bootloader_supported": true
"bootloader_supported": false
},
"CY8CPROTO_064_SB": {
"inherits": ["MCU_PSOC6_M4"],
@ -9279,7 +9280,7 @@
"post_binary_hook": {
"function": "PSOC6Code.complete"
},
"bootloader_supported": true,
"bootloader_supported": false,
"sectors": [[268435456, 512]],
"overrides": {
"network-default-interface-type": "WIFI"
@ -9461,15 +9462,10 @@
"inherits": ["RDA5981X"],
"detect_code": ["8001"],
"components_add": ["FLASHIAP"],
"bootloader_supported": true,
"mbed_ram_start": "0x00100080",
"mbed_ram_size": "0x1ff80",
"mbed_rom_start": "0x18001000",
"mbed_rom_size": "0x1F4000",
"sectors": [[0,4096]],
"overrides": {
"network-default-interface-type" : "WIFI"
}
},
"bootloader_supported": false
},
"GD32_Target": {
"inherits": ["Target"],

View File

@ -894,63 +894,56 @@ class mbedToolchain(with_metaclass(ABCMeta, object)):
def add_regions(self):
"""Add regions to the build profile, if there are any.
"""
if not getattr(self.target, "bootloader_supported", False):
return
if self.config.has_regions:
try:
regions = list(self.config.regions)
regions.sort(key=lambda x: x.start)
self.notify.info("Using ROM region%s %s in this build." % (
"s" if len(regions) > 1 else "",
", ".join(r.name for r in regions)
))
self._add_all_regions(regions, "MBED_APP")
except ConfigException:
pass
regions = list(self.config.regions)
regions.sort(key=lambda x: x.start)
self.notify.info("Using ROM region%s %s in this build." % (
"s" if len(regions) > 1 else "",
", ".join(r.name for r in regions)
))
self._add_all_regions(regions, "MBED_APP")
if self.config.has_ram_regions:
try:
regions = list(self.config.ram_regions)
self.notify.info("Using RAM region%s %s in this build." % (
"s" if len(regions) > 1 else "",
", ".join(r.name for r in regions)
))
self._add_all_regions(regions, None)
except ConfigException:
pass
regions = list(self.config.ram_regions)
self.notify.info("Using RAM region%s %s in this build." % (
"s" if len(regions) > 1 else "",
", ".join(r.name for r in regions)
))
self._add_all_regions(regions, None)
Region = namedtuple("Region", "name start size")
try:
# Add all available ROM regions to build profile
if not getattr(self.target, "static_memory_defines", False):
raise ConfigException()
rom_available_regions = self.config.get_all_active_memories(
ROM_ALL_MEMORIES
# Add all available ROM regions to build profile
if not getattr(self.target, "static_memory_defines", False):
raise ConfigException()
rom_available_regions = self.config.get_all_active_memories(
ROM_ALL_MEMORIES
)
for key, value in rom_available_regions.items():
rom_start, rom_size = value
self._add_defines_from_region(
Region("MBED_" + key, rom_start, rom_size),
True,
suffixes=["_START", "_SIZE"]
)
for key, value in rom_available_regions.items():
rom_start, rom_size = value
self._add_defines_from_region(
Region("MBED_" + key, rom_start, rom_size),
True,
suffixes=["_START", "_SIZE"]
)
except ConfigException:
pass
try:
# Add all available RAM regions to build profile
if not getattr(self.target, "static_memory_defines", False):
raise ConfigException()
ram_available_regions = self.config.get_all_active_memories(
RAM_ALL_MEMORIES
# Add all available RAM regions to build profile
if not getattr(self.target, "static_memory_defines", False):
raise ConfigException()
ram_available_regions = self.config.get_all_active_memories(
RAM_ALL_MEMORIES
)
for key, value in ram_available_regions.items():
ram_start, ram_size = value
self._add_defines_from_region(
Region("MBED_" + key, ram_start, ram_size),
True,
suffixes=["_START", "_SIZE"]
)
for key, value in ram_available_regions.items():
ram_start, ram_size = value
self._add_defines_from_region(
Region("MBED_" + key, ram_start, ram_size),
True,
suffixes=["_START", "_SIZE"]
)
except ConfigException:
pass
STACK_PARAM = "target.boot-stack-size"
TFM_LVL_PARAM = "tfm.level"