Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-11148

C2000: Compiler manual mistakenly states global and static variables go in the .econst section

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium

      The C28x compiler manual (SPRU514Y) in sub-chapter 7.1.1 Sections, states ...

      The .econst section contains ... the declaration and initialization of global and static variables

      Compile this example (for COFF ABI) to see this is incorrect ...

      /* In .ebss, with initialization entry in .cinit */
      int not_const_initialized = 10;
      
      /* In .econst */
      const int const_initialized = 20;
      

      For a variable to go in .econst, the const keyword must be used.

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: