Debugging Exynos 4412 U-boot with Eclipse and Jlink V8

Source: Internet
Author: User
Tags jlink

/********************************************************************************* @author?? Maoxiao Hu* @version? V1.0.0* @date??? Dec-2014******************************************************************************* < COPYRIGHT ISE of Shandong UNIVERSITY >*********************************************************************************/?first of all, let's talk about my lab's network environment: a public Linux server with an Ubuntu system, and several clients using SSH to connect to the server. my personal development environment: Using MAC OS x system, SSH remote connection to Linux server. USB String Connection 4412 Development Board, USB via Jlink to connect the development Board, there is no other cable connection.
Here I take the Mac system as an example, said the hardware and software environment to build, Windows and Linux under the same building method.
Prepare the package first:1. Eclipse cdt:http://www.eclipse.org/downloads/choose one of the following on your platform:There is a download link to the CDT in the middle of the approximately page:Once the download is complete, you can install it yourself. 2. Eclipse CDT ZYLINCDT PluginOpen Eclipse CDT and choose Help->install New softwarein the popup dialog box, click Add ... Button.

Name fill in:?? Zylincdt

URL fill in:? HTTP://OPENSOURCE.ZYLIN.COM/ZYLINCDT

then select the package and continue to the next step until the installation is complete. Depending on the network environment, this step takes approximately 5-10 minutes. 3, Jlink drive: https://www.segger.com/jlink-software.htmlmy jlink is Jlink V8, here you need to make sure that your jlink can be networked to upgrade firmware, firmware too low may not be able to debug cortex-a9 kernel. Select the driver download according to your platform. The installation process does not repeat. after the installation is complete, there are several programs thatas if the tools on the Windows platform are more than the Mac. 4, Gdb:https://launchpad.net/gcc-arm-embedded/+downloadNote: With Eclipse's installation platform as the standard, if your eclipse is installed directly under Linux, you can use this program directly under the cross-compilation tool in the Board CD:without having to repeat the download. other things: Install Eclipse on Windows, Mac, need to open? https://launchpad.net/gcc-arm-embedded/+download download Cross gdb. after the download is complete, unzip to any location. ----------------------- Preparation phase completed -----------------------Here's how Eclipse debugs u-boot through GDB. 1, pull u-boot source from the serverSuppose you have completed the Uboot compilation on the server and produced the elf file. Here I use the Transmit (FTP tool) to pull the source directory from the server to any local location. 2. New project in Eclipse??The source tree will then appear in the left navigation bar:3. Setting Debug ParametersRight-click the project folder and locate the debug parameters setting:?new A local Zylin debug:Locate the elf file:?set the initialization command, which may require further discussion here, let's use this section first, and then I'll test the other commands.

# Connect to the J-link gdb server
Target Remote localhost:2331
# Reset the target
Monitor Reset
Monitor Sleep 10
# Setup GDB for faster downloads
#set Remote Memory-write-packet-size 1024
Set remote memory-write-packet-size 4096
Set Remote Memory-write-packet-size fixed
Monitor Speed 12000
Load
Break _start

Also need to set up the source directory, or debug time will be prompted to find the source file:

4. Start Gdb-server

Note: You need to ensure that 4412 of the CPU is in the halt state before each debug.

Method: After the board starts, Uboot read seconds before the end of pressing any key to make 4412 into the Uboot interface, instead of booting the kernel, jlink may not be able to make 4412 pause after booting the kernel.

Opening the JLINKEXE,CPU will be recognized successfully, this step is critical, the inability to identify the CPU may be due to the Jlink firmware version is too low, or a hardware connection problem.

We use the halt command to stop the CPU:

Exit Jlinkexe.

Open Jlinkgdbserver, if successful, will show waiting for GDB to connect:

5. Go back to eclipse to perform debugging

Click Bug to start Debug

The value of the register is read successfully and can be debugged in one step, enjoy.

?

Problems to be solved after the day is out:

1, here I did not seriously study GDB's initialization command, now only can run, but also need to make further changes.

2, the code to run the address seems to have a problem, gdb-server always hint can not read some locations, such as check the source code, re-locate and try again.

3, may need to be in the debugging phase of the CPU to reduce frequency processing, otherwise jlink will probably not stop the CPU (experience judgment).

4, the most worried about the problem is Jlink V8 can perfect support A9 debugging, but so far has not found the problem.

?

Use eclipse with Jlink V8 debugging Exynos 4412 u-boot

Related Article

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.