Re: Setup In Eclipse


Piotr Mienkowski
 

Hi JC,

On 25.10.2017 16:05, JC wrote:
I'm running Ubuntu 16.04 LTS in a Virtualbox VM.  I'm using Eclipse
Oxygen CDT for development and openOCD for debugging.  My target is an
NRF52,  At this moment, I can build the code and successfully initiate
debugging through eclipse.  

Here's what I see that I find strange:
1. Only one thread in the debug window.
2. Unpredictable result when stepping through the code.
3. Callstack makes zero sense.
4. Breakpoints don't seem to work correctly outside of application code.

I have to think I've not configured something correctly about my debug
environment.  Does anyone have any ideas?
One obvious thing you need to do, which nevertheless is easy to
overlook, is setting Kconfig option
CONFIG_DEBUG=y
It disables compiler optimizations and adds debug symbols to the bin
file. I'm only reminding it since you didn't mention it in your post.
Not setting this option would be a typical cause for 2. and 4. Though in
case of 4. the behavior shouldn't differ between application and system
code. Not enabling CONFIG_DEBUG may also influence 3. Though the changes
shouldn't be dramatic, callstack should still make sense.

To have thread aware debugging you need to use OpenOCD from the latest
Zephyr SDK version. The stock OpenOCD comes without Zephyr extensions. I
actually have not tried it out yet and am not sure how well it works. I
think you will also need to set
CONFIG_OPENOCD_SUPPORT=y
Maybe someone else knows more.

Let us know how it worked and especially if you were successful enabling
thread aware debugging.

Regards,
Piotr

Join devel@lists.zephyrproject.org to automatically receive all group messages.