This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS: How to view macros while debugging

Tool/software: Code Composer Studio

The screenshot demonstrates my problem when trying to read the value of ACTIVE_POSITION. Hovering gives me a long expression, and macros aren't found in the Expressions window.

I have a set a bunch of macro indexes for a custom data packet with the style:

#define THING_THREE_POSITION (THING_TWO_POSITION + THING_TWO_LENGTH)
#define THING_FOUR_POSITION (THING_THREE_POSITION + THING_THREE_LENGTH)

The final thing is a longer expression that is difficult to resolve in my head at a glance.

  • Peter,

    I don't believe CCS currently supports viewing macros in the Expressions view. I am checking with an expert about plans to support this in the future, but in the meantime please see this post that suggests a workaround.

  • Thanks for investigating. I came across the post you linked, but at a glance I thought it didn't apply since the programmer seemed to have an issue with making a macro. My code compiles fine and runs as expected. The macros get the right value, but I can only see them by capturing the value in a dummy variable:

    int dummyVar = ACTIVE_POSITION;

    Adding a macro to the .gel file did not cause it appear in the expressions window.

  • Peter Borenstein said:
    Adding a macro to the .gel file did not cause it appear in the expressions window.

    Can you provide an example of how you did this?

    I tried it with a very basic example and if I add the same #define macro to the .gel file as in the C source file then I can see its value in the CCS Expressions view.

  • Peter,

    Since I haven’t heard back from you, I’m assuming you were able to get past this issue. If not, please feel free to post a reply with additional information and a reproducible example that demonstrates the issue. Thanks!
  • Hi Aarti,

    You were right from the start. I made some mistake when trying to edit my gel file.