RPMsg
Perform the following steps to run AMP image and test:
- Connect Linux and the debug serial port of RTOS, set the baud rate to115,200.
- 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.
- Boot Linux: During the process of booting Linux, the
virtio_rpmsg_bus
driver and thestarfive_rpsmg
driver will be registered. After registration is completed, an IPI interrupt will be sent to RT-Thread. 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. - Running the following command on the Linux side can see the IPI interrupt sent
by RT-Thread to
Linux:
cat /proc/interrupts
- 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:IPI interrupt: