The TI E2E™ design support forums will undergo maintenance from Sept. 28 to Oct. 2. If you need design support during this time, contact your TI representative or open a new support request with our customer support center.

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.

CCS/C2000-F28004X-POWER-EST-CALC: Live firmware update

Part Number: C2000-F28004X-POWER-EST-CALC

Tool/software: Code Composer Studio

Dear sir,

I am learning the Live firmware update based on the examples "flashapi_ex2_sci_kernel" which is developed on F28004x.

And I noticed that the "bank select logic " was allocated at the "codestart" section, and also the "codestartbranch" code.

It is said that _c_int00 is the entry point of the RTS for C environment and it will call the main function.

So I am curious about how the function is executed after exiting the Boot ROM, it will run the main first or it will run the "bankselect" first?

How are the two parts of code (codestartbranch and bankselect)  allocated?

Maybe something I understand not correctly.

Looking forward to  your reply, thank you!

  • Huijin,

    That is a good question.

    For the flashapi_ex2_sci_kernel project, if you observe carefully, the LDFU build configurations all exclude the codestartbranch.asm from the project i.e. bankSelect is the entry point.

    The non-LDFU build configurations have codestartbranch.asm included in the project + they don't have bankSelect as the entry point.

    Thanks,

    Sira

  •  Hi, Sira,

    Thank you for your quick response.

    I noticed that the entry point has been set to "bankselect", but the f28004x_codestartbranch.asm has not been excluded, it is in the device folder.

    And the map file shows that  both the "bankselect" and "codestartbranch" are located at the section "codestart".

    what is  the factor that decides which part of the code will be located at the first address of the memory section when there are more than 2 files to be linked?

    So according to this setup, the main function will never be called, right?

    If so, why not put the bankselect function in main funciton, is there any special concerns?

    And another question, why there is a line "-u _bankselect" in the command file, It seems  used to be tell the linker the symbol of bankselect, but what what kind of symbols need to be declared like this , what kind do not need? why there is a "_"preceded “bankselect”?

    Thank you!

  • Huijin, your observations are interesting. Please give me a day or so to dig into this for you. Thanks, Sira

  • Huijin, just wanted to provide an update - I'm consulting with the compiler team to understand what the behavior is when multiple symbols are assigned to the same section.

    Can I ask you to try a few things:

    1. Remove codestartbranch.asm from the project build configuration and test. It should work.

    2. Remove the -u _bankSelect from the linker cmd file and test. I built it and it builds. But can you check if it works.

    Thanks,

    Sira

  • Hi, Sira,

    Thank you for your support very much.

    Yes, it can be built successfully when I exclude the codestartbranch.asm or delete the “-u _bankselect" . So it seems like the main function never be called.

    Unfortunately I don't have a board based on 28004x at hand and I will try to find one and test it.

    Another question:

    I build the project “flashapi_ex3_live_firmware_update” just after  import it, and there is an error.

    Could you please help to check what the error is ?

  • Hi Huijin,

    It could be because you are using compiler v20.20.LTS or later. In the flashapi_ex3_live_firmware_update.c file, make the following changes please and see if it builds. I would expect it to.

    asm(" LCR 0x81000");

    to


    asm(" MOVL XAR7,#0x81000");
    asm(" LCR *XAR7");

    and

    asm(" LCR 0x91000");

    to


    asm(" MOVL XAR7,#0x91000");
    asm(" LCR *XAR7");