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.

TMS320F28032: How to assign _epilog_c28x_ to a user-defined flash address?

Part Number: TMS320F28032


Hi Experts,

I am asking for my customer here.

How to assign _epilog_c28x_ to a user-defined flash address?

By default, _epilog_c28x_2 is assigned to .text, and this .text program segment belongs to the FLASH area, But when customer operate LFU/Updates, the some FLASH area would be erased by Customer Bootloader Code. So the code of _epilog_c28x_2 has been erased and becomes all 0xFFFF, and then Customer Bootloader Code cannot run normally.

Customer try to change the .txt to .bootflash as below figure, it not work for assign _epilog_c28x_. So how can we achieve it?

Pls have a look into this case. Thanks.

  • I believe customer will want to use the CODE_SECTION pragma to force the linker to store the epilog function in a specific flash region.  They would make sure that this region is not updated during FW update.  I'm assuming that there is flash area that is not being updated, alternatively they could use the OTP to store this code, that would not be touched at all during FW update.

    Example of how to do this is in https://www.ti.com.cn/lit/ug/spru514y/spru514y.pdf page 116.

    Best,

    Matthew

  • Hi Matthew,

    Thanks for your reply here.

    Could you show me the example about how to operate the epilog28.asm to assign in a specific flash region? Because we use the CODE_SECTION pragma to operate C language, not the assembly language. We want to assign _epilog_c28x_ function to a specific flash region, not copy to RAM running. Thanks.

  • Hi Matthew,

    You can refer the below, CODE_SECTION pragma allocates space for the symbol in C, how about the assembly language? Thanks  a lot!

  • Hi Matthew,

    Assembly code is generally specified by .SECT, but it not work by customer operation as below figure.

    You can find the epilog28.asm in the below path, please help look into it, thanks a lot!

    C:\ti\ccs1220\ccs\tools\compiler\ti-cgt-c2000_22.6.0.LTS\lib\src\epilog28.asm

  • Shoaxing,

    You are right, asm functions will use the .sect directly.  I'm not sure why this is not working, did customer change both .sect from .text to "bootflash" in the file?

    Did customer create same named section in the .cmd file  with name "bootflash".

    Does the linker or assembler give an error when building, or does the build compete?  Is customer using COFF or EABI?

    Best,

    Matthew

  • Hi Matthew,

    Yes, customer change the .sect from .text to "bootflash" in the file/epilog28.asm, as shown the below figure.

    Customer also create same named section in the .cmd file  with name "bootflash" as shown the below figure.

    They are using COFF format, the linker or assembler successfully done when building project. We are also not sure why this is not working by asm functions use the .sect directly? Any suggestion here? Thanks.

  • Shaoxing,

    Can customer send their .map file for this project?  My primary question is where is the .text getting stored?  Is it also FLASHA, or a different sector?  I'd like to see which other sectors of flash are being used outside of the "bootflash" section.

    Matt

  • Hi Matthew,

    issue solved.

    .text getting stored the other Flash region, not Flash A. As .text would be erased by Flash API. So we change the .text to .bootflash.

     

  • We rts2800_ml.lib allocates to Flash A. So there is no issue to happen.