From mboxrd@z Thu Jan 1 00:00:00 1970 From: greg@kroah.com (Greg KH) Date: Wed, 26 Apr 2017 14:49:19 +0200 Subject: kgdb debug with ttyUSB0 instead of ttyS0 In-Reply-To: <20170426112355.GA16804@graute-opti> References: <20170425211138.GA3230@ripley> <20170426043701.GB5734@kroah.com> <20170426112355.GA16804@graute-opti> Message-ID: <20170426124919.GA12061@kroah.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Wed, Apr 26, 2017 at 01:23:55PM +0200, Oliver Graute wrote: > On 26/04/17, Greg KH wrote: > > On Tue, Apr 25, 2017 at 11:11:38PM +0200, Oliver Graute wrote: > > > Hello list, > > > > > > i'am using a null modem cable with two usb to serial converts on both > > > ends between my develop and my target machine. The connection is fine. > > > On both machines the serial interface is /dev/ttyUSB0 for this connection. > > > > > > On the target machine I try to enable kgdboc > > > > > > echo ttyUSB0 > /sys/module/kgdboc/parameters/kgdboc > > > > > > but only got: > > > > > > echo write error: No such device > > > > > > if I try: > > > > > > echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc > > > > > > is not complaining. Some ideas why ttyUSB0 can't be used with kgdb? > > > > USB needs interrupts in order to run properly, which kgdb doesn't enable > > when you stop the target, for obvious reasons :) > > ok that make sense > > > Stick to a "real" serial connection and you should be fine. > > thats not so easy. Even the old notebooks today lacks a "real" serial > connection. Perhaps I should use a raspberry as target. There I can get > a serial over the gpios. Why do you need to use a notebook where Linux works already for kgdb? That's traditionally only used to bring up new hardware platforms. Also, there is USB serial debugging cables as there is a special mode in the USB 2 and 3 controllers that can be enabled to handle serial messages without interrupts for console/printk early messages that people use. The cables are not cheap to enable this, but worth it if you have to debug this type of target system. Good luck! greg k-h