erpc_server_matrix_multiply_uart
Overview
This example demonstrates usage of eRPC between PC and board using UART transport layer. Board acts like a server and the PC as client.
When client starts, it generates two random matrixes and sends them to server.
Server then performs matrix multiplication and sends result data back to client.
Result matrix is then printed on the PC side.
eRPC documentation
eRPC specific files are stored in: middleware\multicore\erpc eRPC documentation is stored in: middleware\multicore\erpc\doc eRPC is open-source project stored on github: https://github.com/EmbeddedRPC/erpc eRPC documentation can be also found in: http://embeddedrpc.github.io
PC Side Setup (Python)
Make sure you have Python installed on your PC
Install serial module by executing following command in command line: “python -m pip install pyserial”
Install eRPC module to Python by executing setup.py located in: middleware\multicore\erpc\erpc_python - “python setup.py install”
Usage of run_uart.py
usage: run_uart.py [-h] [-c] [-s] [-p PORT] [-b BD]
eRPC Matrix Multiply example
optional arguments: -h, –help show this help message and exit -c, –client Run client -s, –server Run server -p PORT, –port PORT Serial port -b BD, –bd BD Baud rate (default value is 115200)
Either server or client has to be selected to run
Example: To run PC side as a client with a board connected as a server to COM3 execute: “run_uart.py –client –port COM3”
Building the application
This shows example how to build application for evkbmimxrt1170
board with cm7
core_id.
Change the -b <board>
parameter based on board you want to build.
Change the -Dcore_id=<core_id>
parameter based on board core you want to build.
For these parameters please see attribute boards:
in primary/example.yml
.
west build examples/multiprocessor_examples/erpc_server_matrix_multiply_uart --toolchain armgcc --config debug -b evkbmimxrt1170 -Dcore_id=cm7