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.

TMS320F28035: fix _c_int00 starting address

Part Number: TMS320F28035

Hi Champ,

I am asking for my customer.

For F28035, the Boot-to-Flash Entry Point is 0x3F 7FF6 to 0x3F 7FF7. We have the codestart placed at the BEGIN section, then Branch to start of boot._asm in RTS library (LB _c_int00) as the codestartbranch. asm written.

The contents stored at address 0x3F 7FF6 & 0x3F 7FF7 should point to the address of the start of boot._asm, right ?

If yes, user wants to fix the _c_int00 starting address. How to do that ? Refer to below below post.

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/115413/_c_int00---can-this-be-specified-so-entry-point-is-always-at-a-specified-address

Here, I take F28003x project for testing. I named a section in .cmd called "test" then allocated an address for it. 

test : > FLASH_BANK0_SEC15 (.cmd sections)

Then, use #pragma CODE_SECION (_c_int00, "test") in the codestartbranch.asm file as below.

image.png

However, it compiled with error.

image.png

How should I have starting address of _c_int00 fixed at a specfic address correctly? 

Please advise.

Thanks & Regards,

Johnny

  • Hi Champ,

    Any update on this? Thanks.

    Johnny

  • Hi Johnny,

    You cannot add pragmas to assembly files otherwise the assembler will complain, as it is doing.  Nor can you add it to another file since _c_int00 is already built into the runtime library (unless you rebuild the library). The best thing to do is to use the linker command file to place the section containing _c_int00 where you want it to go rather than assigning _c_int00 to another section test and placing test.

  • Hi Alan,

    The best thing to do is to use the linker command file to place the section containing _c_int00 where you want it to go rather than assigning _c_int00 to another section test and placing test.

    Would you please explicitly show me how to do it ? An example is appreciated.

    I still couldn't get the _c_int00 address fix at specific flash address looking from the map file.

    Please help me out. Thank you.

    Regards,

    Johnny 

  • Hi Johnny,

    Earlier you mentioned you were placing `test` like this:

    test : > FLASH_BANK0_SEC15

    Instead of `test`, use the section name where _c_int00 is actually located using the proper syntax:

    test { -l rts2800_ml_eabi.lib<boot28.asm.obj>(.text) } > FLASH_BANK0_SEC15

    I used the default RTS library name and boot object file, but your system may be different -- you will need to look at your map file to determine what what library and file are being pulled into your link and then place it accordingly.  This syntax is documented in the C28x Assembly Language Tools Guide.  Please search the C28x assembly tools manual for the sub-chapter titled "Section Allocation and Placement".

    -Alan