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/CC3200: I want to know how to see the data in CCS workspace in real-time with ADC example in CC3200.

Part Number: CC3200

Tool/software: Code Composer Studio

The MCU I use is CC3200 and I run the ADC example code in CCS. I can see the results in Tera Term, But I can not see the results in real-time in CCS workspace. After I add the watch experssion of one variable, such as "uiIndex", it always show "error: identifier not found" in the Expressions window. I don't know how to deal with it. Because I also use other MCU TMS28335, and I can do it easily with data refreshed in real-time. 

Thanks for the help.

Yuan

  • Yuan,

    There are a few details that involve the Expressions view such as context where the view is updated, optimization, etc. Please check a few threads that have some suggestions that can help you:

    e2e.ti.com/.../56866
    e2e.ti.com/.../235782
    e2e.ti.com/.../449602

    Hope this helps,
    Rafael
  • Thanks Desouza, I find a interesting thing that if I defign a variable myself, I can see it updated in real-time in workspace. But for all the definations in the example, I cannot see them. So maybe it is because I defign the variable as "int" or "float", but for the definations in the example, they defign the variables as "unsigned long".
    So I think the CCS workspace can only see some specific definations, not all definations.
    Is my understanding correct?
  • Yuan,

    >>So I think the CCS workspace can only see some specific definations, not all definations.
    Yes, CCS can only see some definitions. However, the visibility is defined by the scope and not the type of the variable.

    In other words, if the variable "exists" or is "in scope" when the Expressions view updates its information, then the values will be correctly displayed. Otherwise you will see the error messages you are experiencing.

    For example, if you declared a global variable irrespective of its type (float, int, char) it can be accessed by the Expressions view all the time the code is running - thus giving the impression the Expressions view is working.

    However, if the pre-existing variable is defined either as "static" (exists only inside the context of a specific .c source file) or is local (which does not exist if the code leaves the function it was defined), then the Expressions view will only display its value if the update happens when the program is running at a point where the variable was defined.

    An interesting discussion is shown in the link below:
    stackoverflow.com/.../difference-between-static-auto-global-and-local-variable-in-the-context-of-c-a

    Hope this helps,
    Rafael
  • Thanks. This helps a lot.
  • desouza said:
    However, if the pre-existing variable is defined either as "static" (exists only inside the context of a specific .c source file) or is local (which does not exist if the code leaves the function it was defined), then the Expressions view will only display its value if the update happens when the program is running at a point where the variable was defined.

    For file statics, you can use a syntax in the expressions view like: '<file name>'::<static var name> (e.g. 'peripheral.c'::testvar2)

    [Found on this thread https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/70217/255694#255694]