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.

XDC Configuration - Entry function - Load address

2625.MapFile.txt

3750.i2cSample_xea8f_cfg.txt

1050.i2cSample_xea8f_xdl.txt

I have question on mapping the entry function to the specific location in the XDC Program's config file.

In the program’s configuration file, how to locate the entry function ( _c_int00)  to load at 0x8000_0000 location?

By default, _c_int00 set as the entry function & it located to 0x81010a94.

I have referred the user guide & finding an example to map the Heap module

var HeapMin = xdc.useModule('xdc.runtime.HeapMin');

/8030.i2csample_cfg.txt* Create a HeapMin and place it in new section ".myHeapSect" */

var myHeap = HeapMin.create();

myHeap.size = 1024;

myHeap.sectionName = ".myHeapSect";

/* Place the heap's section in the IRAM segment */

Program.sectMap["myHeap.sectionName"] = "IRAM";

Program.sectMap[".text"] = {loadSegment: "SDRAM", runSegment: "IRAM"};

Program.sectMap[".myHeapSect"] = {loadAddress: 0x80000000};

 

 

Implement the sample mode for the “rtsarm” package, but no luck.

_c_int00 function is defined in the following lib

\xdctools_3_20_03_63\packages\ti\targets\arm\rtsarm\lib\boot.aea8f"

 Any help on the XDC syntax?

I’m familiar with conventional linker cmd file syntax

           .text:

            {

                        arch/arm/cpu/arm_cortexa8/start.o          (.text)

                        *(.text)

            }

 For your immediate reference attaching the map file, .xdl , program config file & generated .cfg files.

~Vinothr

  • Hi Vinoth,

    You can add a supplemental linker command file to your project  that works in conjunction with the linker command file generated by XDCtools in  [Debug | Release]/configPkg/linker.cmd

     

    To relocate  _c_int00 to 0x80000000 add the following to your supplemental linker command file

    SECTIONS

    {

        boot > 0x80000000

          {

          -l ti\targets\arm\rtsarm\lib\boot.aea8f<boot.oea8f>(.text)

          } 

    }

     

    Also add "${XDC_CG_ROOT}/packages" to your linker search path by right clicking on your project and selecting "Build Properties.." -> "C/C++ Build" -> "TMS470 Linker" -> "File Search Path"

    After a successful link you should see the following in your map file:

     

     

    ENTRY POINT SYMBOL: "_c_int00"  address: 80000000

     ....

    address    name

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

    ....

    80000000   _c_int00

     

    Let me know if you face any problems.

    Regards

    Amit

  • Hi Amit,

     

    I have only XDC command mode build environment & not the CCS project.

    Can you help me on where to place this supplement linker command file and how to include in the linker search path?

     

    Regards

    Vinothr

     

     

     

  • Hi Vinoth,

    Are you a using 'package.bld'  script to build your application? If so you can specify linker options for your application in the  addExecutable method of xdc.bld.PackageContents. A snippet is shown below:

    /* for all configured targets ... */

    for (var i = 0; i < Build.targets.length; i++) {

        var targ = Build.targets[i];

        /* create an executable named PROGRAM_NAME from PROGRAM_SOURCES */

        Pkg.addExecutable(PROGRAM_NAME, targ, targ.platform,{lopts: '-i ' + environment['xdc.root'] + '/packages' + ' -l link.cmd'}).addObjects(PROGRAM_SOURCES);

    }

     

    The '-i' option is used to define the search path for the linker. Note that environment['xdc.root'] points to the XDCtools installation that you are using for your build. Using this variable you can have a portable build script that does not have to change with a change in XDCtools.

     

    Let me know if this works for you.

    Regards

    Amit

     

     

     

  • Amit,

    Yes, The entry function is mapped to the specific location.

    Thanks for your help. 

    Great:)

     

    Regards

    Vinothr

     

  • Amit,

    Making use of the link.cmd file to map the entry function ( _c_int00) in the Cortex-M3 core.

    For a surprise, i found the mapping address is misaligned.

    SECTIONS

     

    {

        //EXTMEM_CORE1

        boot > 0x8d200000

          {

          -l   ti\targets\arm\rtsarm\lib\boot.aem3<boot.oem3>(.text)  

          } 

    }

    From the map file, finding _c_int00 map into 0x8d20_0000 + 1

     

    ENTRY POINT SYMBOL: "_c_int00"  address: 8d200001

    A constant __TI_static_base_ mapped into 0x8d20_0000

    8d200000   __TI_static_base

     

    __4135.m3video_debug.txt

     

    Thank You!