Subversion Repositories freemyipod

Rev

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

Rev 582 Rev 583
Line 453... Line 453...
453
        return self.lib.monitorcommand(struct.pack("<IIII", 21, addr, 0, 0), "III", ("thread", None, None))
453
        return self.lib.monitorcommand(struct.pack("<IIII", 21, addr, 0, 0), "III", ("thread", None, None))
454
    
454
    
455
    @command()
455
    @command()
456
    def run(self, app):
456
    def run(self, app):
457
        """ Uploads and runs the emCORE app in the string 'app' """
457
        """ Uploads and runs the emCORE app in the string 'app' """
458
        if app[:8] != "emCOexec":
458
        if app[:8].decode("ascii") != "emCOexec":
459
            raise ArgumentError("The specified app is not an emCORE application")
459
            raise ArgumentError("The specified app is not an emCORE application")
460
        baseaddr = self.malloc(len(app))
460
        baseaddr = self.malloc(len(app))
461
        self.write(baseaddr, app)
461
        self.write(baseaddr, app)
462
        result = self.execimage(baseaddr)
462
        result = self.execimage(baseaddr)
463
        return Bunch(thread=result.thread)
463
        return Bunch(thread=result.thread)