phyFLEX
®
-i.MX 6
If you are not logged in, enter
root
and press
Enter
.
Type .
/myHelloWorld
to start the application.
You will see the following output:
.
Welcome to the World of PHYTEC! (serial)
.
.
Welcome to the World of PHYTEC!
.......... .
Close
Microcom
.
When you start the application via an
SSH
session, you only see one output line. When you
execute the program with
Microcom
, you see two output lines.
The first line is a direct output on the serial interface. You can not see this
line in an
SSH
session, because you are connected over a TCP/IP
connection to the target. With
Microcom
, however, you have direct access
to the serial interface, so you can also see the line that is written to the
serial console.
In this section you have changed an existing application. You also learned
how to access the serial interface. First you called the function
open()
on
the device
/dev/console
. The return value of this function was a file
descriptor. With the file descriptor you called the function
write()
to send
n
bytes to the device
/dev/console
. After that, the file descriptor was
closed with the function
close()
.
This procedure is quite typical for Linux, because Linux treats everything
as a file.
24
PHYTEC Messtechnik GmbH 2015 L-781e_7
Содержание phyFLEX-i.MX 6
Страница 85: ...79...