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.

Problem profiling code in CCSv6.1.2 Mac

Other Parts Discussed in Thread: TMS320F28335

I am trying to profile some code using CCSv6.1.2 on a Macintosh. I tried both within CCS and using DSS and neither approach seems to work.

I am using a TMS320F28335 processor and an XDS2xx USB debug probe.

I first tried the approach outline here: http://processors.wiki.ti.com/index.php/Profiler.

When I go to Menu Tools->Profile->Setup Profile Data Collection nothing happens -- no dialog appears.

Next I tried the DSS approach described here: http://processors.wiki.ti.com/index.php/Profiling_with_DSS

I run the command

// retrieve an activity from the activity list based on the name
myProfileActivity = debugSession.profileSetup.getActivity("Profile all Functions for Total Cycles");

but it returns null.

The above code was run after loading the .ccxml file and connecting to the target. (Other DSS activities work such as setting breakpoints and running the code and creating a log)


Next, I tried to print the Activities supported by my target with the profileSetup.printActivityList() API. It printed a nicely formatted but empty list of activities.

I am able to use the Clock functions in the Run menu to count the CPU Cycles between two breakpoints, however, this is difficult to do for lots of code. Is there a way to profile the code to see what sections are using the most CPU Cycles?

Regards

  • Hello Neil,
    The CCS function profiler is not supported on 28x. The DSS based approach your are trying to use is based on the CCS function profiler also. The recommend method is to use the profile clock (count cycles between two breakpoints). Sorry for the inconvenience.

    Thanks
    ki
  • Ki,

    I started doing the clock functions you suggest but I run into problems with this approach. If I fill up Ram with my functions, I can't use the clock or set breakpoints. If I remove a bunch of code from Ram, the clock and breakpoints work. How do we clock routines when they are loaded in Ram and there is little ram left? How much ram do I need to leave open to do this type of testing? Is there any other way to do this?

    If I clock the functions in Flash and not Ram, is there a simple rule of thumb or conversion that lets me know how much faster they will be in Ram?

    Thank you.
  • The profile clock should not use any memory resources. The only constraint is if your are trying to profile code in Flash. Enabling the profile clock will use up an AET emulation resource of which there is a very limited amount on 28x. Hardware breakpoints (which is required for code in flash) and watchpoints also use these resources. But if you are profiling code in RAM, it should not be any issue. Yes an AET resource is still used, but you can use software breakpoints in RAM, which do not use any AET resources. Hence I am a bit confused when you say that you cannot use the clock or set breakpoints for code in RAM if RAM is getting filled up. Could you provide a bit more details on your environment and what kind of messages you get from the debugger when you can't use the clock or set breakpoints in RAM?

    Thanks
    ki