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/TMS320F28377D: _c_int00 for a SYSBIOS app

Part Number: TMS320F28377D
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Code Composer Studio

Hi,

In both "RTOS" or "non RTOS" applications, in the linker file there is BEGIN / codestart section. For the "non RTOS" application the _c_int00 always corresponds to the BEGIN / codestart assignment in the linker file. In the "RTOS" application _c_int00 is different from the BEGIN assignment in the linker file.

Now, if I call the _c_int00 assigned address for both types of applications the code is running fine in both cases. In addition if I call the BEGIN  address (different than 0x80000) for the RTOS application it seems to be be working fine as well, which I was not expecting it.

The question is, what will be the correct way to start a RTOS application, calling the address assigned on the BEGIN section or to call the address where _c_int00 is assigned by the compiler? If I would like to have the _c_int00 assigned to a predetermined address in the flash memory space, what would be the way to do it, because this is not assigned to the BEGIN address?

Thanks,
Gaby

  • Hi Gabriela,

    Someone will look at this on Monday.

    Todd

  • Hi Gabriela,

    The linker command code below will allow you to reassign an entry point. First, you will want to define a symbol to hold your new entry point address. Then, you can suppress the warning you will receive from overriding the entry point. The "-u" places the unresolved external symbol into the output module's symbol table. The "-e" defines the global symbol that specifies the primary entry point for the output.

    NewAddress = <insert address here>; 
    
     
    
    --diag_suppress=10063 // suppress entry point override
    
    -u NewAddress
    -e NewAddress

    Best,

    Megan

  • Megan,

    Thanks for getting back to me! I am using SYS/BIOS 6.52.0.12 with XDC: 3.50.8.24.

    I am jumping to my SYS/BIOS program from another small piece of code that executes when DSP is powered up. The BEGIN line in my SYS/BIOS program linker file looks like this: 

    " BEGIN            : origin = 0x082000, length = 0x000002".

    The _c_int00 is assigned by the compiler to some other address, which is allocated in flash memory space I am using. 

    If I am jumping directly to "0x082000" the SYSBIOS code seems to be working fine. Same thing happens when I am jumping to the _c_int00 address which can be variable. From what I knew, it is required to jump to the _c_int00 only in order for your program to work, but for me it looks like the SYSBIOS code is working in both cases, hence the question what is the correct way to do it? 

    Now, because the compiler controls where _c_int00 is placed, wanted to see if there is any way to control that placement in a SYS/BIOS project.  The instructions you sent me to place in my linker file, they don't seem to work for me and it looks like they should be placed somewhere in the CCS project settings.

    Thanks,
    Gaby

  • Hi Gaby,

    For TI tools, the convention is to have the entry point be c_int00. After some digging, I found that the specific target you are using has placed a long branch to c_int00 at the BEGIN address. Since this is in effect a jump from the BEGIN address straight to c_int00, that is why you did not notice any difference in behavior when starting at BEGIN versus c_int00.

    My apologies, the code above is to jump somewhere other than c_int00. If you would like to change the location of c_int00, please refer to this forum post: https://e2e.ti.com/support/microcontrollers/other/f/908/t/860069?tisearch=e2e-sitesearch&keymatch=c_int00

    Note that the part you are using has a different object file and file extension than the one used in the forum post above. Your part's extension is .o28FP and the object file is boot_cg.o28FP. Therefore, the code should be:

    Program.sectMap[".c_int00 { boot.a28FP<boot_cg.o28FP> (.text) }"] = new Program.SectionSpec();
    Program.sectMap[".c_int00 { boot.a28FP<boot_cg.o28FP> (.text) }"].loadAddress = 0x80012000;

    Also note that in this structure, there must be code located at the BEGIN address in order to use the boot to flash mode (e.g. the codestart section that is used currently). Therefore, you are able to move where c_int00 is placed but make sure to keep code at the BEGIN address if you would like to keep using boot to flash mode. 

    Would you be able to provide your noRTOS linker command file, please? I am wondering how it is able to put c_int00 at the BEGIN address. It should not be able to fit there if it follows the same convention as our TI-RTOS linker command file structure for this part (i.e. BEGIN is only two words long to hold a long branch to c_int00 rather than placing c_int00 directly at the BEGIN address). 

    Best,

    Megan