[llvmlinux] rpi, serial and kgdb

Jan-Simon Möller dl9pf at gmx.de
Mon Jan 21 17:37:43 UTC 2013


Hi all!

Here's a short documentation on how to use the serial port on the rpi with 
console and gdb:


* Build your kernel with debugging symbols and kgdb (over serial) enabled.


* Deploy it, boot it.


* Change the kernel cmdline and add:

console=ttyAMA0,115200 kgdboc=ttyAMA0,115200

1st is the serial console, 2nd is the gdb connection.


* download and build agent-proxy
git clone http://git.kernel.org/pub/scm/utils/kernel/kgdb/agent-proxy.git
cd agent-proxy
make
./agent-proxy 5550^5551 0 /dev/ttyUSB0,115200 


Now we have console on port 5550 and gdb on port 5551.
Boot the board and ...

a) telnet 127.0.0.1:5550  -> console
b) gdb:

   gdb vmlinux
   - set remotebaud 115200
   - target remote 127.0.0.1:5551

Et voila!

Best,
JS

-- 

Dipl.-Ing.
Jan-Simon Möller

jansimon.moeller at gmx.de


More information about the LLVMLinux mailing list