This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
dev:launcher [2016/02/25 13:33] – created - external edit 127.0.0.1 | dev:launcher [2022/11/16 11:40] (current) – [TestLauncher] ursgraf | ||
---|---|---|---|
Line 4: | Line 4: | ||
- Step | - Step | ||
* Eclipse Launcher: In Eclipse it possible to define run configurations and perform a run. This event is handled by the // | * Eclipse Launcher: In Eclipse it possible to define run configurations and perform a run. This event is handled by the // | ||
- | * Standalone Launcher: The // | + | * Standalone Launcher: The // |
* Test Launcher: The // | * Test Launcher: The // | ||
- Step | - Step | ||
Line 35: | Line 35: | ||
===== Standalone Launcher ===== | ===== Standalone Launcher ===== | ||
- | In the package //ch.ntb.inf.deep.launcher// there is also a standalone launcher. It can be started from the command line and accepts | + | In the package //org.deepjava.launcher// there is also a standalone launcher. It can be started from the command line and accepts |
+ | < | ||
+ | Usage: java org.deepjava.launcher.StandAloneLauncher [/config ConfigName] deepfile | ||
- | ===== 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 | + | By specifying this switch, you can set a different |
- | + | | |
- | <code java> | + | / |
- | public class TestLauncher { | + | |
- | public static void main(String[] args) { | + | |
- | Launcher.buildAll("/ | + | |
- | + | ||
- | if (ErrorReporter.reporter.nofErrors == 0) { | + | |
- | | + | |
- | if (programmer != null) { | + | |
- | java.lang.Class<?> | + | |
- | | + | |
- | 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 | + | e.g. |
+ | < | ||
+ | cd < | ||
+ | java -cp "< | ||
+ | </ | ||
+ | or if the compiler is packed into a jar file | ||
+ | < | ||
+ | java -cp < | ||
+ | </ | ||
+ | ===== 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 launched as Java application | ||
+ | * --deepfile 555ExampleProject.deep --targetconfig BootFromRam | ||
+ | * --deepfile microzedExampleProject.deep --targetconfig BootFromRam --interface-files-path "< | ||
+ | * --deepfile junitHostTest.deep --targetconfig BootFromRam | ||
+ | * --deepfile microzedjunitTarget.deep --targetconfig BootFromRam | ||
===== Running and Debugging the Development Workspace ===== | ===== Running and Debugging the Development Workspace ===== |