Eclipse debug Sample Hello World

Asked 2 months ago, Updated 2 months ago, 3 views

We are building a debug environment for ecipse+openocd.
I don't know how to debug the example hello program.
Could you tell me the steps in detail?

Now, what I've tried is
when I started debugging nuttx. Breakpoint hello_main() and

After running nuttx continuously US>You entered "hello" from the serial terminal.
As a result, a segmentation fault occurred and the connection was lost.

Below are the debug console logs and serial terminal logs.

 [ console ]
b hello_main
Breakpoint 2 at 0xd008098: file hello_main.c, line 56.

bt
# 0__start() at chip/cxd56_start.c:277

B
Note: breakpoint1 also set at pc0x28.
Breakpoint 3 at 0x28

c
c
Continuing.
Segmentation fault (core dumped)
Remote connection closed
-----------------------------------
serial terminal
Waiting for debugger connection..                                               
NuttShell (NSH) NuttX - 7.22                                                      
nsh>hello                                                              
------------------------------------

spresense

2022-09-30 11:53

1 Answers

Thank you for your help.I solved myself, thank you.

./spresense-openocd/src/rtos/nuttx_header.h
The above file has been modified.The following is diff.

diffnuttx_header.org.hnuttx_header.h
38,40c38,40
<#define XCPREG0x70
<#define STATE 0x19
<#define NAME0xb8
---
>#define XCPREG0x78
>#define STATE 0x1a
>#define NAME0x14c

Thank you for your cooperation.


2022-09-30 11:53

If you have any answers or tips


© 2022 OneMinuteCode. All rights reserved.