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.

CCS5.3 "--gen_profile_info" option doesn't generate .pdat file

Hi,

I was using CCS5.3, cgtool 6.4.2, C64x+ Megamodule Cycle Accurate Simulator, to do cache analysis. I followed the instructions in CCS help 3.9.5.1 to get profile data. I selected "--gen_profile_info" compiler option.

When I ran my application, it didn't generate the .pdat file and the program never stopped. Did I miss anything?

Thanks and regards,

Jianzhong

  • jianzhongxu said:
    When I ran my application, it didn't generate the .pdat file and the program never stopped. Did I miss anything?

    Your program must reach the exit point of the application. That is when the .pdat file will get written.

    Thanks

    ki

  • Ki,

    Thanks for your quick response. When I didn't have option "--gen_profile_info", the program finished and exited as expected. However, when I added that option, the program never finishes.

    Thanks.

    Jianzhong

  • Where does it get stuck?

  • Please see my code below. The second last line of code in main() was executed.

    int main(int argc, char *pp_argv[])
    {
    ...

    ...

        /* print the last error message received by the error handler */
        print_last_message(&g_exec.errcb_data);

        /* close the executive layer */
        exec_close(&g_exec);

        print_exit_status_to_file(err);    -> This line is executed.

        return (err);
    }

    Thanks,
    Jianzhong

  • To confirm:

    jianzhongxu said:
        print_exit_status_to_file(err);    -> This line is executed.

    It returns from this function call but gets stuck on 'return (err);' ?

  • In fact, when stepped through the code, it passed the last line and then I got the following error message:

    Can't find a source file at "/tmp/TI_MKLIBHEeM99/SRC/boot.c"

  • That's not really an error. Basically you are halted inside the boot routine from the run-time library. Aarti explains it in detail in this post:

    http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/230662/811582.aspx#811582

    What is curious is why you end up there if you are not doing a reset of some sort. Most likely there is some kind of bug in the application. If you only see this when enabling --gen_profile_info, it could be some memory allocation issue. Please provide a reproducible test case and I can investigate further.

    Thanks

    ki