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.

TMS320F28379D: Alignment of sections in memory using ALIGN(4)

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE, UNIFLASH

Hi,

According to this topic the ALIGN(4) command is used in the linker command files because ECC is calculated for 64 bit data. But I don't understand what it means.

From the F2837xD Technical Reference Manual :

For every 64 bits of flash data (aligned on a 64-bit memory boundary) that is programmed, eight ECC check bits have to be calculated and programmed in ECC memory space.

I think I understand this sentence, but what does it matter that every single section is aligned on a 64-bit boundary using the ALIGN(4) command? The ECC bits do not "care" about which sections the data which they were computed from belongs to, do they?

Regards,

Pierre

  • Pierre,

    Please search for "Why do you use align directive (ALIGN(x)) in the linker cmd files provided in the C2000Ware examples?" in the Flash wiki at processors.wiki.ti.com/.../C2000_Flash_FAQ

    Let me know if it does not clear your doubt. I will try to explain further.

    Thanks and regards,
    Vamsi

  • Vamsi,

    Thank you for your answer.

    If I understand correctly, this means that the problem can only arise if I'm using a custom bootloader. Or is there a risk even when I'm programming the DSP using an XDS100v2 / XDS110 JTAG probe with CCS or Uniflash?

    Can you also confirm that if I'm not using the ECC I can ignore this?

    Finally, how does this work out if you compile a project with the --gen_func_subsections option? Using this option you can end up with dozens upon dozens of sections, which could result in a significant loss of space if every single one of them gets aligned on a 4-word boundary.

    Regards,

    Pierre

  • Pierre,

    #1. You are correct. CCS or UniFlash will not have any problem programming unaligned 64-bit sections, since we make sure to stream entire 64-bits before we program them. We suggest custom tool developers to do the same.

    #2. You can not ignore ECC. You should always program ECC since ECC-check for execution/reads is enabled by default.

    #3. I agree that too many sections can waste space due to the alignment. In that case, as we suggested in the Flash API guide and in the wiki question that I referenced in my previous replies, custom loaders should take care of streaming all the 64-bits before they program.

    Thanks and regards,
    Vamsi