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.

EABI: how to create a buffer that does not get initialized?



we are using a C6748 with 7.4.16 compiler

i would like to know how to create a buffer that will not get initialized on creation.  i found that the pragma's for "NOINIT" and "PERSISTENT" do not exist in the C6000 compiler (even though it is in the manual - you guys gonna take that out any time?).

we have a buffer that is pragma'd to a data section, and that data section is linked in the command file to a certain location in memory, and i tried to add the "type = NOINIT" to the linker command file to that section as well but that didn't seem to do the trick as the buffer was initialized anyway. so what magic combination of pragmas do i need to do to get a buffer that doesn't get initialized at program load?

  • ok my bad, here is how i fixed my problem:

    i tried to do
    section: {} > location
    section: type = NOINIT

    and that didn't work

    but when i do
    section: type=NOINIT, {} > location

    it works.

    thanks for listening.
  • I apologize for the error in the documentation.  The NOINIT and PERSISTENT pragmas are introduced in compiler version 8.0.x.

    This ...

    cobsonchael said:
    section: {} > location
    section: type = NOINIT

    does not work because you are creating two separate output sections of the same name.  The first one gets all the input sections of the same name, and is allocated to that location.  The second one is empty, has the NOINIT attribute, and is allocated per the linker's default allocation rules.

    This ...

    cobsonchael said:
    section: type=NOINIT, {} > location

    is valid.  But it is typically written ...

    section > location, type = NOINIT

    Thanks and regards,

    -George