What is the right way to open a serial connection to a board for debugging?
I want to read the debug output my board prints, and to send it the occasional command. The editor I use has a built-in serial monitor, and I have also seen people use a standalone terminal program.
My attempts produce either nothing at all or garbage characters, which suggests I am getting a setting wrong rather than the connection failing.
What are the settings that matter, and when is a separate terminal program worth using?
@sensor_sarp · 5d ago
On when a separate terminal is worth it, the honest answer is that the built-in monitor is fine for most work and there are three cases where it is not.
You need the port while the editor has it. Only one program can hold a serial port. A standalone terminal you can close independently is easier than fighting the editor for it, and this is the most common reason people switch.
You need to see the board boot. The interesting output often appears in the first moments after reset, and by the time the editor's monitor opens it has been missed. A terminal already connected when you press reset catches it.
You need logging, or non-text data. Capturing to a file over hours, or looking at raw bytes in hexadecimal, is what the standalone tools are for.
For anything else, the built-in one is fewer moving parts.
Reply
Report