def link_program(self, r, tmp_path, name): ext = 'bin' if hasattr(self.target, 'OUTPUT_NAMING'): self.var("binary_naming", self.target.OUTPUT_NAMING) if self.target.OUTPUT_NAMING == "8.3": name = name[0:8] ext = ext[0:3] filename = name + '.' + ext elf = join(tmp_path, name + '.elf') bin = join(tmp_path, filename) if self.need_update(elf, r.objects + r.libraries + [r.linker_script]): self.progress("link", name) self.link(elf, r.objects, r.libraries, r.lib_dirs, r.linker_script) if self.need_update(bin, [elf]): self.progress("elf2bin", name) self.binary(r, elf, bin) if self.target.name.startswith('LPC'): self.debug("LPC Patch %s" % filename) patch(bin) self.var("compile_succeded", True) self.var("binary", filename) if hasattr(self.target, 'OUTPUT_EXT'): bin = bin.replace('.bin', self.target.OUTPUT_EXT) return bin
def link_program(self, r, tmp_path, name): ext = 'bin' if hasattr(self.target, 'OUTPUT_NAMING'): self.var("binary_naming", self.target.OUTPUT_NAMING) if self.target.OUTPUT_NAMING == "8.3": name = name[0:8] ext = ext[0:3] filename = name+'.'+ext elf = join(tmp_path, name + '.elf') bin = join(tmp_path, filename) if self.need_update(elf, r.objects + r.libraries + [r.linker_script]): self.progress("link", name) self.link(elf, r.objects, r.libraries, r.lib_dirs, r.linker_script) if self.need_update(bin, [elf]): self.progress("elf2bin", name) self.binary(r, elf, bin) if self.target.name.startswith('LPC'): self.debug("LPC Patch %s" % filename) patch(bin) self.var("compile_succeded", True) self.var("binary", filename) if hasattr(self.target, 'OUTPUT_EXT'): bin = bin.replace('.bin', self.target.OUTPUT_EXT) return bin
def link_program(self, r, tmp_path, name): elf = join(tmp_path, name + ".elf") bin = join(tmp_path, name + ".bin") if self.need_update(elf, r.objects + r.libraries + [r.linker_script]): self.progress("link", name) self.link(elf, r.objects, r.libraries, r.lib_dirs, r.linker_script) if self.need_update(bin, [elf]): self.progress("elf2bin", name) self.binary(elf, bin) if self.target.name.startswith("LPC"): self.debug("LPC Patch %s" % (name + ".bin")) patch(bin) self.var("compile_succeded", True) self.var("binary", name + ".bin") return bin
def link_program(self, r, tmp_path, name): elf = join(tmp_path, name + '.elf') bin = join(tmp_path, name + '.bin') if self.need_update(elf, r.objects + r.libraries + [r.linker_script]): self.progress("link", name) self.link(elf, r.objects, r.libraries, r.lib_dirs, r.linker_script) if self.need_update(bin, [elf]): self.progress("elf2bin", name) self.binary(elf, bin) if self.target.name.startswith('LPC'): self.debug("LPC Patch %s" % (name + '.bin')) patch(bin) self.var("compile_succeded", True) self.var("binary", name + '.bin') return bin
def build_program(self, r, tmp_path, name): objects = self.compile_sources(r, tmp_path) + r.objects elf = join(tmp_path, name + '.elf') bin = join(tmp_path, name + '.bin') if self.need_update(elf, objects + r.libraries + [r.linker_script]): self.progress("link", name) self.link(elf, objects, r.libraries, r.lib_dirs, r.linker_script) if self.need_update(bin, [elf]): self.progress("elf2bin", name) self.binary(elf, bin) if self.target.name.startswith('LPC'): self.debug("LPC Patch %s" % (name + '.bin')) patch(bin) self.var("compile_succeded", True) self.var("binary", name+'.bin') return bin
def build_program(self, r, tmp_path, name): objects = self.compile_sources(r, tmp_path) + r.objects elf = join(tmp_path, name + '.elf') bin = join(tmp_path, name + '.bin') if self.need_update(elf, objects + r.libraries + [r.linker_script]): self.progress("link", name) self.link(elf, objects, r.libraries, r.lib_dirs, r.linker_script) if self.need_update(bin, [elf]): self.progress("elf2bin", name) self.binary(elf, bin) if self.target.vendor == 'nxp': self.debug("LPC Patch %s" % (name + '.bin')) patch(bin) self.var("compile_succeded", True) self.var("binary", name + '.bin') return bin
def build_program(self, r, tmp_path, name): objects = self.compile_sources(r, tmp_path) + r.objects elf = join(tmp_path, name + '.elf') bin = join(tmp_path, name + '.bin') if self.need_update(elf, objects + r.libraries + [r.linker_script]): self.progress("link", name) self.link(elf, objects, r.libraries, r.lib_dirs, r.linker_script) if self.need_update(bin, [elf]): self.progress("elf2bin", name) self.binary(elf, bin) if self.target in ['LPC1768', 'LPC11U24', 'LPC2368', 'LPC812']: self.progress("LPC Patch", (name + '.bin')) patch(bin) self.var("compile_succeded", True) self.var("binary", name+'.bin') return bin
def lpc_patch(t_self, resources, elf, binf): t_self.debug("LPC Patch: %s" % os.path.split(binf)[1]) patch(binf)