Embedded Real-Time Software and Hardware Solutions for Industrial Control

In the field of industrial control, stability and real-time performance are two important factors that need to be fully considered in the design of embedded systems. Compared to general embedded Linux design solutions, MYiR Electronics has launched the myir-image-core system on the Remi Pi development platform, targeting various industrial application scenarios.

The newly released myir-image-core system integrates RT-Linux real-time patches and Ethercat master, and has also ported the LVGL interface display solution and FreeRTOS real-time operating system. It will continue to update the Ubuntu and Debian systems based on Remi Pi in the future.

Remi Pi is also fully compatible with the expansion module interfaces of Raspberry Pi, making it easy and low-cost to verify the feasibility of solutions in the early stages of design. Users who need embedded software and hardware solutions for industrial real-time control should pay attention!

Embedded Real-Time Software and Hardware Solutions for Industrial Control

Embedded Real-Time Software and Hardware Solutions for Industrial Control

MYiR Electronics launched the first MPU ecological board card from Renesas – Remi Pi (Remi Pi) sold out 200 sets on the same day, gaining the favor of many new and old users. To thank everyone for their support, MYiRis launching an additional 300 sets of the Remi Pi at asubsidized price of 198 yuan, while supplies last!
Moreover, this time Remi Pi released the myir-image-core system, which is lighter compared to the previously released comprehensive myir-image-full system suitable for HMI scenarios. The myir-image-core system is very suitable for various industrial application scenarios, such as the RT-Linux real-time patches and Ethercat master specifically ported for industrial control scenarios, the LVGL ported for lightweight industrial display scenarios, and the FreeRTOS real-time operating system ported for industrial real-time scenarios.

Embedded Real-Time Software and Hardware Solutions for Industrial Control

Embedded Real-Time Software and Hardware Solutions for Industrial Control

1. System Overview

Embedded Real-Time Software and Hardware Solutions for Industrial Control

The myir-image-core system of Remi Pi is an image built based on Yocto with an LVGL interface, including complete hardware drivers, commonly used system tools, debugging tools, etc., including RT-Linux real-time patches and Ethercat master, and supports application development using Shell, C/C++.

Category

Name

Description

Source Code

Flash-Writer

Flash-Writer 1.06

TF-A

Arm Trusted Firmware 2.6

Bootloader

U-boot 2021.10

Kernel

Linux Kernel 5.10.83

Yocto

Yocto 3.1.20

File System

myir-image-core

File system built with Yocto

Tools

Development Tools

sdk.tar.bz2, e2 studio

Burning Tools

Win32DiskImager

teraterm

Documentation

Remi Pi_Linux Software Development Guide

Includes source code compilation, burning, etc.

Remi Pi FreeRTOS Application Development Notes

Includes environment setup, project creation, etc.

Remi Pi Real-Time System and Ethercat Porting Application Notes

Includes rtlinux, ethercat porting

2. Function Introduction

Embedded Real-Time Software and Hardware Solutions for Industrial Control

1.LVGL Display

Obtain the lvgl.tar.bz2 source package from the 04_Sources directory and extract the source package.

PC:~/renesas/04_Sources$ tar -xvf lvgl.tar.gz

Compile the source package and copy the lvgl_demo executable file to the development board for execution.

PC:~/renesas/04_Sources/lvgl$ source /opt/remi-sdk/environment-setup-aarch64-poky-linuxPC:~/renesas/04_Sources/lvgl$ make

Embedded Real-Time Software and Hardware Solutions for Industrial ControlThe LVGL display effect of MYiR-Remi Pi

2. RT-Linux Real-Time Patch

Obtain the patches corresponding to the L5.10.83 kernel version from the RT official website, link as follows:

https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.10/older/

Extract the patch package to your working directory.

PC:~/renesas/04_Sources$ tar -xvf patches-5.10.83-rt58.tar.gz

Patch the kernel source directory.

PC:~/renesas/04_Sources/myir-renesas-linux$ for p in `ls -1 ../patches/*.patch`;do patch -p1 < $p;done

Modify the mys_g2lx_defconfig configuration file

PC:~/renesas/04_Sources/myir-renesas-linux$ vi arch/arm64/configs/mys_g2lx_defconfigCONFIG_EXPERT=yCONFIG_ARCH_SUPPORTS_RT=yCONFIG_PREEMPT_RT=y#CONFIG_PREEMPT=y#CONFIG_KVM=y

Compile the kernel source and update the Image file.

PC:~/renesas/04_Sources/myir-renesas-linux$ source /opt/remi-sdk/environment-setup-aarch64-poky-linuxPC:~/renesas/04_Sources/myir-renesas-linux$ make ARCH=arm64 mys_g2lx_defconfigPC:~/renesas/04_Sources/myir-renesas-linux$ make ARCH=arm64 Image dtbs   -j16

3. IGH Ethercat Master

Download version 1.5 of the Ethercat source code from the official website, link as follows:

https://gitlab.com/etherlab.org/ethercat/-/tree/stable-1.5?ref_type=heads

Extract the Ethercat source package to your working directory.

PC:~/renesas/04_Sources$ tar -xvf ethercat-stable-1.5.tar.bz2PC:~/renesas/04_Sources$ cd ethercat-stable-1.5

Load environment variables.

PC:~/renesas/04_Sources/ethercat-stable-1.5$ source /opt/remi-sdk/environment-setup-aarch64-poky-linux

Generate configure files.

PC:~/renesas/04_Sources/ethercat-stable-1.5$ ./bootstrap

Configure settings.

PC:~/renesas/04_Sources/ethercat-stable-1.5$ mkdir outputPC:~/renesas/04_Sources/ethercat-stable-1.5$ ./configure --prefix=/home/renesas/04_Sources/ethercat-stable-1.5/output --with-linux-dir=/home/renesas/04_Sources/myir-renesas-linux  --enable-8139too=no  --enable-generic=yes   --host=aarch64-poky-linux

Compile and install.

PC:~/renesas/04_Sources/ethercat-stable-1.5$ makePC:~/renesas/04_Sources/ethercat-stable-1.5$ make modulesPC:~/renesas/04_Sources/ethercat-stable-1.5$ make install

After compiling and installing, the generatedec_generic.ko driver file is located in thedevices directory, theec_master.ko driver file is located in themaster directory, and the generated library-related files are located in theoutput directory.

PC:~/renesas/04_Sources/ethercat-stable-1.5$ ls devices/en_genric.kodevices/ec_generic.koPC:~/renesas/04_Sources/ethercat-stable-1.5$ master/ec_master.kodevices/ec_master.koPC:~/renesas/04_Sources/ethercat-stable-1.5$ ls output/bin etc  include  lib  sbin  share

Copy the relevant files from the output directory above andec_master.ko to the following directories on the development board:

root@myir-remi-1g:~/output# lsbin etc  include  lib  modules  sbin  shareroot@myir-remi-1g:~/output# cp bin/ethercat /bin/root@myir-remi-1g:~/output# cp etc/ethercat.conf /etc/root@myir-remi-1g:~/output# cp etc/init.d/*  /etc/init.droot@myir-remi-1g:~/output# cp -r etc/sysconfig/ /etc/root@myir-remi-1g:~/output# cp  lib/libethercat.* /lib64/root@myir-remi-1g:~/output# cp -r lib/pkgconfig /lib64/root@myir-remi-1g:~/output# cp modules/ec_master.ko /lib/modules/5.10.83-cip1-rt58-yocto-standard/root@myir-remi-1g:~/output# cp sbin/ethercatctl  /sbin/

StartEthercat.

root@myir-remi-1g:~# depmodroot@myir-remi-1g:~# modprobe ec_master main_devices=1E:ED:19:27:1A:B3root@myir-remi-1g:~# /etc/init.d/ethercat startStarting EtherCAT master 1.5.2 done

4. FreeRTOS

First, download the e2 studio tool and set up the environment, then obtain the GPIO.zip project package from the 04_Sources directory. After opening the e2 studio tool, click File->Import->General-> Existing Projects into Workspace to import the GPIO project. After importing the project, click Project->Build Project to compile the project. For details, please refer to the “Remi Pi FreeRTOS Application Development Notes”.

After a successful compilation, a debug directory will be generated, and the generated files below should be copied to the SD card for calling the CM33 project in U-Boot.

GPIO_non_secure_code.binGPIO_non_secure_vector.binGPIO_secure_code.binGPIO_secure_vector.bin

Insert the SD card into the development board’s SD card slot, power on the board, and execute the following call during the U-Boot stage to check the contents of the SD card, as follows:

=> switch_sdhi1 sdcardswitch to sdcard=> ls mmc 1:1System Volume Information/64   GPIO_secure_vector.bin16926   GPIO_non_secure_code.bin1984   GPIO_non_secure_vector.bin480   GPIO_secure_code.bin4 file(s), 1 dir(s)

Load the compiled firmware as follows:

=> dcache off=> mmc dev 1switch to partitions #0, OKmmc1 is current device=> fatload mmc 1:1 0x0001FF80 GPIO_secure_vector.bin64 bytes read in 24 ms (2 KiB/s)=> fatload mmc 1:1 0x42EFF440 GPIO_secure_code.bin480 bytes read in 25 ms (18.6 KiB/s)=> fatload mmc 1:1 0x00010000 GPIO_non_secure_vector.bin1984 bytes read in 26 ms (74.2 KiB/s)=> fatload mmc 1:1 0x40010000 GPIO_non_secure_code.bin16926 bytes read in 29 ms (569.3 KiB/s)=> cm33 start_debug 0x1001FF80 0x00010000

Once the above commands are loaded, you can see the blue light flashing.

Embedded Real-Time Software and Hardware Solutions for Industrial ControlDemonstration of loading effect of MYiR-Remi Pi

3. Kernel List

Embedded Real-Time Software and Hardware Solutions for Industrial Control

To facilitate users in porting the kernel, the source paths of various kernel driver modules are organized as follows:

Module

Description

Source Path

MMC
EMMC Driver
drivers/mmc/host/renesas_sdhi_internal_dmac.c
SD
SD Card Driver
drivers/mmc/host/renesas_sdhi_internal_dmac.c
QSPI
MTD Driver
drivers/memory/renesas-rpc-if.c
SPI
SPI Driver
drivers/spi/spidev.c
I2C
I2C Driver
drivers/i2c/busses/i2c-riic.c
ADC
ADC Driver
drivers/iio/adc/rzg2l_adc.c
E2PROM
24C256C Driver
drivers/misc/eeprom/at24.c
USB Host
USB Driver
drivers/usb/host/ehci-platform.c
drivers/usb/host/ohci-platform.c
Ethernet
Gigabit Network Driver
drivers/net/ethernet/renesas/ravb_main.c
USB OTG
USB Driver
drivers/phy/renesas/phy-rcar-gen3-usb2.c
RS232/RS485/Uart
Serial Driver
drivers/tty/serial/sh-sci.c
CAN BUS
CAN Bus Driver
drivers/net/can/rcar/rcar_canfd.c
GPIO KEY
KEY Driver
drivers/input/keyboard/gpio_keys.c
WIFI
WIFI Driver
drivers/staging/rtl88x2cs/*
RTC
RTC Driver
drivers/rtc/rtc-rx8025t.c
GPIO LED
LED Driver
drivers/leds/leds-gpio.c
HDMI/LVDS
MIPI to HDMI and LVDS Driver
drivers/gpu/drm/bridge/lt8912.c
LCD
LCD Driver
drivers/gpu/drm/panel/panel-simple.c
TOUCH
Touchscreen Driver
drivers/input/touchscreen/edt-ft5x06.c
ES8388
ES8388 Audio Driver
sound/soc/codecs/es8328-i2c.c
OV5640
OV5640 Camera Driver
drivers/media/i2c/ov5640.c

4. Access Links

Embedded Real-Time Software and Hardware Solutions for Industrial Control

For the myir-image-core system of Remi Pi, users can obtain the image files and source code from the following address:

Download link:http://down.myir-tech.com/RemiPi

Embedded Real-Time Software and Hardware Solutions for Industrial Control

For more information about the board, you can visit the following MYiR Electronics official website link:

https://www.myir.cn/shows/23/14.html

For more discussions on technical issues regarding Remi Pi, please log in to the MYiR official forum:

https://bbs.myir-tech.com/forum-66-1.html

Purchase link:

https://detail.tmall.com/item.htm?id=763219500729&skuId=5425000934998

Embedded Real-Time Software and Hardware Solutions for Industrial Control

Latest “Star Product” Report from MYiR Electronics

Embedded Real-Time Software and Hardware Solutions for Industrial Control

Embedded Real-Time Software and Hardware Solutions for Industrial Control

Embedded Real-Time Software and Hardware Solutions for Industrial Control

Embedded Real-Time Software and Hardware Solutions for Industrial Control

Embedded Real-Time Software and Hardware Solutions for Industrial Control

MYiR Electronics
Leading Embedded Processor Module Manufacturer
Follow the “MYiR” public account
Occasionally share product information and dry goods
Release MYiR latest news first

Long press the QR code to follow us

Embedded Real-Time Software and Hardware Solutions for Industrial Control
For more information, please contact us
Shenzhen HeadquartersPhone:
0755-25622735 17324413392
Address: 6th Floor, Building 2, Yunli Intelligent Park, Bantian, Shenzhen
Shanghai Office Phone:
021-62087019 17324413392
Beijing Office Phone:
010-84675491 13316862895
Technical Support Phone:
027-59621648
Email: [email protected]

Leave a Comment