jt_arm_iceRT.c File Reference

#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/time.h>
#include "dbg_msg.h"
#include "jt_arm.h"
#include "jt_instr.h"
#include "convert.h"

Data Structures

Functions

Variables


Detailed Description

EmbeddedICE or ICE-RT interface for ARM7TDMI / ARM9TDMI

Note: We support ARM7TDMI and ARM9TDMI only.
At chain 2 ARM7TDMI and ARM9TDMI cores both have an embedded-ICE programming unit.
The length is 38 bits and the layout is similar but the behaviour is not exactly equal.
The ARM10TDMI core does not have this kind of unit at chain 2. (It's using a different mechanism.)


Function Documentation

unsigned int jtag_arm_IceRT_RegRead ( int  nreg  ) 
unsigned int jtag_arm_IceRT_RegRead_Once ( int  nreg  ) 
void jtag_arm_IceRT_RegWrite ( int  nreg,
unsigned int  regdata 
)
unsigned int jtag_arm_IceRT_RegWrite_getPrevData ( int  nreg,
unsigned int  regdata 
)
void jtag_arm_ShowAllIceRT_Regs ( void   ) 
unsigned int jtag_arm_iceRT_PollDbgState ( void   ) 
int jtag_arm_iceRT_StopRunningProgram ( void   ) 

Send ICE-RT a manual debug request to stop the running program.

Parameters:
- 
Returns:
-

References ICERT_REG_DEBUG_CONTROL, jtag_arm_IceRT_RegWrite(), and jtag_eos().

int jtag_arm_IceRT_version ( void   ) 

Read out the ICE-RT version (and the save version number in arm_info.ice_revision).

Parameters:
- 
Returns:
version number

References DBG_LEVEL_GDB_ARM_INFO, dbgPrintf(), ICERT_REG_DCC_CONTROL, and jtag_arm_IceRT_RegRead().

Referenced by gdb_restart().

void jtag_arm_IceRT_PutAnyBreakPoint ( void   ) 
void jtag_arm_IceRT_PutHWBreakPoint0 ( uint32_t  addr  ) 
void jtag_arm_IceRT_PutHWBreakPoint1 ( uint32_t  addr  ) 
void jtag_arm_IceRT_PutSWBreakPoint0 ( void   ) 

Program first Watch/Breakpoint register to break if an Soft-Break instruction should be executed. (using 0xB710B710 as ARM Software break and 0xB710 as THUMB Software break).

Parameters:
- 
Returns:
-

References DBG_LEVEL_GDB_ARM_WARN, dbgPrintf(), ICERT_REG_WATCHPOINT_0_ADDRMASK, ICERT_REG_WATCHPOINT_0_CONTROL, ICERT_REG_WATCHPOINT_0_CONTROLMASK, ICERT_REG_WATCHPOINT_0_DATA, ICERT_REG_WATCHPOINT_0_DATAMASK, jtag_arm_IceRT_RegWrite(), transactionActivate(), transactionCreate(), transactionErase(), transactionExecute(), transactionGet(), transactionPenting(), transaction::uplevel, and icert::watchpoint0.

Referenced by gdbSetupJtagTarget_Breakpoint().

void jtag_arm_IceRT_PutSWBreakPoint1 ( void   ) 

Program second Watch/Breakpoint register to break if an Soft-Break instruction should be executed. (using 0xB710B710 as ARM Software break and 0xB710 as THUMB Software break).

Parameters:
- 
Returns:
-

References DBG_LEVEL_GDB_ARM_WARN, dbgPrintf(), ICERT_REG_WATCHPOINT_1_ADDRMASK, ICERT_REG_WATCHPOINT_1_CONTROL, ICERT_REG_WATCHPOINT_1_CONTROLMASK, ICERT_REG_WATCHPOINT_1_DATA, ICERT_REG_WATCHPOINT_1_DATAMASK, jtag_arm_IceRT_RegWrite(), transactionActivate(), transactionCreate(), transactionErase(), transactionExecute(), transactionGet(), transactionPenting(), transaction::uplevel, and icert::watchpoint1.

Referenced by gdbSetupJtagTarget_Breakpoint().

void jtag_arm_IceRT_PutWatchPoint0 ( uint32_t  addr,
int  len,
int  access 
)

Program first Watchpoint register to break if Read/Write access on given address.

Parameters:
addr hardware address to watch (should be word aligned)
len number of bytes to watch (round up to power of 2; at least =4 then 8,16,32..)
access Write access(=1); Read access(=2); Read/Write access (=3)
Returns:
-

References DBG_LEVEL_GDB_ARM_WARN, dbgPrintf(), ICERT_REG_WATCHPOINT_0_ADDRESS, ICERT_REG_WATCHPOINT_0_ADDRMASK, ICERT_REG_WATCHPOINT_0_CONTROL, ICERT_REG_WATCHPOINT_0_CONTROLMASK, ICERT_REG_WATCHPOINT_0_DATAMASK, jtag_arm_IceRT_RegWrite(), transactionActivate(), transactionCreate(), transactionErase(), transactionExecute(), transactionGet(), transactionPenting(), transaction::uplevel, and icert::watchpoint0.

Referenced by gdbSetupJtagTarget_Breakpoint().

void jtag_arm_IceRT_PutWatchPoint1 ( uint32_t  addr,
int  len,
int  access 
)

Program second Watchpoint register to break if Read/Write access on given address.

Parameters:
addr hardware address to watch (should be word aligned)
len number of bytes to watch (round up to power of 2; at least =4 then 8,16,32..)
access Write access(=1); Read access(=2); Read/Write access (=3)
Returns:
-

References DBG_LEVEL_GDB_ARM_WARN, dbgPrintf(), ICERT_REG_WATCHPOINT_1_ADDRESS, ICERT_REG_WATCHPOINT_1_ADDRMASK, ICERT_REG_WATCHPOINT_1_CONTROL, ICERT_REG_WATCHPOINT_1_CONTROLMASK, ICERT_REG_WATCHPOINT_1_DATAMASK, jtag_arm_IceRT_RegWrite(), transactionActivate(), transactionCreate(), transactionErase(), transactionExecute(), transactionGet(), transactionPenting(), transaction::uplevel, and icert::watchpoint1.

Referenced by gdbSetupJtagTarget_Breakpoint().

void jtag_arm_IceRT_disable_Intr ( void   ) 

Disable Interrupt using ICE-RT

Parameters:
- 
Returns:
-

References ICERT_REG_DEBUG_CONTROL, jtag_arm_IceRT_RegRead(), and jtag_arm_IceRT_RegWrite().

void jtag_arm_IceRT_enable_Intr ( void   ) 

Enable Interrupt using ICE-RT

Parameters:
- 
Returns:
-

References ICERT_REG_DEBUG_CONTROL, jtag_arm_IceRT_RegRead(), and jtag_arm_IceRT_RegWrite().

Referenced by gdb_action_step().

void jtag_arm_IceRT_ClearAnyBreakPoint ( void   ) 
void jtag_arm_enterMonitorMode ( void   ) 

Disable any enabled breakpoint and enter monitor mode

Parameters:
- 
Returns:
-

References DBG_LEVEL_JTAG_ICERT_LOW, dbgPrintf(), ICERT_REG_DEBUG_CONTROL, and jtag_arm_IceRT_RegWrite().

void jtag_arm_Mointor2DebugMode ( void   ) 

Variable Documentation

struct icert icert = {0,0} [static]

icert


This file is part of the documentation for JTAG-GDB Server for ARM .

Generated on Mon Feb 15 21:23:21 2010 by doxygen 1.6.2.