Use absolute paths for bootloader binaries

pull/4521/head
Jimmy Brisson 2017-06-07 15:00:53 -05:00 committed by adbridge
parent 98bb2472fd
commit 42bfa06b48
1 changed files with 4 additions and 4 deletions

View File

@ -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, exists from os.path import dirname, abspath, exists, join
import sys import sys
from collections import namedtuple from collections import namedtuple
from os.path import splitext, relpath from os.path import splitext, relpath
@ -526,11 +526,11 @@ class Config(object):
raise ConfigException( raise ConfigException(
"Bootloader build requested but no bootlader configuration") "Bootloader build requested but no bootlader configuration")
@staticmethod def _generate_booloader_build(self, target_overrides, rom_start, rom_size):
def _generate_booloader_build(target_overrides, rom_start, rom_size):
start = 0 start = 0
if 'target.bootloader_img' in target_overrides: if 'target.bootloader_img' in target_overrides:
filename = target_overrides['target.bootloader_img'] basedir = abspath(dirname(self.app_config_location))
filename = join(basedir, target_overrides['target.bootloader_img'])
if not exists(filename): if not exists(filename):
raise ConfigException("Bootloader %s not found" % filename) raise ConfigException("Bootloader %s not found" % filename)
part = intelhex_offset(filename, offset=rom_start) part = intelhex_offset(filename, offset=rom_start)