Today I was having problems debugging a design in Chipscope and SDK. For some reason, every time I used the Chipscope trigger (either the armed trigger or immediate) the Microblaze would reset or jump to another part of the code. I figured that Chipscope was messing with the stack pointer but I couldn’t find anything in the forums for such a problem. I finally came across a solution here:

[14.6] SDK and Chipscope do not work together

The solution didn’t put any light on why the problem occurs, but it did fix my problem – many thanks to moderator htsvn. Here’s my clean and illustrated version of the solution:

  1. Connect the power supply and programming cables to the board.
  2. Launch SDK.
  3. Program the FPGA using SDK: “Xilinx Tools->Program FPGA”.chipscope-sdk-problem4
  4. In the SDK, from the menu, select “Run->Debug As->Launch on Hardware (System Debugger)” as shown. Alternatively, you can use “Run As” if you don’t need to debug the code.chipscope-sdk-problem5
  5. Launch Chipscope Analyzer and select from the menu “JTAG Chain->Open plug-in”.chipscope-sdk-problem1
  6. Type in the following parameter and click OK:
    • xilinx_tcf URL =tcp::3121chipscope-sdk-problem2
  7. 
    

    This will detect the chain and you can see the devices on the chain.chipscope-sdk-problem3

  8. Import the CDC file using Chipscope Analyzer (or just open up a preconfigured Chipscope project file).
  9. Set the trigger points in Chipscope and click on Apply Settings and ARM trigger
  10. In the SDK Debug Perspective set the break-points in the C code and run through the code.

 

 

 

 

 

 

Jeff is passionate about FPGAs, SoCs and high-performance computing, and has been writing the FPGA Developer blog since 2008. As the owner of Opsero, he leads a small team of FPGA all-stars providing start-ups and tech companies with FPGA design capability that they can call on when needed.

Facebook Twitter LinkedIn