关于IAR用JLINK调试的疑问
这几天在用IAR和JLINK调试ARM9的一个测试程序,刚接触ARM一个月了,还没有吃透如何下载程序,以及程序在目标板执行的过程,一下是我IAR调试过程中出现的调试信息:
Mon Mar 19 20:34:55 2012: DLL version: V3.92a, compiled Oct 6 2008 19:58:36
Mon Mar 19 20:34:55 2012: Firmware: J-Link ARM V8 compiled Jan 31 2011 18:34:52
Mon Mar 19 20:34:55 2012: JTAG speed is initially set to: 32 kHz
Mon Mar 19 20:34:55 2012: Initial reset was performed
Mon Mar 19 20:34:55 2012: TotalIRLen = 4, IRPrint = 0x01
Mon Mar 19 20:34:55 2012: CP15.0.0: 0x41129200: ARM, Architecure 4T
Mon Mar 19 20:34:55 2012: CP15.0.1: 0x0D172172: ICache: 16kB (64*8*32), DCache: 16kB (64*8*32)
Mon Mar 19 20:34:55 2012: Cache type: Separate, Write-back, Format A
Mon Mar 19 20:34:55 2012: J-Link found 1 JTAG device(s). ARM core Id: 32409D ARM9
Mon Mar 19 20:34:55 2012: Device at TAP0 selected
Mon Mar 19 20:34:55 2012: JLINK command: ProjectFile = C:\Users\Ruan\Documents\IAR for arm\settings\test1_Debug.jlink, return = 0
Mon Mar 19 20:34:55 2012: JLINK command: device = S3C2440A, return = 0
Mon Mar 19 20:34:55 2012: RTCK is not connected
Mon Mar 19 20:34:55 2012: Auto JTAG speed: 8000 kHz
Mon Mar 19 20:34:55 2012: 572 bytes downloaded (1.43 Kbytes/sec)
Mon Mar 19 20:34:55 2012: Loaded debugee: C:\Users\Ruan\Documents\IAR for arm\Debug\Exe\test1.out
Mon Mar 19 20:34:55 2012: Target reset
Mon Mar 19 20:35:01 2012: Failed to read one or more register values (busy).
想请问一下大家,当中出现的RTCK is not connected是怎么回事呢?以及最后一句Failed to read one or more register values (busy).也不知道是什么原因,我的linker的配置文件中的内容如下:
/*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x00000000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x0;
define symbol __ICFEDIT_region_ROM_end__ = 0x1000;
define symbol __ICFEDIT_region_RAM_start__ = 0x30000000;
define symbol __ICFEDIT_region_RAM_end__ = 0x34000000;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x2000;
define symbol __ICFEDIT_size_svcstack__ = 0x100;
define symbol __ICFEDIT_size_irqstack__ = 0x100;
define symbol __ICFEDIT_size_fiqstack__ = 0x100;
define symbol __ICFEDIT_size_undstack__ = 0x100;
define symbol __ICFEDIT_size_abtstack__ = 0x100;
define symbol __ICFEDIT_size_heap__ = 0x8000;
/**** End of ICF editor section. ###ICF###*/
define memory mem with size = 4G;
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
define block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ { };
define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { };
define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { };
define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { };
define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
initialize by copy { readwrite };
do not initialize { section .noinit };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place in ROM_region { readonly };
place in RAM_region { readwrite,
block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK,
block UND_STACK, block ABT_STACK, block HEAP };
主程序如下:
#include "Def.h"
#include "Option.h"
#include "2440addr.h"
#include "2440lib.h"
#include "2440slib.h"
#define led0_on (rGPBDAT &= ~0x01)
#define led0_off (rGPBDAT |= 0x01)
//================================
void delay(U32 tt)
{
U32 i;
for(;tt>0;tt--)
{
for(i=0;i<10000;i++){}
}
}
int main(int argc, char **argv)
{
//mpll_val = (92<<12)|(1<<4)|(1);
//init FCLK=400M, so change MPLL first
//ChangeMPllValue((mpll_val>>12)&0xff, (mpll_val>>4)&0x3f, mpll_val&3);
//ChangeClockDivider(key, 12);
//ChangeClockDivider(1,1); // 1:2:4 FCLK:HCLK:PCLK
// rCLKDIVN=0x4; // 1:4:4
//ChangeMPllValue(82,2,1); //FCLK=135.0Mhz
//ChangeMPllValue(82,1,1); //FCLK=180.0Mhz
//ChangeMPllValue(161,3,1); //FCLK=202.8Mhz
//ChangeMPllValue(117,1,1); //FCLK=250.0Mhz
//ChangeMPllValue(122,1,1); //FCLK=260.0Mhz
//ChangeMPllValue(125,1,1); //FCLK=266.0Mhz
//ChangeMPllValue(127,1,1); //FCLK=270.0Mhz
//MMU_EnableICache();
//MMU_EnableDCache();
//MMU_DisableICache();
//MMU_DisableDCache();
//rGPBCON = 0x155555;
rGPBUP=0XFFF;
rGPBCON=0X05;
while(1)
{
led0_on;
delay(0xfffff);
led0_off;
delay(0xfffff);
}
} 希望大家能多给些建议及指导!