Пример #1
0
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.bld.install_files(self.objcopy_install_path,
                               task.outputs[0],
                               env=task.env.derive())
Пример #2
0
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])
Пример #3
0
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.bld.install_files(self.objcopy_install_path, task.outputs[0], env=task.env.derive())
Пример #4
0
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])