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.

TMS320F280039C: Clarify .switch and -unified_memory

Part Number: TMS320F280039C


Dear Champs,

I am asking this for our customer.

They user CCS 12.2/CGT 22.6.0.LTS to build codes in EABI format.

They are confused about .switch and -unified_memory.

When they user uses -unified_memory to build .switch, they find .switch must be placed on bank0_sector2. Otherwise, the code cannot run correctly (initialization is not passed).

That is, if the user place .switch onto other flash, the code can build without any error/warning, but it cannot run. 

When the user does not user -unified_memory, they can place .switch to the same flash sector as .data places or place .switch on a flash sector without any other sections.

Questions:

1. From below table in P88 of

https://www.ti.com/lit/pdf/SPRU514Y

It seems what we observed is different from below in red box. 

It says, with -unified_memory, we should be able to place .switch everywhere?!

Why?

2. It seems when we user -unified_memory, .switch has to be placed in the same sector where .text is placed and the related obj (where switch statements are used) is allocated too.

Is this the limitation for placing .switch?

 

3. Is there any limitation for placing .switch?

  • If you build without --unified_memory, the instruction used to read from the .switch section is PREAD.  If you build with --unified_memory, the instruction used to read from the .switch section is MOVL.  Does this explain things?  If not, I will bring this thread to the attention of the C2000 device experts.

    Thanks and regards,

    -George