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.

Compiler/TMS320F28377S: Heap and Cio alignment: CODEGEN-4875

Part Number: TMS320F28377S

Tool/software: TI C/C++ Compiler

Hello,

The related problem was report 3 month ago, and then there is not yet a target release planned to correct this Bug.

This become very critical for us because we lost many hundred of word and we need some place to continue to develop our system.

Could I know on which release the correction will planned?

Thank

  • Unfortunately, we did not understand the full extent of the problem.  I thought the problem was primarily the 18 words wasted due to the alignment of the C I/O buffer, i.e. the section .cio.  Thus the entry in SDOWP was not given high priority.

    We now understand that your problem is caused by blocking of data sections.  It affects many more sections than .cio.  For background on this topic, please search for the sub-chapter titled Data Page (DP) Pointer Load Optimization in the C28x compiler manual.

    Please be patient as we develop further details.

    Thanks and regards,

    -George

  • We are planning to add a new feature to the compiler to address the problem of memory lost to data blocking.  The new variable attribute NOBLOCK tells the compiler that variable is not to be blocked, and to presume the location of that variable can cross a page boundary at any point.  The syntax will be similar to ...

    int global_array[100] __attribute__ ((NOBLOCK));

    This feature will first be available in version 18.9.0.STS, which is scheduled for early October.  It will also be available in version 18.1.4.LTS, which is scheduled for early November.  To understand the difference between an STS and LTS release, please see the article Compiler Version Numbers and What They Mean.

    Thanks and regards,

    -George

  • Hello
    It is not easy to understand exactly the problem, so I don't know when I must use this new attribut, on which variables? (On All? Only for some sections?...)

    Thanks.
  • Only apply NOBLOCK to global or static data variables.  It has no effect on local variables.

    Apply NOBLOCK to arrays, and any structures which contain arrays.  That will avoid most of the unused gaps in data memory that come from data blocking, while causing very few (usually no) additional instructions to load the DP register.  If you are still losing to much data memory due to data blocking, apply NOBLOCK to large structures.  I'm pretty sure that, in typical code, that will be enough.  I'd be interested in hearing of cases where this fails to solve the problem.

    Thanks and regards,

    -George