原创 keil下使用jlink调试S3C2440方法

2009-12-22 21:54 8415 6 6 分类: MCU/ 嵌入式

问题引入:需要实现在MDK下使用jlink v8调试S3C2440;


参考博客:


debugging with Jlink under keil


出处:http://blog.chinaunix.net/u3/94861/showart.php?id=1907622
project   : debugging with Jlink on keil
instuction: jlinker settings for QQ2440 board under keil IDE

(1) Firstly, modify the scatter files as following( locate it start at SDRAM: 0x30000000):

scatter file:
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************

LR_ROM1 0x30000000 {    ; load region size_region
  RO +0  {  ; load address = execution address
   2440init.o (+RO,+First)
   *(InRoot$$Sections)
   .ANY (+RO)
  }
  RW +0  {  ; RW data
   .ANY (+RW)
  }
  ZI +0  {  ; ZI data
   .ANY (+ZI)
  }
}
=================================================================

(2) Do not enable the item "Run to main()", because when the target reset, the PC value is 0x00000000, so will change it to 0x30000000 to run.(if not, it can not change the PC register value.)

(3) enter into "SEGGER J-Link RDI V4.02 Congiuration" Dialog and setting as below.
(3.1) General page: USB --> Device 0
(3.2) Init page: macro file as following:
filename: QQ2440.setup:
===================================================================
/*********************************************************************
*
*    Macro file for J-LINK RDI
*
**********************************************************************
* File:    QQ2440.setup
* Purpose: Setup for S3C2440 chip
**********************************************************************
*/
Write32(0x53000000, 0x00000000);
Write32(0x4A000008, 0xFFFFFFFF);
Write32(0x4A00001C, 0x000007FF);
Write32(0x53000000, 0x00000000);
Write32(0x56000050, 0x000055AA);
Write32(0x4C000014, 0x00000007);
Write32(0x4C000000, 0x00FFFFFF);
Write32(0x4C000004, 0x00061012);
Write32(0x4C000008, 0x00040042);
Write32(0x48000000, 0x22111120);
Write32(0x48000004, 0x00002F50);
Write32(0x48000008, 0x00000700);
Write32(0x4800000C, 0x00000700);
Write32(0x48000010, 0x00000700);
Write32(0x48000014, 0x00000700);
Write32(0x48000018, 0x0007FFFC);
Write32(0x4800001C, 0x00018005);
Write32(0x48000020, 0x00018005);
Write32(0x48000024, 0x008E0459);
Write32(0x48000028, 0x00000032);
Write32(0x4800002C, 0x00000030);
Write32(0x48000030, 0x00000030);

===================================================================

(3.3) JTAG page: JTAG speed --> 12000 kHz
(3.4) Flash page: Disable Flash programming.
(3.5) Breakpoints page: Enable Use software breakpoints.
(3.6) CPU page: Enable Allow instruction set simulation, Little endian. Reset Normal.
(3.7) Log page: None.

Done! Good Luck!
这是qq2440.setup配置:https://static.assets-stash.eet-china.com/album/old-resources/2009/12/22/89ef3c60-64dd-4c46-bccb-9aa9b4c79b14.rar


这是基于ram的调试工程

文章评论0条评论)

登录后参与讨论
我要评论
0
6
关闭 站长推荐上一条 /2 下一条