Serial consoles and remote GDB

Greg 'groggy' Lehey grog at FreeBSD.org
Wed Sep 8 21:39:54 PDT 2004


On Monday, 30 August 2004 at 14:11:49 -0400, Rob Deker wrote:
>
> Stephan Uphoff wrote:
>
>> Are you sure that your serial line is configured with the right
>> baud rate?
>
> This may seem a stupid question, but how do I set the baudrate on
> the port and in gdb?

The default bit rate is 9600 bps.  It would be nice to go higher, but
there appear to be race conditions which make it unreliable.  At least
initially, you should run at 9600 bps; after that, there are ways of
changing the rate that are themselves changing.  Check the kernel
configuration files and sysctl.

To set the bit rate on the port depends on what software you're
using.  I still use cu, though it's now gone from the base system,
along with its parent uucp.  With cu you'd do:

  cu -s 9600 -l /dev/cuaa0

You can do something similar with tip, which is still around.

If you have a firewire connection, that's *much* better.  Before you
say "no, I don't have that", consider that firewire hardware is very
cheap.  There's some stuff about it in
http://www.lemis.com/papers/AUUG2004/tutorial.pdf, but it would be
nice if somebody were to extract this information and put it in the
handbook.  If anybody wants to, please contact me and I'll supply the
source.

Greg
--
See complete headers for address and phone numbers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20040909/10d36268/attachment.bin


More information about the freebsd-hackers mailing list