Remi Pi arrives, adding software systems for industrial products

Publisher:EE小广播Latest update time:2024-03-14 Source: EEWORLD Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Mir Electronics released the first Renesas MPU ecosystem board, Remi Pi, which sold out 200 sets on the first day of its launch and has won the favor of many new and old users . To thank everyone for their support, Mir will launch an additional 300 sets of Remi Pi at a subsidized price of 198 yuan, while stocks last!


In addition, this time, Ruimi Pie released the myir-image-core system. Compared with the comprehensive myir-image-full system for HMI scenarios released last time, the myir-image-core system is lighter and very suitable for various industrial scenarios, such as the RT-Linux real-time patch and Ethercat master ported for industrial control scenarios, LVGL ported for lightweight industrial display scenarios, and FreeRTOS real-time operating system ported for industrial real-time scenarios. The systems supported by Ruimi Pie will be continuously updated, and Ruimi Pie's Ubuntu and Debian systems will continue to be launched next month, so stay tuned!


Rami Pi uses Renesas RZ/G2L dual-core A55 chip, which has rich interfaces and is fully compatible with Raspberry Pi expansion modules. In the early stage of solution design, the feasibility of the solution can be verified conveniently and at low cost.


image.png


1. System Overview


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


image.png


2. Function Introduction


1.LVGL display


Get the lvgl.tar.bz2 source package from the 04_Sources directory and decompress it.

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

Compile the source code package, copy the lvgl_demo executable file to the development board and run it.

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

PC:~/renesas/04_Sources/lvgl$ make


image.png

Figure: LVGL display effect of Mir-RemiPai


2. RT-Linux real-time patch


Obtain the patch corresponding to the L5.10.83 kernel version from the RT official website.

Unzip the patch package to your working directory.

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

Go to the kernel source directory and apply the patch.

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_defconfig

CONFIG_EXPERT=y

CONFIG_ARCH_SUPPORTS_RT=y

CONFIG_PREEMPT_RT=y

#CONFIG_PREEMPT=y

#CONFIG_KVM=y


Compile the kernel source code and update the Image file.


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

PC:~/renesas/04_Sources/myir-renesas-linux$ make ARCH=arm64 mys_g2lx_defconfig

PC:~/renesas/04_Sources/myir-renesas-linux$ make ARCH=arm64 Image dtbs -j16


3. IGH Ethercat Master


Go to the official website to download the 1.5 version of Ethercat source code, the link is as follows:

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

Unzip the Ethercat source package to your working directory.

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

PC:~/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 file.

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

configure settings.

PC:~/renesas/04_Sources/ethercat-stable-1.5$ mkdir output

PC:~/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$ make

PC:~/renesas/04_Sources/ethercat-stable-1.5$ make modules

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

After compilation and installation, the generated ec_generic.ko driver file is located in the devices directory, the ec_master.ko driver file is located in the master directory, and the generated library-related files are located in the output directory.

PC:~/renesas/04_Sources/ethercat-stable-1.5$ ls devices/en_genric.ko

devices/ec_generic.ko

PC:~/renesas/04_Sources/ethercat-stable-1.5$ master/ec_master.ko

devices/ec_master.ko

PC:~/renesas/04_Sources/ethercat-stable-1.5$ ls output/

bin etc include lib sbin share

Copy the relevant files and ec_master.ko in the output directory above to the following directory on the development board:

root@myir-remi-1g:~/output# ls

bin etc include lib modules sbin share

root@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.d

root@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/

Start Ethercat.

root@myir-remi-1g:~# depmod

root@myir-remi-1g:~# modprobe ec_master main_devices=1E:ED:19:27:1A:B3

root@myir-remi-1g:~# /etc/init.d/ethercat start

Starting EtherCAT master 1.5.2 done


4. FreeRTOS


First, you need to download the e2 studio tool and build the environment and get 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 "Remi Pi FreeRTOS Application Development Notes".


A debug directory will be generated after successful compilation. The following files will be copied to the SD card for calling the CM33 project in uboot.


GPIO_non_secure_code.bin

GPIO_non_secure_vector.bin

GPIO_secure_code.bin

GPIO_secure_vector.bin


Insert the SD card into the SD card slot of the development board, start the board and execute the following call in the uboot stage to view the contents of the SD card, as follows:


=> switch_sdhi1 sdcard

switch to sdcard

=> ls mmc 1:1

System Volume Information/

64 GPIO_secure_vector.bin

16926 GPIO_non_secure_code.bin

1984 GPIO_non_secure_vector.bin

480 GPIO_secure_code.bin

4 file(s), 1 dir(s)

Load the compiled firmware as follows:

=> dcache off

=> mmc dev 1

switch to partitions #0, OK

mmc1 is current device

=> fatload mmc 1:1 0x0001FF80 GPIO_secure_vector.bin

64 bytes read in 24 ms (2 KiB/s)

=> fatload mmc 1:1 0x42EFF440 GPIO_secure_code.bin

480 bytes read in 25 ms (18.6 KiB/s)

=> fatload mmc 1:1 0x00010000 GPIO_non_secure_vector.bin

1984 bytes read in 26 ms (74.2 KiB/s)

=> fatload mmc 1:1 0x40010000 GPIO_non_secure_code.bin

16926 bytes read in 29 ms (569.3 KiB/s)

=> cm33 start_debug 0x1001FF80 0x00010000

After loading the above commands, you can see the blue light flashing.


image.png

Figure: Loading effect display of Mir-Remi Pie


3. Kernel List


In order to facilitate users to transplant the kernel, the source code paths of each kernel driver module are organized as follows:


image.png



Reference address:Remi Pi arrives, adding software systems for industrial products

Previous article:Focusing on AI and analyzing new trends in edge intelligence, registration for the Advantech AI on Arm Partner Conference is open!
Next article:NVIDIA CEO: “We created processors for the generative AI era”

Latest Industrial Control Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号