ARM bare board debugging technology

Publisher:心灵飞翔Latest update time:2016-06-22 Source: eefocusKeywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
What I mean by ARM bare board debugging is that after the ARM PCB board is made, the board that comes back with the patch has no program and is powered on for the first time. The reason why I wrote a blog is that I recently debugged an ARM board based on S3C6410, but we replaced the original M-DDR DRAM and Nandflash, and made significant changes to the hardware. I have done similar bare board debugging before, from ARM7 to ARM9, and now to ARM11. Today I will write an article about ARM bare board debugging.

 

As I said before, when you just get the ARM bare board, the first thing to do is to power it on. But before powering on, it is best to test whether the power supply and ground are short-circuited. Then you can power it on. I usually use a regulated power supply so that you can see the current. If the current is too large, it means that there may be a problem with the hardware. Touch the chip on the board with your hand to see if it is hot, and check whether the power supply voltage of each power module is normal. If the ARM board is normal, you can start. Based on my personal experience, the following introduces the debugging steps and possible problems:

 

1. Connect to the emulator and read and write registers

Plug the hardware emulator into the JTAG port of the ARM board, and then connect it to the PC. Nowadays, ARM emulators seem to be connected to the PC via USB. After the connection is completed, power on the board and then open the debugging software on the PC. I am using the ARM11 emulator here, and the debugging software is AXD. If AXD recognizes the ARM processor, it means the connection is successful. If it does not recognize it, there is a problem.

(1) Confirm that all power supplies for the ARM processor are correct

(2) Confirm the RESET pin of the ARM processor

(3) Check whether the crystal oscillator of the ARM processor is vibrating

(4) Confirm whether the JTAG interface is correct

If the above 4 items are normal, the emulator should be able to find ARM.

 

2. Initialize the ARM processor and DRAM through the script

Since it is a bare board, ARM has not been initialized after powering on. Generally, a script is executed to perform a basic initialization on ARM. The script is usually a txt file, for example:

setmem 0x36001004 0x4 32

setmem 0x36001010 0x40d 32

setmem 0x36001014 0x6 32

setmem 0x36001018 0x3 32

setmem 0x3600101c 0xf 32

setmem 0x36001020 0xf 32

setmem 0x36001024 0xf 32

mem 0x36001000 +1 32

mem 0x36001004 +1 32

mem 0x36001008 +1 32

mem 0x3600100c +1 32

….

The above script commands are used for AXD software, where the "setmem" command means setting a value to a certain address, and the "mem" command means reading a value from a certain address and printing it out. Through these two commands, you can set the registers inside the ARM and read the values ​​of the registers. The main function of the script is to initialize the ARM, generally including turning off Interrupt and watchdog, configuring the clock, configuring GPIO, and configuring the DRAM controller.

How to run a script in AXD? First, select "System Views" in the AXD menu, then select "Command Line Interface". A window will pop up, and enter the following command in the window:

ob c:/init.txt

 

This command means running the script command in init.txt in the root directory of drive C. As shown in the figure:

 

After the script is finished running, the ARM and DRAM on the board should have been initialized. Now you can test the read and write memory. Select "Process Views" in the menu, then select "Memory", enter the DRAM address, and then modify the values ​​above some addresses. The changed values ​​will turn red. If they can be modified, it means that the DRAM should be working properly. Here is a screenshot:

 

 

3. Download the program to DRAM via AXD and run it


The next step is to download the program to DRAM and run it. The main purpose is to use the program to burn the bootloader. Today's ARM processors are very powerful and support multiple boot modes. Depending on the different boot modes, the bootloader needs to be burned to different media. Select "File" in the AXD menu, then select "Load Memory from File...", and a window will pop up as follows:


 

As shown in the figure, enter the downloaded address in "Address", which is the running address of Loader_RAM.bin. After the download is successful, open the serial port, and then enter the command "setpc 0x50000000" in the "Command Line Interface" of AXD to point the PC pointer to the address 0x50000000, and then enter the command "go" to start running.

 

4. Burn the bootloader and start the ARM board

After the downloaded program is run, the bootloader can be burned into Nandflash, NORflash or SD card through the program, depending on the boot mode supported by the board. This program can download the bootloader through the serial port. Another way is to pause the program in AXD, then download the bootloader to DRAM through the emulator, and then resume the program in AXD and burn the downloaded bootloader into flash or SD card through the program downloaded at the beginning.

After the burning is successful, turn off the power, unplug the JTAG of the emulator, and power it back on. At this time, the bootloader in the ARM board can run.

 

After the bootloader is running, the work becomes easy. Today's bootloaders are very powerful. Linux has uboot and WinCE has Eboot, both of which support burning, downloading and other functions. Generally, if you buy a development board, it will provide a burning tool. However, after replacing DRAM and Nandflash, the burning tool may also need to be re-debugged. And the bootloader used also needs to be modified.

Keywords:ARM Reference address:ARM bare board debugging technology

Previous article:Brief Introduction to Debugging 6410 on ARM Bare Board
Next article:ARM bare board program compilation process

Recommended ReadingLatest update time:2024-11-15 15:03

Quickly learn Arm (37)--Timers and Counters (1)
There is no difference between a timer and a calculator, they just have different uses. The uses of a timer/calculator are as follows: _ The number of external events recorded. _ Generate time base, various time intervals, and implement timing mechanism.   The LPC2300 series ARM has four 32-bit programmable timers/cal
[Microcontroller]
Comparison between ARM instruction set and X86 instruction set
1. Background knowledge: The strength of instructions is an important indicator of the CPU, and the instruction set is one of the most effective tools to improve the efficiency of the microprocessor. From the current mainstream architecture, the instruction set can be divided into two parts: complex instruction set (C
[Microcontroller]
ARM7 MCU (Learning) - (I) Input/output port GPIO programming - 02
1. Input/output port GPIO programming 1—(02), control LCD1602 display~~ Without further ado, let's get straight to the pictures. Then the program~~ MDK1_2.c //------------------------------------------------------------------------------ //This is of course the main function #include "lpc210x.h" #include "macroan
[Microcontroller]
ARM7 MCU (Learning) - (I) Input/output port GPIO programming - 02
Design of Fully Digital Dual Closed-loop Brushless DC Motor Control System Based on ARM
Traditional DC motors have many advantages such as high operating efficiency and good speed regulation performance, so they occupy an important position in industrial transmission. However, their inherent mechanical commutator and brushes lead to disadvantages such as limited motor capacity, high noise, easy spark gene
[Microcontroller]
Design of Fully Digital Dual Closed-loop Brushless DC Motor Control System Based on ARM
Quickly learn Arm (41)--External memory controller (2)
Let's take a look at the EMC structure diagram:           Let's take a look at the basic operation process of EMC: 1. First, enable EMC: Before using EMC, be sure to enable it in the power control register: PCONP=PCONP|0x00000800; //11th position 1 Next, set the 0th bit of the EMC control register EMCControl to 1
[Microcontroller]
Quickly learn Arm (41)--External memory controller (2)
ARM-CortexM0 system clock
AHB is the abbreviation of Advanced High performance Bus, which is a kind of "system bus". AHB is mainly used for the connection between high-performance modules (such as CPU, DMA and DSP, etc.). The AHB system consists of three parts: master module, slave module and infrastructure. The transmission on the entire AHB b
[Microcontroller]
ARM7 Architecture
1. Words and Halfwords of Memory 1. Two consecutive bytes starting from an even address constitute a half-word. 2. Four consecutive word orders of addresses divisible by 4 constitute a word The length of an ARM instruction is exactly one word, and the length of a Thumb instruction is exactly one half word. 2. Memory s
[Microcontroller]
ARM7 Architecture
Ming-Chi Kuo on the dispute between Arm and Qualcomm: The probability of canceling the authorization is extremely low, and if it happens, both sides will suffer
On October 24, Bloomberg reported yesterday that Arm plans to cancel the license that allows its long-term partner Qualcomm to use Arm intellectual property to design chips. Today, analyst Ming-Chi Kuo wrote, "I think the chances of ARM cancelling Qauclomm's license are extremely low. If it happens, both
[Semiconductor design/manufacturing]
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号