deep

a Cross Development Platform for Java

User Tools

Site Tools


runtime_library:using_serial_out:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
runtime_library:using_serial_out:start [2015/04/19 07:51] – [On the hardware side] ursgrafruntime_library:using_serial_out:start [2022/12/20 11:17] (current) ursgraf
Line 1: Line 1:
 ====== Using Serial Out (System.out) ====== ====== Using Serial Out (System.out) ======
  
-===== On the hardware side =====+See [[firstexample:start|Hello World with System.out]] to understand how to configure one of the available serial interfaces and direct your standard output onto this stream. On the host side you have to determine which port number your operating system has assigned to the port. Open any terminal program, such as //Putty//, //Hyperterminal// or //Realterm//. Configure the port setting similar to the target setting and open the connection.
  
 ==== Freescale MPC555 ==== ==== Freescale MPC555 ====
- +The Freescale MPC555 offers two independent serial interfaces with RS232 Protocol, SCI1 and SCI2. When using our [[http://wiki.bu.ost.ch/infoportal/embedded_systems/mpc555/headerboard/start | NTB MPC555 Headerboard]], the SCI1 is connected through the [[http://wiki.bu.ost.ch/infoportal/embedded_systems/mpc555/usb-bdi | USB Background Debugging Interface (USB-BDI)]] to the host where it will be visible as a virtual COM port. The SCI2 can be connected with a standard serial cable (DB9 connector).
-The Freescale MPC555 offers two independent serial interfaces with RS232 Protocol, SCI1 and SCI2. When using our [[http://wiki.ntb.ch/infoportal/embedded_systems/mpc555/headerboard/start | NTB MPC555 Headerboard]], the SCI1 is connected through the [[http://wiki.ntb.ch/infoportal/embedded_systems/mpc555/usb-bdi | USB Background Debugging Interface (USB-BDI)]] to the host where it will be visible as a virtual COM port. The SCI2 can be connected with a standard serial cable (DB9 connector).+
  
 ==== Freescale MPC5200 ==== ==== Freescale MPC5200 ====
 The Freescale MPC5200 has six built in Programmable Serial Controllers (PSC), which can all work as UART's running the RS232 protocol. Check your hardware manual to see which of the PSC can be used on your board. The Freescale MPC5200 has six built in Programmable Serial Controllers (PSC), which can all work as UART's running the RS232 protocol. Check your hardware manual to see which of the PSC can be used on your board.
  
-===== On the software side ===== +==== Zynq 7000 ==== 
-  In your application on the target you have to initialize the serial communication interface with the desired settings and assign the standard pipes (inout, err) to this port. Example for the MPC555<code java> +The Zynq 7000 has two built-in UART's and allows to use further UART's by using flink devices located in the FPGAsee [[https://flink-project.ch/]]For further details see [[runtime_library:drivers:start#Universal_Asynchronous_Receiver/Transmitter_(UART,_RS232)|Device Drivers]].
-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 and stderr 
- System.out = new PrintStream(SCI1.out); 
- System.err = new PrintStream(SCI1.out); 
  
- // 3) Say hello to the world 
- System.out.println("Hello, world"); 
- } 
-} 
-</code> 
-  - On the host you have to determine which port number your operating system has assigned to the port 
-  - Open any terminal program, such as //putty//, //Hyperterminal// or //realterm//. Configure the port setting similar to the target setting and open the connection. 
-  - Alternatively, in eclipse you can use the terminal view. Open View Dialog under //Window → Show View → Other// 
-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. \\ {{software:eclipse:connectiontype.png?200&direct}} 
-  - In order to use the terminal in eclipse you have to install the appropriate plugin, see [[software:eclipse:eclipse_serial_terminal|Eclipse Serial Terminal]]. If you use our eclipse distribution this plugin is already included. 
runtime_library/using_serial_out/start.1429422688.txt.gz · Last modified: 2016/02/25 13:33 (external edit)