1.概述 Remi Pi采用瑞薩RZ/G2L作為核心處理器,該處理器搭載雙核Cortex-A55@1.2GHz+Cortex-M33@200MHz處理器,其內(nèi)部集成高性能3D加速引擎Mail-G31 GPU(500MHz)和視頻處理單元(支持H.264硬件編解碼),16位的DDR4-1600 / DDR3L-1333內(nèi)存控制器、千兆以太網(wǎng)控制器、USB、CAN、SD卡、MIPI-CSI等外設(shè)接口,在工業(yè)、醫(yī)療、電力等行業(yè)都得到廣泛的應(yīng)用。 2.實(shí)時(shí)內(nèi)核設(shè)計(jì) RT補(bǔ)丁可以從RT官網(wǎng)下載5.10.83對應(yīng)的補(bǔ)丁 - hjx@myir-server:~/renesas/04_Sources$ tar -xvf patches-5.10.83-rt58.tar.gz
復(fù)制代碼
圖2-1. 內(nèi)核源碼 - hjx@myir-server:~/renesas/04_Sources/myir-renesas-linux$ for p in `ls -1 ../patches/*.patch`; do patch -p1 < $p; done
復(fù)制代碼
圖2-2. 打?qū)崟r(shí)補(bǔ)丁 - hjx@myir-server:~/renesas/04_Sources/myir-renesas-linux$ /opt/remi-sdk/environment-setup-aarch64-poky-linux
- hjx@myir-server:~/renesas/04_Sources/myir-renesas-linux$ make ARCH=arm64 mys_g2lx_defconfig
- hjx@myir-server:~/renesas/04_Sources/myir-renesas-linux$ make ARCH=arm64 Image dtbs -j16
復(fù)制代碼
2.2. 其他影響性能的配置 3.實(shí)時(shí)性測試 - cyclictest -p 99 -t 1 -d 100 -i 1000 -D 24h -m -a -n
復(fù)制代碼
圖3-1.空載測試 - cyclictest -p 99 -t 1 -d 100 -i 1000 -D 24h -m -a -n
復(fù)制代碼
- stress-ng --cpu 4 --cpu-method all --io 4 --vm 50 -d 5 --fork 4 --timeout 36000s
復(fù)制代碼
圖3-2.滿載測試 表3-1.數(shù)據(jù)信息 4.1. 下載EtherCAT IGH源碼 https://gitlab.com/etherlab.org/ethercat/-/tree/stable-1.5?ref_type=heads 圖4-1. 下載源碼 - hjx@myir-server:~/renesas/04_Sources$ tar -xvf ethercat-stable-1.5.tar.bz2
- hjx@myir-server:~/renesas/04_Sources$ cd ethercat-stable-1.5
復(fù)制代碼
- hjx@myir-server:~/renesas/04_Sources/myir-renesas-linux$ source /opt/remi-sdk/environment-setup-aarch64-poky-linux
復(fù)制代碼
編譯通過會(huì)對應(yīng)生成ethercat-stable-1.5/devices/ec_generic.ko和ethercat-stable-1.5/master/ec_master.ko 安裝成功后前面指定/home/hjx/renesas/04_Sources/ethercat-stable-1.5/output目錄下有編譯生成的各種用戶空間的文件。 - hjx@myir-server:~/renesas/04_Sources/ethercat-stable-1.5$ make install
- Making install in include
- make[1]: Entering directory '/home/hjx/renesas/04_Sources/ethercat-stable-1.5/include'
- make[2]: Entering directory '/home/hjx/renesas/04_Sources/ethercat-stable-1.5/include'
- make[2]: Nothing to be done for 'install-exec-am'.
- /bin/mkdir -p '/home/hjx/renesas/04_Sources/ethercat-stable-1.5/output/include'/
- usr/bin/install -c -m 644 ecrt.h ectty.h '/home/hjx/renesas/04_Sources/ethercat-stable-1.5/output/include'
- make[2]: Leaving directory '/home/hjx/renesas/04_Sources/ethercat-stable-1.5/include'
- make[1]: Leaving directory '/home/hjx/renesas/04_Sources/ethercat-stable-1.5/include'
- Making install in script
- make[1]: Entering directory '/home/hjx/renesas/04_Sources/ethercat-stable-1.5/script'
- Making install in init.d
- make[2]: Entering directory '/home/hjx/renesas/04_Sources/ethercat-stable-1.5/script/init.d'
- make[3]: Entering directory '/home/hjx/renesas/04_Sources/ethercat-stable-1.5/script/init.d'
- make[3]: Nothing to be done for 'install-exec-am'
- ............
- ..........
- make[3]: Leaving directory '/home/hjx/renesas/04_Sources/ethercat-stable-1.5/examples'
- make[2]: Leaving directory '/home/hjx/renesas/04_Sources/ethercat-stable-1.5/examples'
- make[1]: Leaving directory '/home/hjx/renesas/04_Sources/ethercat-stable-1.5/examples'
- make[1]: Entering directory '/home/hjx/renesas/04_Sources/ethercat-stable-1.5'
- make[2]: Entering directory '/home/hjx/renesas/04_Sources/ethercat-stable-1.5'
- make[2]: Nothing to be done for 'install-exec-am'.
- make[2]: Nothing to be done for 'install-data-am'.
- make[2]: Leaving directory '/home/hjx/renesas/04_Sources/ethercat-stable-1.5'
- make[1]: Leaving directory '/home/hjx/renesas/04_Sources/ethercat-stable-1.5'
復(fù)制代碼4.4. 將EtharCAT相關(guān)文件打包 至此IGH交叉編譯完成,下面是在對應(yīng)arm目標(biāo)板上的操作。 將上面制作好的output.tar.bz2傳到開發(fā)板上,然后解壓出來。 - root@myir-remi-1g:~# tar -xvf output.tar.bz2output/
- output/
- etc/output/
- etc/ethercat.conf
- output/etc/init.d/
- output/etc/init.d/ethercat
- output/etc/sysconfig/
- output/etc/sysconfig/ethercat
- output/sbin/
- output/sbin/ethercatctl
- output/include/
- output/include/ectty.h
- output/include/ecrt.h
- output/modules/
- output/modules/ec_master.ko
- output/modules/ec_generic.ko
- output/share/
- output/share/bash-completion/
- output/share/bash-completion/completions/
- output/share/bash-completion/completions/ethercat
- output/bin/
- output/bin/ethercat
- output/lib/
- output/lib/libethercat.so
- output/lib/pkgconfig/
- output/lib/pkgconfig/libethercat.pc
- output/lib/libethercat.so.1.2.0
- output/lib/cmake/
- output/lib/cmake/ethercat/
- output/lib/cmake/ethercat/ethercat-config.cmake
- output/lib/libethercat.a
- output/lib/libethercat.la
- output/lib/libethercat.so.1
復(fù)制代碼將output目錄下各文件目錄的內(nèi)容復(fù)制到板子根文件系統(tǒng)根目錄下相應(yīng)目錄下,例如:cp bin/ethercat /bin/(include目錄不用復(fù)制) - 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-yocto-standard/
- root@myir-remi-1g:~/output# cp sbin/ethercatctl /sbin/
復(fù)制代碼4.6. 啟動(dòng)EtherCAT 4.6.2. 啟動(dòng)EtherCAT - root@myir-remi-1g:~# /etc/init.d/ethercat start
- Starting EtherCAT master 1.5.2 done
復(fù)制代碼
至此所有步驟完成。
米爾瑞米派 Remi Pi瑞薩第一款MPU生態(tài)板卡,兼容樹莓派擴(kuò)展模塊 采用瑞薩RZ/G2L工業(yè)級處理器,便于企業(yè)客戶產(chǎn)品開發(fā); Remi Pi兼容樹莓派所有配件,方便產(chǎn)品原型搭建和創(chuàng)新應(yīng)用; 更多的工業(yè)接口,兼顧開發(fā)、學(xué)習(xí)和實(shí)際應(yīng)用;
|