Package avrora.core

Examples of avrora.core.Program


            simulator.delay(startup);
        }

        private void updateNodeID() {
            if ( UPDATE_NODE_ID.get() ) {
                Program p = path.getProgram();
                SourceMapping smap = p.getSourceMapping();
                SourceMapping.Location location = smap.getLocation("TOS_LOCAL_ADDRESS");
                if ( location == null ) location = smap.getLocation("node_address");
                if ( location != null ) {
                    BaseInterpreter bi = simulator.getInterpreter();
                    bi.writeFlashByte(location.address, Arithmetic.low(id));
View Full Code Here


     * @throws Exception
     */
    public void run(String[] args) throws Exception {
        Printer printer = Printer.STDOUT;
        PrettyPrinter pp = new PrettyPrinter(printer);
        Program p = Main.loadProgram(args);
        DBBC dbbc = new DBBC(p, options);

        ControlFlowGraph cfg = p.getCFG();
        Iterator i = cfg.getSortedBlockIterator();
        while (i.hasNext()) {
            ControlFlowGraph.Block b = (ControlFlowGraph.Block)i.next();
            printer.startblock("block starting at: " + StringUtil.addrToString(b.getAddress()));
            DBBC.CodeBlock code = dbbc.getCodeBlock(b.getAddress());
View Full Code Here

        //Status.begin("Parsing");
        ObjDumpParser parser = new ObjDumpParser(new FileReader(f), module, f.getName());
        parser.Module();
        //Status.success();
        //Status.begin("Building");
        Program p = module.build();
        //Status.success();
        addIndirectEdges(p);
        return p;
    }
View Full Code Here

            itable.insertProbe(new InterruptProbe());

            stack = new String[MAX_STACK_DEPTH];
            stack[0] = "";

            Program p = s.getProgram();
            sm = p.getSourceMapping();
            for ( int pc = 0; pc < p.program_end; pc = p.getNextPC(pc)) {
                Instr i = p.readInstr(pc);
                if ( i != null ) {
                    if ( i instanceof Instr.CALL ) {
                        s.insertProbe(new CallProbe("CALL"), pc);
                    }
                    else if ( i instanceof Instr.ICALL ) {
View Full Code Here

        //Status.begin("Parsing");
        ObjDumpParser parser = new ObjDumpParser(r, module, f.getName());
        parser.Module();
        //Status.success();
        //Status.begin("Building");
        Program p = module.build();
        //Status.success();
        addIndirectEdges(p);
        return p;
    }
View Full Code Here

        Mon(Simulator s) {
            this.simulator = s;
            props = simulator.getMicrocontroller().getProperties();
            interpreter = s.getInterpreter();
            interruptBase = interpreter.getInterruptBase();
            Program p = s.getProgram();
            sm = p.getSourceMapping();
            Iterator i = BREAKPOINTS.get().iterator();
            while ( i.hasNext() ) {
                String str = (String)i.next();
                SourceMapping.Location l = sm.getLocation(str);
                if ( l == null ) Avrora.userError("Label not found", str);
View Full Code Here

     *
     * @param args the string arguments that are the files containing the program
     * @throws java.lang.Exception if the program cannot be loaded correctly
     */
    public void run(String[] args) throws Exception {
        Program p = Main.loadProgram(args);

        Analyzer.TRACE_SUMMARY = TRACE_SUMMARY.get();
        Analyzer.MONITOR_STATES = MONITOR_STATES.get();
        Analyzer.TRACE = TRACE.get();
        Analyzer.USE_ISEA = USE_ISEA.get();
View Full Code Here

        //Status.begin("Parsing");
        AtmelParser parser = new AtmelParser(fis, module, f.getName());
        parser.Module();
        //Status.success();
        //Status.begin("Building");
        Program p = module.build();
        //Status.success();
        addIndirectEdges(p);
        return p;
    }
View Full Code Here

      simulator.delay(startup);
    }

    private void updateNodeID() {
      if ( UPDATE_NODE_ID.get() ) {
        Program p = path.getProgram();
        SourceMapping smap = p.getSourceMapping();
        SourceMapping.Location location = smap.getLocation("TOS_LOCAL_ADDRESS");
        if ( location == null ) location = smap.getLocation("node_address");
        if ( location != null ) {
          BaseInterpreter bi = simulator.getInterpreter();
          bi.writeFlashByte(location.address, Arithmetic.low(id));
View Full Code Here

        File f = new File(args[0]);
        Module module = new Module(true, true);
        FileInputStream fis = new FileInputStream(f);
        GASParser parser = new GASParser(fis, module, f.getName());
        parser.Module();
        Program p = module.build();
        addIndirectEdges(p);
        return p;
    }
View Full Code Here

TOP

Related Classes of avrora.core.Program

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.