Skip to content

Commit ea7561d

Browse files
authored
Merge pull request #4494 from theotherjimmy/absolute-bootloader-paths
Use absolute paths for bootloader binaries
2 parents 644cdee + 9c2626f commit ea7561d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/config/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
from copy import deepcopy
1919
import os
20-
from os.path import dirname, abspath, exists
20+
from os.path import dirname, abspath, exists, join
2121
import sys
2222
from collections import namedtuple
2323
from os.path import splitext, relpath
@@ -526,11 +526,11 @@ def regions(self):
526526
raise ConfigException(
527527
"Bootloader build requested but no bootlader configuration")
528528

529-
@staticmethod
530-
def _generate_booloader_build(target_overrides, rom_start, rom_size):
529+
def _generate_booloader_build(self, target_overrides, rom_start, rom_size):
531530
start = 0
532531
if 'target.bootloader_img' in target_overrides:
533-
filename = target_overrides['target.bootloader_img']
532+
basedir = abspath(dirname(self.app_config_location))
533+
filename = join(basedir, target_overrides['target.bootloader_img'])
534534
if not exists(filename):
535535
raise ConfigException("Bootloader %s not found" % filename)
536536
part = intelhex_offset(filename, offset=rom_start)

0 commit comments

Comments
 (0)