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 @@ -497,7 +497,15 @@ def regions(self):
497
497
"""Generate a list of regions from the config"""
498
498
if not self .target .bootloader_supported :
499
499
raise ConfigException ("Bootloader not supported on this target." )
500
- cmsis_part = Cache (False , False ).index [self .target .device_name ]
500
+ if not hasattr (self .target , "device_name" ):
501
+ raise ConfigException ("Bootloader not supported on this target: "
502
+ "targets.json `device_name` not specified." )
503
+ cache = Cache (False , False )
504
+ if self .target .device_name not in cache .index :
505
+ raise ConfigException ("Bootloader not supported on this target: "
506
+ "targets.json `device_name` not found in "
507
+ "arm_pack_manager index." )
508
+ cmsis_part = cache .index [self .target .device_name ]
501
509
target_overrides = self .app_config_data ['target_overrides' ].get (
502
510
self .target .name , {})
503
511
if (('target.bootloader_img' in target_overrides or
You can’t perform that action at this time.
0 commit comments