0

TL;DR: A debug toolchain which works perfectly outside of Eclipse terminates automatically when started in Eclipse.

OS: macOS Sierra 10.12.3
IDE: Eclipse IDE for C/C++ Developers, Mars.2, Release 4.5.2
Target Board: WIZwiki-W7500P (via CMSIS-DAP for interactive debugging)
Embedded Platform: mbed-os 5.4
On-chip Debugger: pyOCD 0.8.1a1
Debugger: arm-none-eabi-gdb 7.12.0.20161204-git
Compiler: arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 6.2.1 20161205

Following this tutorial, my aim is to use gdb to debug in Eclipse. Via command line, $ pyocd-gdbserver successfully starts the server and detects the board, and $ arm-none-eabi-gdb successfully starts the debugger and can connect to the server. The program successfully compiles to binary via mbed-cli: $ mbed compile -t GCC_ARM -m WIZWIKI_W7500P and flashes to the board, and executes without issue.

In addition, an .elf is generated which can be interactively debugged, breakpoints can be added, and functions can be stepped-through while running on the board.

Finally, the program appears to export successfully to Eclipse: $ mbed export -t eclipse_gcc_arm WIZWIKI_W7500P --profile mbed-os/tools/profiles/debug.json including the automatic generation of a Makefile, which successfully orchestrates building in Eclipse.

However, in Eclipse both gdb and pyocd-gdbserver terminate shortly after beginning debug with the following output (despite being configured exactly as they are when I run them in my terminal):

gdb traces:

650,101 2-gdb-show language
650,102 2^done,value="auto"
650,102 (gdb) 
650,103 3-data-evaluate-expression "sizeof (void*)"
650,104 3^done,value="4"
650,104 (gdb) 
650,104 4-gdb-set language auto

pyocd-gdbserver (n.b. only the last line is different from what's seen in terminal):

WARNING:root:Unsupported board found 2203
INFO:root:DAP SWD MODE initialised
INFO:root:ROM table #0 @ 0xe00ff000 cidr=b105100d pidr=4000bb471
INFO:root:[0]<e000e000:SCS-M0+ cidr=b105e00d, pidr=4000bb008, class=14>
INFO:root:[1]<e0001000:DWT-M0+ cidr=b105e00d, pidr=4000bb00a, class=14>
INFO:root:[2]<e0002000:BPU cidr=b105e00d, pidr=4000bb00b, class=14>
INFO:root:CPU core is Cortex-M0
INFO:root:4 hardware breakpoints, 0 literal comparators
INFO:root:2 hardware watchpoints
INFO:root:Telnet: server started on port 4444
INFO:root:GDB server started at port:3333
Started by GNU ARM Eclipse

Outcome:
Eclipse debug window

I've reinstalled each component, begun a fresh workspace and experimented with preferences such as:
Eclipse GDB preferences

How do I prevent this debug system from terminating?

Tom Shea
  • 21
  • 4
  • The tutorial link you shared is dead link. Share entire gbd traces output. How are you creating launch configuration in eclipse? – Chandrayya G K Mar 15 '17 at 09:11
  • @ChandrayyaGK thanks; I've fixed the link ([link](https://docs.mbed.com/docs/debugging-on-mbed/en/latest/Debugging/Debugging_Eclipse_pyOCD/)). What I posted is actually the entire **gdb** traces output given by the console in Eclipse. I've configured Run and Debug in Eclipse manually based on the linked tutorial (I installed the **GNU ARM C/C++ Cross Development Tools** and added the location of the `pyocd-gdbserver` and `arm-none-eabi-gdb` binaries and the correct ports.) – Tom Shea Mar 15 '17 at 14:24

0 Answers0