In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to use eclipse and jLink V8 to debug exynos 4412 u-boot, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
/ * *
*
*
< COPYRIGHT 2014 ISE of SHANDONG UNIVERSITY >*
* * /
First of all, let's talk about the network environment of our lab: a public Linux server with ubuntu system, and several clients connect to the server using ssh.
My personal development environment: using Mac OS X system, ssh remote connection to the Linux server. The USB is connected to the 4412 development board, and the USB is connected to the development board through jLink. There is no other cable connection for the time being.
Here I will take the Mac system as an example to talk about the construction of software and hardware environment. The building method under windows and Linux is basically the same.
First prepare the package:
1. Eclipse CDT: http://www.eclipse.org/downloads/
Choose one of them according to your platform:
There is a download link for CDT approximately in the middle of the page:
After the download is complete, you can install it yourself.
If your system is Mac, then you may not need to install environments such as jre jdk, because the system has been installed for you by default
If your system is linux, you may prompt that eclipse cannot be opened. You need to install jre jdk, and the terminal executes the command:
Sudo apt-get install openjdk-7-jre openjdk-7-jdk
2. Eclipse CDT zylincdt plug-in
Open eclipse CDT and select help- > Install New Software
In the pop-up dialog box, click Add... Button.
Name: zylincdt
URL: http://opensource.zylin.com/zylincdt
Then select the package and continue until the installation is complete. Depending on the network environment, this step takes about 5-10 minutes.
3. JLink driver: https://www.segger.com/jlink-software.html
My jLink is jLink V8, and you need to make sure that your jLink can upgrade firmware online. If the firmware is too low, you may not be able to debug the Cortex-A9 kernel.
Choose the driver to download according to your own platform.
The installation process will not be repeated.
After the installation is complete, you will have the following programs
It seems that there are more tools on the windows platform than on Mac.
4. Gdb: https://launchpad.net/gcc-arm-embedded/+download
Note: based on the installation platform of eclipse, if your eclipse is installed directly under Linux, you can directly use this program under the cross-compilation tool on the development board CD:
Without the need for repeated downloads.
Other situations: to install eclipse on windows and Mac, you need to open https://launchpad.net/gcc-arm-embedded/+download to download cross-gdb.
After the download is complete, extract it to any location.
-preparation phase completed
Here's how eclipse debugs u-boot through gdb.
1. Pull the u-boot source code from the server
Suppose you have finished compiling uboot on the server and produced the elf file. Here I use transmit (FTP tool) to pull the source directory from the server to any local location.
2. Build a new project in eclipse
Then the source tree appears in the left navigation bar:
3. Set debugging parameters
Right-click the project folder to find the debug parameter settings:
New a local Zylin debug:
Locate the elf file:
Setting up initialization commands may need to be discussed further here. Let's use this paragraph first, and then I'll test 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
You also need to set up the source directory, otherwise you will be prompted that the source file cannot be found when debugging:
4. Start gdb-server
Note: make sure that 4412 of the CPU is in the halt state before each debugging.
Method: after the board starts, press any key before the end of uboot read seconds to make 4412 enter the uboot interface instead of starting the kernel. Jlink may not be able to pause 4412 after starting the kernel.
Opening the JLinkExe,CPU will be recognized successfully, which is critical. If the CPU is not recognized, it may be due to the low firmware version of jlink or a hardware connection problem.
We use the halt command to stop CPU:
Exit JLinkExe.
Open JLinkGDBServer. If it is successful, it will show waiting for gdb connection:
5. Go back to eclipse to perform debugging
Click on the bug directly to start Debug
The value of the register has been successfully read out and can be debugged in a single step, enjoy.
Problems that need to be solved:
1. I didn't seriously study the initialization command of gdb here. Now I can just run it and need to make further modifications.
2. There seems to be a problem with the running address of the code. Gdb-server always prompts that some locations cannot be read. Check the source code, relocate the code and try again.
3. It may be necessary to reduce the frequency of CPU during debugging, otherwise jlink may not be able to stop CPU (empirical judgment).
4. The most worrying problem is whether jlink V8 can perfectly support A9 debugging, but no problem has been found so far.
The above is all the contents of the article "how to debug exynos 4412 u-boot with eclipse and jLink V8". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.