4.11. µC3 for STM32
4.11.1. Setting up and running EcMasterDemo in IAR for ARM IDE
- Prerequisites
IAR for ARM IDE, v9.32
µC3/Compact
STM32H743 target
EtherCAT® devices
Connect the STM32H743 target to the PC.
Connect EtherCAT® device to the board.
- Create ENI file for EtherCAT® configuration.
xxd.exeis capable of converting ENI files to a C file as array, e.g.xxd.exe -i eni.xml ENI.c
Replace the file ENI.c by the generated one. The file should be manually modified to look like:
unsigned char MasterENI_xml_data[] = { ... }; unsigned int MasterENI_xml_data_size = ???;
Start IAR for ARM IDE and set the EcMasterDemo_STM32H743.
If needed, change debug project settings.
Build and run EcMasterDemo.
See also
4.11.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.12. µC3 for i.MX8
4.12.1. Setting up and running EcMasterDemo on NXP 8MPLUSLPD4-EVK board
- 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® network adapters
Install GCC toolchain from https://developer.arm.com/downloads/-/gnu-a/9-2-2019-12
Install make from https://xpack-dev-tools.github.io/
- Create ENI file for EtherCAT® configuration.
xxd.exeis 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.cfile with generated one. File should be manually modified to look like:unsigned char MasterENI_xml_data[] = { ... }; unsigned int MasterENI_xml_data_size = ???;
- Build EcMasterDemo
cd Workspace\uC3_iMX8\EcMasterDemo\ make
- Build EcMasterDemo_8MPLUSPD4-EVK
cd Workspace\uC3_iMX8\EcMasterDemo_8MPLUSPD4-EVK\ make
- 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
Connect EtherCAT® network adapters to the board, use “ENET1” connector.
Prepare an u-boot SD card and copy
Workspace\uC3_iMX8\EcMasterDemo_8MPLUSPD4-EVK\aarch64\EcMasterDemo_8PLUSPD4-EVK.binon it.- 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=>
- Load the binary to RAM:
u-boot=>fatload mmc ${mmcdev}:1 0x95000000 EcMasterDemo_8PLUSPD4-EVK.bin
- Start EcMasterDemo:
u-boot=>go 0x95000000