| Overview |
| ======== |
| The Multicore RPMsg-Lite pingpong RTOS project is a simple demonstration program that uses the |
| MCUXpresso SDK software and the RPMsg-Lite library and shows how to implement the inter-core |
| communicaton between cores of the multicore system. The primary core releases the secondary core |
| from the reset and then the inter-core communication is established. Once the RPMsg is initialized |
| and endpoints are created the message exchange starts, incrementing a virtual counter that is part |
| of the message payload. The message pingpong finishes when the counter reaches the value of 100. |
| Then the RPMsg-Lite is deinitialized and the procedure of the data exchange is repeated again. |
| |
| Shared memory usage |
| This multicore example uses the shared memory for data exchange. The shared memory region is |
| defined and the size can be adjustable in the linker file. The shared memory region start address |
| and the size have to be defined in linker file for each core equally. The shared memory start |
| address is then exported from the linker to the application. |
| |
| Toolchain supported |
| =================== |
| - GCC ARM Embedded 9.2.1 |
| - IAR embedded Workbench 8.50.1 |
| |
| Hardware requirements |
| ===================== |
| - Micro USB cable |
| - MIMX8MQ6-EVK board |
| - J-Link Debug Probe |
| - 12V power supply |
| - Personal Computer |
| |
| Board settings |
| ============== |
| No special is needed. |
| |
| |
| |
| Prepare the Demo |
| ================ |
| 1. Connect 12V power supply and J-Link Debug Probe to the board, switch SW701 to power on the board |
| 2. Connect a USB cable between the host PC and the J1701 USB port on the target board. |
| 3. Open two serial terminals for A53 core and M4 core with the following settings: |
| - 115200 baud rate |
| - 8 data bits |
| - No parity |
| - One stop bit |
| - No flow control |
| 4. Using U-Boot command to run the demo.bin file. For details, please refer to Getting Started with MCUXpresso SDK i.MX 8M Quad.pdf |
| 5. After running the demo.bin, using the "boot" command to boot the kernel on the A core terminal; |
| 6. After the kernel is boot, using "root" to login. |
| 7. After login, make sure imx_rpmsg_pingpong kernel module is inserted (lsmod) or insert it (modprobe imx_rpmsg_pingpong). |
| |
| Running the demo |
| ================ |
| |
| After the boot process succeeds, the ARM Cortex-M4 terminal displays the following information: |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| RPMSG Ping-Pong FreeRTOS RTOS API Demo... |
| RPMSG Share Base Addr is 0xb8000000 |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| During boot the Kernel,the ARM Cortex-M4 terminal displays the following information: |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| Link is up! |
| Nameservice announce sent. |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| After the Linux RPMsg pingpong module was installed, the ARM Cortex-M4 terminal displays the following information: |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| Waiting for ping... |
| Sending pong... |
| Waiting for ping... |
| Sending pong... |
| Waiting for ping... |
| Sending pong... |
| ...... |
| Waiting for ping... |
| Sending pong... |
| Ping pong done, deinitializing... |
| Looping forever... |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| The Cortex-A terminal displays the following information: |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| get 1 (src: 0x1e) |
| get 3 (src: 0x1e) |
| ...... |
| get 99 (src: 0x1e) |
| get 101 (src: 0x1e) |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| Customization options |
| ===================== |