typo has been fixed
The default mask is 0xffffffff  - this means that the data value is ignored.

The best place to look at how these registers are programmed is the arm TRM - http://infocenter.arm.com


From: openocd-development-bounces@lists.berlios.de [mailto:openocd-development-bounces@lists.berlios.de] On Behalf Of Pieter Conradie
Sent: 27 May 2008 10:45
To: 'openocd-development@lists.berlios.de'
Subject: Re: [Openocd-development] Setting a watchpoint to break when writing a specific value to a specific address



The mask should be set to 0x0000000 when trying to halt the CPU when a specific value is written, e.g.


wp 0x00200098 4 w 0xaabbccdd 0x00000000


Best regards,

Pieter Conradie


From: Pieter Conradie
Sent: 22 May 2008 08:34 AM
To: 'openocd-development@lists.berlios.de'
Subject: Setting a watchpoint to break when writing a specific value to a specific address


Hi List,


The target I am trying to debug is an Atmel AT91SAM7S256 (arm7tdmi core). The OpenOCD revision is 657. The syntax for setting a watch point is:


wp    set watchpoint <address> <length> <r/w/a> [value] [mask]


I want OpenOCD to only break when a specific value (0xaabbccdd) is written to a specific address (0x00200098). I used the following command:


wp 0x00200098 4 w 0xaabbccdd


By querying the watchpoints (using “wp”) the following is reported (note that the word “mask” is used twice):


address: 0x00200098, mask: 0x00000004, r/w/a: 1, value: 0xaabbccdd, mask: 0xffffffff


The problem is that OpenOCD breaks when ANY value is written to the specified address. Am I missing something?


Thanks for your time!


Best regards,

Pieter Conradie


P.S. I am trying to find the cause of a nasty Prefetch Abort because of a nested interrupt handler and the only way is using this feature.

This email is intended for the addressee only and may contain legally privileged and/or confidential information. If you have received this email in error and are not the intended recipient, you are hereby informed that you are not entitled to read, broadcast, distribute or in any manner whatsoever use the contents of this email or any attachments thereto. You are requested to please notify Psitek that you have received the email and then delete it. Unless clearly stated otherwise, the content and sentiments expressed in this email or any attachments thereto are those of the sender and not of Psitek (Proprietary) Limited. Psitek does not accept liability for any damages, loss or expense of any nature whatsoever arising (a) out of or in connection with the email or any attachments thereto and/or (b) from any act or omission by the recipient relying upon the content of the email or attachments. Psitek further disclaims liability for any damages caused by computer and/or software viruses. Should this email contain the terms of a contract, no binding agreement will result until such time as a written (hardcopy) document is signed on behalf of Psitek.