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.

.cinit initialization timing and time to come to main() function

Other Parts Discussed in Thread: TMS320F28335

Hello,

I am using TMS320F28335 controller. I want to analyze the time taken from powerup to the point control coming to main() function. I need to analyze few points.

  1. By using GPIO pin can i measure the time for .cinit copying from Flash.
  2. Is there any alternative method to measure the time to come to main() function.
  3. Will it be same time to reach main() irrespective of .cinit size.
  4. To save flash i want to define global structure/array variables without any initialization and after coming to main(), by using memset(), i want to initialize all global structures/array variables to their default variables. This will definitely reduce the .cinit. With this can i reduce the time to come to main() function.

Thanks & Regards

Vishnu Beema

  • Vishnu Beema said:
    • By using GPIO pin can i measure the time for .cinit copying from Flash.
    • Is there any alternative method to measure the time to come to main() function.

    Those are hardware specific questions.  We compiler experts tend to not know such things.  I recommend you try the C2000 device forum.

    Vishnu Beema said:
    Will it be same time to reach main() irrespective of .cinit size.

    No.  All other things being equal, the longer .cinit is, the longer it will take to reach main.

    Vishnu Beema said:
    To save flash i want to define global structure/array variables without any initialization and after coming to main(), by using memset(), i want to initialize all global structures/array variables to their default variables. This will definitely reduce the .cinit. With this can i reduce the time to come to main() function.

    That is correct.  However, whether this saves you time overall is an open question.  You would have to test and see.

    Thanks and regards,

    -George

  • Hello George,

    Thank you for your comments.

    With respect to overall time, i am concerned more on flash reduction. Anyway the time increased by initializing the global variables using memset() can be compensated (at least partially) by reducing .cinit initialization time. Please correct me if i am wrong.

    Thanks & Regards

    Vishnu Beema