-
Notifications
You must be signed in to change notification settings - Fork 7.3k
[DNM][RFC] RPMsg-Lite and OpenAMP side-by-side #6153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Additional assembly startup code needed when both cores are used. Origin: NXP MCUXpresso SDK 2.2.1 URL: mcux.nxp.com Maintained-by: External Signed-off-by: Stanislav Poboril <[email protected]>
Add soc configuration support and dts files for nxp_lpc54xxx_m0. Adjusted nxp_lpc54xxx soc linker, configuration and dts files for the presence of slave core. Added startup hook support in ARM Cortext-M arch to allow the initialization of slave core from startup and reset. Added hw remap of vector table for ARM Cortext-M0+ if particular soc supports it. Origin: Original Signed-off-by: Stanislav Poboril <[email protected]>
Add lpcxpresso54114_m0 board dts, yaml, fixup, docs, configuration, pinmux and header files. Origin: Original Signed-off-by: Stanislav Poboril <[email protected]>
Add driver for MCUX mailbox which can be used for lpcxpresso54114 and other lpc, kinetis and iMX socs. Origin: Original Signed-off-by: Stanislav Poboril <[email protected]>
Add ext code to be able to include image of slave core in primary core image. Origin: NXP MCUXpresso SDK 2.2.1 URL: mcux.nxp.com Maintained-by: External Signed-off-by: Stanislav Poboril <[email protected]>
Add MCUX IPM sample application. It can be run on lpcxpresso54114 board at the moment. First, the slave core image has to be built from samples/subsys/ipc/ipm_mcux/remote/. Then, buid primary core image from samples/subsys/ipc/ipm_mcux/master/. Origin: Original Signed-off-by: Stanislav Poboril <[email protected]>
Add RPMsg-Lite version 1.2.0 to ext. Origin: RPMsg-Lite License: BSD 3-Clause URL: https://github.com/codeauroraforum/rpmsg-lite commit: 3ed2d34376a2d1ec04f59e4a89e201d820b5d5e5 Purpose: Introduction of lightweight implementation of the Remote Processor Messaging (RPMsg) protocol to Zephyr. Maintained-by: External Signed-off-by: Stanislav Poboril <[email protected]>
Add RPMsg-Lite sample application. It can be run on lpcxpresso54114 board at the moment. The application sends messages from slave to primary core. First, the slave core image has to be built from samples/subsys/ipc/rpmsg_lite/remote/. Then, buid primary core image from samples/subsys/ipc/rpmsg_lite/master/. Origin: Original Signed-off-by: Stanislav Poboril <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doc looks OK, but there are branch conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.rst file for our Zephyr docs
samples/subsys/ipc/openamp/README.md
Outdated
@@ -0,0 +1,72 @@ | |||
OpenAMP Example Application |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should be called README.rst (with an .rst extension)
Add a line before this with a document label to make it easier to reference externaly:
.. _openAMP_example:
samples/subsys/ipc/openamp/README.md
Outdated
@@ -0,0 +1,72 @@ | |||
OpenAMP Example Application | |||
=========================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our Zephyr doc standards use ### underlines for H1 headings, *** for H2, === for H3, and --- for H4.
So use ### underlines for this heading
samples/subsys/ipc/openamp/README.md
Outdated
=========================== | ||
|
||
Overview | ||
-------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use *** underline for this heading
samples/subsys/ipc/openamp/README.md
Outdated
chip, to be used for comparison and benchmarking of the two RPC libraries. | ||
|
||
Building this application | ||
------------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use *** underlines here
samples/subsys/ipc/openamp/README.md
Outdated
Building this application | ||
------------------------- | ||
|
||
Building and running this application requires that libmetal and OpenAMP is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change that last is
to are
samples/subsys/ipc/openamp/README.md
Outdated
|
||
Compile and build libmetal for both cores: | ||
|
||
$ cd libmetal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use a code-block here too:
.. code-block:: bash
mkdir build-master build-remote
cd build-master
cmake -DWITH_ZEPHYR=ON -DBOARD=lpcxpresso54114 ..
make
cd ../build-remote
cmake -DWITH_ZEPHYR=ON -DBOARD=lpcxpresso54114_m0 ..
make
samples/subsys/ipc/openamp/README.md
Outdated
|
||
Compile and build OpenAMP for both cores: | ||
|
||
$ cd open-amp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use code-block here too
samples/subsys/ipc/openamp/README.md
Outdated
Compile the remote application, by going to the toplevel folder of the example | ||
(where this file is located) and running the following commands: | ||
|
||
$ cd remote |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code-block
samples/subsys/ipc/openamp/README.md
Outdated
|
||
Compile the master application, by going to the toplevel folder of the example | ||
and running the following commands: | ||
$ cd master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you know what to do (code-block)
samples/subsys/ipc/openamp/README.md
Outdated
$ make | ||
|
||
Flash the project to the board from the master build directory: | ||
$ make flash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one more code-block
This commit adds a sample application using OpenAMP for remote procedure calls on the LPCXpresso54114. It is adapted from the RPMsg-Lite sample application added in PR #5960, and uses the IPM driver to provide interprocessor interrupts. Instructions for how to compile the application, including OpenAMP and libmetal is provided in the README.md file in the application's toplevel directory. Signed-off-by: Kristian Klomsten Skordal <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Takk! (But you still have merge conflicts that need to be resolved)
Statistics Tenative comparison of executable sizes based on a build with default settings and GCC 7.2.1. The size of the image for the second core has been subtracted from the sizes of the
* The size of the shared memory section, 6144 bytes, has been subtracted from this number. Messages received by the master application per second. Measured by removing the limit from the
|
Cannot we have both implementations in /ext? Is it not what is /ext intended for? |
@skordal could you please post also map files, you have used for code size comparison? Did RPMSG-lite use static or dynamic allocation option? Default settings uses dynamic allocation option. There could be also used static to decrease codesize quite a bit. Thanks, Petr |
@PetrLukas I added the mapfiles to my comment above. I will get some numbers for RPMsg-Lite using the static API and add them to the table. |
@skordal Thank you for analysis and map files. I was trying to find what is reason for big difference in master BSS size. It seems that in case of RPMSG Lite shared memory buffers are included in statistics (rpmsg_sh_mem), while in case of openAMP implementation it is not. If it would be included it would add another 30kB.
Speed comparison - I think it more or less depends on placement of shared buffers. In case of OpenAMP they are placed in SRAMX. It may impact performance for big buffer transfers. We should pace shared buffers to the same SRAM for both implementations. |
Thanks, I did not notice that the shared memory was included in the .bss section for the RPMsg-Lite code. I have updated the numbers to account for this. I also did an experiment with the shared memory placement. Overall, there seems to be an average performance drop of around 1 % when using SRAMX. I added the numbers to the table in the comment above for comparison. |
Hello, I attach the excell sheet, where the computation is done. Let me know if you find any error in this benchmark, which reflects more the reality about code size comparison between OpenAMP RPMsg and RPMsg-Lite.
|
@skordal @MaureenHelm should we close this now? |
That's fine by me, there should be a new PR with a new example when OpenAMP is ready to be included in Zephyr. |
This pull request adds an example application using OpenAMP to do multiprocessor communication. It is adapted from the recently posted RPMsg-Lite example application, from PR #5960. This application is intended to provide a starting-point for comparison and benchmarking of RPMsg-Lite and OpenAMP, see issue #3065.
The relevant commit in this PR is the most recent commit. However, since the code is dependent on changes included in PR #5960, the commits from that PR is also included here.
I have added build instructions in a README.md file, located in samples/subsys/ipc/openamp/README.rst.
Some details: