How to use the range option when we are setting the watchpoint?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to use the range option when we are setting the watchpoint?

跳至解决方案
3,448 次查看
chaitanyapravee
Contributor II

Hello Everyone,

I am trying to set a watchpoint for a global variable. when I click on "Toggle Watchpoint" after selecting a variable, there is a "range" option along with the other options(like read, write).

Is the "range" option used to program the mask register of comparator in DWT hardware to trigger a debug event, if an access is made in the range of addresses?

Is it effective in LPCXpresso v8.2.2?

I tried setting the range with different values and access memory locations with in the range, I cannot trigger a debug event for this.

Debug event is triggered only for the first address.

If the "range" option is effective, please tell me how I can use the it?

Thank you

Best Regards,

Chaitanya Praveen

1 解答
2,270 次查看
thefallguy
Contributor IV

According to this Eclipse bug report

Bug 506073 – Support address "range" when adding a watchpoint to a memory location 

This feature is not supported by MI (how the IDE communicates with the underlying debugger - GDB).

[Note: the feature was originally added to Eclipse under this bug: Bug 118299 – Request for watchpoint enhancements . Reading the comments implies this was originally added and tested for x86 processors]

Despite this bg report, my understanding was that the range field  was designed to override the automatic selection of the size of the watchpoint (i.e. by default it will choose the appropriate access type (byte/halfword/word) based on the type of variables , and set the DWT comparators appropriately).

BTW: IIRC, the size supported by Cortex-M can only be a power of 2 (bytes), this you would only be able to select a range of 1, 2, 4, 8 etc)

在原帖中查看解决方案

3 回复数
2,270 次查看
lpcxpresso_supp
NXP Employee
NXP Employee

Although the IDE frontend offers access to such functionality, I don't believe the underlying Cortex-M debug hardware will support the use of ranges.

Note : You might find the FAQ How to use Watchpoints of general interest.

Regards,

LPCXpresso Support

0 项奖励
回复
2,270 次查看
chaitanyapravee
Contributor II

Dear LPCX support,

I am using the LPC1768 microcontroller, it is an ARM Cortex-M3 based microcontroller . It contains 4 DWT Comparators. So it contains 4 mask registers for each comparator. It suppose to support the use of ranges?

Is this functionality not supported in LPCXpresso v8.2.2?

Comparator1 of the DWT unit can also be programmed to generate a debug event for the data value match.

How can I use this facility in LPCXpresso v8.2.2 IDE?

0 项奖励
回复
2,271 次查看
thefallguy
Contributor IV

According to this Eclipse bug report

Bug 506073 – Support address "range" when adding a watchpoint to a memory location 

This feature is not supported by MI (how the IDE communicates with the underlying debugger - GDB).

[Note: the feature was originally added to Eclipse under this bug: Bug 118299 – Request for watchpoint enhancements . Reading the comments implies this was originally added and tested for x86 processors]

Despite this bg report, my understanding was that the range field  was designed to override the automatic selection of the size of the watchpoint (i.e. by default it will choose the appropriate access type (byte/halfword/word) based on the type of variables , and set the DWT comparators appropriately).

BTW: IIRC, the size supported by Cortex-M can only be a power of 2 (bytes), this you would only be able to select a range of 1, 2, 4, 8 etc)