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.

F28335 based system optimization

Folks,

My project is running into release phase, however, I met the performance bottleneck which cause catastrophic fault. I need to optimize the system where possible.

We use F28335 chip, what I have done so far are:

1. reduce random access time and paged access time of internal FLASH

2. run most of real-time code from internal SARAM

are there any practical methods I can leverage to optimize my system?

Thanks

Tim

  • Hi Tim,

    you can go with the compiler based optimization. There are 3 levels of comiler based optimization.

    1. O1  =  Minimal optimization

    2. O2 = Intermediate level optimization which optimizes the functions

    3. O3 = Ultimate optmization, optimizes every thing.

    NOTE: Optmization will lead to some unknown issues, which you have to test completly.

    Certain Level of Optimization will make the compiler not to generate the code and will lead to unexpected behaviour. This can be found only by testing.

    And as well, can be seen by viewing the mixed source asm option in the compiler to checl whether it has generated the code.

    And you apply the optimization for file level as well as project level.

    If you still do want to do manual optimization you can follow certain steps as mentioned in the below link:

    http://en.wikipedia.org/wiki/Compiler_optimization

    Regards,

    Mohan

  • Thanks Mohan.

    As you mentioned, the optimization leads to problems, the system just do not work, even if I only use -o0 in the compiler settings, the programs behaves oddly.

    Right now I only turn on the Optimize for Speed (-mf) option and set the level to 5, it can work. But I haven't profile how speed is improved. Do you have any idea

    what is the impact of -mf option?

  • I think you are using the CCS4 or atleast latest  version of CSS.

    Thats is the reason you get mf option.  I have really no idea of the impact of this. But some context is available at

    http://processors.wiki.ti.com/index.php/-mf_compiler_option

    Even you can refer this as well

    http://focus.ti.com.cn/cn/lit/ug/spru024e/spru024e.pdf

    But believe me, you can correct all these optimiztion issues. only thing is you have to see what is failing when you enable optimization.

    Start optmizing you files at O3 one by one. see what is the issue. See the assembly code generated, by using the mixed source option.

    If you feel, some thing is missing,make it volatile, and use optmization only for those, which required.

    I am sure you can solve it, because, I use O3 level of optimiation, no miss, I too got issues, only thing is you need to debug and solve.

    TI says that as "It will make to hidden bugs to come out"

    Regards,

    Mohan

  • My CCS version is CCS3.3.81.6, thanks for the encouragement. I will set optimization flag for each files one by one

  • Thanks for mentioning the version.

    I checked with  my compiler too. I have that option, but never used.

    Any way let me know, if any peculiar issue, if you experience, while debugging the same.

    And you have the feedback option, in the build option, when enabled will show the comments for the optimization, which will give you an idea of level of function call,

    and might be helpful in debugging, when optimized.

    that option is -0n1, -0n2.