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/TM4C129XNCZAD: How do I get my project to link with my newly built stk6.aem4f lib?

Part Number: TM4C129XNCZAD
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Code Composer Studio

How do I get my project to use my newly built stk6.aem4f which is in copy-ndk_2_25_00_09 instead of ndk_2_25_00_09?

The linker.cmd in my Release keeps pointing to:

C:\ti\tirtos_tivac_2_16_01_14\products\ndk_2_25_00_09\packages\ti\ndk\stack\lib\stk6.aem4f

instead of:

C:\ti\tirtos_tivac_2_16_01_14\products\copy-ndk_2_25_00_09\packages\ti\ndk\stack\lib\stk6.aem4f

I updated the ARM Linker -- File Search Path:

What am I missing?? I don't want to wipe out the original but just point it to the new stk6.aem4f

  • When you hover over the three dots (...) in the first item under the --library option, does it get expanded to the expected directory?

    If you take a closer look at the CCS build console, that should also show you what that path expands to and if the desired library is getting passed to the linker. 

  • Here is the CDT Build Console:

    **** Build of configuration Release for project RMC ****

    "C:\\ti\\ccsv7\\utils\\bin\\gmake" -k -j 8 all -O

    'Building target: "RMC.out"'
    'Invoking: ARM Linker'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -O3 --define=ccs="ccs" --define=PART_TM4C129XNCZAD --define=WOLFSSL_TIRTOS --define=ccs --define=TIVAWARE --define=_INCLUDE_IPv6_CODE -g --gcc --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -z -m"RMC.map" --heap_size=0 --stack_size=512 -i"C:/ti/tirtos_tivac_2_16_01_14/products/copy-ndk_2_25_00_09/packages/ti/ndk/stack/lib" -i"C:/ti/wolfssl/tirtos/packages/ti/net/wolfssl/lib" -i"C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/lib" -i"C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="RMC_linkInfo.xml" --rom_model -o "RMC.out" "./source/AdcBit.obj" "./source/AdcIo.obj" "./source/BitManager.obj" "./source/EnetInfo.obj" "./source/EnetManager.obj" "./source/EnetSwitch.obj" "./source/Eth2SerDefs.obj" "./source/Eth2SerManager.obj" "./source/Eth2SerProto.obj" "./source/EthProto.obj" "./source/EthProtoTask.obj" "./source/EthServer.obj" "./source/EthSession.obj" "./source/FlashBit.obj" "./source/FlashIo.obj" "./source/GpioCtrl.obj" "./source/HdlcCoder.obj" "./source/I2cIo.obj" "./source/LedManager.obj" "./source/MAX16058.obj" "./source/MC33996Switch.obj" "./source/MaintIf.obj" "./source/MaintMenuItem.obj" "./source/Marvell88E6240.obj" "./source/MgmtManager.obj" "./source/MgmtProto.obj" "./source/NetworkSettingManager.obj" "./source/Novram.obj" "./source/NvramConfiguration.obj" "./source/ProcBit.obj" "./source/QuadSSI.obj" "./source/RMC.obj" "./source/RMCmain.obj" "./source/SpiIo.obj" "./source/TemperatureSensor.obj" "./source/TimerIo.obj" "./source/UartBit.obj" "./source/UartConsoleIo.obj" "./source/UartIo.obj" "./source/Utility.obj" "./source/eMMC08G.obj" "./source/eMMC08GDefs.obj" "../RMC.cmd" -l"configPkg/linker.cmd" -l"C:/ti/tirtos_tivac_2_16_01_14/products/copy-ndk_2_25_00_09/packages/ti/ndk/stack/lib/stk6.aem4f" -l"C:/ti/wolfssl/tirtos/packages/ti/net/wolfssl/lib/wolfssl.aem4f" -l"C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b/driverlib/ccs/Debug/driverlib.lib" -llibc.a
    <Linking>
    'Finished building target: "RMC.out"'

    "C:/ti/ccsv7/utils/tiobj2bin/tiobj2bin" "RMC.out" "RMC.bin" "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/bin/armofd" "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/bin/armhex" "C:/ti/ccsv7/utils/tiobj2bin/mkhex4bin"
    cmd /c "..\RMC_Release.bat"
    Building rmcboot.hex File:

    Copying rmcboot.bin file..
    1 file(s) copied.
    1 file(s) copied.
    Copy complete.

    Running Epromgen..


    EPROM File Generator V3.00



    Reading database
    RMC.DBH
    Creating temporary work files


    Reading binary input data file
    1: RMC.bin

    Generating Device Checksum

    Revision Id : 12A0
    Device(s) Chksum: 576B

    Creating short hex output files



    Epromgen Complete.


    **** Build Finished ****

    Here is the Release/configPkg/package/linker.cmd file that is generated

    /*
    * Do not modify this file; it is automatically generated from the template
    * linkcmd.xdt in the ti.platforms.tiva package and will be overwritten.
    */

    /*
    * put '"'s around paths because, without this, the linker
    * considers '-' as minus operator, not a file name character.
    */


    -l"C:\Users\michael_keezer\Desktop\G4\G4 JLTV RIB\5494776 RMC Operational Software\RMC\Release\configPkg\package\cfg\RMC_pem4f.oem4f"
    -l"C:/ti/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages/ti/drivers/lib/drivers_tivaware.aem4f"
    -l"C:\ti\tirtos_tivac_2_16_01_14\products\tidrivers_tivac_2_16_01_13\packages\ti\mw\fatfs\lib\release\ti.mw.fatfs.aem4f"
    -l"C:/ti/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages/ti/drivers/ports/lib/tirtosport.aem4f"
    -l"C:\ti\tirtos_tivac_2_16_01_14\products\ndk_2_25_00_09\packages\ti\ndk\hal\timer_bios\lib\hal_timer_bios.aem4f"
    -l"C:\ti\tirtos_tivac_2_16_01_14\products\ndk_2_25_00_09\packages\ti\ndk\os\lib\os.aem4f"
    -l"C:\ti\tirtos_tivac_2_16_01_14\products\ndk_2_25_00_09\packages\ti\ndk\hal\userled_stub\lib\hal_userled_stub.aem4f"
    -l"C:\ti\tirtos_tivac_2_16_01_14\products\ndk_2_25_00_09\packages\ti\ndk\hal\eth_stub\lib\hal_eth_stub.aem4f"
    -l"C:\ti\tirtos_tivac_2_16_01_14\products\ndk_2_25_00_09\packages\ti\ndk\tools\cgi\lib\cgi.aem4f"
    -l"C:\ti\tirtos_tivac_2_16_01_14\products\ndk_2_25_00_09\packages\ti\ndk\tools\hdlc\lib\hdlc.aem4f"
    -l"C:\ti\tirtos_tivac_2_16_01_14\products\ndk_2_25_00_09\packages\ti\ndk\tools\console\lib\console_min.aem4f"
    -l"C:\ti\tirtos_tivac_2_16_01_14\products\ndk_2_25_00_09\packages\ti\ndk\netctrl\lib\netctrl_min.aem4f"
    -l"C:\ti\tirtos_tivac_2_16_01_14\products\ndk_2_25_00_09\packages\ti\ndk\nettools\lib\nettool.aem4f"
    -l"C:\ti\tirtos_tivac_2_16_01_14\products\ndk_2_25_00_09\packages\ti\ndk\hal\ser_stub\lib\hal_ser_stub.aem4f"
    -l"C:\ti\tirtos_tivac_2_16_01_14\products\ndk_2_25_00_09\packages\ti\ndk\tools\servers\lib\servers_min.aem4f"
    -l"C:\ti\tirtos_tivac_2_16_01_14\products\ndk_2_25_00_09\packages\ti\ndk\stack\lib\stk6.aem4f"
    -l"C:\Users\michael_keezer\Desktop\G4\G4 JLTV RIB\5494776 RMC Operational Software\RMC\src\sysbios\sysbios.aem4f"
    -l"C:\ti\tirtos_tivac_2_16_01_14\products\bios_6_45_02_31\packages\ti\catalog\arm\cortexm4\tiva\ce\lib\Boot.aem4f"
    -l"C:\ti\tirtos_tivac_2_16_01_14\products\bios_6_45_02_31\packages\ti\targets\arm\rtsarm\lib\ti.targets.arm.rtsarm.aem4f"
    -l"C:\ti\tirtos_tivac_2_16_01_14\products\bios_6_45_02_31\packages\ti\targets\arm\rtsarm\lib\boot.aem4f"
    -l"C:\ti\tirtos_tivac_2_16_01_14\products\bios_6_45_02_31\packages\ti\targets\arm\rtsarm\lib\auto_init.aem4f"

    --retain="*(xdc.meta)"

    /* C6x Elf symbols */
    --symbol_map __TI_STACK_SIZE=__STACK_SIZE
    --symbol_map __TI_STACK_BASE=__stack
    --symbol_map _stack=__stack


    --args 0x0
    -heap 0x0
    -stack 0x800

    /*
    * Linker command file contributions from all loaded packages:
    */

    /* Content from xdc.services.global (null): */

    /* Content from xdc (null): */

    /* Content from xdc.corevers (null): */

    /* Content from xdc.shelf (null): */

    /* Content from xdc.services.spec (null): */

    /* Content from xdc.services.intern.xsr (null): */

    /* Content from xdc.services.intern.gen (null): */

    /* Content from xdc.services.intern.cmd (null): */

    /* Content from xdc.bld (null): */

    /* Content from ti.targets (null): */

    /* Content from ti.targets.arm.elf (null): */

    /* Content from xdc.rov (null): */

    /* Content from xdc.runtime (null): */

    /* Content from xdc.services.getset (null): */

    /* Content from ti.targets.arm.rtsarm (null): */

    /* Content from ti.sysbios.interfaces (null): */

    /* Content from ti.sysbios.family (null): */

    /* Content from ti.sysbios.family.arm (ti/sysbios/family/arm/linkcmd.xdt): */
    --retain "*(.vecs)"

    /* Content from ti.ndk.rov (null): */

    /* Content from ti.mw (null): */

    /* Content from ti.sysbios.rts (ti/sysbios/rts/linkcmd.xdt): */

    /* Content from xdc.runtime.knl (null): */

    /* Content from ti.ndk (null): */

    /* Content from ti.ndk.hal.timer_bios (null): */

    /* Content from ti.ndk.os (null): */

    /* Content from ti.ndk.hal.userled_stub (null): */

    /* Content from ti.ndk.hal.eth_stub (null): */

    /* Content from ti.ndk.tools.cgi (null): */

    /* Content from ti.ndk.tools.hdlc (null): */

    /* Content from ti.ndk.stack (null): */

    /* Content from ti.ndk.tools.console (null): */

    /* Content from ti.ndk.netctrl (null): */

    /* Content from ti.ndk.nettools (null): */

    /* Content from ti.ndk.hal.ser_stub (null): */

    /* Content from ti.ndk.tools.servers (null): */

    /* Content from xdc.services.io (null): */

    /* Content from ti.catalog.arm.peripherals.timers (null): */

    /* Content from ti.catalog (null): */

    /* Content from ti.catalog.arm.cortexm4 (null): */

    /* Content from ti.catalog.peripherals.hdvicp2 (null): */

    /* Content from xdc.platform (null): */

    /* Content from xdc.cfg (null): */

    /* Content from ti.catalog.arm.cortexm3 (null): */

    /* Content from ti.catalog.arm.cortexm4.tiva.ce (null): */

    /* Content from ti.platforms.tiva (null): */

    /* Content from ti.sysbios.hal (null): */

    /* Content from ti.sysbios.family.arm.m3 (ti/sysbios/family/arm/m3/linkcmd.xdt): */
    -u _c_int00
    --retain "*(.resetVecs)"
    ti_sysbios_family_arm_m3_Hwi_nvic = 0xe000e000;

    /* Content from ti.sysbios (null): */

    /* Content from ti.sysbios.knl (null): */

    /* Content from ti.sysbios.family.arm.lm4 (null): */

    /* Content from ti.ndk.config (null): */

    /* Content from ti.drivers.ports (null): */

    /* Content from ti.mw.fatfs (null): */

    /* Content from ti.drivers (null): */

    /* Content from ti.sysbios.utils (null): */

    /* Content from ti.sysbios.gates (null): */

    /* Content from ti.sysbios.xdcruntime (null): */

    /* Content from ti.sysbios.heaps (null): */

    /* Content from configPkg (null): */



    /*
    * symbolic aliases for static instance objects
    */
    xdc_runtime_Startup__EXECFXN__C = 1;
    xdc_runtime_Startup__RESETFXN__C = 1;


    SECTIONS
    {
    .bootVecs: type = DSECT
    .vecs: load > 0x20000000
    .resetVecs: load > 0x0



    xdc.meta: type = COPY
    }
  • AartiG I ask Danny to post this question since I was having an issue posting a question to the forum.

    Mike
  • Mike,

    The linker.cmd is file that is auto-generated by the XDCtools build step and as you can see that file is pulling in several libraries from the NDK (from \ndk_2_25_00_09\packages\ti\ndk sub-folders). If you want it to link in libraries from a different location, you would need to modify the repository path that is passed to the build tools. 

    If you look at Project Properties->Build->XDCtools->Package Repositories, you will notice that the paths are passed via the variable ${COM_TI_RTSC_TIRTOSTIVAC_REPOS}. To change the paths you would need to edit this variable. You can do this from Project Properties->Build->Variables tab, enable "Show system variables", then edit COM_TI_RTSC_TIRTOSTIVAC_REPOS to change ndk_2_25_00_09 to copy-ndk_2_25_00_09.


    After doing this, the linker.cmd generated by the build should pull in the libraries from inside the copy-ndk_2_25_00_09 directory path. 

    Let us know if this helps.

  • Yes, thank you that answered my question.
  • Glad to hear that. I'd appreciate if you could mark the thread as Answered, so it helps others that may be searching the forum for similar issues.