Jlink + ads debugging S3C2440

Source: Internet
Author: User
Tags jlink

I will only debug the program in SDRAM. Let's talk about it:
ADS project attribute settings:
-Ro-base = 0x30000000
Entry 0x30000000
Init section: 2440init. O init
In axd, an SDRAM initialization file needs to be loaded.
Under axd --> Option-> config interface-> session file-> RUN configuration script.
Select an initialization file with the following content:
Setmem 0x53000000 0x00000000 32
Setmem 0x4a000008 0 xffffffff 32
Setmem 0x4a00001c 0x000007ff 32
Setmem 0x53000000 0x00000000 32
Setmem 0x56000050 0x000055aa 32
Setmem 0x4c000014 0x00000007 32
Setmem 0x4c000000 0x00ffffff 32
Setmem 0x4c000004 0x00061012 32
Setmem 0x4c000008 0x00040042 32
Setmem 0x48000000 0x22111120 32
Setmem 0x48000004 0x00002f50 32
Setmem 0x48000008 0x00000700 32
Setmem 0x4800000c 0x00000700 32
Setmem 0x48000010 0x00000700 32
Setmem 0x48000014 0x00000700 32
Setmem 0x48000018 0x0007fffc 32
Setmem 0x481_1c 0x00018005 32
Setmem 0x48000020 0x00018005 32
Setmem 0x48000024 0x008e0459 32
Setmem 0x48000028 0x00000032 32
Setmem 0x481_2c 0x00000030 32
Setmem 0x48000030 0x00000030 32

Disable option-> config procossor-> semihosting
With the above method, a small program can be run once or several times in the SDRAM.

Option-> config procossor-> vector catch-> clear all
There will be no too worker breakpoint.

Almost the same as JTAG. The selected simulation DLL is different.

First, write the memory initialization file, which is the table that initializes the memory controller. -Install the jlink disc drive. Open ads and click Debug. select target configuration. Set the memory initialization file path and the jlink simulation dll path. It seems that jlink has instructions.

OK. The next time you start ads debug, jlink is automatically used.

Positive solution!

Bootloader is usually available in the Board, and hardware initialization is completed during the startup process. So if you wait for boot to start axd debugging again (disable J-LINK reset), you don't need the axd debugger file.

Find a jlink V8 video tutorial for debugging with subtitles to see if it is useful.

Http://topic.csdn.net/u/20090220/11/284f0b00-1737-4b31-9812-08481c5cbd93.html

(Solved) arm79_0 raise an exption, cause: the processor was reset.

Why does ads + jlink prompt when you enter axd to download and run image?

Arm79_0 raise an excption, cause: the processor was reset.

The solution found on the internet is as follows:

During arm JTAG debugging, the default axd does not initialize the SDRAM (this is no wonder that the axd does not know the connection of the Board). Therefore, you need to initialize the code before debugging it to the SDRAM. You can also enable the axd to configure the 2440 SDRAM control register through the JTAG to initialize the SDRAM and reference others. Labor results:

Set the target board using the axd command line

Because the SDRAM address is 0x30000000, You need to first set the memory control register. In axd, set the method to: Select systems views-> command lines interface, and enter the following command to set the register.

Address value Length

Setmem 0x53000000, Zero X 00000000, 32

You can also write a file into the registers you want to set. You can use OB (obey) config. ini on the command line to execute the setting commands in batches or make the following settings in options-> Configure interface.

The content of my config file is as follows:

Setmem 0x53000000, Zero X 00000000, 32

Setmem 0x4a000008, 0 xffffffff, 32

Setmem 0x4a00001c, 0x00007fff, 32

Setmem 0x48000000, 0x2212d110, 32

Setmem 0x48000004, 0x00000f40, 32

Setmem 0x48000008, 0x00002e50, 32

Setmem 0x4800000c, 0x00002e50, 32

Setmem 0x48000010, 0x00002e50, 32

Setmem 0x48000014, 0x00002e50, 32

Setmem 0x48000018, 0x00002e50, 32

Setmem 0x481_1c, 0x00018005, 32

Setmem 0x48000020, Zero X 00018005, 32

Setmem 0x48000024, Zero X 00960542, 32

Setmem 0x48000028, Zero X 00000032, 32

Setmem 0x481_2c, 0x00000030, 32

Setmem 0x48000030, Zero X 00000030, 32

If the settings are correct, the developed version of SDRAM takes effect and the target code can be loaded.

Http://www.e-online.cc/bbs/thread-76-1-1.html

The problem with the original Board was also found during debugging today (when 0x30000000 is written, 0x30000001 ~ 3)

Load the configuration file in Option-> Configure interface-> session file

The content is as follows:

Setmem 0x53000000 0x00000000 32
Setmem 0x4a000008 0 xffffffff 32
Setmem 0x4a00001c 0x000007ff 32
Setmem 0x53000000 0x00000000 32
Setmem 0x56000050 0x000055aa 32
Setmem 0x4c000014 0x00000007 32
Setmem 0x4c000000 0x00ffffff 32
Setmem 0x4c000004 0x00061012 32
Setmem 0x4c000008 0x00040042 32
Setmem 0x48000000 0x22111120 32
Setmem 0x48000004 0x00002f50 32
Setmem 0x48000008 0x00000700 32
Setmem 0x4800000c 0x00000700 32
Setmem 0x48000010 0x00000700 32
Setmem 0x48000014 0x00000700 32
Setmem 0x48000018 0x0007fffc 32
Setmem 0x481_1c 0x00018005 32
Setmem 0x48000020 0x00018005 32
Setmem 0x48000024 0x008e0459 32
Setmem 0x48000028 0x00000032 32
Setmem 0x481_2c 0x00000030 32
Setmem 0x48000030 0x00000030 32

After that, it will be OK. It seems that the memory configuration is still a problem.

Put the following content in a file and load it with jink file.txt. nboot2nd. Bin can be automatically downloaded and run
Note: without the W4 heap memory configuration command, it will be wrong to download the file to ram.

R
H
W4 0x53000000 0x00000000
W4 0x4a000008 0 xffffffff
W4 0x4a00001c 0x000007ff
W4 0x53000000 0x00000000
W4 0x56000050 0x000055aa
W4 0x4c000014 0x00000007
W4 0x4c000000 0x00ffffff
W4 0x4c000004 0x00061012
W4 0x4c000008 0x00040042
W4 0x48000000 0x22111120
W4 0x48000004 0x00002f50
W4 0x48000008 0x00000700
W4 0x4800000c 0x00000700
W4 0x48000010 0x00000700
W4 0x48000014 0x00000700
W4 0x48000018 0x0007fffc
W4 0x481_1c 0x00018005
W4 0x48000020 0x00018005
W4 0x48000024 0x008e0459
W4 0x48000028 0x00000032
W4 0x481_2c 0x00000030
W4 0x48000030 0x00000030

Speed12000
Loadbin D: \ nboot2nd. Bin, 0x30000000
Setpc 0x30000000
G

// Use the following command to check whether the data written in the memory is correct

Mem 30000000,16
W1 30000000,0x12
Mem 30000000,16

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.