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.

Global symbol definitions in the generated linker cmd file & debugging

Other Parts Discussed in Thread: TMS320F28335

Hi,

I have a couple questions both related to converting a project from CCSV3 to CCSV5:

1) I've converted a CCSV3 (DSP/BIOS) project to CCSV5 (SYS/BIOS) basically leveraging most of my legacy DSP/BIOS stuff, but one of the problems I came across is that two of the symbols that my application uses from the CCSV3 project don't make it into my CCSV5 project after conversion. Those symbols are _HWI_STKTOP and _HWI_STKBOTTOM. It looks like those symbols don't actually exist in the .tcf file but are found in the .cdb file. So after converting the tcf file to cfg, I end up with a linker cmd file that does not include those two symbols.  My question is: Is there a way to get the conversion utility to pull those symbol definitions from the legacy cdb file into the cfg file. Ultimately, how do I get a (SYS/BIOS) linker cmd file with those symbol definitions? Below is a code snippet showing how those symbols are used.

//Initialize system stack checking - Margin = 16
STKOV_initSystemStack((Uint32)&HWI_STKBOTTOM,(Uint32)&HWI_STKTOP,16);
//Initialize task stack checking
STKOV_initTaskStack();

2)  I tried debugging a project that I converted from CCSV3 to CCSV5, it does not break at the beginning of the main() function. No source file is displayed. If I suspend the program, it stops at what appears to be a random address such as 0x229359 with the texts: "(no symbols are defined for 0x229359)". My suspicion is that something in the project settings is not right. I'm hoping someone might have seen/heard of a situation similar to this and might have some suggestions. Thanks in advance for your help.

Kens

  • Hi Kens,

    what device is this for and which version of SYS/BIOS 6 are you using?

    Kens Alexandre said:
    STKOV_initSystemStack

    Is this your own API?

  • Hi Tom,

    Thanks for getting back to me. We are using the TMS320F28335 device. The SYS/BIOS 6 version that I'm using is 6.34.2.18.

    The function: STKOV_initSystemStack() is not our own function. We have the source code incorporated into our code, but it's actually TI source code. Here's a link that describes it in pretty good details: http://www.ti.com/lit/an/spra820/spra820.pdf. Thanks.

    Kens

  • Hi Kens,

    Kens Alexandre said:
    My question is: Is there a way to get the conversion utility to pull those symbol definitions from the legacy cdb file into the cfg file. Ultimately, how do I get a (SYS/BIOS) linker cmd file with those symbol definitions? Below is a code snippet showing how those symbols are used.

    SYS/BIOS 6 incorporates task stack checking and  so I'm not sure if you even need "_HWI_STKTOP" or _HWI_STKBOTTOM" symbols (or that API altogether). For the system stack, you probably want to take a look at the User's Guide section 6.5 and 3.4.3.

    Kens Alexandre said:
    I tried debugging a project that I converted from CCSV3 to CCSV5, it does not break at the beginning of the main() function. No source file is displayed. If I suspend the program, it stops at what appears to be a random address such as 0x229359 with the texts: "(no symbols are defined for 0x229359)". My suspicion is that something in the project settings is not right. I'm hoping someone might have seen/heard of a situation similar to this and might have some suggestions. Thanks in advance for your help.

    Are you able to open up ROV and have the BIOS view scan for errors? When you reset the target, can you see the target sitting in "_c_int00"?

  • Hi Tom,

    Good to know SYS/BIOS 6 includes support for stack checking. I will look into that.

    As for the debugging issue, I did not open up ROV. I don't have much experience using ROV, but I am aware that it only displays information when the target is halted, and so far I have not been able to see anything useful when I suspend the target. Tomorrow morning I will try a debug session with ROV open and see if anything useful comes up. 

    This afternoon I successfully debugged a simple example Task program, but as soon as I added a custom platform, I ran into the same problems. Please see the MEMORY and SECTION from my linker.cmd file after adding my custom platform. I'll let you know tomorrow whether I am able to make any progress. Thanks.

    MEMORY
    {
        PAGE 1: BOOT_INFO : org = 0xfe00, len = 0x200
        PAGE 0: IQTABLES2 : org = 0x3feb50, len = 0x8c
        PAGE 1: SRAM_DATA : org = 0x25a000, len = 0x26000
        PAGE 0: BEGIN_FLASH : org = 0x33fff6, len = 0x2
        PAGE 0: FLASH_CODE : org = 0x300000, len = 0x3ff00
        PAGE 0: FLASH_KEY : org = 0x33ff00, len = 0x80
        PAGE 0: BOOTROM : org = 0x3ff27c, len = 0xd44
        PAGE 0: FPUTABLES : org = 0x3febdc, len = 0x6a0
        PAGE 0: CSM_RSVD : org = 0x33ff80, len = 0x76
        PAGE 0: OTP : org = 0x380400, len = 0x400
        PAGE 1: PIEVECT : org = 0xd00, len = 0x100
        PAGE 0: SRAM : org = 0x200000, len = 0x5a000
        PAGE 1: MSARAM : org = 0x60, len = 0x7a0
        PAGE 0: L03SARAM : org = 0x8000, len = 0x3000
        PAGE 1: L47SARAM : org = 0xb000, len = 0x4e00
        PAGE 0: IQTABLES : org = 0x3fe000, len = 0xb50
    }

    SECTIONS
    {
        .text: load >> SRAM PAGE 0
        .switch: load >> SRAM PAGE 0
        .data: load >> SRAM_DATA PAGE 1
        .cinit: load > SRAM PAGE 0
        .bss: load > SRAM_DATA PAGE 1
        .ebss: load >> SRAM_DATA PAGE 1
        .econst: load >> SRAM PAGE 0
        .const: load >> SRAM PAGE 0
        .stack: load > MSARAM PAGE 1
        .sysmem: load > SRAM_DATA PAGE 1
        .esysmem: load > SRAM_DATA PAGE 1
        .pinit: load > SRAM PAGE 0
        .args: load > SRAM_DATA PAGE 1 align = 0x4, fill = 0 {_argsize = 0x8; }
        .cio: load >> SRAM PAGE 0
        .clk: load >> L03SARAM PAGE 0
        .ti_catalog_c2800_init_begin: load >> BEGIN_FLASH PAGE 0
        .reset: load >> L03SARAM PAGE 0
        .ebss:taskStackSection: load >> SRAM_DATA PAGE 1
        _ti.bios.LOG: load >> L47SARAM PAGE 1
        _ti.bios.CLK: load >> MSARAM PAGE 1
        _ti.bios.STS: load >> L47SARAM PAGE 1
        xdc.meta: load >> SRAM PAGE 0, type = COPY

    }