Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
software:deep:dev:launcher [2013-12-31 19:23] – Externe Bearbeitung 127.0.0.1 | software:deep:dev:launcher [Unbekanntes Datum] (aktuell) – gelöscht - Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== Launcher ====== | ||
- | Launching is done in two steps. The first step starts launching with three different options, while the second step comprises the the actual launcher. | ||
- | - Step | ||
- | * Eclipse Launcher: In Eclipse it possible to define run configurations and perform a run. This event is handled by the // | ||
- | * Standalone Launcher: The // | ||
- | * Test Launcher: The // | ||
- | - Step | ||
- | * deep Launcher: This is the actual // | ||
- | |||
- | ===== What is done when Building? ===== | ||
- | - Parse and load configuration | ||
- | - Classfile reader: loads all necessary classes, read Bytecode and build object directory | ||
- | - Initialize Linker and code generator | ||
- | - Create type descriptor for arrays | ||
- | - Create type descriptor for interfaces (interfaces which need a type descriptor only) | ||
- | - Loop One: For all regular classes | ||
- | * Prepare constant block (per class) | ||
- | * Create CFG (per method) | ||
- | * Create SSA (per method) | ||
- | * Create machine code (per method) | ||
- | * Calculate necessary memory size | ||
- | - Linker: put together system table | ||
- | - Linker: fix memory map | ||
- | - Calculate absolute addresses for arrays | ||
- | - Calculate absolute addresses for interfaces | ||
- | - Loop Two: For all regular classes | ||
- | * Calculate absolute addresses | ||
- | - Linker: create constant table | ||
- | - Loop Three: For all regular classes | ||
- | * Constant block, enter absolute addresses | ||
- | * Code generator: do fixup (per method) | ||
- | - Linker: complemend system table with information about class addresses | ||
- | - Linker: create target image (per segment) | ||
- | |||
- | |||
- | ===== TestLauncher ===== | ||
- | The TestLauncher is a helper class to start building projects directly from the eclipse development workspace without loading the deep plugin in the first place. The TestLauncher has to be adapted in a way that that the desired actions will be taken. One has to enter the correct path and name of the project file and choose a programmer or none. | ||
- | |||
- | <code java> | ||
- | public class TestLauncher { | ||
- | public static void main(String[] args) { | ||
- | Launcher.buildAll("/ | ||
- | |||
- | if (ErrorReporter.reporter.nofErrors == 0) { | ||
- | Programmer programmer = Configuration.getProgrammer(); | ||
- | if (programmer != null) { | ||
- | java.lang.Class<?> | ||
- | try { | ||
- | cls = java.lang.Class.forName(programmer.getClassName().toString()); | ||
- | java.lang.reflect.Method m; | ||
- | m = cls.getDeclaredMethod(" | ||
- | TargetConnection tc = (TargetConnection) m.invoke(cls); | ||
- | Launcher.setTargetConnection(tc); | ||
- | Launcher.openTargetConnection(); | ||
- | Launcher.downloadTargetImage(); | ||
- | Launcher.startTarget(); | ||
- | Launcher.closeTargetConnection(); | ||
- | } catch (ClassNotFoundException e) { | ||
- | ErrorReporter.reporter.error(811, | ||
- | } catch (Exception e) { | ||
- | e.printStackTrace(); | ||
- | } | ||
- | } else System.out.println(" | ||
- | } | ||
- | } | ||
- | } | ||
- | </ | ||
- | The TestLauncher is started as a normal Java application. | ||
- | |||
- | ===== Standalone Launcher ===== | ||
- | In the package // | ||
- | |||
- | ===== Running and Debugging the Development Workspace ===== | ||
- | In order to test the eclipse development workspace you can start the workspace as eclipse application. For this purpose a nee directory has to be chosen as new workspace under //Run Configuration// | ||
- | As arguments for the VM standard settings can be used. If an error like '' | ||
- | **Important: | ||
- | In the eclipse instance all plugins under development - namely deep - can be used. A new deep project can be created. In this project you can implement any new application which you specify as root class in the deep project file. You have to modify the build path of the project so that the classes of the runtime system can be found. With //Add External Class Folder// you have to add the bin directory of the runtime system. Of course you could also use a test class from the runtime system as root class.\\ | ||
- | If you debug an application and want the source lookup wo work properly you have to enter the src directory of the runtime system in build path -> // | ||
- | If one of the root classes is a class from again another library like junitTarget you must add the bin directory of this library. Here again you may want to setup the source attachment correctly. |