This paper introduces the test of R5 coprocessor based on MYD-YD9360 commercial display board of Mill Electronics.
Here, refer to <R5 Coprocessor Development Notes > to develop and test the coprocessor in the D9360
Before development, ensure that the compilation environment is normal and the image can be compiled normally
Refer to the previous article on compiling the Ubuntu system, and compile the buildroot system test by yourself
1.1 Enabling the RTOS Driver
The source code of freeRTOS is placed under the ssdk package, and we can start the RTOS system through a graphical interface. The ssdk GUI of the D9 is opened using the menuconfig.sh script, which is in ssdk/tools. DC-TUIO31 Take D9360 as an example, as follows:
ddj@ubuntu:~/YD9X/MYD-YD9X-SDK_V1.0/source/ssdk$pwd/home/ddj/YD9X/ myd-yd9x-sdk_V1.0 /source/ssdk
~/MYD-JD9X-ubuntu/MYD-JD9X-SDK_V1.0/source/ssdk$./tools/menuconfig.sh -b d9360_ref -p ref -c secure
1.2 Adding an RTOS Routine Driver
RTOS system routines are available in examples/kunlun/drivers
DDJ @ ubuntu: ~ / YD9X/MYD – YD9X – SDK_V1. 0 / source/SSDK $ls/examples/kunlun/drivers
Create a new abc directory
And configure the Kconfig and rules.mk files
Return to the driver directory and configure Kconfig. Add ABC to the initial status and GUI type of the Eastgate module
ABC Indicates the initial status and graphical interface type of the driver module
In the rules.mk file, add the following information
MODULES += $(LOCAL_DIR)/abc: If the CONFIG_ABC_TEST configuration option is “y”, $(LOCAL_DIR)/abc will be added to the variable MODULES. This means that when the “ABC Test” feature is enabled, the $(LOCAL_DIR)/abc module is added to the list of modules.
The R5 core data is sent to the A55 core
Copy the rpmsg_test.c file in the rpmsg directory to the abc.c file. The driver describes how to communicate between cores using the RPMSG protocol. We can add our own protocol based on this program, the following is R5 sends “Hello, RPMSG!” String to the A55 core and print out the received information of the function.
1.3, 1.4 — — — — — — — — — — — — — — — – specific code to mir public — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — –
Save all code
DC-TUIO31 Compilation system burning
MODULES += $(LOCAL_DIR)/abc: If the CONFIG_ABC_TEST configuration option is “y”, $(LOCAL_DIR)/abc will be added to the variable MODULES. This means that when the “ABC Test” feature is enabled, the $(LOCAL_DIR)/abc module is added to the list of modules.
The R5 core data is sent to the A55 core
Copy the rpmsg_test.c file in the rpmsg directory to the abc.c file. The driver describes how to communicate between cores using the RPMSG protocol. We can add our own protocol based on this program, the following is R5 sends “Hello, RPMSG!” String to the A55 core and print out the received information of the function.
1.5 Result Display
The rpmsg_test routine is called in the R5 core to send information to the A55 core
R5 >rpmsg_test send 0 3 1>Sent: 123456789Received: 123456789
>rpmsg_test send 1 3 1>Sent: 123456789Received: 123456789
A55 interface root@myd-jd9x:~# [22.223170] virtio_rpmsg_bus virtio0: virtio send susses[34.943644] sd,rpmsg-ipcc soc:ipcc@1: ipcc send susses
Call the echo_test routine in the A55 core and send a message to R5, printed as follows:
A55 interface root@myd-jd9x:~# echo_test -d virtio0.rpmsg-echo.-1.30-c 1
Echo test startupdate rpmsg-mtu=496 from kernelsend string:Hello,RPMsg! receive string:Hello,RPMsg!
R5 >Sending data (length 20): H e l l o, R P M s g!