diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F746xG/device/TOOLCHAIN_IAR/stm32f746xg.icf b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F746xG/device/TOOLCHAIN_IAR/stm32f746xg.icf index e7292de12d..75f36e1994 100644 --- a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F746xG/device/TOOLCHAIN_IAR/stm32f746xg.icf +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F746xG/device/TOOLCHAIN_IAR/stm32f746xg.icf @@ -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; } diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F756xG/device/TOOLCHAIN_IAR/stm32f756xg.icf b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F756xG/device/TOOLCHAIN_IAR/stm32f756xg.icf index 57d4931f20..da7d15e558 100644 --- a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F756xG/device/TOOLCHAIN_IAR/stm32f756xg.icf +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F756xG/device/TOOLCHAIN_IAR/stm32f756xg.icf @@ -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; } diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F767xI/device/TOOLCHAIN_IAR/stm32f767xi.icf b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F767xI/device/TOOLCHAIN_IAR/stm32f767xi.icf index e313c6f835..1b00062728 100644 --- a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F767xI/device/TOOLCHAIN_IAR/stm32f767xi.icf +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F767xI/device/TOOLCHAIN_IAR/stm32f767xi.icf @@ -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; } diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F769xI/device/TOOLCHAIN_IAR/stm32f769xi.icf b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F769xI/device/TOOLCHAIN_IAR/stm32f769xi.icf index 6a7d9b9bad..fae99e64d4 100644 --- a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F769xI/device/TOOLCHAIN_IAR/stm32f769xi.icf +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F769xI/device/TOOLCHAIN_IAR/stm32f769xi.icf @@ -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; } diff --git a/targets/targets.json b/targets/targets.json index b5f758743e..1040f6fd55 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -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"], diff --git a/tools/toolchains/mbed_toolchain.py b/tools/toolchains/mbed_toolchain.py index ae91e12b99..52ca8da35a 100755 --- a/tools/toolchains/mbed_toolchain.py +++ b/tools/toolchains/mbed_toolchain.py @@ -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"