5) Recompile the serial test program serialTest in wiringOP
root@orangepi:~/wiringOP/examples# make serialTest
[CC] serialTest.c
[link]
root@orangepi:~/wiringOP/examples#
6) Finally, run serialTest, if you can see the following print, it means that the serial
communication is normal
root@orangepi:~/wiringOP/examples# ./serialTest
Out: 0: -> 0
Out: 1: -> 1
Out: 2: -> 2
Out: 3: -> 3
Out: 4: -> 4
Out: 5: -> 5
Out: 6: -> 6
Out: 7: -> 7
Out: 8: -> 8^C
3.24. Method of redirecting kernel console output to serial port
ttyS5
The kernel console outputs to ttyS0 by default, which is the 3pin debug serial port on
the development board. We can also set the kernel console output to be redirected to
the 26pins connector UART5, the method is as follows:
1) Modify console=ttyS0 in /boot/boot.cmd to console=ttyS5
root@orangepi:~# vim /boot/boot.cmd