HW data watchpoints
Posted: Thu Feb 06, 2025 11:33 am
Hello!
Xtensa ISA reference mention data breakpoint registers, and ESP-IDF even has the code (xt_utils, set_watchpoint).
But how can these be used?
I mean, after I write the data address/length in a corresponding DBREAKA, DBREAKC registers, what would happen on data access?
An interrupt? Which on? How to hook on it?
I went with the gdbstub code, but quickly get lost. Is there any documentation on xtensa arch component of esp-idf? I mean, examples, docs, with these xt_... functions.
Thanks!
PS: Oh I forgot to mention what it is all about. I would like to get a control, wwhen one of FreeRTOS tasks accesses memory region of interest. After taking control and performing some job, control must be returned to the task which triggered the watchpoint.
Xtensa ISA reference mention data breakpoint registers, and ESP-IDF even has the code (xt_utils, set_watchpoint).
But how can these be used?
I mean, after I write the data address/length in a corresponding DBREAKA, DBREAKC registers, what would happen on data access?
An interrupt? Which on? How to hook on it?
I went with the gdbstub code, but quickly get lost. Is there any documentation on xtensa arch component of esp-idf? I mean, examples, docs, with these xt_... functions.
Thanks!
PS: Oh I forgot to mention what it is all about. I would like to get a control, wwhen one of FreeRTOS tasks accesses memory region of interest. After taking control and performing some job, control must be returned to the task which triggered the watchpoint.