Ouss4 commented on PR #5966:
URL: https://github.com/apache/incubator-nuttx/pull/5966#issuecomment-1107841744

   @xiaoxiang781216 please take a look at: 
https://github.com/Ouss4/openocd-esp32/tree/nuttx
   
   You can build it using:
   
   ```
   cd openocd-esp32
   ./bootstrap
   ./configure --disable-doxygen-html --disable-doxygen-pdf\
               --enable-ftdi --enable-jlink --enable-ulink\
               --disable-werror --disable-presto --disable-openjtag\
               --disable-usbprog --disable-rlink --disable-kitprog\
               --disable-cmsis-dap
   make
   ````
   
   Then run with `./src/openocd -s tcl -c 'set ESP_RTOS NuttX' -c 'set 
ESP32_ONLYCPU 1' -f board/esp32-wrover-kit-3.3v.cfg`.
   
   And from GDB side:
   
   ```gdb
   (gdb) target extended-remote :3333
   Remote debugging using :3333
   up_idle () at chip/esp32_idle.c:293
   293    esp32_idlepm();
   (gdb) mon reset halt
   ...
   (gdb) flushregs
   Register cache flushed.
   (gdb) c
   Continuing.
   ^Cesp32.cpu0: Target halted, PC=0x400E4782, debug_reason=00000000
   Set GDB target to 'esp32.cpu0'
   [New Thread 1073412128]
   [New Thread 1073413360]
   
   Thread 1 "Idle Task" received signal SIGINT, Interrupt.
   up_idle () at chip/esp32_idle.c:293
   293    esp32_idlepm();
   (gdb) info threads
     Id   Target Id         Frame
   * 1    Thread 1073414152 "Idle Task" (Name: Idle Task, pid:0, RUNNING) 
up_idle () at chip/esp32_idle.c:293
     2    Thread 1073408192 "nsh_main" (Name: nsh_main, pid:1, WAIT_SEM) 
0x400d4e59 in sys_call2 (nbr=2, parm2=1073412252, parm1=<optimized out>)
       at /Users/ouss4/NuttX/nuttx/include/arch/syscall.h:258
     3    Thread 1073412128 "ostest" (Name: ostest, pid:2, WAIT_SEM) 0x400d4e59 
in sys_call2 (nbr=2, parm2=1073413484, parm1=<optimized out>)
       at /Users/ouss4/NuttX/nuttx/include/arch/syscall.h:258
     4    Thread 1073413360 "ostest" (Name: ostest, pid:3, WAIT_SIG) 0x400d4e59 
in sys_call2 (nbr=2, parm2=1073414276, parm1=<optimized out>)
       at /Users/ouss4/NuttX/nuttx/include/arch/syscall.h:258
   ```


-- 
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]

Reply via email to