Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
software:deep:ide:deep_eclipse_serialout [2012-04-04 11:28] – angelegt grafsoftware:deep:ide:deep_eclipse_serialout [2012-12-08 13:18] (aktuell) – gelöscht graf
Zeile 1: Zeile 1:
-====== Using serial out(System.out) ====== 
-  - By right-clicking on the newly created package choose //New// -> //Class// and enter class name //HelloWorld//. 
-  - Open class and enter source code:<code java> 
-package ch.ntb.stud.yourName.helloworld; 
  
-import java.io.PrintStream; 
-import ch.ntb.inf.deep.runtime.mpc555.driver.SCI1; 
- 
-public class HelloWorld { 
- static { 
- // 1) Initialize SCI1 (9600 8N1) 
- SCI1.start(9600, SCI1.NO_PARITY, (short)8); 
-  
- // 2) Use SCI1 for stdout 
- System.out = new PrintStream(SCI1.out); 
-  
- // 3) Say hello to the world 
- System.out.println("Hello, world"); 
- } 
-} 
-</code> 
-  - Open project file: HelloWorld.deep 
-  - Add the newly created class to rootclasses:<code>project { 
- libpath = "I:/deep/lib"; 
- rootclasses = "ch/ntb/stud/yourName/helloworld/HelloWorld"; 
-}</code> 
-  - Connect hardware to PC and power on. 
-  - Open View Dialog under //Window -> Show View -> Other...//. \\ {{software:eclipse:showview.png?400&direct}} 
-  - In the category //Terminal// mark //Terminal// and  confirm with //OK//. \\ {{software:eclipse:viewchooser.png?200&direct}} 
-  - Under //Connection Type// select //Serial// and choose settings according to the settings of the SCI on the target from paragraph 9 above. Check the port number with your operating system. \\ {{software:eclipse:connectiontype.png?200&direct}} 
-  - Mark project file "HelloWorld.deep", either by right-clicking //Run As -> Deep Application// \\ {{software:eclipse:runas_context.png?direct}} \\ or with pulldown menu of the run-button //Run As -> Deep Application// \\ {{:software:eclipse:runas_pulldown.png?400&direct}} \\ will the programm be compiled, linked and downloaded. 
-  - The //USB Log// shows //Hello, World//. 
-  - With {{software:eclipse:run.jpg}} you can recompile and rerun the programm.