mirror of https://github.com/ARMmbed/mbed-os.git
Error when bootloader is specified but does not exist
The changes to build_api.py make the error happen when running things like get_config.pypull/4136/head
parent
bc58c1ba2d
commit
2a84ddd6e4
|
@ -145,6 +145,8 @@ def get_config(src_paths, target, toolchain_name):
|
||||||
|
|
||||||
prev_features = features
|
prev_features = features
|
||||||
toolchain.config.validate_config()
|
toolchain.config.validate_config()
|
||||||
|
if toolchain.config.has_regions:
|
||||||
|
_ = list(toolchain.config.regions)
|
||||||
|
|
||||||
cfg, macros = toolchain.config.get_config_data()
|
cfg, macros = toolchain.config.get_config_data()
|
||||||
features = toolchain.config.get_features()
|
features = toolchain.config.get_features()
|
||||||
|
|
|
@ -17,7 +17,7 @@ limitations under the License.
|
||||||
|
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
import os
|
import os
|
||||||
from os.path import dirname, abspath
|
from os.path import dirname, abspath, exists
|
||||||
import sys
|
import sys
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from os.path import splitext
|
from os.path import splitext
|
||||||
|
@ -506,6 +506,8 @@ class Config(object):
|
||||||
"build a bootloader project")
|
"build a bootloader project")
|
||||||
if 'target.bootloader_img' in target_overrides:
|
if 'target.bootloader_img' in target_overrides:
|
||||||
filename = target_overrides['target.bootloader_img']
|
filename = target_overrides['target.bootloader_img']
|
||||||
|
if not exists(filename):
|
||||||
|
raise ConfigException("Bootloader %s not found" % filename)
|
||||||
part = intelhex_offset(filename, offset=rom_start)
|
part = intelhex_offset(filename, offset=rom_start)
|
||||||
if part.minaddr() != rom_start:
|
if part.minaddr() != rom_start:
|
||||||
raise ConfigException("bootloader executable does not "
|
raise ConfigException("bootloader executable does not "
|
||||||
|
|
Loading…
Reference in New Issue