Open main menu


812 bytes added ,  11:33, 18 December 2020
no edit summary
To debug your device with a serial cable, you will need:
* A serial debugging cable for your device. '''You will need to make this yourself''', so prior experience with soldering and soldering tools is recommended.(You might be able to make a cable without soldering if you find the right parts, though.)
* An USB-UART adapter that will allow you to connect the UART cable from your phone/tablet to your computer.
* A piece of software like screen, PuTTY or CuteCom that will be used to access the output from the USB-UART adapter on the computer.
** The best is to have them a couple (4-8) centimeters long, to solder them, solder a connector on the other end, and scotch tape them to the pcb
** Please, don't forget to pick insulated wires
==Kernel configuration==
In your device tree (or defconfig's <code>CONFIG_CMDLINE</code> setting) add <code>console=ttyXXX,115200n8</code> to your cmdline. (Make sure that <code>CONFIG_CMDLINE_EXTEND</code> is enabled.)
Replace <code>ttyXXX</code> with the TTY used in your system for serial output. If you're unsure, check the device trees of similar devices, or your device's configuration in downstream; if still in doubt, you can try sending random data to the TTY through <code>/dev/ttyXXX</code> and seeing what works.
Some chipsets also require an additional defconfig setting to be set to enable the serial console (e.g. for OMAP: <code>CONFIG_SERIAL_OMAP</code> and <code>CONFIG_SERIAL_OMAP_CONSOLE</code>).
==Plugging the cable in==