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/CCSTUDIO: How to enable clock when using loadti

Part Number: CCSTUDIO


Tool/software: Code Composer Studio

Hi there,

I have a C674x application that I am loading with the c674x cycle accurate simulator to profile it. I am using the clock function to read cycles. If I use the CCS IDE, I have to use the menu to enable the clock before running it to get a measurement. However, I am trying to figure out how to enable the clock when running my application from command line using loadti.  When using it like this:

loadti -a -c g_ccsConfigFile ITFOut.out;

I am getting 0 cycles (clock still disable).  Any ideas?

g_ccsConfigFile contains the following:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<configurations XML_version="1.2" id="configurations_0">

<instance XML_version="1.2" desc="C674x CPU Cycle Accurate Simulator, Little Endian" href="configurations/tisim_c674le.xml" id="C674x CPU Cycle Accurate Simulator, Little Endian" xml="tisim_c674le.xml" xmlpath="configurations"/>
<configuration XML_version="1.2" description="simulates the c674x core in a cycle accurate manner. supports a flat memory system and 2 timers. does not model the cache system and any other peripherals. this cpu only configuration is suitable for core level algorithms development (including bios based development), without considering the system effects, for all c674x based devices. also, it is much faster than the device simulators. &#10; choose the device configurations for developing applications that involves modules other than the core." id="C674x CPU Cycle Accurate Simulator, Little Endian">
<connection XML_version="1.2" desc="C674x CPU Cycle Accurate Simulator, Little Endian_0" id="C674x CPU Cycle Accurate Simulator, Little Endian"/>
</configuration>
</configurations>

  • Hi Cesar,

    I've forwarded this to the experts. Their feedback should be posted here.

    BR
    Tsvetolin Shulev
  • Hello,

    Cesar Aguilar said:
    loadti -a -c g_ccsConfigFile ITFOut.out;

    I see that you are running with -a. This is an asynchronous run and this will not report the cycle counts since the target is run asynchronously and then the script exits without waiting for a target halt and reporting the cycle count.

    Thanks

    ki

  • Hi Ki,

    Thanks, it works.

    Could you explain a little more the difference between running async or not?  Will the application take longer to run?  I am asking the question, because my application is running as part of a GUI and multiple "loadti" applications are launched at the same time in different threads.  Would the synchronous run affect this?

    Thanks

    Cesar 

  • loadti defaults to a synchronous run call. A synchronous run for loadti means that it will wait until the target reaches some halt point (in most cases for running with loadti, that is the exit point of the application). Then loadti will output the cycle count and exit. So loadti will only finish executing when the program has finished execution. However, you can choose to have loadti do an asynchronous run (-a). This means that loadti will run the target and quickly exit without waiting for the target to finish execution (reach a halt point). This is useful if your program does not really have an exit point but is meant to run forever in normal circumstances (like a typical RTOS application, etc). You can use loadti to simply load and run the application and then have loadti exit, leaving the application running, so that it is not blocked.

    Hence loadti with -a is useful if you wish to run multiple instances of loadti, one after the other, for applications that do not typically terminate on their own.