@@ -545,11 +545,11 @@ def regions(self):
545
545
rom_start = int (cmsis_part ['memory' ]['PROGRAM_FLASH' ]['start' ], 0 )
546
546
except KeyError :
547
547
raise ConfigException ("Not enough information in CMSIS packs to "
548
- "build a bootloader project" )
548
+ "build a bootloader project" )
549
549
if ('target.bootloader_img' in target_overrides or
550
550
'target.restrict_size' in target_overrides ):
551
551
return self ._generate_bootloader_build (target_overrides ,
552
- rom_start , rom_size )
552
+ rom_start , rom_size )
553
553
elif ('target.mbed_app_start' in target_overrides or
554
554
'target.mbed_app_size' in target_overrides ):
555
555
return self ._generate_linker_overrides (target_overrides ,
@@ -559,7 +559,7 @@ def regions(self):
559
559
"Bootloader build requested but no bootlader configuration" )
560
560
561
561
def _generate_bootloader_build (self , target_overrides , rom_start , rom_size ):
562
- start = 0
562
+ start = rom_start
563
563
if 'target.bootloader_img' in target_overrides :
564
564
basedir = abspath (dirname (self .app_config_location ))
565
565
filename = join (basedir , target_overrides ['target.bootloader_img' ])
@@ -579,7 +579,7 @@ def _generate_bootloader_build(self, target_overrides, rom_start, rom_size):
579
579
new_size = Config ._align_floor (start + new_size , self .sectors ) - start
580
580
yield Region ("application" , start , new_size , True , None )
581
581
start += new_size
582
- yield Region ("post_application" , rom_start + start , rom_size - start ,
582
+ yield Region ("post_application" , start , rom_size - start ,
583
583
False , None )
584
584
else :
585
585
yield Region ("application" , start , rom_size - start ,
0 commit comments