Enable Debugging

About this task

If you chose OpenOCD Debug Mode > Turn On by default when you configured the SoC, debugging is turned on and you can skip the instructions in this topic.

If you chose OpenOCD Debug Mode > Turn Off by default when you configured the SoC, debugging is turned off. Add the environment variables as described in Set Global Environment Variables and then change the variables as needed.

  • To run the program for normal operation, keep DEBUG set to no.
  • To debug with the OpenOCD debugger, set DEBUG to yes.

In debug mode, the program suspends operation after loading so that you can set breakpoints or perform debug tasks.

To change the debug settings for your project, right-click the project name axiDemo in the Project Explorer and choose Properties from the pop-up menu.

Procedure

  1. Expand C/C++ Build.
  2. Click C/C++ Build > Environment.
  3. Click the Debug variable.
  4. Click Edit.
  5. Change the Value to yes.
  6. Click OK.
  7. Click Apply and Close.

Results

Important: When you change the debug value for a project you previously built, you must clean the project (Project > Clean) before building again. Otherwise, Eclipse gives a message in the Console that there is Nothing to be done for 'all'