4.16. FreeRTOS

4.16.1. Setting up and running EcMasterDemo on Xilinx Zynq UltraScale+ (ZCU104) and Xilinx Zynq-7000 (ZC702 Evaluation Kit)

Install Xilinx SDK 2018.2

4.16.1.1. How to create the demo applications for Xilinx Zynq

  1. Create ENI file for EtherCAT configuration.

    xxd.exe is capable of converting ENI files to a C file as array, e.g.

    xxd.exe -i eni.xml ENI.c
    

    Replace ENI.c file with generated one.

  2. Create a BSP project

    Based on the delivered hardware project, replace the settings file with the one from the package:

    ../<BSP name>/<core name>/libsrc/freertos10_xilinx_v1_1/src/FreeRTOSConfig.h
    

    For the new BSP project, just use the same BSP name and core as in the package.

4.16.1.2. How to run the EC-Master demo applications on Xilinx Zynq

Via USB debugger

Load the application with Debug Configuration ‣ Xilinix C/C++ application (System Debugger) to the chosen core.

Via SD card

By creating a BOOT.bin file, e.g.:

bootgen -w on -image ../EcMasterDemo_ZCU104_cortexa53.bif -arch zynqmp -o BOOT.bin

Maybe adjust the boot setting switches on the board

4.16.2. Setting up and running EcMasterDemo on Ti AM64x EVM for R5 Core

Install MCU-PLUS-SDK-AM64X 08.01.00.36

Code Composer Studio 11.1 or newer

4.16.2.1. How to create the demo applications for Ti AM64x

  1. Create ENI file for EtherCAT configuration.

    xxd.exe is capable of converting ENI files to a C file as array, e.g.

    xxd.exe -i eni.xml ENI.c
    

    Replace ENI.c file with generated one.

  2. rebuild BSP for the correct performance measurement

    Change: timcu_plus_sdk_am64x_08_01_00_36sourcekernelfreertosconfigam64xr5fFreeRTOSConfig.h

    #define configUSE_IDLE_HOOK (0)
    

    or:

    timcu_plus_sdk_am64x_08_01_00_36sourcekernelfreertosportableTI_ARM_CLANGARM_CR5Fport.c

    vApplicationIdleHook() replace “wfi” with “nop”
    

4.16.2.2. How to run the EC-Master demo applications on Ti AM64x

Follow getting started guide to flash the UART loader into the internal memory.

Load the application with Debug Configuration ‣ Code ComposerStudio - Device Debugging and the Target Configuration to the R5F_0 core.