File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -479,7 +479,15 @@ def regions(self):
479
479
"""Generate a list of regions from the config"""
480
480
if not self .target .bootloader_supported :
481
481
raise ConfigException ("Bootloader not supported on this target." )
482
- cmsis_part = Cache (False , False ).index [self .target .device_name ]
482
+ if not hasattr (self .target , "device_name" ):
483
+ raise ConfigException ("Bootloader not supported on this target: "
484
+ "targets.json `device_name` not specified." )
485
+ cache = Cache (False , False )
486
+ if self .target .device_name not in cache .index :
487
+ raise ConfigException ("Bootloader not supported on this target: "
488
+ "targets.json `device_name` not found in "
489
+ "arm_pack_manager index." )
490
+ cmsis_part = cache .index [self .target .device_name ]
483
491
start = 0
484
492
target_overrides = self .app_config_data ['target_overrides' ].get (
485
493
self .target .name , {})
You can’t perform that action at this time.
0 commit comments