Package avrora.core

Examples of avrora.core.SourceMapping


        }

        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));
                    bi.writeFlashByte(location.address+1, Arithmetic.high(id));
                }
View Full Code Here


     * @return a list of program locations
     */
    public static List getLocationList(Program program, List v) {
        HashSet locset = new HashSet(v.size()*2);

        SourceMapping lm = program.getSourceMapping();
        Iterator i = v.iterator();

        while (i.hasNext()) {
            String val = (String)i.next();

            SourceMapping.Location l = lm.getLocation(val);
            if ( l == null )
                Avrora.userError("Label unknown", val);
            locset.add(l);
        }

View Full Code Here

                addPair(loc.address, tar.address);
            }
        }

        private LabelMapping.Location getLocation(String src) {
            SourceMapping lm = program.getSourceMapping();
            SourceMapping.Location loc = lm.getLocation(src);
            if ( loc == null )
                Avrora.userError("Invalid program address: ", src);
            if ( program.readInstr(loc.address) == null )
                Avrora.userError("Invalid program address: ", src);
            return loc;
View Full Code Here

            return loc;
        }

        private void addFrom() {
            Iterator i = FROM.get().iterator();
            SourceMapping sm = program.getSourceMapping();
            while (i.hasNext()) {
                String str = (String)i.next();
                SourceMapping.Location loc = sm.getLocation(str);
                for ( int cntr = 0; cntr < program.program_end; cntr = program.getNextPC(cntr) )
                    addPair(loc.address, cntr);
            }
        }
View Full Code Here

            }
        }

        private void addTo() {
            Iterator i = TO.get().iterator();
            SourceMapping sm = program.getSourceMapping();
            while (i.hasNext()) {
                String str = (String)i.next();
                SourceMapping.Location loc = sm.getLocation(str);
                for ( int cntr = 0; cntr < program.program_end; cntr = program.getNextPC(cntr) )
                    addPair(cntr, loc.address);
            }
        }
View Full Code Here

    }

    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));
          bi.writeFlashByte(location.address+1, Arithmetic.high(id));
        }
View Full Code Here

                addPair(loc.address, tar.address);
            }
        }

        private LabelMapping.Location getLocation(String src) {
            SourceMapping lm = program.getSourceMapping();
            SourceMapping.Location loc = lm.getLocation(src);
            if ( loc == null )
                Avrora.userError("Invalid program address: ", src);
            if ( program.readInstr(loc.address) == null )
                Avrora.userError("Invalid program address: ", src);
            return loc;
View Full Code Here

TOP

Related Classes of avrora.core.SourceMapping

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.