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.

AM6548: AM6548: Where to find PRU EtherCAT Slave firmware?

Part Number: AM6548
Other Parts Discussed in Thread: AMIC110, SYSBIOS

PRU-ICSS-ETHERCAT-SLAVE  01_00_08_01 (https://software-dl.ti.com/processor-industrial-sw/esd/PRU-ICSS-ETHERCAT-SLAVE/latest/index_FDS.html) mentions AM65xx. But the AM65xx_release folder in the prebuilt binaries download is empty. And in the PRU-ICSS EtherCAT Slave Linux Installer there is Readme.txt mapping from version numbers to boards as

1) v1.0 -> ICSS v1.0 -> Present in AM335x, AMIC110 and AM572x PG1.x
1) v2.0 -> ICSS v2.0 -> Present in AM437x
1) v2.1 -> ICSS v2.1 -> Present in AM572x and AM571x
1) v2.2 -> ICSS v2.2 -> Present in K2G

Which version works with AM65xx? Or do I need to find the sources elsewhere?

  • The firmware in g_v1.0 works for the AM65x.

    The "G" probably refers to ICSSG.

    Regards,

    Dominic

     

  • Thanks for the info. So I tried to create the project via

    ./projectCreate.sh AM65xx arm ethercat_slave_demo

    in PRU-ICSS-EtherCAT_Slave_01.00.08.01/protocols/ethercat_slave/projects. It creates the project with a warning:

    NOTE: Compiler version 'GNU_7.2.1:Linaro aarch64' is not currently installed! - defaulting to 'GNU_7.2.1:Linaro'.

    CCS shows me an error though about the created 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.

    When I hit the build button, I does something, but runs into errors:


    **** Build of configuration AM65xx_release for project ethercat_slave_demo_AM65xx_arm ****

    /home/jonatan.h.zeidler/ti/ccs930/ccs/utils/bin/gmake -k -j 4 all -O
     
    Building file: "/home/jonatan.h.zeidler/ti/PRU-ICSS-EtherCAT_Slave_01.00.08.01/protocols/ethercat_slave/ecat_appl/am65xx_app.cfg"
    Invoking: XDCtools
    "/home/jonatan.h.zeidler/ti/ccs930/xdctools_3_60_02_34_core/xs" --xdcpath="/home/jonatan.h.zeidler/ti/bios_6_73_00_12/packages;/home/jonatan.h.zeidler/ti/pdk_am65xx_1_0_2/packages;/home/jonatan.h.zeidler/ti/ndk_3_40_01_01/packages;/home/jonatan.h.zeidler/ti/edma3_lld_02_12_00_20/packages;" xdc.tools.configuro -o configPkg -t gnu.targets.arm.A53F -p ti.platforms.cortexA:AM65X -r release -c "/home/jonatan.h.zeidler/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major" "/home/jonatan.h.zeidler/ti/PRU-ICSS-EtherCAT_Slave_01.00.08.01/protocols/ethercat_slave/ecat_appl/am65xx_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 am65xx_app.xa53fg from package/cfg/am65xx_app_pa53fg.cfg ...
    generating custom ti.sysbios library makefile ...
        Linking with library /home/jonatan.h.zeidler/ti/pdk_am65xx_1_0_2/packages/ti/drv/sciclient/./lib/am65xx/mpu1_0/release/sciclient.aa53fg
        Linking with library ti.osal:./lib/tirtos/a53/release/ti.osal.aa53fg
        Linking with library ti.drv.spi:./lib/am65xx/a53/release/ti.drv.spi.aa53fg
        Linking with library ti.board:./lib/am65xx_idk/a53/release/ti.board.aa53fg
        Linking with library ti.csl:./lib/am65xx/a53/release/ti.csl.aa53fg
        Linking with library ti.drv.gpio:./lib/a53/release/ti.drv.gpio.aa53fg
        Linking with library ti.drv.pruss:./lib/a53/release/ti.drv.pruss.aa53fg
        Linking with library ti.drv.i2c:./lib/a53/release/ti.drv.i2c.aa53fg
        Linking with library ti.drv.uart:./lib/a53/release/ti.drv.uart.aa53fg
    Starting build of library sources ...
    making /home/jonatan.h.zeidler/ti/PRU-ICSS-EtherCAT_Slave_01.00.08.01/protocols/ethercat_slave/ecat_appl/src/sysbios/sysbios.aa53fg ...
    asma53fg /home/jonatan.h.zeidler/ti/bios_6_73_00_12/packages/ti/sysbios/family/arm/IntrinsicsSupport_asm_gnu.sv8A ...
    Build of libraries failed.
    subdir_rules.mk:38: recipe for target 'build-1648658223-inproc' failed
    arm-none-eabi-gcc: error: unrecognized argument in option '-mcpu=cortex-a53+fp+simd'
    arm-none-eabi-gcc: note: valid arguments to '-mcpu=' are: arm1020e arm1020t arm1022e arm1026ej-s arm10e arm10tdmi arm1136j-s arm1136jf-s arm1156t2-s arm1156t2f-s arm1176jz-s arm1176jzf-s arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm70 arm700 arm700i arm710 arm7100 arm710c arm710t arm720 arm720t arm740t arm7500 arm7500fe arm7d arm7di arm7dm arm7dmi arm7m arm7tdmi arm7tdmi-s arm8 arm810 arm9 arm920 arm920t arm922t arm926ej-s arm940t arm946e-s arm966e-s arm968e-s arm9e arm9tdmi cortex-a12 cortex-a15 cortex-a15.cortex-a7 cortex-a17 cortex-a17.cortex-a7 cortex-a32 cortex-a35 cortex-a5 cortex-a53 cortex-a57 cortex-a57.cortex-a53 cortex-a7 cortex-a72 cortex-a72.cortex-a53 cortex-a73 cortex-a73.cortex-a35 cortex-a73.cortex-a53 cortex-a8 cortex-a9 cortex-m0 cortex-m0.small-multiply cortex-m0plus cortex-m0plus.small-multiply cortex-m1 cortex-m1.small-multiply cortex-m23 cortex-m3 cortex-m33 cortex-m4 cortex-m7 cortex-r4 cortex-r4f cortex-r5 cortex-r52 cortex-r7 cortex-r8 ep9312 exynos-m1 fa526 fa606te fa626 fa626te fa726te fmp626 generic-armv7-a iwmmxt iwmmxt2 marvell-pj4 mpcore mpcorenovfp native strongarm strongarm110 strongarm1100 strongarm1110 xgene1 xscale; did you mean 'cortex-a53'?
    arm-none-eabi-gcc: error: unrecognized argument in option '-mabi=lp64'
    arm-none-eabi-gcc: note: valid arguments to '-mabi=' are: aapcs aapcs-linux apcs-gnu atpcs iwmmxt
    arm-none-eabi-gcc: error: unrecognized command line option '-mcmodel=large'
    arm-none-eabi-gcc: error: unrecognized command line option '-mstrict-align'; did you mean '-Wstrict-aliasing'?
    arm-none-eabi-gcc: error: unrecognized command line option '-mfix-cortex-a53-835769'; did you mean '-mfix-cortex-m3-ldrd'?
    arm-none-eabi-gcc: error: unrecognized command line option '-mfix-cortex-a53-843419'; did you mean '-mfix-cortex-m3-ldrd'?
    gmake[1]: *** [makefile:48: arm_IntrinsicsSupport_asm_gnu.o] Error 1
    gmake: *** [/home/jonatan.h.zeidler/ti/PRU-ICSS-EtherCAT_Slave_01.00.08.01/protocols/ethercat_slave/ecat_appl/src/makefile.libs:57: /home/jonatan.h.zeidler/ti/PRU-ICSS-EtherCAT_Slave_01.00.08.01/protocols/ethercat_slave/ecat_appl/src/sysbios/sysbios.aa53fg] Error 2
    error: xdc.cfg.SourceDir: "/home/jonatan.h.zeidler/ti/ccs930/xdctools_3_60_02_34_core/packages/xdc/cfg/SourceDir.xs", line 209: xdc.cfg.SourceDir : Build of generated source libraries failed: exit status = 2:
     
    js: "/home/jonatan.h.zeidler/ti/ccs930/xdctools_3_60_02_34_core/packages/xdc/cfg/Main.xs", line 160: Error: Configuration failed!
    gmake: *** [package.mak:218: package/cfg/am65xx_app_pa53fg.xdl] Error 1
    gmake: *** Deleting file 'package/cfg/am65xx_app_pa53fg.xdl'
    gmake: *** [package/cfg/am65xx_app_pa53fg.xdl] Deleting file 'package/cfg/am65xx_app_pa53fg.h'
    gmake: *** [package/cfg/am65xx_app_pa53fg.xdl] Deleting file 'package/cfg/am65xx_app_pa53fg.c'
    js: "/home/jonatan.h.zeidler/ti/ccs930/xdctools_3_60_02_34_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-1648658223-inproc] Error 1
    gmake: *** [build-1648658223] Error 2
    subdir_rules.mk:35: recipe for target 'build-1648658223' failed
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

    So i guess it tries to build with the wrong compiler.

    Is there an easier way to just build the PRU firmware? That is the only thing I am interested in actually.

  • I haven't tried building the EtherCat slave example projects for quite some time. Please note that I'm not TI. Someone from TI might have better answers for you.

    Jonatan Hatakeyama Zeidler said:
    So i guess it tries to build with the wrong compiler.

    Yes, you're using the wrong compiler. Did you install the AM65x processor SDK RTOS, and did you make sure all its products and compilers are registered in the CCS IDE?

    Jonatan Hatakeyama Zeidler said:
    Is there an easier way to just build the PRU firmware? That is the only thing I am interested in actually.

    The PRU-ICSS-ETHERCAT-SLAVE doesn't contain the source code for the Ethercat slave PRU firmware. It consists only of the "host" software that is supposed to run on the A53 core. The actual PRU firmware is delivered as prebuilt binaries (ecat_frame_handler.bin and ecat_host_interface.bin) and a HEXified version of those binaries that allow the PRU firmware to be linked into the A53 executable. The binary is loaded into PRU memory by the A53.

    I don't think that the PRU firmware source is available, at least I haven't seen it anywhere. If the binary firmware is all that you're looking for then you should already have it in the g_v1.0 folder.

    Regards,

    Dominic

  • Jonatan,

    Only the binaries are available. We do not provide a source release for the EtherCAT firmware. To build the CCS projects, first make sure you've followed the Processor SDK getting started steps to install, set environment variables, and find products within CCS. Specifically for EtherCAT follow the below.

    Go to the <ethercat_install_dir>\protocols\ethercat_slave\projects. directory and edit the projectCreate.bat file

    The following lines should be found and edited as shown (All are at beginning of file in USER CONFIGURATION section.) 

    ::Set CCS installation directory path(Mandatory) - The path where folder 'eclipse' is located
    set "CCS_INSTALL_DIR=<ccs_install_dir>\ccs" (example: C:\ti\ccs1010\ccs)

    ::Set the IA_SDK_HOME Directory(Mandatory)
    set "IA_SDK_HOME=<ethercat_install_dir>" (example: C:\TI\PRU-ICSS-EtherCAT_Slave_01.00.08.01)

    ::Set PDK Installation directory path(Mandatory for AM65xx projects)
    set "AM65xx_PDK_INSTALL_PATH=<pdk_install_dir>\packages" (example: C:\ti\pdk_am65xx_1_0_7\packages)

    Save the file

    in the <ethercat_install_dir>\protocols\ethercat_slave\projects execute the following commands:
    For A53: projectCreate.bat AM65xx arm ethercat_slave_demo
    For R5F: projectCreate.bat AM65xx r5f ethercat_slave_demo


    The “ethercat_slave_demo_AM65xx_arm” and “ethercat_slave_demo_AM65xx_r5f” projects should now be visible in the CCS Project Explorer window. There is an error in the project generation that you need to correct manually. Right click on the project and select properties and under the Build section:
    - Use the drop-down menu in the “Configuration” box select “AM65xx_release” if it is not already set
    - Select the “Steps” window
    - In the Post-build steps, add “ mpu” or " mcu" at the end of the line (be sure to include the space).

  • I followed your instructions and get to the very same build errors as before. "mpu" was already there in the post-build steps. The r5f build fails also btw.

    Maybe the versions of TI SDKs are interesting?

    bios_6_73_00_12

    ndk_3_40_01_01

    ccs1010

    pdk_am65xx_1_0_2

    processor-sdk-linux-am65xx-evm-07_00_01_06

    PRU-ICSS-EtherCAT_Slave_01.00.08.01

    edma3_lld_02_12_00_20

    gcc-linaro-7.2.1-2017.11-x86_64_aarch64-elf

  • Thanks for your help, Dominic. The ICSSG has four processors (PRU1, PRU2, PRU_RTU1 and PRU_RTU2), but there are only two binaries. Which binary is supposed to run on which processor?

  • You can find the code that loads the firmware in tiescbsp.c:

        /* PRU firmwares are loaded as header files in appliation  */
        PRUICSS_pruWriteMemory(pruIcssHandle, PRU_ICSS_IRAM(0) , 0,
                               (uint32_t *) pru_frame_proc,
                               pru_frame_proc_len);
    
        PRUICSS_pruWriteMemory(pruIcssHandle, PRU_ICSS_IRAM(1) , 0,
                               (uint32_t *) pru_host_proc,
                               pru_host_proc_len);

    From that I'd say that PRU1 runs the ecat_frame_handler_bin code while PRU2 runs the ecat_host_interface_bin code.

    Regards,

    Dominic

  • Jonatan,

    The EtherCAT 1.0.8 release was made with Processor SDK RTOS 6.3. So you need to be sure to use the same for a clean build with the project settings.

    For the PRU utilization it requires only PRU1 and PRU2. The RTUs are unused.

    Best regards,

    Dave

  • Using SDK RTOS 6.3 I can build EtherCAT 1.0.8. Thanks for the help!

    To avoid confusion in the future, where are those version dependencies documented?

    Best regards

    Jonatan

  • Jonatan,

    It's listed in the user guide under section 1.1.2.2 Component Version

    https://software-dl.ti.com/processor-industrial-sw/esd/docs/indsw/EtherCAT_Slave/01_00_08/PRU_ICSS_EtherCAT.html

    Best regards,

    Dave