Package avrora.core

Examples of avrora.core.ProgramReader


     * @throws Exception if there is an error loading the program, such as a file not found exception, parse
     *                   error, etc
     */
    public static Program loadProgram(String[] args) throws Exception {
        Status.begin("Loading "+args[0]);
        ProgramReader reader = Defaults.getProgramReader(INPUT.get());
        reader.options.process(mainOptions);
        Program program = reader.read(args);
        Status.success();
        return program;
    }
View Full Code Here


        }

        public void run() throws Exception {
            String input = properties.getProperty("input");
            if (input == null) input = "atmel";
            ProgramReader r = Defaults.getProgramReader(input);
            String[] args = {filename};
            program = r.read(args);
        }
View Full Code Here

            super(fname, props);
            disassembler = new Disassembler();
        }

        public void run() throws Exception {
            ProgramReader r = new ObjDump2ProgramReader();
            String[] args = { filename };
            program = r.read(args);

            byte data[] = new byte[program.program_end];
            instrs = new Instr[program.program_end];

            for ( int cntr = 0; cntr < program.program_end; cntr++ ) {
View Full Code Here

            String extension = n.substring(offset).toLowerCase();

String ext = ".od";
System.out.println(":::::::::::"+(".od".equals(ext)));

            ProgramReader reader = null;
/*            if (".asm".equals(extension))
                reader = new AtmelProgramReader();
            else if (".s".equals(extension))
                reader = new GASProgramReader();
            else if (".od".equals(extension))*/
                reader = new ObjDumpProgramReader();
            /*else if (".odpp".equals(extension))
                reader = new ObjDump2ProgramReader();*/

            if ( reader == null ) {
                Avrora.userError("file extension " + StringUtil.quote(extension) + " unknown");
                return null;
            }

            // TODO: this is a hack; all inherited options should be available
            reader.INDIRECT_EDGES.set(INDIRECT_EDGES.stringValue());
            reader.options.process(options);
            return reader.read(args);
        }
View Full Code Here

        }

        public void run() throws Exception {
            String input = properties.getProperty("input");
            if (input == null) input = "atmel";
            ProgramReader r = Defaults.getProgramReader(input);
            String[] args = {filename};
            program = r.read(args);
            simulator = Defaults.newSimulator(0, program);
            simulator.start();
        }
View Full Code Here

TOP

Related Classes of avrora.core.ProgramReader

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.