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.

Specifying Program.linkTemplate for own linker file for SYS/BIOS project.

Other Parts Discussed in Thread: SYSBIOS

I'm trying to customize a SYS/BIOS project's linker command file. Its looks like the way to do this is to set the linkTemplate property as described in spruex3p.pdf:

Specify a template for the program's linker command file. See
tip/xdc/cfg/Program.html#link.Template
for information and examples that use the
Program.linkTemplate parameter. The simplest way to create a template for your program is to first
auto-generate the linker command file, then edit it to suit your application’s needs, and then set the
Program.linkTemplate parameter to reference your edited file.
I "point" linkTemplate to my own ARMlinker.cmd file that was created as above. I get the following errors in the build:

gmake[1]: Leaving directory 'D:/workspace_v6_0/gaia_arm/src/sysbios'
js: "C:/ti/xdctools_3_32_00_06/packages/xdc/cfg/Main.xs", line 48: XDC runtime error: can't find program 'app.xe9's linker command template file: './ARMlinker.cmd' along the path C:/ti/bios_6_41_00_26/packages;C:/ti/uia_2_00_05_50/packages;C:/ti/ccsv6/ccs_base;C:/ti/xdctools_3_32_00_06/packages;..;
gmake.exe: *** [package/cfg/app_pe9.xdl] Error 1
gmake.exe: *** Deleting file `package/cfg/app_pe9.xdl'
gmake.exe: *** [package/cfg/app_pe9.xdl] Deleting file `package/cfg/app_pe9.h'
gmake.exe: *** [package/cfg/app_pe9.xdl] Deleting file `package/cfg/app_pe9.c'
js: "C:/ti/xdctools_3_32_00_06/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
gmake: *** No rule to make target 'configPkg/linker.cmd', needed by 'configPkg/compiler.opt'.
gmake: Target 'all' not remade because of errors.

**** Build Finished ****

What could be wrong? Is there some other better way to modify the project's linker file?

Steve

  • './ARMlinker.cmd' exists in the root of the project.
  • Hello Steve,

    I have seen this issue earlier. Dont know why but removing "./" before command file name fixed it for me. Though the official docs suggest to add it before command file name.

    Can you please try specifying command file like below (remove ./)

    Program.linkTemplate= "ARMlinker.cmd"

    Regards,

    Prasad

  • Also you can make sure if the same command file is used by comparing your command file with one generated in sysbios folder. Basically XDC just copies custom linker file (with name linker.cmd) and uses from that location.

    Prasad
  • Nope - now I'm getting this:

    js: "C:/ti/xdctools_3_32_00_06/packages/xdc/cfg/Main.xs", line 48: XDC runtime error: can't find program 'app.xe9's linker command template file: 'ARMlinker.cmd' along the path C:/ti/bios_6_41_00_26/packages;C:/ti/uia_2_00_05_50/packages;C:/ti/ccsv6/ccs_base;C:/ti/xdctools_3_32_00_06/packages;..;
    gmake.exe: *** [package/cfg/app_pe9.xdl] Error 1
    gmake.exe: *** Deleting file `package/cfg/app_pe9.xdl'
    gmake.exe: *** [package/cfg/app_pe9.xdl] Deleting file `package/cfg/app_pe9.h'
    gmake.exe: *** [package/cfg/app_pe9.xdl] Deleting file `package/cfg/app_pe9.c'
    js: "C:/ti/xdctools_3_32_00_06/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    gmake: *** No rule to make target 'configPkg/linker.cmd', needed by 'configPkg/compiler.opt'.
    gmake: *** No rule to make target 'configPkg/linker.cmd', needed by 'configPkg/compiler.opt'.
    gmake: *** No rule to make target 'configPkg/linker.cmd', needed by 'configPkg/compiler.opt'.
    gmake: *** No rule to make target 'configPkg/linker.cmd', needed by 'configPkg/compiler.opt'.
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

    Next suggestion?
  • Did that - my .cmd file is copied directly from the generated one.
  • Now it is taking new linker command file but not able to find one of binaries. Can you try clean build?
  • Now it is taking new linker command file but not able to find one of binaries. Can you try clean build?

    Of course I tried that - the output is from a project rebuild...

    Steve

  • My bad. Did not read through full error message.
    Looks like error is same regardless. Dont know why but it had fixed issue for me. Is is possible to share config file and project code?
  • Steve,
    the actual working directory is Debug, you may want to try
    Program.linkTemplate = "../ARMlinker.cmd";
  • Still not working.

    The only thing that seems to work for me is a fully-specified path to an XDL file. This is working:

    Program.linkTemplate = "D:/workspace_v6_0/gaia_arm/ARMapp_pe9.xdl";

    But... what is an XDL file??? And why do I need to fully specify the path to it!?!? I find this work-around to be ridiculous.
  • Is specifying an absolute path to you ARMlinker.cmd not working? There is an XDL file in some of the subdirectories of your project, but that's an internal file and normally is not found in the top project directory.
    Can you also post the complete console output after cleaning and rebuilding, not only the error message?
  • Is specifying an absolute path to you ARMlinker.cmd not working?

    No, that didn't work.

    Can you also post the complete console output after cleaning and rebuilding, not only the error message?

    Let me work on that...

  • **** Build of configuration Debug for project gaia_arm ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../app.cfg'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_32_00_06/xs" --xdcpath="C:/ti/bios_6_41_00_26/packages;C:/ti/uia_2_00_05_50/packages;C:/ti/ccsv6/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.Arm9 -p ti.platforms.evmOMAPL137 -r debug -c "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5" --compileOptions "-g --optimize_with_debug" "../app.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring app.xe9 from package/cfg/app_pe9.cfg ...
    generating custom ti.sysbios library makefile ...
    making ../src/sysbios/sysbios.ae9 ...
    gmake[1]: Entering directory 'D:/workspace_v6_0/gaia_arm/src/sysbios'
    cle9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/BIOS.c ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/HwiCommon_asm.asm ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/IntrinsicsSupport_asm.asm ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/TaskSupport_asm.asm ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/arm9/Cache_asm.asm ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/arm9/Mmu_asm.asm ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/da830/Hwi_asm.s470 ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/exc/Exception_asm.asm ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/timers/timer64/Timer_asm.s470 ...
    are9 BIOS.obj arm_HwiCommon_asm.obj arm_IntrinsicsSupport_asm.obj arm_TaskSupport_asm.obj arm9_Cache_asm.obj arm9_Mmu_asm.obj da830_Hwi_asm.obj exc_Exception_asm.obj timer64_Timer_asm.obj ...
    gmake[1]: Leaving directory 'D:/workspace_v6_0/gaia_arm/src/sysbios'
    js: "C:/ti/xdctools_3_32_00_06/packages/xdc/cfg/Main.xs", line 48: XDC runtime error: can't find program 'app.xe9's linker command template file: 'ARMlinker.cmd' along the path C:/ti/bios_6_41_00_26/packages;C:/ti/uia_2_00_05_50/packages;C:/ti/ccsv6/ccs_base;C:/ti/xdctools_3_32_00_06/packages;..;
    gmake.exe: *** [package/cfg/app_pe9.xdl] Error 1
    gmake.exe: *** Deleting file `package/cfg/app_pe9.xdl'
    gmake.exe: *** [package/cfg/app_pe9.xdl] Deleting file `package/cfg/app_pe9.h'
    gmake.exe: *** [package/cfg/app_pe9.xdl] Deleting file `package/cfg/app_pe9.c'
    js: "C:/ti/xdctools_3_32_00_06/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    gmake: *** No rule to make target 'configPkg/linker.cmd', needed by 'configPkg/compiler.opt'.
    gmake: *** No rule to make target 'configPkg/linker.cmd', needed by 'configPkg/compiler.opt'.
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

    And... from app.cfg:

    Program.linkTemplate = "ARMlinker.cmd";
  • That all looks normal. Before I ask you for the whole project, can you try switching back to the absolute path for the linker template:
    Program.linkTemplate = "D:/workspace_v6_0/gaia_arm/ARMlinker.cmd"; // or whatever the actual path is

    and then add the following code right after that statement:
    var io = xdc.useModule("xdc.services.io.File");
    print(io.exists("D:/workspace_v6_0/gaia_arm/ARMlinker.cmd"));  // the same path as above

    This is just a shortcut to the same Java IO code that will be used later where the actual error is raised. If there is any unusual I/O conditions, there will be a different error thrown. If you get back 'false', then there is no such a file in file system, and you should check the paths and possible uppercase/lowercase mixup.

  • OK:

    from app.cfg:

    Program.linkTemplate = "D:/workspace_v6_0/gaia_arm/ARMlinker.cmd";

    var io = xdc.useModule("xdc.services.io.File");
    print(io.exists("D:/workspace_v6_0/gaia_arm/ARMlinker.cmd")); // the same path as above


    build output:

    **** Build of configuration Debug for project gaia_arm ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../app.cfg'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_32_00_06/xs" --xdcpath="C:/ti/bios_6_41_00_26/packages;C:/ti/uia_2_00_05_50/packages;C:/ti/ccsv6/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.Arm9 -p ti.platforms.evmOMAPL137 -r debug -c "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5" --compileOptions "-g --optimize_with_debug" "../app.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring app.xe9 from package/cfg/app_pe9.cfg ...
    true
    generating custom ti.sysbios library makefile ...
    Starting build of library sources ...
    making D:/workspace_v6_0/gaia_arm/src/sysbios/sysbios.ae9 ...
    gmake[1]: Entering directory `D:/workspace_v6_0/gaia_arm/src/sysbios'
    cle9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/BIOS.c ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/HwiCommon_asm.asm ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/IntrinsicsSupport_asm.asm ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/TaskSupport_asm.asm ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/arm9/Cache_asm.asm ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/arm9/Mmu_asm.asm ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/da830/Hwi_asm.s470 ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/exc/Exception_asm.asm ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/timers/timer64/Timer_asm.s470 ...
    are9 BIOS.obj arm_HwiCommon_asm.obj arm_IntrinsicsSupport_asm.obj arm_TaskSupport_asm.obj arm9_Cache_asm.obj arm9_Mmu_asm.obj da830_Hwi_asm.obj exc_Exception_asm.obj timer64_Timer_asm.obj ...
    gmake[1]: Leaving directory `D:/workspace_v6_0/gaia_arm/src/sysbios'
    Build of libraries done.
    cle9 package/cfg/app_pe9.c ...
    'Finished building: ../app.cfg'
    ' '
    1 file(s) copied.
    making ../src/sysbios/sysbios.ae9 ...
    gmake[1]: Entering directory 'D:/workspace_v6_0/gaia_arm/src/sysbios'
    gmake[1]: Nothing to be done for 'all'.
    gmake[1]: Leaving directory 'D:/workspace_v6_0/gaia_arm/src/sysbios'
    'Building file: ../ARMmain.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/bin/armcl" -mv5e --code_state=32 --abi=eabi -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include" --include_path="D:/workspace_v6_0/gaia_arm/include" -g --define=omapl137 --diag_wrap=off --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="ARMmain.d" --cmd_file="configPkg/compiler.opt" "../ARMmain.c"
    'Finished building: ../ARMmain.c'
    ' '
    'Building file: ../aBT/aBTeeprom.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/bin/armcl" -mv5e --code_state=32 --abi=eabi -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include" --include_path="D:/workspace_v6_0/gaia_arm/include" -g --define=omapl137 --diag_wrap=off --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="aBT/aBTeeprom.d" --obj_directory="aBT" --cmd_file="configPkg/compiler.opt" "../aBT/aBTeeprom.c"
    'Finished building: ../aBT/aBTeeprom.c'
    ' '
    'Building file: ../aBT/aBTentry.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/bin/armcl" -mv5e --code_state=32 --abi=eabi -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include" --include_path="D:/workspace_v6_0/gaia_arm/include" -g --define=omapl137 --diag_wrap=off --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="aBT/aBTentry.d" --obj_directory="aBT" --cmd_file="configPkg/compiler.opt" "../aBT/aBTentry.c"
    'Finished building: ../aBT/aBTentry.c'
    ' '
    'Building file: ../aBT/aBThealthMon.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/bin/armcl" -mv5e --code_state=32 --abi=eabi -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include" --include_path="D:/workspace_v6_0/gaia_arm/include" -g --define=omapl137 --diag_wrap=off --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="aBT/aBThealthMon.d" --obj_directory="aBT" --cmd_file="configPkg/compiler.opt" "../aBT/aBThealthMon.c"
    'Finished building: ../aBT/aBThealthMon.c'
    ' '
    'Building file: ../aBT/aBTversioning.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/bin/armcl" -mv5e --code_state=32 --abi=eabi -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include" --include_path="D:/workspace_v6_0/gaia_arm/include" -g --define=omapl137 --diag_wrap=off --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="aBT/aBTversioning.d" --obj_directory="aBT" --cmd_file="configPkg/compiler.opt" "../aBT/aBTversioning.c"
    'Finished building: ../aBT/aBTversioning.c'
    ' '
    'Building file: ../aBT/aBTwdt.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/bin/armcl" -mv5e --code_state=32 --abi=eabi -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include" --include_path="D:/workspace_v6_0/gaia_arm/include" -g --define=omapl137 --diag_wrap=off --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="aBT/aBTwdt.d" --obj_directory="aBT" --cmd_file="configPkg/compiler.opt" "../aBT/aBTwdt.c"
    'Finished building: ../aBT/aBTwdt.c'
    ' '
    'Building target: gaia_arm.out'
    'Invoking: ARM Linker'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/bin/armcl" -mv5e --code_state=32 --abi=eabi -me -g --define=omapl137 --diag_wrap=off --diag_warning=225 --display_error_number -z -m"gaia_arm.map" --heap_size=0x800 --stack_size=0x800 -i"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/lib" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include" --reread_libs --display_error_number --diag_wrap=off --warn_sections --xml_link_info="gaia_arm_linkInfo.xml" --rom_model -o "gaia_arm.out" "./ARMmain.obj" "./aBT/aBTeeprom.obj" "./aBT/aBTentry.obj" "./aBT/aBThealthMon.obj" "./aBT/aBTversioning.obj" "./aBT/aBTwdt.obj" "../ARMlinker.cmd" -l"configPkg/linker.cmd" -llibc.a
    <Linking>
    "configPkg/linker.cmd", line 33: error #10263: IRAM memory range has already been specified
    "configPkg/linker.cmd", line 33: error #10264: IRAM memory range overlaps existing memory range IRAM
    "configPkg/linker.cmd", line 34: error #10263: L3_CBA_RAM memory range has already been specified
    "configPkg/linker.cmd", line 34: error #10264: L3_CBA_RAM memory range overlaps existing memory range L3_CBA_RAM

    >> Compilation failure
    makefile:147: recipe for target 'gaia_arm.out' failed
    "configPkg/linker.cmd", line 35: error #10263: SDRAM memory range has already been specified
    "configPkg/linker.cmd", line 35: error #10264: SDRAM memory range overlaps existing memory range SDRAM
    error #10057: symbol "__TI_STACK_SIZE" has conflicting mappings (previously mapped to "__STACK_SIZE")
    error #10057: symbol "__TI_STACK_BASE" has conflicting mappings (previously mapped to "__stack")
    error #10057: symbol "_stack" has conflicting mappings (previously mapped to "__stack")
    "configPkg/linker.cmd", line 130: warning #10190-D: absolute symbol "xdc_runtime_Startup__EXECFXN__C" being redefined
    "configPkg/linker.cmd", line 131: warning #10190-D: absolute symbol "xdc_runtime_Startup__RESETFXN__C" being redefined
    "configPkg/linker.cmd", line 132: warning #10190-D: absolute symbol "TSK_idle" being redefined
    "configPkg/linker.cmd", line 153: warning #10190-D: absolute symbol "_argsize" being redefined
    "configPkg/linker.cmd", line 132: warning #10190-D: absolute symbol "TSK_idle" being redefined
    "configPkg/linker.cmd", line 132: warning #10190-D: absolute symbol "TSK_idle" being redefined
    error #10010: errors encountered during linking; "gaia_arm.out" not built
    gmake: *** [gaia_arm.out] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****
  • You are now getting a different error, which means that the linker command file template has been found. If you are not planning to share that project with others, you can keep the absolute path. Otherwise, you may try to use "../ARMlinker.cmd" notation and see what kind of error you get.

    The new error is caused by adding ARMlinker.cmd to the command line. You don't need to do that. Once you set Prog.linkTemplate to that file, its content will be automatically included, no need to add it to the command line explicitly.
  • The new error is caused by adding ARMlinker.cmd to the command line. You don't need to do that.


    I'm not - I'm only including it via the .cfg file.

    If you are not planning to share that project with others

    I am.

    Otherwise, you may try to use "../ARMlinker.cmd" notation and see what kind of error you get.

    That's what started this.... I'm unable to use any .cmd file of my own w/o build errors.  I'm not interested in seeing what kind of errors I get - I'm interested in a solution to this problem. Any pointers?

    Steve

  • There are two different errors. The one is that the template is not found. It can be solved by a relative path "../ARMlinker.cmd" or the absolute path. The other one is that ARMlinker.cmd is included twice. Try right-click and "Exclude from build".
  • No - there's still something wrong.

    When I rename the same file to an xdl file:

    Program.linkTemplate = "D:/workspace_v6_0/gaia_arm/ARMapp_pe9.xdl";

    the build works. When I use (same file content) ARMlinker.cmd,

    Program.linkTemplate = "D:/workspace_v6_0/gaia_arm/ARMlinker.cmd";

    it fails:

    **** Clean-only build of configuration Debug for project gaia_arm ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k clean
    cleaning ../src/sysbios ...
    DEL /F "gaia_arm.out" "configPkg\linker.cmd" "configPkg\compiler.opt" "gaia_arm.bin"
    makefile:165: recipe for target 'clean' failed
    The system cannot find the file specified.
    gmake: [clean] Error 1 (ignored)
    DEL /F "aBT\aBTeeprom.d"
    RMDIR /S/Q "configPkg\"
    makefile:165: recipe for target 'clean' failed
    Could Not Find D:\workspace_v6_0\gaia_arm\Debug\aBT\aBTeeprom.d
    The system cannot find the file specified.
    gmake: [clean] Error 2 (ignored)
    DEL /F "ARMmain.d" "OMAPL1x_common.d" "aBT\aBTentry.d" "aBT\aBThealthMon.d" "aBT\aBTversioning.d" "aBT\aBTwdt.d"
    DEL /F "ARMmain.obj" "OMAPL1x_common.obj" "aBT\aBTeeprom.obj" "aBT\aBTentry.obj" "aBT\aBThealthMon.obj" "aBT\aBTversioning.obj" "aBT\aBTwdt.obj"
    Could Not Find D:\workspace_v6_0\gaia_arm\Debug\ARMmain.d
    Could Not Find D:\workspace_v6_0\gaia_arm\Debug\aBT\aBTentry.d
    Could Not Find D:\workspace_v6_0\gaia_arm\Debug\ARMmain.obj
    Could Not Find D:\workspace_v6_0\gaia_arm\Debug\aBT\aBTeeprom.obj
    'Finished clean'
    ' '

    **** Build Finished ****

    **** Build of configuration Debug for project gaia_arm ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../app.cfg'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_32_00_06/xs" --xdcpath="C:/ti/bios_6_41_00_26/packages;C:/ti/uia_2_00_05_50/packages;C:/ti/ccsv6/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.Arm9 -p ti.platforms.evmOMAPL137 -r debug -c "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5" --compileOptions "-g --optimize_with_debug" "../app.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring app.xe9 from package/cfg/app_pe9.cfg ...
    generating custom ti.sysbios library makefile ...
    making ../src/sysbios/sysbios.ae9 ...
    gmake[1]: Entering directory 'D:/workspace_v6_0/gaia_arm/src/sysbios'
    cle9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/BIOS.c ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/HwiCommon_asm.asm ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/IntrinsicsSupport_asm.asm ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/TaskSupport_asm.asm ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/arm9/Cache_asm.asm ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/arm9/Mmu_asm.asm ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/da830/Hwi_asm.s470 ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/family/arm/exc/Exception_asm.asm ...
    asme9 C:/ti/bios_6_41_00_26/packages/ti/sysbios/timers/timer64/Timer_asm.s470 ...
    are9 BIOS.obj arm_HwiCommon_asm.obj arm_IntrinsicsSupport_asm.obj arm_TaskSupport_asm.obj arm9_Cache_asm.obj arm9_Mmu_asm.obj da830_Hwi_asm.obj exc_Exception_asm.obj timer64_Timer_asm.obj ...
    gmake[1]: Leaving directory 'D:/workspace_v6_0/gaia_arm/src/sysbios'
    js: "C:/ti/xdctools_3_32_00_06/packages/xdc/cfg/Main.xs", line 48: XDC runtime error: can't find program 'app.xe9's linker command template file: 'D:/workspace_v6_0/gaia_arm/ARMlinker.cmd' along the path C:/ti/bios_6_41_00_26/packages;C:/ti/uia_2_00_05_50/packages;C:/ti/ccsv6/ccs_base;C:/ti/xdctools_3_32_00_06/packages;..;
    gmake.exe: *** [package/cfg/app_pe9.xdl] Error 1
    gmake.exe: *** Deleting file `package/cfg/app_pe9.xdl'
    gmake.exe: *** [package/cfg/app_pe9.xdl] Deleting file `package/cfg/app_pe9.h'
    gmake.exe: *** [package/cfg/app_pe9.xdl] Deleting file `package/cfg/app_pe9.c'
    js: "C:/ti/xdctools_3_32_00_06/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    gmake: *** No rule to make target 'configPkg/linker.cmd', needed by 'configPkg/compiler.opt'.
    gmake: *** No rule to make target 'configPkg/linker.cmd', needed by 'configPkg/compiler.opt'.
    gmake: *** No rule to make target 'configPkg/linker.cmd', needed by 'configPkg/compiler.opt'.
    gmake: *** No rule to make target 'configPkg/linker.cmd', needed by 'configPkg/compiler.opt'.
    gmake: *** No rule to make target 'configPkg/linker.cmd', needed by 'configPkg/compiler.opt'.
    gmake: *** No rule to make target 'configPkg/linker.cmd', needed by 'configPkg/compiler.opt'.
    gmake: *** No rule to make target 'configPkg/linker.cmd', needed by 'configPkg/compiler.opt'.
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****
  • In your post  on Tue, May 31 2016 2:24 PM, you were using that same syntax
    Program.linkTemplate = "D:/workspace_v6_0/gaia_arm/ARMlinker.cmd";

    with the additional instructions that I asked for:
    var io = xdc.useModule("xdc.services.io.File");
    print(io.exists("D:/workspace_v6_0/gaia_arm/ARMlinker.cmd"));  // the same path as above

    At that time, the template file was found (the linker later failed but that is a different problem). Do you know what changed between that build and your last post?

    The name "ARMlinker.cmd" doesn't seem special in any way, I just built an example where I was using it as a template name, and it worked fine. Can you clean your project and then zip up and post your directory 'gaia_arm'? You can exclude your C sources because I am assuming you don't want them posted on a public forum, but please include the CFG script if possible.  

  • I'm in the middle of debugging another issue, so there may be some debug stuff in there, but here's a clean copy of what I'm working on now:0003.gaia_arm - Copy.zip

  • The project's configuration runs fine for me with either ARMlinker.cmd or ARMapp_pe9.xdl, specified using an absolute path or a relative path like this one:

    Program.linkTemplate = "../ARMlinker.cmd";

    When I say that the configuration runs fine, I mean I don't get the error that says: XDC runtime error: can't find program 'app.xe9's linker command template file. I get some compiler errors later because I don't have all the necessary files, but we can deal with them later once you have a working configuration. When you have a working configuration without the abovementioned error, don't change the content of the CFG script or rename ARMlinker.cmd, and just post any compiler or linker errors you get.

  • When you have a working configuration without the abovementioned error, don't change the content of the CFG script or rename ARMlinker.cmd

    Do you have any suggestions on how to get it working?  I think that's at the core of this issue...

    Steve

  • Do whatever you did to get the output in your post on Tue, May 31 2016 2:24 PM when you got the error:
    <Linking>
    "configPkg/linker.cmd", line 33: error #10263: IRAM memory range has already been specified
    "configPkg/linker.cmd", line 33: error #10264: IRAM memory range overlaps existing memory range IRAM
    ...
  • But that's still an error. Any suggestions on how to fix this???

  • So, you are not getting that error about not finding linker template file? Good. Now, see my post on Thu, Jun 2 2016 8:31 AM and exclude ARMlinker from build as explained there.
  • So, you are not getting that error about not finding linker template file?

    I get errors if I use a .cmd file. I don't if I use .xdl.  Why???

    Steve

  • Are you talking about Error A - "XDC runtime error: can't find program 'app.xe9's linker command template file" or Error B - "error #10263: IRAM memory range has already been specified"? Let's say it's A. I tried your project with different names for the linker template, and I never got Error A as long as I used a relative path that goes one level up from the current directory:
    Program.linkTemplate =  "../ARMlinker.cmd";

    So, the problem must be specific to your PC. Add the following code right after that statement:
    var io = xdc.useModule("xdc.services.io.File");
    print(io.ls("D:/workspace_v6_0/gaia_arm/", null));

    This should display the files that Java IO sees in your file system. Keep changing the name of the template and build the project after each change, then post the complete output.

  • Thanks for all the help on this. I think the last thing that got me working was going one level up for the .cmd instead of ./ - I think I missed that important subtlety earlier:

    Program.linkTemplate = "../ARMlinker.cmd";

    Steve