Build an ARM Development Environment Based on ADS + J-Link in Windows

Source: Internet
Author: User
Tags jlink
In general ARM programming teaching and experimental environments, the development environment of ADS plus + parallel port conversion of Jtag board + H-Jtag is generally used. However, the biggest disadvantage of this method is that there must be a parallel port on the machine. Now it is difficult to have a parallel port between PCs and laptops. Therefore, USB interface debugger is widely used. The JLink of Sigger is a well-known and convenient debugger. ADS 1.2, you can download the following link http://esoft.mcu123.com/MCU123_temp_0080309@/ARM/ads1.2.rar hardware can refer to this
Jlink V8 original firmware TVs + fuse J-LINK V8 simulator (full-featured automatic upgrade)
$75.0
Http://s.click.taobao.com/t_1? I = qz0qHj7qltKQRQ % 3D % 3D & p = mm_11796696_0_0 & n = 11 1. Install J-LinkFirst, install the driver. Can download http://www.segger.com/cms/jlink-software.html from the official website I download the latest driver 4.14d, http://www.segger.com/cms/admin/uploads/userfiles/file/J-Link/Setup_JLinkARM_V414d.zip (the last test of this version is not available in AXD, always program dead) I final success is the old version 4.02d, this version basically can ensure that it is normal to use the old version about segger are concentrated here http://www.segger.com/cms/j-link-older-versions.html I use the 4.02d driver. http://www.segger.com/cms/admin/uploads/userfiles/file/J-Link/Setup_JLinkARM_V402d.zip graphics installer all the way to nex T. 1.1 test the connection between PC and J-LinkAfter the driver is installed, the menu of Sigger-> J-Link ARM 4.02d will be displayed on the main menu. Connect the USB interface of JLink to the PC (the jtag end can not be connected to the Development Board). Under normal circumstances, Windows will prompt you to discover the hardware and automatically install the hardware. Run the J-Link GDB Server program. There will be the following interface 1. now, transfer the Jtag line on J-Link to the development board. I use TQ24402. do not enter the Operating System (Arm-Linux or WinCE) after the Development Board is powered on ), therefore, it may conflict with the simulation software. The simpler method is Switch to Nor flash Startup ModeThis mode will not normally go to OS .3. after JLink is connected, the LCD will not be displayed, which is normal. If you run GDB Server again, the following prompt is displayed when you connect to the Development Board. . (Note that gdb should be used normally. Generally, You need to manually tune the byte order to Little Endian. If it is not used, it doesn't matter.) after such a test, it indicates that J-Link works normally. Ii. debug the program using J-Link in ADS  2.1 use ADS to open the project source codeOpen a test project on ADS. I usually use LED projects for teaching. after compilation, select the debug button to go to The AXD debugging interface. The first time you use AXD, an error will occur. You can configure it in Step 2.2 regardless of the error. 2.2 configure the AXD interface (required !)Choose Options> Configure Interface... from the AXD main menu .... Configure two items. One is to select Target connection from the General tab. HALTMode 2: configure the SDRAM address during AXD initialization. You can write the configuration command in a script. Set as initialization script in AXD. Method, select Configure Interface --> Session File --> Run Configuration Script.Add the full path of the sdram script 2440init.txt (note that the path should not contain Chinese characters. To prevent format errors, use the file included in the attachment). The content of 2440init.txt is as follows:

Setmem 0 x 5300gb/s, 0 x percentile, 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 0x481_20, 0x00018005, 32

Setmem 0x4821324,0x00960542,32

Setmem 0x481_28,0x00000032,32

Setmem 0x4800002c, 0x00000030,32

Setmem 0x4821330,0x00000030,32

  2.3 configure J-Link's RDI InterfaceIn the AXD debugging interface. Choose Options> Configure Target... from the AXD main menu .... Select JLinkRDI. dll under the sigger installation directory. This step allows the AXD to call the J-Link DLL for debugging. RDI is a Remote Debug Interface (RDI) protocol designed by ARM for communication between debuggers and AXD. After configuration, you can directly debug the program in J-Link. If you have no relevant experience, you can turn off the AXD and re-Execute Step 1 to debug the program. 2.4 axd call the J-link debugging InterfaceMy test is a complete 2440 test program. The 64-3 K axf test program can be debugged after being downloaded in an instant. This is unimaginable when I use the parallel port for debugging. It may not be finished in a few minutes, in addition, single-step debugging is very slow. In addition, J-Link debugging does not solve this problem at all. Fast. J-Link's Control panel automatically opens to the self-http://blogold.chinaunix.net/u3/105675/showart_2260143.html during debugging

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.