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/TMDSCNCD28335: Identifier Not Found in Watch window when adding variable to expression table

Part Number: TMDSCNCD28335

Tool/software: Code Composer Studio

Firstly the C code is automatically generated by Simulink Coder, I'm using CCS6, as I'd like to watch the graph of some variables, I defined an array variable 'test[400]' in the C file, the array variable is defined as global variable as the following screeshots show:

And the project is built with the Full Symbolic Debug option (-g):

Also, the optimization is off.

When I finished the setting and modification of project, I loaded it. While I was tring to add the array 'test[400]' to the expression table, the error 'Identifier Not Found' came up:

Is there anything wrong with the settings? Thanks in advance.

  • Hi Jim,

    Please provide your project and required source and header files to build. You can modify the code to simplify the example (and hide any sensitive information). I just need to be able to reproduce the issue.

    Thanks

    ki 

  • Hello Ki,

    The project is attached.

    FYI, the code is automatically generated from a Simulink model which is not inclueded in the project.

    Thanks for your help.

    Jim

    0363.RCP_TEST.rar

  • Hi Ki,

    Have you tried the project?

    Regards.

    Jin

  • Hi Jim,

    My apologies for the delay. I had some difficulty finding a target close to the F28335. Based on the project and your screenshots, it looks like you are using an older version of CCS. Which exact version are you using?

    Thanks

    ki

  • Based on some metadata information, it looks like you are using CCS 6.2. I'm able to reproduce this with CCS 10.1.1. investigating...

  • Jim_Li_898 said:
    The project is attached.

    I found the file OP8665_PMSM_Control_efs_3_data.c in this project.  I cannot build it, because it refers to header files that are not in the project.  And the only include path option in the project ...

    --include_path=${CG_TOOL_ROOT}/include

    ... doesn't give a directory that has those header files.  

    But the object file OP8665_PMSM_Control_efs_3.obj is in the project.  So, I inspected it to see if the missing global variables test and testPoint are present.  I used the utility nm2000 from the command line ...

    % nm2000 OP8665_PMSM_Control_efs_3.obj | findstr test
    00000000 U _angle_test

    They are not present.  

    So, I need to reproduce the behavior where the global variables are defined in the C file, but not present in the object file.  To do that I need a test case.  For the source file OP8665_PMSM_Control_efs_3.c, please follow the directions in the article How to Submit a Compiler Test Case.

    On a different line of thought ... It appears the source file OP8665_PMSM_Control_efs_3.c is automatically generated.  Then you modify it to add those global variables.  Is it possible the file was automatically generated again, which causes your changes to be overwritten?

    Thanks and regards,

    -George

  • Hello George,

    Thanks for your reply, I will upload the test case as soon as I can. And I think you've made a sensible point here:

    On a different line of thought ... It appears the source file OP8665_PMSM_Control_efs_3.c is automatically generated.  Then you modify it to add those global variables.  Is it possible the file was automatically generated again, which causes your changes to be overwritten?

    If above is the reason, how did this happen? Is there anyway to avoid the overwritten problem by conducting some settings for the project? 

    Regards,

    Jim

  • Hi George,

    For this:

    So, I need to reproduce the behavior where the global variables are defined in the C file, but not present in the object file.  To do that I need a test case.  For the source file OP8665_PMSM_Control_efs_3.c, please follow the directions in the article How to Submit a Compiler Test Case.

    I can not build the file by the directions above, after I build the .c file, there's no relevant .pp file generated. Here's the screenshot:

    Regards,

    Jim 

  • Please try again.  This time copy-and-paste the text of the build command into your next post.  Do not use a screen shot.  

    Thanks and regards,

    -George

  • Hello George,

    While I'm tring to build the file, nothing is appeared in the Console table! Instead, the Advice table pops up:


    Current optimization/debug settings: --opt_level=3 --opt_for_speed=3 -g Current optimization/debug settings: --opt_level=3 --opt_for_speed=3 -g VSC properties

    Detecting compilation at optimization level 3. Recommend setting --opt_level=4. NOTE: Compilation time will increase and debug ability will decrease.

    I tried to change the optimazaiton option as the above indicates, but the advice table still keep popping up.

  • Jim,

    George is out this week.  I will see if I can help with the console output issue until he returns.

    Sounds like you are trying to build a single file and then send George the build command for him to take a look at.

    Personally I setup the console view to be on one side and then the problems and advice view to be beside it so that I can see both when in my Edit perspective in CCS.  This way the problems and advice view don't cover the console.

    To build a single file I just right click on it and then "Build Selected File(s)"

    If the console is blank double check to make sure that it is configured to show build output:

    Once the output is there you can select it and then copy and paste the text into this thread.

    Regards,

    John