RPMsg

Perform the following steps to run AMP image and test:
  1. Connect Linux and the debug serial port of RTOS, set the baud rate to115,200.
  2. Flash the compiled file sdcard_amp.img into SD card.
  3. 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
  4. 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
  5. 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
  6. 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:
    Figure 5. Test Result
    IPI interrupt:
    Figure 6. IPI interrupt