Adding New Program LoadersMicrocontroller programs come in a variety of formats. For example, if the program is written in assembly language, Avrora can load these programs directly without first assembling them to machine code. For programs in higher level languages such as C, they can be compiled to a variety of formats, including ELF, COFF, SREC. In order to support these various input formats, Avrora has a class ProgramReader. Extensions of this class support various formats for loading the program and produce an internal representation of the program that is more suitable for simulation and analysis.Avrora supports three types of program formats:
The -input option selects from the available input formats. The default value is auto, which in itself is simply a program reader that inspects the extension of the filename and choose one of the other loaders. This option also can accept a fully qualified classname as a program loader. For example, -input=mypackage.MyLoader will load and instantiate the mypackage.MyLoader class and pass the rest of the command line arguments. For more information see avrora.core.ProgramReader in the JavaDOC API. |