Introduction to arm bare board debugging

Source: Internet
Author: User
About arm bare board debugging 15309101313

13:56:11 favorites | print | vote (1) | comment (0) | read (15938) ◇ fonts: [large, small]

Author: arm-WinCE

What I saidArm bare board debuggingAfter the PCB Board of ARM is created, the Board that comes back from the patch does not have anyProgram, Power-on is the first time. The reason for writing a blog, because recently debugged a piece of arm Board, based on the, but we have replaced the original M-DDR DRAM and nandflash all, hardware has made a small change. We have also done similar bare board debugging in the past, from ARM7 to ARM9. Today I will write an article about arm bare board debugging.Article.

As I mentioned earlier, when I first got an arm bare board, I had to power on the board. However, before power-on, it is best to test whether the power supply and ground are short-circuited. Then we can power on. I usually use a regulated power supply, so that we can see the current size. If the current is too large, it indicates that the hardware may be faulty. I can touch the chip on the board by hand, check whether the power supply voltage of each power supply module is normal. If the arm board is normal, you can start. The following describes the debugging steps and possible problems based on my personal experience:

1. Connect the simulator to read and write registers.

Plug the hardware simulator into the JTAG port of the arm board and connect to the PC. Now the ARM Simulator seems to be connected to the PC through USB. After the connection, power on the board and open the PC debugging software. Here I use the arm11 simulator and the axd for debugging software. If the axd identifies an ARM processor, the connection is successful. If the axd does not recognize the processor, the connection is faulty.

(1) check whether all power supplies of the ARM processor are correct

(2) confirm the reset pin of the ARM processor

(3) check whether the crystal oscillator of the ARM processor vibrates.

(4) check whether the JTAG interface is correct

If the above four items are normal, the simulator should be able to find the arm.

2. initialize the ARM processor and DRAM through a script

Because it is a bare board, no initialization has been done after arm is powered on. Generally, a script is executed to initialize the arm. A script is generally 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 preceding script command is used for axd software. The "setmem" command indicates that a value is set to an address, and the "mem" command indicates that a value is read and printed from an address. With these two commands, you can set the internal registers of the arm or read the values of the registers. The script is mainly used to initialize the arm, including disabling interrupt and watchdog, configuring clock, configuring gpio, and configuring DRAM controller.

How to run scripts in axd? Select "system views" in the axd menu, and then select "command line interface". A window is displayed, and the following command is entered in the window:

Ob c: \ init.txt

This command is used to run the script command in init.txt under the C-root directory.

After the script is run, the arm and dram on the Board should have been initialized. In this case, you can perform a read/write memory test. Select "Process views" in the menu, select "Memory", enter the dram address, and modify the values above some addresses, the changed value will change to Red. If it can be modified, it indicates that DRAM should work normally. Here is:

3.Through axdDownload the program to dramRunning

The next step is to download the program to DRAM and run it. The main purpose is to use this program to burn bootloader. Currently, arm processors are powerful and support multiple startup modes. Depending on the startup mode, you need to burn the bootloader to different media. Select "file" in the axd menu, and then select "load memory from file ...", A window will pop up, as shown below:

Enter the download address in address, which is the running address of loader_ram.bin. After the download is successful, open the serial port, enter the command "setpc 0x50000000" in "command line interface" of axd, and point the PC pointer to the 0x50000000 address, run the "go" command.

4. Burn Bootloader and start the arm Board

After the Downloaded Program runs, you can use this program to burn the bootloader to nandflash, norflash, or SD card, depending on the Startup Mode Supported by the Board. This program can download bootloader through the serial port. Another way is to pause the program running in axd, download bootloader to DRAM through the simulator, and resume the program running in axd, use the initial program to download the bootloader to flash or SD card.

After the installation is successful, power off, unplug the JTAG of the simulator, and power on again. At this time, the bootloader in the arm board can run.

It is easy to work after bootloader is run. Currently, the bootloader is very powerful. Linux has uboot and wince has eboot, which can support functions such as burning and downloading. Generally, if you buy a Development Board, a burning tool is provided. However, after changing DRAM and nandflash, the burning tool may need to be debugged again. In addition, the bootloader needs to be modified.

this article from the csdn blog, reprinted please indicate the source: http://blog.csdn.net/nanjianhui/archive/2009/05/15/4189270.aspx

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.