gdb/gdbserver Instructions Use the following instructions to debug a user application on the blackfin development (target) board. As directed below the host gdb needs to be installed and compiled, but gdbserver should be selected as part of the "make xconfig" procedure. gdb: 1. Extract gdb host software using the following command: tar zxf /cdrom/tools/gdb-5.0-nisa-src.tar.gz cd gdb/ 2. Configure gdb for your system: ./configure --target=nisa-elf 3. Compile gdb: make If everything compiled correctly the gdb executable will be in the gdb/ subdirectory. 4. If desired, copy this file to the blackfin tools directory. cp gdb/gdb /opt/uClinux/blackfin/bin/nisa-elf-gdb gdbserver: 1. Select the gdbserver option by following the selections in "make xconfig". Customize Vendor/User Settings Miscellaneous Applications gdbserver Build the executable image normally. When the build is complete gdbserver will be an executable and the required host side files are in the ./user/"app" directory. The file that is necessary on the host side is "your-app".gdb. Connect a cable from a host serial port to the blackfin target port UART 0. The cable pinout required for gdb is the same as the cable used for the console. Debugging: 1. Boot the kernel on blackfin target board. 2. In the shell prompt of blackfin target board type: gdbserver /dev/ttyS0 "your-app" 3. On your linux host start gdb: gdb "your-app".gdb or nisa-elf-gdb "your-app".gdb (gdb) target remote /dev/ttyS0 (Use ttyS0 or ttyS1 depending on which host serial port you used.) Something like the following information should be displayed on your host and target terminals if everything is working properly. I used login as an example of a target application to debug. target: /> cd bin /bin> gdbserver /dev/ttyS0 login Process login created; pid = 16 code at 0xee0040 - 0xee7c80, data at 0xee7c80 Remote debugging using /dev/ttyS0 host: > cd user/login > nisa-elf-gdb login.gdb GNU gdb 5.0 Copyright 2000 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=nisa-elf"... (gdb) target remote /dev/ttyS0 Remote debugging using /dev/ttyS0 0xee0040 in start () (gdb) From here all the normal gdb commands should work. Refer to one of the many gdb help resources if you need more information about gdb.