Flash the compiled file sdcard_amp.img into SD card.
Power on: RT-Thread starts quickly after power on and runs the program. When
running to the main program, RT-Thread needs waiting for
the Linux side to send an IPI interrupt, while the Linux side is the master of
Rpmsg and needs to configure the control memory and shared memory of the virtual
queue.Figure 1. Power on
Boot Linux: During the process of booting Linux, the
virtio_rpmsg_bus driver and the
starfive_rpsmg driver will be registered. After registration is
completed, an IPI interrupt will be sent to RT-Thread.Figure 2. Open Linux
Tip: 8 RPMsg device nodes are registered
in the figure and can support multiple applications for data
inter-communication.
After receiving an IPI interrupt, rpmsg_linux_test will
continue to execute, and at this point, the finish shell of RT-Thread can also
be used normally.Figure 3. RT-Thread Process
Running the following command on the Linux side can see the IPI interrupt sent
by RT-Thread to
Linux:
cat /proc/interrupts
Figure 4. IPI Interrupt
Run the test program
below:
rpmsg_echo
Tip: RVspace has provided the compiled applications and source code. This
application sends a string to the remote side of RPMsg, After receiving it,
RT-Thread will send the received string back to Linux, and the test result
is shown below: