From bc596356af71d95eb2a341d0324a76e6b7e59a73 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 21 Apr 2019 22:56:13 +0200 Subject: Switch to using a submodule for autowaf --- waflib | 1 + waflib/extras/objcopy.py | 50 ------------------------------------------------ 2 files changed, 1 insertion(+), 50 deletions(-) create mode 160000 waflib delete mode 100644 waflib/extras/objcopy.py (limited to 'waflib/extras/objcopy.py') diff --git a/waflib b/waflib new file mode 160000 index 00000000..2314e236 --- /dev/null +++ b/waflib @@ -0,0 +1 @@ +Subproject commit 2314e236ca6e7d94a26c3c17091da0f25f5867f3 diff --git a/waflib/extras/objcopy.py b/waflib/extras/objcopy.py deleted file mode 100644 index 82d8359e..00000000 --- a/waflib/extras/objcopy.py +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/python -# Grygoriy Fuchedzhy 2010 - -""" -Support for converting linked targets to ihex, srec or binary files using -objcopy. Use the 'objcopy' feature in conjunction with the 'cc' or 'cxx' -feature. The 'objcopy' feature uses the following attributes: - -objcopy_bfdname Target object format name (eg. ihex, srec, binary). - Defaults to ihex. -objcopy_target File name used for objcopy output. This defaults to the - target name with objcopy_bfdname as extension. -objcopy_install_path Install path for objcopy_target file. Defaults to ${PREFIX}/fw. -objcopy_flags Additional flags passed to objcopy. -""" - -from waflib.Utils import def_attrs -from waflib import Task -from waflib.TaskGen import feature, after_method - -class objcopy(Task.Task): - run_str = '${OBJCOPY} -O ${TARGET_BFDNAME} ${OBJCOPYFLAGS} ${SRC} ${TGT}' - color = 'CYAN' - -@feature('objcopy') -@after_method('apply_link') -def map_objcopy(self): - def_attrs(self, - objcopy_bfdname = 'ihex', - objcopy_target = None, - objcopy_install_path = "${PREFIX}/firmware", - objcopy_flags = '') - - link_output = self.link_task.outputs[0] - if not self.objcopy_target: - self.objcopy_target = link_output.change_ext('.' + self.objcopy_bfdname).name - task = self.create_task('objcopy', src=link_output, tgt=self.path.find_or_declare(self.objcopy_target)) - - task.env.append_unique('TARGET_BFDNAME', self.objcopy_bfdname) - try: - task.env.append_unique('OBJCOPYFLAGS', getattr(self, 'objcopy_flags')) - except AttributeError: - pass - - if self.objcopy_install_path: - self.add_install_files(install_to=self.objcopy_install_path, install_from=task.outputs[0]) - -def configure(ctx): - ctx.find_program('objcopy', var='OBJCOPY', mandatory=True) - -- cgit v1.2.1