Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
software:deep:ide:eclipse_serialout [2014-05-26 14:12] – graf | software:deep:ide:eclipse_serialout [Unbekanntes Datum] (aktuell) – gelöscht - Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== Using Serial Out (System.out) ====== | ||
- | ===== On the hardware side ===== | ||
- | |||
- | ==== Freescale MPC555 ==== | ||
- | |||
- | The Freescale MPC555 offers two independent serial interfaces with RS232 Protocol, SCI1 and SCI2. When using the [[: | ||
- | |||
- | ==== 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 the software side ===== | ||
- | - In your application on the target you have to initialize the serial communication interface with the desired settings and assign the standard pipes (in, out, error) to this port. Example for the MPC555: <code java> | ||
- | 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, | ||
- | |||
- | // 2) Use SCI1 for stdout | ||
- | System.out = 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: |