Build an insight debugging environment on an embedded platform

Source: Internet
Author: User
Tags jlink

Insight is a GDB graphical user interface written by Tcl/Tk. It is written by engineers at Red Hat and Cygnus. Red Hat generously donated it to the public, and even provided manpower to continue to improve its functions from time to time. The Insight Project was launched in 1994 and has been quite mature so far. It can make full use of the powerful functions of most GDB.

 

The following are the installation steps: 1. First download insight 6.8-1 (version 6.8 is a little problematic) and decompress it. After decompression, do not delete the source file even after compilation, because insight still needs to use it. So I decompress it to the/OPT directory.

  1. # Tar xjvf insight-6.8-1.tar.bz2

2. compile.

  1. # Cd/opt/insight-6.8-1/
  2. #./Configure -- target = arm-Linux -- prefix =/usr/local
  3. # Make
  4. # Make install

The target option specifies that the target platform is arm-Linux, and the prefix option specifies that the installation path of the insight tool is/usr/local.


3. Compile the gdbserver paired with insight

  1. # Cdinsight-6.8-1/GDB/gdbserver
  2. #./Configure -- target = arm-Linux -- Host = arm-Linux
  3. # Make

Copy the compiled gdbserver to the root directory of your development board.

Now, compile and install insight. The following describes how to use it.

My Development Board is mini2440. nfs startup Development Board under Virtual Machine

Root directory of the Development Board:/opt/friendlyarm/mini2440/root_qtopia/

Development Board IP Address: 192.168.1.70

Linux host IP Address: 192.168.1.21

First, you need to prepare the program to be debugged. The following example uses the executable program Hello. Copy it to the root directory

The startup sequence is to first run the gdbserver of the development board, and then run insight

Development Board usage:

 

  1. # ../Gdbserver 192.168.1.21: 1000 hello

Note:

1. 192.168.1.21 is the IP address of the Linux host.

2. The colon is followed by the port number, which can be used as long as the two port numbers are the same.

3. Hello is the application you want to debug.

 

Linux host usage.

 

  1. # Cd/opt/friendlyarm/mini2440/root_qtopia/Note: you must first enter your root directory, that is, the directory where the debugging program is located.
  2. # Arm-Linux-insight./hello and then run insight

In this way, there are still many problems after the startup. First, set the port and connect to the Development Board.

1. After insight is started, select File> target setting.

Target select remote/tcp

Enter the IP address of the Development Board for host name: 192.168.1.70

Note that the port 1000 above must be consistent with the above

2. Click Run in the menu, select connect to target, and the connection will be successful. Alert on ARM development board

Remote debugging from host 192.168.1.21

3. Start debugging manually.

3. 1. Click the menu View> console to display a GDB command line screen, and enter B Main

This means to set a breakpoint at the main function.

3, 2, and then enter the letter C or continue in the command line, that is, continue to execute the program. (Because your program has been started on gdbserver. Only continue can be created on a Linux host)

4. Now you can get rid of the command line. You can debug it on the GUI.

5. At the end of debugging, You need to restart the Development Board to start gdbserver, and then start insight on the Linux host.

 

Related Articles:

Establishment of debugging environment for jlink + jlink gdb server + insight

Debug dvsdk demo-decode with insight

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.