Skip to content

Commit 542bceb

Browse files
committed
Use notify API in post-build scripts
1 parent 6b501b5 commit 542bceb

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tools/targets/__init__.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ class LPCTargetCode(object):
370370
@staticmethod
371371
def lpc_patch(t_self, resources, elf, binf):
372372
"""Patch an elf file"""
373-
t_self.debug("LPC Patch: %s" % os.path.split(binf)[1])
373+
t_self.notify.debug("LPC Patch: %s" % os.path.split(binf)[1])
374374
patch(binf)
375375

376376
class LPC4088Code(object):
@@ -404,7 +404,7 @@ def binary_hook(t_self, resources, elf, binf):
404404
# file to 'binf'
405405
shutil.rmtree(binf, True)
406406
os.rename(binf + '.temp', binf)
407-
t_self.debug("Generated custom binary file (internal flash + SPIFI)")
407+
t_self.notify.debug("Generated custom binary file (internal flash + SPIFI)")
408408
LPCTargetCode.lpc_patch(t_self, resources, elf, binf)
409409

410410
class TEENSY3_1Code(object):
@@ -471,8 +471,8 @@ def binary_hook(t_self, resources, _, binf):
471471
in t_self.target.EXPECTED_SOFTDEVICES_WITH_OFFSETS:
472472
for hexf in resources.hex_files:
473473
if hexf.find(softdevice_and_offset_entry['name']) != -1:
474-
t_self.debug("SoftDevice file found %s."
475-
% softdevice_and_offset_entry['name'])
474+
t_self.notify.debug("SoftDevice file found %s."
475+
% softdevice_and_offset_entry['name'])
476476
sdf = hexf
477477

478478
if sdf is not None:
@@ -481,7 +481,7 @@ def binary_hook(t_self, resources, _, binf):
481481
break
482482

483483
if sdf is None:
484-
t_self.debug("Hex file not found. Aborting.")
484+
t_self.notify.debug("Hex file not found. Aborting.")
485485
return
486486

487487
# Look for bootloader file that matches this soft device or bootloader
@@ -490,13 +490,13 @@ def binary_hook(t_self, resources, _, binf):
490490
if t_self.target.MERGE_BOOTLOADER is True:
491491
for hexf in resources.hex_files:
492492
if hexf.find(t_self.target.OVERRIDE_BOOTLOADER_FILENAME) != -1:
493-
t_self.debug("Bootloader file found %s."
494-
% t_self.target.OVERRIDE_BOOTLOADER_FILENAME)
493+
t_self.notify.debug("Bootloader file found %s."
494+
% t_self.target.OVERRIDE_BOOTLOADER_FILENAME)
495495
blf = hexf
496496
break
497497
elif hexf.find(softdevice_and_offset_entry['boot']) != -1:
498-
t_self.debug("Bootloader file found %s."
499-
% softdevice_and_offset_entry['boot'])
498+
t_self.notify.debug("Bootloader file found %s."
499+
% softdevice_and_offset_entry['boot'])
500500
blf = hexf
501501
break
502502

@@ -510,13 +510,13 @@ def binary_hook(t_self, resources, _, binf):
510510
binh.loadbin(binf, softdevice_and_offset_entry['offset'])
511511

512512
if t_self.target.MERGE_SOFT_DEVICE is True:
513-
t_self.debug("Merge SoftDevice file %s"
514-
% softdevice_and_offset_entry['name'])
513+
t_self.notify.debug("Merge SoftDevice file %s"
514+
% softdevice_and_offset_entry['name'])
515515
sdh = IntelHex(sdf)
516516
binh.merge(sdh)
517517

518518
if t_self.target.MERGE_BOOTLOADER is True and blf is not None:
519-
t_self.debug("Merge BootLoader file %s" % blf)
519+
t_self.notify.debug("Merge BootLoader file %s" % blf)
520520
blh = IntelHex(blf)
521521
binh.merge(blh)
522522

0 commit comments

Comments
 (0)