1 | .. comment SPDX-License-Identifier: CC-BY-SA-4.0 |
---|
2 | |
---|
3 | .. comment: Copyright (c) 2018 Chris Johns <chrisj@rtems.org> |
---|
4 | .. comment: All rights reserved. |
---|
5 | |
---|
6 | .. _tester-consoles: |
---|
7 | |
---|
8 | Consoles |
---|
9 | -------- |
---|
10 | |
---|
11 | The RTEMS Tester uses the target's console output to determine the state of a |
---|
12 | test. Console interfaces vary depending on the testing mode, the BSP, and the |
---|
13 | target hardware. |
---|
14 | |
---|
15 | Consoles for simulator work best if mapped to the simulator's ``stdout`` |
---|
16 | interface. The RTEMS Tester can capture and process the ``stdout`` data from a |
---|
17 | simulator while it is running. |
---|
18 | |
---|
19 | Target hardware console interfaces can vary. The most universal and stable |
---|
20 | interface target hardware is a UART interface. There are a number of physical |
---|
21 | interfaces for UART data these days. They are: |
---|
22 | |
---|
23 | #. RS232 |
---|
24 | |
---|
25 | #. TTL |
---|
26 | |
---|
27 | #. USB |
---|
28 | |
---|
29 | RS232 is still present on a number of targets. The best solution is to use a |
---|
30 | RS232 to USB pod and convert the port to USB. |
---|
31 | |
---|
32 | TTL is common on a number of boards where cost is important. A console |
---|
33 | interface is typically a development tool and removing the extra devices need |
---|
34 | to convert the signal to RS232 or directly to USB is not needed on production |
---|
35 | builds of the target. There is a standard header pin out for TTL UART consoles |
---|
36 | and you can purchase low cost cables with the header and a built in UART to USB |
---|
37 | converter. The cables come is different voltage levels so make sure you check |
---|
38 | and use the correct voltage level. |
---|
39 | |
---|
40 | The USB interface on a target is typcially a slave or OTG interface and all you |
---|
41 | need to a standard USB cable. |
---|
42 | |
---|
43 | We recommend a low cost and low power device to be a terminal server. A |
---|
44 | Raspberry Pi or similar low cost computer running Linux can be set up quickly |
---|
45 | and with a powered USB hub and can support a number of USB UART ports. A USB |
---|
46 | hub with a high power port is recommended that can suppy the Raspberry Pi. |
---|
47 | |
---|
48 | The open source daemon ``ser2net`` is easy to configure to map the USB UART |
---|
49 | ports to the Telnet protocol. There is no need for security because a typical |
---|
50 | test environment is part of a lab network that should be partitioned off from |
---|
51 | an enginnering or corportate network and not directly connected to the |
---|
52 | internet. |
---|
53 | |
---|
54 | A test set up like this lets you place a terminal server close to your target |
---|
55 | hardware providing you with the flexibility to select where you run the RTEMS |
---|
56 | Tester. It could be your desktop or an expensive fast host machine in a server |
---|
57 | rack. None of this equipment needs to directly interface to the target |
---|
58 | hardware. |
---|
59 | |
---|
60 | The RTEMS Tester directly supports the telnet protcol as a console and can |
---|
61 | interface to the ``ser1net`` server. The telnet console will poll the server |
---|
62 | waiting for the remote port to connect. If the terminal server ``ser2net`` does |
---|
63 | not have a ``tty`` device it will not listen on the port assigned to that |
---|
64 | ``tty``. A USB ``tty`` can come and go depending on the power state of the |
---|
65 | hardware and the target hardware's design and this can cause timing issues if |
---|
66 | the target hardware is power cycled as part of a reset process. |
---|