4.12. µC3 for STM32

4.12.1. Setting up and running EcMasterDemo in IAR for ARM IDE

  1. Prerequisites
    • IAR for ARM IDE, v9.32

    • µC3/Compact

    • STM32H743 target

    • EtherCAT devices

  2. Connect the STM32H743 target to the PC.

  3. Connect EtherCAT devices to the board.

  4. 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. File should be manually modified to look like:

    unsigned char MasterENI_xml_data[] = {
    ...
    };
    unsigned int MasterENI_xml_data_size = ???;
    
  5. Start IAR for ARM IDE and set the EcMasterDemo_STM32H743.

  6. If needed, change debug project settings.

  7. Build and run EcMasterDemo.

4.12.2. OS Compiler settings

Besides the general settings from Compiling the EcMasterDemo the following settings are necessary to build the example application for µC3 (STM32).

Extra include paths
<InstallPath>/SDK/INC/uC3
<InstallPath>/Examples/Common/uC3
Extra source paths
<InstallPath>/Examples/Common/uC3
Extra library paths to the main EtherCAT components
<InstallPath>/SDK/LIB/uC3/M7-EWARM
Extra libraries
EcMaster.a
emllCmsisEth.a

4.13. µC3 for i.MX8

4.13.1. Setting up and running EcMasterDemo on NXP 8MPLUSLPD4-EVK board

  1. Prerequisites
    • GCC compiler for aarch64 9.2.1

    • GNU make 4.4.1

    • µC3/Standard for Cortex-A53 MPcore i.MX8M Plus GCC

    • NXP 8MPLUSLPD4-EVK board

    • EtherCAT devices

  2. Install GCC toolchain from https://developer.arm.com/downloads/-/gnu-a/9-2-2019-12

  3. Install make from https://xpack-dev-tools.github.io/

  4. 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 MasterENI.c
    

    Replace Workspace\uC3_iMX8\EcMasterDemo_8MPLUSPD4-EVK\ENI\MasterENI.c file with generated one. File should be manually modified to look like:

    unsigned char MasterENI_xml_data[] = {
    ...
    };
    unsigned int MasterENI_xml_data_size = ???;
    
  5. Build EcMasterDemo
    cd Workspace\uC3_iMX8\EcMasterDemo\
    make
    
  6. Build EcMasterDemo_8MPLUSPD4-EVK
    cd Workspace\uC3_iMX8\EcMasterDemo_8MPLUSPD4-EVK\
    make
    
  7. Connect the target board to the PC. The J23 ‘DEBUG’ connector is user for serial output, connect it to PC and use your terminal software of choice in order to display EcMasterDemo output. The following connection settings will be used:
    • Baude rate: 115200

    • Data: 8 bits

    • Parity: none

    • Stop: 1 bit

    • Flow control: none

  8. Connect EtherCAT devices to the board, use “ENET1” connector.

  9. Prepare an u-boot SD card and copy Workspace\uC3_iMX8\EcMasterDemo_8MPLUSPD4-EVK\aarch64\EcMasterDemo_8PLUSPD4-EVK.bin on it.

  10. Boot from SD card into u-boot, interrupt booting process if needed:
    ...
    Fastboot: Normal
    Normal Boot
    Hit any key to stop autoboot:  2
    u-boot=>
    
  11. Load the binary to RAM:
    u-boot=>fatload mmc ${mmcdev}:1 0x95000000 EcMasterDemo_8PLUSPD4-EVK.bin
    
  12. Start EcMasterDemo:
    u-boot=>go 0x95000000
    

4.14. µC3 for Renesas RZ/N2H

4.14.1. Setting up and running EcMasterDemo for RZ/N2H

  1. Prerequisites
    • Renesas e2studio 2024-10

    • RZ/N2H board

    • Segger J-Link

    • EtherCAT devices

  2. Set environment variables to point to µC3 kernel and driver folders, i.e.

    set UC3_KERNEL_LOC=C:\uC3_RZN2H\Kernel\Standard
    set UC3_DRIVER_LOC=C:\uC3_RZN2H\Driver\Standard
    
  3. Install and run e2studio, please select support of RZ family as optinal feature.

  4. Create a new workspace and import EcMasterDemo project from WorkspaceuC3_RZN2H_e2studio

  5. 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 MasterENI.c
    

    Replace Workspace\uC3_RZN2H_e2studio\EcMasterDemo_xxx\ENI\MasterENI.c file with generated one. This file should be manually modified for EcMasterDemo_xxx_SRAM to look like:

    const unsigned char MasterENI_xml_data[] = {
    ...
    };
    const unsigned int MasterENI_xml_data_size = ???;
    

    This file should be manually modified for EcMasterDemo_xxx_DDR to look like:

    const unsigned char MasterENI_xml_data[] __attribute__((section(".eni_file"))) = {
    ...
    };
    const unsigned int MasterENI_xml_data_size __attribute__((section(".eni_file"))) = ???;
    
  6. Build EcMasterDemo projects and debug it as “Renesas GDB Hardware Debugging” using “J-Link ARM” as debugging hardware and “R9A09G087M44_CA55_0” as target device.