# µC3 for STM32
## 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® device 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.
: ```doscon
C:\> 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:
```c
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.
#### SEE ALSO
[Running EcMasterDemo](gettingstarted_running-demo.html.md#running-ecmasterdemo)
## OS Compiler settings
Besides the general settings from [Compiling the EcMasterDemo](gettingstarted_compiling.html.md#compiling-the-ecmasterdemo) the following settings are necessary to build the example application for µC3 (STM32).
Extra include paths
: ```default
/SDK/INC/uC3
/Examples/Common/uC3
```
Extra source paths
: ```default
/Examples/Common/uC3
```
Extra library paths to the main EtherCAT® components
: ```default
/SDK/LIB/uC3/M7-EWARM
```
Extra libraries
: ```default
EcMaster.a
emllCmsisEth.a
```
# µC3 for i.MX8
## 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® network adapters
2. Install GCC toolchain from [https://developer.arm.com/downloads/-/gnu-a/9-2-2019-12](https://developer.arm.com/downloads/-/gnu-a/9-2-2019-12)
3. Install make from [https://xpack-dev-tools.github.io/](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.
: ```doscon
C:\> 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:
```c
unsigned char MasterENI_xml_data[] = {
...
};
unsigned int MasterENI_xml_data_size = ???;
```
5. Build EcMasterDemo
: ```doscon
cd Workspace\uC3_iMX8\EcMasterDemo\
make
```
6. Build EcMasterDemo_8MPLUSPD4-EVK
: ```doscon
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® network adapters 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:
: ```text
...
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 2
u-boot=>
```
11. Load the binary to RAM:
: ```doscon
u-boot=>fatload mmc ${mmcdev}:1 0x95000000 EcMasterDemo_8PLUSPD4-EVK.bin
```
12. Start EcMasterDemo:
: ```doscon
u-boot=>go 0x95000000
```