This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
runtime_library:using_serial_out:start [2015/04/19 07:51] – [On the hardware side] ursgraf | runtime_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 | + | See [[firstexample: |
==== Freescale MPC555 ==== | ==== Freescale MPC555 ==== | ||
- | + | The Freescale MPC555 offers two independent serial interfaces with RS232 Protocol, SCI1 and SCI2. When using our [[http:// | |
- | The Freescale MPC555 offers two independent serial interfaces with RS232 Protocol, SCI1 and SCI2. When using our [[http:// | + | |
==== 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 Zynq 7000 has two built-in UART's and allows |
- | import java.io.PrintStream; | + | |
- | import | + | |
- | public class HelloWorld { | ||
- | static { | ||
- | // 1) Initialize SCI1 (9600 8N1) | ||
- | SCI1.start(9600, | ||
- | |||
- | // 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(" | ||
- | } | ||
- | } | ||
- | </ | ||
- | - 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//, // | ||
- | - Alternatively, | ||
- | In the category // | ||
- | Under // | ||
- | - In order to use the terminal in eclipse you have to install the appropriate plugin, see [[software: |