apache / nuttx-apps

Apache NuttX Apps is a collection of tools, shells, network utilities, libraries, interpreters and can be used with the NuttX RTOS
https://nuttx.apache.org/
Apache License 2.0
275 stars 521 forks source link

testing: Add simple debug test program #2419

Closed no1wudi closed 3 months ago

no1wudi commented 3 months ago

Summary

It is a simple test case of the NuttX debugging facilities (breakpoint and watchpoint).

Impact

New testcase

Testing

STM32F4 (Not sure why some test failed)

NuttShell (NSH) NuttX-12.5.1
nsh> debug
Testing breakpoints
==== Calling test_function ====
Add breakpoint at 0x80107e5
Calling test_trigger
Pass: Breakpoint at 0x80107e5 triggered
==== Calling test_data ====
Add read watchpoint at 0x8013998
ERROR: Read watchpoint at 0x8013998 not triggered
==== Calling test_data ====
Add read watchpoint at 0x20001c3c
ERROR: Read watchpoint at 0x20001c3c not triggered
==== Calling test_data ====
Add write watchpoint at 0x20001c3c
Pass: Write watchpoint at 0x20001c3c triggered
==== Calling test_data ====
Add read/write watchpoint at 0x20001c3c
ERROR: Read watchpoint at 0x20001c3c not triggered
ERROR: Write watchpoint at 0x20001c3c not triggered
nsh>