📄 adp.h
字号:
#define ADP_CPwrite ADPREASON(CI_HADP,8)/* ADP_CPwrite * ----------- * Summary: This message requests a write to a co-processors internal state. * * Arguments: * Send: (byte CPnum, word mask, words data) * Return: (word status) * * 'CPnum' is the number of the co-processor to transfer values to. * 'mask' specifies which registers to transfer and is co-processor * specific. * 'data' holds the values to transfer to the registers specified in 'mask'. * The first value is written to the lowest numbered register. * NOTE: data must not cause the buffer size to exceed the maximum allowed * buffer size. * 'status' is RDIError_NoError to indicate success, non-zero otherwise. */#define ADP_SetBreak ADPREASON(CI_HADP,9)/* ADP_SetBreak * ------------ * Summary: Sets a breakpoint. * * Arguments: * Send: (word address, byte type [, word bound]) * Return: (word status, word pointhandle, word raddress, word rbound) * * 'address' is the address of the instruction to set the breakpoint on. * 'type' specifies the sort of breakpoint and is described in more detail * below. * 'bound' is included if the least significant 4 bits of type are set to * 5 or above (see below for more detail). * 'status' is RDIError_NoError to indicate success, non-zero otherwise. * 'pointhandle' returns a handle to the breakpoint, it will be valid if bit * 7 of 'type' is set. See below for more detail. * 'raddress' is valid depending on 'type', see below for more detail. * 'rbound' is valid depending on 'type', see below for more detail. *//* 'type':- *//* The least significant 4 bits define the sort of breakpoint to set:- *//* Halt if the pc is equal to 'address'. */#define ADP_SetBreak_EqualsAddress (0)/* Halt if the pc is greater than 'address'. */#define ADP_SetBreak_GreaterAddress (1)/* Halt if the pc is greater than or equal to 'address'. */#define ADP_SetBreak_GEqualsAddress (2)/* Halt if the pc is less than 'address'. */#define ADP_SetBreak_LessAddress (3)/* Halt if the pc is less than or equal to 'address'. */#define ADP_SetBreak_LEqualsAddress (4)/* Halt if the pc is in the range from 'address' to 'bound' inclusive. */#define ADP_SetBreak_Range (5)/* Halt if the pc is not in the range from 'address' to 'bound' inclusive. */#define ADP_SetBreak_NotRange (6)/* Halt if (pc & 'bound') = 'address'. */#define ADP_SetBreak_AndBound (7)/* Bits 5,6 and 7 are used as follows :- *//* If set this indicates that the breakpoint is on a 16bit (Thumb) instruction rather than a 32bit (ARM) instruction. */#define ADP_SetBreak_Thumb (1 << 4)/* This requests that the breakpoint should be conditional (execution halts only if the breakpointed instruction is executed, not if it is conditionally skipped). If bit 5 is not set, execution halts whenever the breakpointed instruction is reached (whether executed or skipped). */#define ADP_SetBreak_Cond (1 << 5)/* This requests a dry run: the breakpoint is not set and the 'raddress', and if appropriate the 'rbound', that would be used, are returned (for comparison and range breakpoints the address and bound used need not be exactly as requested). A RDIError_NoError 'status' byte indicates that resources are currently available to set the breakpoint, non-zero indicates an error. RDIError_NoMorePoints indicates that the required breakpoint resources are not currently available. */#define ADP_SetBreak_DryRun (1 << 6)/* If the request is successful, but there are no more breakpoint registers (of the requested type), then the value RDIError_NoMorePoints is returned. *//* If a breakpoint is set on a location which already has a breakpoint, the first breakpoint will be removed before the new breakpoint is set. */#define ADP_ClearBreak ADPREASON(CI_HADP,10)/* ADP_ClearBreak * -------------- * Summary: Clears a breakpoint. * * Arguments: * Send: (word pointhandle) * Return: (word status) * * 'pointhandle' is a handle returned by a previous ADP_SetBreak. * 'status' is RDIError_NoError to indicate success, non-zero otherwise. */#define ADP_SetWatch ADPREASON(CI_HADP,11)/* ADP_SetWatch * ------------ * Summary: Sets a watchpoint. * * Arguments: * Send: (word address, byte type, byte datatype [,word bound]) * Return: (word status, word pointhandle, word raddress, word rbound) * * 'address' is the address at which to set the watchpoint. * 'type' is the type of watchpoint to set and is described in detail below. * 'datatype' defines the sort of data access to watch for and is described * in more detail below. * 'bound' is included depending on the value of type (see description of * type below). * 'status' is RDIError_NoError to indicate success, non-zero otherwise. * 'pointhandle' is valid depending on the value of type (see description * of type below). * 'raddress' is valid depending on the value of type (see description * of type below). * 'rbound' is valid depending on the value of type (see description * of type below). *//* 'type':- *//* The least significant 4 bits of 'type' define the sort of watchpoint to set:- *//* Halt on a data access to the address equal to 'address'. */#define ADP_SetWatch_EqualsAddress (0)/* Halt on a data access to an address greater than 'address'. */#define ADP_SetWatch_GreaterAddress (1)/* Halt on a data access to an address greater than or equal to 'address'. */#define ADP_SetWatch_GEqualsAddress (2)/* Halt on a data access to an address less than 'address'. */#define ADP_SetWatch_LessAddress (3)/* Halt on a data access to an address less than or equal to 'address'. */#define ADP_SetWatch_LEqualsAddress (4)/* Halt on a data access to an address in the range from 'address' to 'bound' inclusive. */#define ADP_SetWatch_Range (5)/* Halt on a data access to an address not in the range from 'address' to 'bound' inclusive. */#define ADP_SetWatch_NotRange (6)/* Halt if (data-access-address & 'bound')='address'. */#define ADP_SetWatch_AndBound (7)/* Bits 6 and 7 of 'type' also have further significance:- NOTE: they must not be simulataneously set. *//* Bit 6 of 'type' set: Requests a dry run: the watchpoint is not set and the 'address' and, if appropriate, the 'bound', that would be used are returned (for range and comparison watchpoints, the 'address' and 'bound' used need not be exactly as requested). A RDIError_NoError status byte indicates that resources are currently available to set the watchpoint; RDIError_NoMorePoints indicates that the required watchpoint resources are not currently available. *//* Bit 7 of 'type' set: Requests that a handle should be returned for the watchpoint by which it will be identified subsequently. If bit 7 is set, a handle will be returned ('pointhandle'), whether or not the request succeeds or fails (but, obviously, it will only be meaningful if the request succeesd). *//* 'datatype':- *//* The 'datatype' argument defines the sort of data access to watch for, values can be summed or ORed together to halt on any set of sorts of memory access. *//* Watch for byte reads. */#define ADP_SetWatch_ByteReads (1)/* Watch for half-word reads. */#define ADP_SetWatch_HalfWordReads (2)/* Watch for word reads. */#define ADP_SetWatch_WordReads (4)/* Watch for half-word reads. */#define ADP_SetWatch_ByteWrites (8)/* Watch for half-word reads. */#define ADP_SetWatch_HalfWordWrites (16)/* Watch for half-word reads. */#define ADP_SetWatch_WordWrites (32)/* On successful completion a RDIError_NoError 'status' byte is returned. On unsuccessful completion, a non-zero error code byte is returned. If the request is successful, but there are now no more watchpoint registers (of the requested type), then the value RDIError_NoMorePoints is returned. *//* If a watchpoint is set on a location which already has a watchpoint, the first watchpoint will be removed before the new watchpoint is set. */#define ADP_ClearWatch ADPREASON(CI_HADP,12)/* ADP_ClearWatch * -------------- * Summary: Clears a watchpoint. * * Arguments: * Send: (word pointhandle) * Return: (word status) * * 'pointhandle' is a handle to a watchpoint returned by a previous * ADP_SetWatch. * 'status' is RDIError_NoError to indicate success, non-zero otherwise. */#define ADP_Execute ADPREASON(CI_HADP,13)/* ADP_Execute * ----------- * Summary: This message requests that the target starts executing from * the stored CPU state. * * Arguments: * Send: () * Return: (word status) * * 'status' is RDIError_NoError to indicate success, non-zero otherwise. * The message will *ALWAYS* respond immediately with an ACK (unlike the * old RDI definition, which allowed asynchronous message replies). * * Execution will stop when allowed system events occur. The host will * be notified via a ADP_Stopped message (described below). */#define ADP_Step ADPREASON(CI_HADP,14)/* ADP_Step * -------- * Summary: Execute 'ninstr' instructions. * * Arguments: * Send: (word ninstr) * Return: (word status) * * 'ninstr' is the number of instructions to execute, starting at the * address currently loaded into the CPU program counter. If it is zero, * the target should execute instructions upto the next instruction that * explicitly alters the Program Counter. i.e. a branch or ALU operation * with the PC as the destination. * 'status' is RDIError_NoError to indicate success, non-zero otherwise. * * The ADP_Step function (unlike the earlier RDI system) will *ALWAYS* * return an ACK immediately. A subsequent ADP_Stopped message will be * delivered from the target to the host when the ADP_Step operation * has completed. */#define ADP_InterruptRequest ADPREASON(CI_HADP,15)/* ADP_InterruptRequest * -------------------- * Summary: Interrupt execution. * * Arguments: * Send: () * Return: (word status) * * 'status' is RDIError_NoError to indicate success, non-zero otherwise. * On receiving this message the target should attempt to stop execution. */#define ADP_HW_Emulation ADPREASON(CI_HADP,16)/* ADP_HW_Emulation * ---------------- * The first parameter to ADP_HW_Emulation is a Reason Subcode, and * subsequent parameters are defined by that subcode * * word reason subcode * other arguments as reason subcode determines * *//* ADP__HW_Emulation sub-reason codes: */#define ADP_HW_Emul_Supported ADPSUBREASON(CI_HADP,0)/* ADP_HW_Emul_Supported * --------------------- * Summary: Enquires whether calls to the next 4 messages are available * (MemoryAccess, MemoryMap, Set_CPUspeed, ReadClock). * * Arguments: * Send: () * Return: (word status) * * 'status' is RDIError_NoError to indicate the messages are available, * non-zero otherwise. * * NOTE: Equivalent to RDI_Info_Memory_Stats. */#define ADP_HW_Emul_MemoryAccess ADPSUBREASON(CI_HADP,1)/* ADP_HW_Emul_MemoryAccess * ------------------------ * Summary: Get memory access information for memory block with specified * handle. * * Arguments: * Send: (word handle) * Return: (word status, word nreads, word nwrites, word sreads, * word swrites, word ns, word s) * * 'handle' is a handle to a memory block. * 'status' is RDIError_NoError to indicate success, non-zero otherwise. * 'nreads' is the number of non-sequential reads. * 'nwrites' is the number of non-sequential writes. * 'sreads' is the number of sequential reads. * 'swrites' is the number of sequential writes. * 'ns' is time in nano seconds. * 's' is time in seconds. * * NOTE: Equivalent to RDIMemory_Access. */#define ADP_HW_Emul_MemoryMap ADPSUBREASON(CI_HADP,2)/* ADP_HW_Emul_MemoryMap * --------------------- * Summary: Sets memory characteristics. * * Arguments: * Send: (word n, Then 'n' sets of arguments of the form:- word handle, word start, word limit, byte width, byte access, word Nread_ns, word Nwrite_ns, word Sread_ns, word Swrite_ns) * Return: (word status) * * 'n' is the number of sets of arguments. * 'handle' is a handle to the region. * 'start' is the start of this region. * 'limit' is the limit of this region. * 'width' is the memory width, described in detail below. * 'access' is described in detail below. * 'Nread_ns' is the access time for N read cycles in nano seconds. * 'Nwrite_ns' is the access time for N write cycles in nano seconds. * 'Sread_ns' is the access time for S read cycles in nano seconds. * 'Swrite_ns' is the access time for S write cycles in nano seconds. * 'status' is RDIError_NoError to indicate success, non-zero otherwise. * NOTE: Equivalent to RDIMemory_Map. *//* 'width':- *//* 8 bit memory width. */#define ADP_HW_Emul_MemoryMap_Width
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -