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.

can two different projects share symbol information?

Hello,

just a quick question. Is it possible for one project to define a variable and then have a second project be able to reference it at the linking stage?

I have a need to imbed project1 ( Regular C files - non BIOS ,converted from .out via hex6x.exe to Srecords to project1.asm ) into project2 . Project2 performs an HPI load of the project1 image to a different processor( C6748 ) but i need to specify the _c_int00 to the bootloader. Instead of modifying my project2 code manually ( after eyeballing the project1 .map for the _c_int00 value ) it would be sweet if i could pick up that value automatically ( by linking to project1's symbols ).

 

Any thoughts would be appreciated.

Thanks

  • An easier approach is to specify the location of c_int00 in the initial program, i.e. don't let the linker randomly assign it.  You can tell the linker precisely where you want it placed and then you won't have to worry about the location changing in your second project.  This approach is discussed in more detail in the following wiki page:

    http://processors.wiki.ti.com/index.php/Accessing_c_int00

  • Thanks Brad - that's a great tip.

    I'm using CCSv4 with Compiler /Linker version ( for PC )  6.1.9.

    I added this line , for a NON-BIOS project  into my .cmd file

    SECTIONS

    {

    .text:_c_int00 > 0x11804000h.

    .

    .

    }

    and it created a "hard-coded" address for _C_int00 like this in my .map file

    MEMORY CONFIGURATION

              name                origin            length       used            unused          attr           fill

    ----------------------        --------          ---------       --------              --------           ---- -        -------

       DSPL2RAM        11804000     00040000  00010cc0    0002f340       RWIX

     

    SECTION ALLOCATION MAP

    output                                                                            attributes/

    section    page         origin            length                 input sections

    --------       ----           ----------          ----------                ----------------

    .text:_c_int00

    *                0             11804000     00000080

                                     11804000     00000080           rts67plus.lib : boot.obj (.text:_c_int00)

     

    This is going to work just dandy - no more going back and forth from one project to another!

    Thanks again.

     

  • I'm glad that worked!  Thanks for sharing your results with the community.