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.

Starterware/am3359: clock() always return 0

Part Number: am3359

Tool/software: Starterware

Hi TI,

              AM335x starter kit, starterware, CCS  Version: 7.2.0.00013

I am working on starterware with AM335x starter kit. Below is the test program on clock() function.

#include <stdio.h>
#include <time.h>

int main(int argc, char *argv[])
{
  int i;
  clock_t t_start, t_stop, t_overhead;

  t_start = clock ();

  for (i = 0; i < 10000000; ++i)  // dummy for loop
    ;

  t_stop = clock ();
  t_overhead = t_stop - t_start;

  printf("took: %ld CPU time\n", (long) t_overhead);
  return 0;
}

console output: [CortxA8] took: 0 CPU time

search on e2e, and found similar thread, such as below from 4 years ago,

e2e.ti.com/.../303963

It mentioned "In your CCS Debug view--->Target menu, go to Clock and select Enable." However, CCS7 seems changed a lot, and I cannot find the right location to enable this Clock. (if I missed, please help to provide a screenshot for my instruction)

I also tried to replace the "dummy for loop" by my already working project codes, in case CCS7 optimizing out the "dummy for loop". Though it didn't help either.

Please advise, Thanks in advance.

Mike

2 Replies

  • In reply to michael yang:

    The TI Starterware forum is now closed to new posts as Starterware is no longer a supported software offering. For more information about Starterware and migration, please see this FAQ. Since the functionality provided by Starterware is now included in TI's Software Development Kits (SDKs) for RTOS, the questions related to this functionality are now routed through the device forums (whose teams produce those SDKs).

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.