Today I would like to share a quick start tutorial for the Remi Pi.
1. System Overview
The Remi Pi’s myir-image-core system is built on Yocto and includes an LVGL interface, complete hardware drivers, common system tools, debugging tools, etc., including RT-Linux real-time patches and Ethercat master station, supporting 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 |
Filesystem 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. Quick Start
1.LVGL Display
Retrieve 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 to run.
PC:~/renesas/04_Sources/lvgl$ source /opt/remi-sdk/environment-setup-aarch64-poky-linuxPC:~/renesas/04_Sources/lvgl$ make
Mil – Remi Pi’s LVGL display effect
2. RT-Linux Real-Time Patch
Obtain the patch 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/
Unzip the patch package to your working directory.
PC:~/renesas/04_Sources$ tar -xvf patches-5.10.83-rt58.tar.gz
Navigate to the kernel source directory to 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_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 Station
Download the Ethercat source code version 1.5 from the official website, link 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.bz2PC:~/renesas/04_Sources$ cd ethercat-stable-1.5
Load the environment variables.
PC:~/renesas/04_Sources/ethercat-stable-1.5$ source /opt/remi-sdk/environment-setup-aarch64-poky-linux
Generate the configure file.
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 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.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 related files in the output directory and ec_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/
Start the Ethercat.
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 and 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”.
If the compilation is successful, a debug directory will be generated, and the generated files should be copied to the SD card for calling the CM33 project in uboot.
GPIO_non_secure_code.binGPIO_non_secure_vector.binGPIO_secure_code.binGPIO_secure_vector.bin
The SD card should be inserted into the SD card slot of the development board, start the board and execute the following commands during the uboot 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
After executing the above commands, you should see the blue light flashing.
Mil – Remi Pi’s loading effect display
3. Kernel List
To facilitate users in porting the kernel, the source paths of various kernel driver modules are organized as follows:
Module |
Description |
Source Path |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4. Access Links
Regarding the Remi Pi’s myir-image-core system, users can obtain the image files and source code from the following address:
Download link:http://down.myir-tech.com/RemiPi
https://www.myir.cn/shows/23/14.html
https://bbs.myir-tech.com/forum-66-1.html
What is it like to develop a Cortex-M85 microcontroller using Keil?
MCU High-Precision Rotary Transformer Motor Control Solution
How to implement effective code protection measures during MCU product testing and operation stages
Leave a Comment
Your email address will not be published. Required fields are marked *