This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Setting watchpoint on nRF52832DK with GDB

Hi,

I've recently come across a problem where in some cases my device's memory gets trashed.

Ideally I'd be able to set a watchpoint on a memory location so that I could see what the offending code is - and it would appear that the nRF52832 has all the debug hardware needed to do this.

I'm using the latest JLinkGDBServer with the latest GCC/GDB on Linux, but adding a watchpoint with watch causes it to fall back to single-stepping and checking every single instruction - which is so slow that I believe the watchdog resets will kick in.

Am I missing something? Is there some way to enable proper hardware watchpoints?

thanks!

Parents
  • Hi, thanks - I tried awatch before and it said Expression cannot be implemented with read/access watchpoint.. I've actually just tried this again and found that awatch array[5] and awatch &array[5] fails, but awatch array works, as does awatch *(uint32_t*)0x20003898 so I guess I was just using it wrong - thanks! Interestingly when I use normal watch with the different expressions it says Hardware watchpoint 11 as opposed to Watchpoint 11 when I manually specify the address. Do you have a link for info on disabling the WDT in GDB? That always made things very painful and I assumed it wasn't something I could do anything about.

Reply
  • Hi, thanks - I tried awatch before and it said Expression cannot be implemented with read/access watchpoint.. I've actually just tried this again and found that awatch array[5] and awatch &array[5] fails, but awatch array works, as does awatch *(uint32_t*)0x20003898 so I guess I was just using it wrong - thanks! Interestingly when I use normal watch with the different expressions it says Hardware watchpoint 11 as opposed to Watchpoint 11 when I manually specify the address. Do you have a link for info on disabling the WDT in GDB? That always made things very painful and I assumed it wasn't something I could do anything about.

Children
No Data
Related