void rwatch (
unsigned long address); /* address to watch */
Description
The rwatch debugger function is used in a debugger signal
function to delay until the specified address is read. While
this function delays, your target program continues to execute. This
function is useful when creating signal functions that simulate
external hardware.
The rwatch debugger function returns before address
is actually read by your target program. This allows your signal
function to interrupt the read request and modify the contents of
memory before it is actually read.
Note
If address refers to a Special Function Register (SFR)
or Peripheral Register repetitive reads may occur which your signal
function must be prepared to ignore.
The rwatch debugger function may be called from within a
signal function only. Calls to rwatch from outside a signal
function are not allowed and result in an error message.
signal void read_trigger (unsigned long adr) {
unsigned char val;
printf ("Track read accesses to address 0x%X\n", adr);
while (1) {
rwatch (adr);
val = getint ("Input Value for Read Trigger");
_WBYTE (adr, val); // update value
}
}
The following call starts the above signal function which prompts
for a value each time var is read.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.