diff options
author | David Robillard <d@drobilla.net> | 2018-11-24 13:44:03 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-11-24 13:44:03 +0100 |
commit | a7d83f19b08eb4c6f79a82fe60c2b86db13f4420 (patch) | |
tree | d9b620bfba1e7462df4ddb3f6225cc5216c0ca81 /waflib/extras/objcopy.py | |
parent | d63edc742cebd685f8a05936682210aa5c1e69a9 (diff) | |
download | ingen-a7d83f19b08eb4c6f79a82fe60c2b86db13f4420.tar.gz ingen-a7d83f19b08eb4c6f79a82fe60c2b86db13f4420.tar.bz2 ingen-a7d83f19b08eb4c6f79a82fe60c2b86db13f4420.zip |
Squashed 'waflib/' changes from 6e726eb1..5ea8f99f
5ea8f99f Improve test output spacing
0e23b29f Raise exception when test suite fails to ensure non-zero exit status
d6de073b Show run time of unit tests
5b655541 Add short configure option for ultra-strict flags
4687ba6d Use gtest-like test output
258903d9 Fix failure count in test group summaries
da07e738 Fix verbose tests with Python 3
git-subtree-dir: waflib
git-subtree-split: 5ea8f99f6e1246079c1fe6bb590c38a53aadd40d
Diffstat (limited to 'waflib/extras/objcopy.py')
-rw-r--r-- | waflib/extras/objcopy.py | 50 |
1 files changed, 0 insertions, 50 deletions
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) - |