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.

How to use the Simulator?

Other Parts Discussed in Thread: LAUNCHXL-F28027

Hello, every one! I use the F28XX simulator to verify my codes. And it is extremely wrong. The result in the watch window is different from my intentions. So please tell me what is wrong. Thank you!  By the way, could you tell me where to download "TMS320C28x Simulator User’s Guide(literature number SPRU003)"? I cannot find it in the web.

  • What does the "Watch Locals" tab show? I notice that you are trying to view values in the stack (local variables in a function).

    Also, try running a few iterations of your for(;;) loop in case there are still instructions in the pipeline that have not executed.
  • Thanks for your advice. The results in "watch locals" are the same with the above. And after many iterations the results still remain.
  • Turn off all optimization.  I think maybe the compiler optimized out the assignments because you do not do anything with them.

  • The optimization is off. Still not work.And the debug by "step into" is usually not effective. The instruction often goes to somewhere beyond intention.
  • Or it gets stuck in one instruction and does not move on.
  • At this point, I would suggest running your project on actual hardware to make sure it really is setup right and the code is compiled as you expected. If you do not have hardware right now, you can get an inexpensive evaluation board for $17 that has the C2000 core. (http://www.ti.com/tool/launchxl-f28027)

    Another thing you may try is to look at the generated assembly file (you have to set your project to keep the assembly under Advanced Options > Assembler Options > Keep generated assembly language) to make sure the instructions were compiled as you expected. Also look at your .map file to make sure you have your entry point and function locations set up correctly.
  • Thank you very much. I ran my project on the actual hardware and see my expected results. And then I try it again in the simulation mode. Just as you say, some instructions are still in the pipeline. And another reason is that the way I look up the data is wrong. I define the member of structure _complex as the type of long double. And the watch window cannot manifest the data in the "long double" type. So I must look up the data in the "memory window", select the display way of "64 bit float". And finally I got the desired result.