UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
185 Views
Registered: ‎04-30-2019

What's the secret to getting a stable debug session with the SDK?

Jump to solution

I'm seeing a couple of issues that I'm not sure of how to solve.

1.  While debugging, the SDK is stepping through the dissassembly rather than the C.  I've seen a few solutions saying to make sure the symbols are loaded.  Why isn't this the default behavioiur and how do I do this with 2018.3?  I've not found a useful answer yet that details the flow to a non-softy.

2.  I'm trying to debug why a BSP function hangs in one of the examples.  I'm setting a breakpoint, running to the breakpoint, and then single stepping.  On entry to a loop the dissassembly window appears with the cursor at a memory location completely different to the PC.  As I single step the PC increments but the dissass window doesn't.  If I click on "Go to Program Counter" nothing happens.  Useful.

3.  While iterating, I'm regularly seeing that when launching the program, the breakpoint on entry to main isn't hit and I end up somewhere random.  I've also seen occasions where the SDK completely fails and I need to power cycle the hardware.  Should I not be able to run, edit, repeat?  Seems about as stable as a blancmange Jenga.

I'm running on Windows on the VCU108 with the Microblaze MCS and trying to run the example code in the BSP.

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
131 Views
Registered: ‎11-09-2015

Re: What's the secret to getting a stable debug session with the SDK?

Jump to solution

Hi shareef@phoelex.com 

There are multiple reason why the debug would go through the assembly code than the C code:

  1.  As you mention, you need to make sure that "Use Symbol Server" is enabled when deining a new target. Note that this does not needs to be done for the local target (on for remote):
    SDK.JPG

     

  2. If you are trying to debug in the BSP, it is highly possible that this is optimized. You need to disable optimization for the driver code. For debugging purposes you can change the extra_compiler_flags in the BSP settings to -g

    This is probably what you are experiencingSDK2.JPG

     

    You can chek on the web for the compiler flags for gcc (ex for -g https://www.rapidtables.com/code/linux/gcc/gcc-g.html)
  3. The application might be optimized. Make sure you are building in Debug mode

Hope that helps,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
4 Replies
Moderator
Moderator
132 Views
Registered: ‎11-09-2015

Re: What's the secret to getting a stable debug session with the SDK?

Jump to solution

Hi shareef@phoelex.com 

There are multiple reason why the debug would go through the assembly code than the C code:

  1.  As you mention, you need to make sure that "Use Symbol Server" is enabled when deining a new target. Note that this does not needs to be done for the local target (on for remote):
    SDK.JPG

     

  2. If you are trying to debug in the BSP, it is highly possible that this is optimized. You need to disable optimization for the driver code. For debugging purposes you can change the extra_compiler_flags in the BSP settings to -g

    This is probably what you are experiencingSDK2.JPG

     

    You can chek on the web for the compiler flags for gcc (ex for -g https://www.rapidtables.com/code/linux/gcc/gcc-g.html)
  3. The application might be optimized. Make sure you are building in Debug mode

Hope that helps,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
113 Views
Registered: ‎04-30-2019

Re: What's the secret to getting a stable debug session with the SDK?

Jump to solution

Thanks a lot.  Your 2. fixed my debug issues.

0 Kudos
Highlighted
Scholar drjohnsmith
Scholar
102 Views
Registered: ‎07-09-2009

Re: What's the secret to getting a stable debug session with the SDK?

Jump to solution
practice
<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
Moderator
Moderator
82 Views
Registered: ‎11-09-2015

Re: What's the secret to getting a stable debug session with the SDK?

Jump to solution

Hi shareef@phoelex.com 

If your issue is now solved, could you kindly mark my previous reply as accepted solution? This might help other members having the same question to find an answer easily.

Regards


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos