String script = config.getProperty("autorun");
if (script != null) {
File fp = new File(script);
if (fp.canRead()) {
CommandHandler ch = registry.getComponent(CommandHandler.class, "commandHandler");
script = script.replace('\\', '/');
System.out.println("Autoloading script: " + script);
config.setProperty("autoloadScript", script);
if (ch != null) {
ch.lineRead("source \"" + script + '"');
}
}
}
if (args.length > 1) {
// Run the following arguments as commands
CommandHandler ch = registry.getComponent(CommandHandler.class, "commandHandler");
if (ch != null) {
for (int i = 1; i < args.length; i++) {
System.out.println("calling '" + args[i] + "'");
ch.lineRead(args[i]);
}
}
}
System.out.println("-----------------------------------------------");
System.out.println("MSPSim " + MSP430Constants.VERSION + " starting firmware: " + firmwareFile);