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.

TMS320F280049: Increasing bss section or rather leave it as is?

Part Number: TMS320F280049
Other Parts Discussed in Thread: C2000WARE

 Hi there,

I'm a little surprised that I couldn't find an answer to this question so I'll just ask it. I have a farely large Look Up Table which is not initialized and hence will be placed in the .bss section. Not surprisingly the bss section is way to small for that.

So I thought of several ways to fix this issue:

1) Increase the .bss section size
2) Initialize the LUT (which is not really necessary in my case) and increase the .data size until it fits in there.
3) Create a dedicated RAM section for this LUT (must be RAM, flash is not sufficient due to slower access time)

Thanks to a lack of experience I cannot really tell which variant would be best. Is there any reason why you shouldn't screw with the section size of .bss and .data? I do have plenty of RAM available.

Thanks in advance for taking the time to answer!

  • Hi Lennart,

    You can add more memory blocks for allocating the .bss section.

    Eg: .bss : >>RAM1 | RAM2 | RAM3 ...

    Regards,

    Veena

  • jep that's basically what I did so I assume you don't know of any reason not to do this as well and prefere one of the other two approaches!?

  • 1) Increase the .bss section size

    There is no particular reason why we used only 1 RAM block for allocating bss section. That is just a template and was sufficient for the C2000ware examples. There is no restriction on number of RAMs that is used to map the section

    2) Initialize the LUT (which is not really necessary in my case) and increase the .data size until it fits in there.

    The only disadvantage I see in this case is, compiler generates a separate section to store the initial values. This just adds to the total memory size (the initial values are usually loaded to Flash).

    Also, initializing of the globals will consume cycles. But, in case you are using EABI format, even the non-initialized variables will be initialized to 0 by default, hence you wont see a significant difference in cycles. But in case of COFF format, this approach will consume more cycles.

    3) Create a dedicated RAM section for this LUT

    This method as well works fine. You can use #pragma DATA_SECTION to make the global go to a user-specified section, instead of the default .bss section. This new section needs to be specified in the cmd file with the RAM mapping. I do not see any advantage or disadvantage of this method over the first one

    Regards,

    Veena

  • awesome, thanks for the details!