zyfeier opened a new pull request, #18936:
URL: https://github.com/apache/nuttx/pull/18936
## Summary
* Why: TriCore architecture lacks hardware debug support in NuttX,
making on-chip breakpoint/watchpoint functionality unavailable for
debugging applications.
* What: Implement the standard NuttX debugpoint API
(up_debugpoint_add/remove) for TriCore using Trigger Event (TREVT)
registers.
* How: Use 8 TREVT register pairs (address + event config) to support
hardware breakpoints and read/write/read-write watchpoints. A debug
monitor exception handler (DMS) dispatches callbacks when trigger
events fire.
## Impact
* Is new feature added? YES (hardware debug breakpoint/watchpoint for
TriCore)
* Impact on user (will user need to adapt to change)? NO
* Impact on build (will build process change)? NO
* Impact on hardware (will arch(s) / board(s) / driver(s) change)? YES
(arch/tricore only)
* Impact on documentation (is update required / provided)? NO
* Impact on security (any sort of implications)? NO
* Impact on compatibility (backward/forward/interoperability)? NO
## Testing
I confirm that changes are verified on local setup and works as intended:
* Build Host(s): Linux x86_64, GCC 11.3.1 (tricore-elf-gcc)
* Target(s): tricore, triboard_tc4x9_com:nsh
Testing logs (build):
```
LD: nuttx
```
Testing logs (runtime, debugpoint):
```
Testing breakpoints
==== Calling test_function ====
Add breakpoint at 0x8002ff92
Calling test_trigger
Pass: Breakpoint at 0x8002ff92 triggered
==== Calling test_data ====
Add read watchpoint at 0x8000e094
Pass: Read watchpoint at 0x8000e094 triggered
==== Calling test_data ====
Add read watchpoint at 0x90022cd4
Pass: Read watchpoint at 0x90022cd4 triggered
==== Calling test_data ====
Add write watchpoint at 0x90022cd4
Pass: Write watchpoint at 0x90022cd4 triggered
==== Calling test_data ====
Add read/write watchpoint at 0x90022cd4
Pass: Read watchpoint at 0x90022cd4 triggered
Pass: Write watchpoint at 0x90022cd4 triggered
```
Testing logs (runtime, ostest):
```
ostest_main: Exiting with status 0
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]