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.

Building Ethercat slave example

Other Parts Discussed in Thread: AM3359, SYSBIOS

I hope I am asking this in the correct forum.  I think there is a setting in CCS that I can't find, thus I started here.

I'm just getting started with CCS and TI products in general.  I bought the am3359 ice2 eval board and am trying to build the ethercat slave example.  I imported the example, changed the target to ICE_AM3359 [Cortex A].  When I try to build I get the message below:

**** Build of configuration am335x_debug for project ethercat ****

/opt/ti/ccsv6/utils/bin/gmake -k all
Building file: ../am335xx_app.cfg
Invoking: XDCtools
"/home/shartmann/ti/xdctools_3_31_02_38_core/xs" --xdcpath="/home/shartmann/ti/bios_6_45_00_19/packages;" xdc.tools.configuro -o configPkg -t gnu.targets.arm.A8F -p ti.platforms.evmAM3359 -r debug -c "/opt/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3" "../am335xx_app.cfg"
configuring am335xx_app.xa8fg from package/cfg/am335xx_app_pa8fg.cfg ...
generating custom ti.sysbios library makefile ...
js: "/home/shartmann/ti/xdctools_3_31_02_38_core/packages/xdc/cfg/Main.xs", line 49: XDC runtime error: can't find program 'am335xx_app.xa8fg's linker command template file: 'null/examples/ethercat_slave/ethercat.xdt' along the path /home/shartmann/ti/bios_6_45_00_19/packages;/home/shartmann/ti/xdctools_3_31_02_38_core/packages;..;
gmake: *** [package/cfg/am335xx_app_pa8fg.xdl] Error 1
gmake: *** Deleting file `package/cfg/am335xx_app_pa8fg.xdl'
gmake: *** [package/cfg/am335xx_app_pa8fg.xdl] Deleting file `package/cfg/am335xx_app_pa8fg.h'
gmake: *** [package/cfg/am335xx_app_pa8fg.xdl] Deleting file `package/cfg/am335xx_app_pa8fg.c'
js: "/home/shartmann/ti/xdctools_3_31_02_38_core/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
gmake: *** [configPkg/linker.cmd] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

So, it appears it is having an issue finding the file ethercat.xdt.  I found these two instances:

shartmann@shartmann-mint ~ $ locate ethercat.xdt
/home/shartmann/ti/sysbios_ind_sdk_2.1.1.2/sdk/examples/ethercat_slave/ethercat.xdt
/home/shartmann/workspace_v6_1/ethercat/ethercat.xdt

My guess is it should be using the second one since that is where I imported  the project to.   Anyway, how do I let the build tools know where to find this file so I can resolve this issue.

Thanks,

Steve

  • OK, I have gotten past that problem, but I'm not sure I did it the proper way. I opened a file in the project called am335xx_app.cfg which opened up in a configuration editor. In the "available products" window I navigated to XDCtoos/System/Program, clicked on the "Generation" tab, then edited the "Linker command file" to have a the full path to the xdt file i.e. /home/shartmann/workspace_v6_1/ethercat.xdt. BTW, I also tried ~ instead of /home/shartmann, but that didn't work.

    Is that the proper way to specify the file, or should I have changed the xdcpath - wherever that setting may be - or is there yet another way I should have specified this file path.
    Also, do most folks use this configuration editor, or just simply use a text editor on the .cfg file? I found the setting in the .cfg file via grepping - seems more straight forward than the navigating through 4 layers of configuration to hunt down the setting.
  • Steven,

    I am moving this thread to the TI-RTOS forum as the experts there can best help with this.
  • Hi Steven,

    The .xdt file is a template file that is used to generate a file (which occurs during a build). I'm not familiar with EtherCat, but I highly doubt you should be pointing to anything to a .xdt file. Can you attach a sample project and let me try to reproduce the initial problem?

    Also, once you are comfortable with editing the .cfg as text, it is faster, you can add comments, conditionals, loops, etc. The downside is that you have to know the JavaScript and know what you want to change.

    Todd
  • The example I am using is $IA_SDK_HOME/examples/ethercat_slave. My development, by the way, is linux. I finally got the example project to completely build, but had some pain since the SDK came in the form of a windows installer, which I had to use Wine to install, thus some environment vars didn't get set up, and paths had backslashes and such.
  • So are you up and running then? Can I close this thread out?
  • Well, before closing the thread I would like to get an answer to my question above as to what is the proper way to specify the Program.linkTemplate path.

    I do have the program compiling, but still not debugging.  I suppose I can open another thread for my debugging issues once I have some specific questions.  

  • Steven,

    What version of CCS are you using? I reproduced the problem with 6.1.0, but was able to build properly (albeit on Windows) with 6.1.1. Here are the required software and versions listed in the Industrial SDK's release notes (v2.1.1.2).

    Software
    • Code Composer Studio [2] version CCS 6.1.1.00022
    • SYS/BIOS 6.42.2.29 Real Time Operating System
    • XDC Tool 3.31.2.38_core
    • NDK 2.24.3.35
    • Compiler GNU v4.8.4 (Linaro)
    • Serial console terminal application (like Teraterm, minicom, HyperTerminal)

    Can you try it again with the above software?

    Todd