Ubuntu12.10 using the Jlink to connect the development Board with the ARM-GDB debug arm program

Source: Internet
Author: User
Tags bz2 gcov jlink

PART1 Environment Building and tool installation 1.1 setting up a cross-compilation environment

To install the relevant compilation tools:

sudo Install  Gcc-arm-linux-gnueabi

Here I use the Gcc-arm-linux-gnueabi series tools that are included in the Ubuntu system source and have the following tools after installation:

Arm-linux-gnueabi-addr2line arm-linux-gnueabi-GCCArm-linux-gnueabi-gprof arm-linux-gnueabi-Ranlibarm-linux-gnueabi-ararm-linux-gnueabi-GCC-4.7arm-linux-gnueabi-LDarm-linux-gnueabi-Readelfarm-linux-gnueabi-as arm-linux-gnueabi-GCC-ar-4.7arm-linux-gnueabi-LD. BFD arm-linux-gnueabi-Sizearm-linux-gnueabi-c++filt arm-linux-gnueabi-GCC-nm-4.7arm-linux-gnueabi-LD. Gold arm-linux-gnueabi-Stringsarm-linux-gnueabi-CPParm-linux-gnueabi-GCC-ranlib-4.7ARM-LINUX-GNUEABI-NM arm-linux-gnueabi-Striparm-linux-gnueabi-CPP-4.7Arm-linux-gnueabi-gcov arm-linux-gnueabi-objcopy Arm-linux-gnueabi-elfedit arm-linux-gnueabi-gcov-4.7Arm-linux-gnueabi-objdump

Note that when using make to compile the source code, the setting cross_compile parameter is: arm-linux-gnueabi-

 Make cross_compile=arm-linux-gnueabi-

1.2 Installation for ARM gdb1.2.1 to gdb website download source code

Because there is no compilation of Ubuntu under the arm platform for the GDB, it can go to the official website to download: http://ftp.gnu.org/gnu/gdb/, you can first through the gdb-v to view the appropriate version of the system;

$GDB- vGNU gdb (gdb)7.5-ubuntucopyright (C) -Free software Foundation, Inc.license GPLv3+: GNU GPL version3or later //gnu.org/licenses/gpl.html>This is FreeSoftware:you is FreeTo change and redistribute it.  There is NO WARRANTY, to the extent permitted by law. Type"Show Copying" and"Show Warranty"  fordetails. This GDB is configured as"I686-linux-gnu". For bugs reporting instructions, please see://www.gnu.org/software/gdb/bugs/>.$wgethttp//ftp.gnu.org/gnu/gdb/gdb-7.5.tar.bz2
1.2.2 Compiling and installing

Compile and install GDB, note that the target platform is set to Arm-linux, and note the following red parameter: "--program-prefix=arm-linux-", which makes the installed program name ARM-LINUX-GDB, Prevent the name of GDB that is already installed with the system;

$tar xjf gdb-7.5. Tar . BZ2$CD gdb-7.5/$. --program-prefix=arm-linux- $ sudo  Make Install

Subsequent calls to the debugger can be done directly from the command line arm-linux-gdb;

1.3 Download and use Linux version Jlink

You can use the serial number on the jlink to download the URL as follows:

Http://www.segger.com/cms/jlink-software.html

http://www.segger.com/cms/jlink-software.html?step=2&file=JLinkLinux_450i

After decompression, connect the development Board, run the start script in the Jlink directory or the Jlinkexe program, you can see the successful connection message:

USB is a jlink supported command that represents a connection from USB, more commands can be entered through? Get.

J-link> USBconnecting to J-link via USB (Port:0) Updating firmware:j-link ARM V8 compiled June +  -  One: in: -replacing Firmware:j-link ARM V8 compiled Jan to  .  -: the: theWaiting fornew firmware to bootnew firmware booted Successfullydll version v4.50i, compiled June A  -  +:xx: $firmware:j-link ARM V8 compiled June +  -  One: in: -hardware:v8.xxS/N:17892859Feature (s): Rdi,flashdl,flashbp,jflash vtarget=0. 000VJ-link>

Ubuntu12.10 using the Jlink to connect the development Board with the ARM-GDB debug arm program

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.