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.

LAUNCHXL-F28379D: watch expressions in debug mode

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: C2000WARE

Hello,

I have a problem to watch expressions:

Down here the declarations of variables in the main function:

The compilation is fully symbolic:

Then I enter in the debug mode.

I try to place a breakpoint at the line 176, but the debug mode places it further, just before of the call of a function:

When I run the programm, it isimpossibe for me to watch toto or titi variable:

I thought that the reason is that the debug ran into the function Devuce_Init().

But other cariables such as flt_Alpha are found.

Can you explain to me

- how toplace a breakpoint at the line 176 ?

- how to watch titi and toto expressions ?

Thank you

Vincent

  • Hi . Just click into 'Step Into' in the Debug Mode four times and you will have your variables populated.

  • Hello, I did the test on a simplier project:

    Neither flt_Sine nor flt_Angle cannot be displayed (even when clicking 4 times on "step into")

    // essai Fast RTS
    float flt_Sine;
    float flt_Angle;

    flt_Angle=0.5;
    flt_Sine=__sin(flt_Angle);

    flt_Angle=0.6;

  • Hello Vincent,

    I try to place a breakpoint at the line 176, but the debug mode places it further, just before of the call of a function

    Do you have any optimizations turned on for the debug session? These will usually not allow breakpoints to be utilized normally.

    When I run the programm, it isimpossibe for me to watch toto or titi variable

    Is your function executing in main when you try to watch the variable? I just tested this on my side with the configuration you mentioned using the empty_driverlib_project example provided for F2837xD in C2000Ware, and I was able to add these variables to my Expression window without a problem. Please try to emulate it with this example (without changing anything else besides adding your code) and let me know what happens.

    Best regards,

    Omer Amir

  • Hello,

    First, thank yuo for helping me. This problem is critical.

    I want to add something in this issue: I thought it was only a watching problem, but it seems that variables really do not exist

    - the variables are not taken into accuont in somme calculations

    - if I place breakpoints into the main loop, in which there are only calculation with "invisible variables", the breakpoints are grayed out (picture below)

    Your question about the optimization for the debug mode is interesting. I set optimizations for the project, and suppressed them on my example, but my problem is still here. Is there an specific optimization for the debug mode ?

    I am going to try with the example provided in C2000, but I am pretty sure that everything will be OK. I ll let you know in another reply, to keep this not confused.

  • Hello, again. I turned off the optimization for the project.

    As you can see on the picture above, everything is OK.

    So I wonder what will happen for my project: with the optimization, in the debug mode, some variables does not exist, and some my my algorithms do not work. Will they work in the release mode ?

  • , two questions:

    1. Did you use these variables in the code? Maybe at the optimalisation stage all unused variables is ommited.

    2. How did you add these vairables into watch window? - from the editor or putting them into watch editor cells?

  • Hello.

    1- Yes, I use these variables (look down below)

    2- By selecting them, then choose Add Watch Expression. But without trying to do that, I noticed that when a variable exists, details appear when the cursor of the mouse moves over the text

    Just to illustrate what I said, the same screen shot when I select the level 0 Optimozation (Only one the of variable disappears)

    And then, when selecting the level 2 (the two  variables disappears)

  • I have noticed that fit_Sine is not invoked but just used only to assign a value so level 1 optimalization just ommiting it by compiler. Trye to invoke this variable. As for fit_angle variable which is invoked - it's not ommited by compiler.

  • Good idea ... but it doas not work

    I expected this result, because my real project, on which I had a problem, uses a invoked variable

  • Hello Vincent,

    Your question about the optimization for the debug mode is interesting. I set optimizations for the project, and suppressed them on my example, but my problem is still here. Is there an specific optimization for the debug mode ?
    So I wonder what will happen for my project: with the optimization, in the debug mode, some variables does not exist, and some my my algorithms do not work. Will they work in the release mode ?

    Referring to the C28x Optimization Guide, optimizations should not be used if you're trying to debug optimally:

    I see no reason why it shouldn't work in release mode, but let me know if you have a problem with this.

    Best regards,

    Omer Amir

  • Thank you for this accurate answer. I let this topic opened till I will have done a test. That's OK for you ?

  • Yes, that's fine with me.