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.

RTOS/AM3357: EtherCAT Slave full feature build fails

Part Number: AM3357
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Dear TI suport team,

I have to build etherCAT slave with TI-RTOS on an AM335x customized board.

Here are the component I’m using:

CCS 7.1.0.00016

gcc-arm-none-eabi-4_9-2015q3

XDCTools 3.32.1.22

PRU-ICSS-EtherCAT Slave 01.00.03.01

Processor SDK RTOS AM335x 4.0.0.4

SYS/BIOS 6.46.5.55

NDK 2.25.1.11

PDK am335x 1.0.7

I followed  the steps from PRU ICSS EtherCAT to build an etherCAT slave full feature project, and I got some errors when I select NDK, SYS/BIOS and am335x PDK in RTSC tab.

Here's the log:

**** Build of configuration AM335x_release for project ethercat_slave_full_AM335x_arm ****

/home/ericwang/ti/ccsv7/utils/bin/gmake -k -j 4 all -O
gmake[1]: Entering directory '/home/ericwang/workspace_v7/ethercat_slave_full_AM335x_arm/AM335x_release'
Building file: /home/ericwang/ti/PRU-ICSS-EtherCAT_Slave_01.00.03.01/protocols/ethercat_slave/ecat_appl/am335x_app.cfg
Invoking: XDCtools
"/home/ericwang/ti/xdctools_3_32_01_22_core/xs" --xdcpath="/home/ericwang/ti/bios_6_46_05_55/packages;/home/ericwang/ti/ndk_2_25_01_11/packages;/home/ericwang/ti/pdk_am335x_1_0_7/packages;/home/ericwang/myRepository;" xdc.tools.configuro -o configPkg -t gnu.targets.arm.A8F -p myBotbone03 -r release -c "/home/ericwang/ti/gcc-arm-none-eabi-4_9-2015q3" "/home/ericwang/ti/PRU-ICSS-EtherCAT_Slave_01.00.03.01/protocols/ethercat_slave/ecat_appl/am335x_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 am335x_app.xa8fg from package/cfg/am335x_app_pa8fg.cfg ...
generating custom ti.sysbios library makefile ...
subdir_rules.mk:38: recipe for target 'build-1694665583-inproc' failed
js: "/home/ericwang/ti/pdk_am335x_1_0_7/packages/ti/drv/spi/package.xs", line 122: Error:     Library not found: /home/ericwang/ti/pdk_am335x_1_0_7/packages/ti/drv/spi/./lib/am335x/a8/release/ti.drv.spi.aa8fg
gmake: *** [package/cfg/am335x_app_pa8fg.xdl] Error 1
gmake: *** Deleting file `package/cfg/am335x_app_pa8fg.xdl'
gmake: *** [package/cfg/am335x_app_pa8fg.xdl] Deleting file `package/cfg/am335x_app_pa8fg.h'
gmake: *** [package/cfg/am335x_app_pa8fg.xdl] Deleting file `package/cfg/am335x_app_pa8fg.c'
Warning: directory "/home/ericwang/myRepository" on package path has a "packages" subdirectory - did you mean this instead?
js: "/home/ericwang/ti/xdctools_3_32_01_22_core/packages/xdc/tools/Cmdr.xs", line 52: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
gmake[1]: *** [build-1694665583-inproc] Error 1
gmake: *** [build-1694665583] Error 2
gmake[1]: Leaving directory '/home/ericwang/workspace_v7/ethercat_slave_full_AM335x_arm/AM335x_release'
subdir_rules.mk:35: recipe for target 'build-1694665583' failed
gmake: Target 'all' not remade because of errors.

**** Build Finished ****

  • The RTOS team have been notified. They will respond here.
  • Hi Erik, could you please try PRU-ICSS-EtherCAT_Slave_01.00.04.02 ? another user reported some building issues (E2E) when using CCSv7 and PRU-ICSS-EtherCAT_Slave_01.00.03.01 and confirmed it is resolved for 1.0.4.2 release.

    About Platform please use: ti.platforms.evmAM3359. If you don't see it, maybe your RTSC tools path are somehow incorrect (sybios, Edma, etc..). Or maybe you don't have these tools installed. Did you installed SYSBIOS Processor SDK?

    For EtherCAT slave 1.0.4.2 you will need PSDK 4.0

    PRU-ICSS EtherCAT slave User Guide

    Processor SDK RTOS 4.0

    Thank you,

    Paula

  • Erik, one additional point EtherCAT 1.0.3.1 is build on top of PSDK RTOS 3.3.0 (as shown in C:\TI\PRU-ICSS-EtherCAT_Slave_01.00.03.01\docs\PRU_ICSS_EtherCAT_User_Guide.pdf, Components Version section) instead of PSDK 4.0. This mismatch could be the issue you are facing.

    thank you,

    Paula

  • Dear Paula,

    Thanks for replying.

    I tried PRU-ICSS-EtherCAT 01.00.04.02 , and I got an error before I built the project : “ This project does not contain a buildable RTSC Configuration (.cfg) file. In order for it to build, this project must contain one RTSC Configuration file that is not excluded from build. ”

    After I built the project, I got the same errors as 01.00.03.01.

    About the platform, there’s nothing showed up when I selected XDCtools 3.32.1.22_core. Then I used 3.50.1.12_core, I can choose ti.platforms.evmAM3359.

    I did install Processor SDK RTOS 4.0

    Here’s the RTSC tools I have selected.

    Thanks for helping,

    Eric

  • Hi Eric, somehow it seems your CCS is not discovering the new tools you installed when installing PSDK.. Try close and open CCS to see if autodiscover tools works again. Also did you install PSDK in C:/TI? .. I believe CCS has to be in the same location in order to autodiscover new tools.. Another option is to add this tools (XDC, Sysbios, EDMA, etc) version manually in CCS. I don't recall how to do it, but if you search online you can find it (or in our CCS E2E forum).

    thank you,

    Paula

  • Dear Paula,

    My CCS found the tools after I reinstalled PSDK and the other tools.

    But there’s a new error showed up : “ 'tiesc_eeprom' undeclared (first use in this function)   in /ethercat_slave_full_AM335x_arm/EcatStack/tiescbsp.c  line 615 “.

    I think it’s because tiesc_eeprom.h isn't included in tiescbsp.c . But I saw this in tiescbsp.c :

    #ifdef TIESC_SPI_SLAVE_MODE
    #include <tiesc_spi_eeprom.h> // header equivalent of ESI bin file
    #elif TIESC_APPLICATION
    #ifdef ECAT_LIMITED_DEMO
    #include <demo_tiesc_eeprom.h> // header equivalent of ESI bin file
    #else
    #include <tiesc_eeprom.h> // header equivalent of ESI bin file
    #endif
    #elif CiA402_DEVICE
    #include <CiA402_eeprom.h> // header equivalent of ESI bin file
    #endif

    It looks like it did include tiesc_eeprom.h . So I don't know how to fix it.

    thanks for helping,

    Eric

  • Dear Paula,

    I found that tiesc_eeprom.h was not included because of ecat_def.h .

    So, I want to know that how to get " the patched ecat_def.h " in " user will have to replace the generated ecat_def.h with the patched ecat_def.h " in Generating EtherCAT sources using Beckhoff SSC Tool.

    thanks for helping,

    Eric

  • Eric, did you already follow instructions for patching EtherCAT slave stack (below link)?. You can get correct "ecat_def.h" after patching the stack.

    Building full feature EtherCAT slave Application

    If you already patched stack files with Beckhoff stack v5.11, then maybe you forgot to convert TI_ECAT.patch to DOS using "unix2dos" tool?

    In summary, you can generate EtherCAT sources using Beckhoff SSC Tool, but if you have Beckhoff stack v5.11, maybe it is easier just to patch it.

    If you decide to use patched Beckhoff stack please don't forget to copy all patched *.c and *.h files from  <Your_beckhoff_stack_path>\SSC_V5i11\SlaveFiles\src to C:\TI\PRU-ICSS-EtherCAT_Slave_01.00.04.02\protocols\ethercat_slave\ecat_appl\EcatStack.

    Please check above points, and let me know. I followed Building full feature EtherCAT slave Application and  "ethercat_slave_full_AM335x_arm" project built OK in my PC (I used CCSv7.0 for testing it).

    thank you,

    Paula

  • Dear Paula,

    I did patched EtherCAT slave stack , and the "ecat_def.h" is the same.

    I compared it with another "ecat_def.h" I found on another forum.

    And I found that My "ecat_def.h" only missing TIESC_APPLICATION section.

    So I added it manually, then I built it successfully.

    Is it feasible to do this way, or I must patch the file correctly?

    I thought maybe something went wrong when I patched EtherCAT slave stack.

    BTW: Does the patch file only has windows host version?

    Because I'm using a linux host PC, and it's inconvenient to get another windows host PC to patch the file.

    thanks for helping,

    Eric

  • Hi Eric, your workaround could work, but definitely your patched files might not be correct.. I haven't tried using Linux for patching, but I think it should work, please try it.

    thank you,
    Paula