Subversion Repositories freemyipod

Rev

Rev 588 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 588 Rev 589
Line 459... Line 459...
459
        return self.lib.monitorcommand(struct.pack("<IIII", 21, addr, 0, 0), "III", ("thread", None, None))
459
        return self.lib.monitorcommand(struct.pack("<IIII", 21, addr, 0, 0), "III", ("thread", None, None))
460
    
460
    
461
    @command()
461
    @command()
462
    def run(self, app):
462
    def run(self, app):
463
        """ Uploads and runs the emCORE app in the string 'app' """
463
        """ Uploads and runs the emCORE app in the string 'app' """
464
        if app[:8].decode("ascii") != "emCOexec":
464
        if app[:8].decode("latin_1") != "emCOexec":
465
            raise ArgumentError("The specified app is not an emCORE application")
465
            raise ArgumentError("The specified app is not an emCORE application")
466
        baseaddr = self.malloc(len(app))
466
        baseaddr = self.malloc(len(app))
467
        self.write(baseaddr, app)
467
        self.write(baseaddr, app)
468
        result = self.execimage(baseaddr)
468
        result = self.execimage(baseaddr)
469
        return Bunch(thread=result.thread)
469
        return Bunch(thread=result.thread)