├── test ├── python_impl_tests │ ├── __init__.py │ ├── test_arrays │ │ └── __init__.py │ ├── test_binary │ │ └── __init__.py │ ├── test_builtin │ │ └── __init__.py │ ├── test_const │ │ └── __init__.py │ ├── test_enums │ │ └── __init__.py │ ├── test_lists │ │ └── __init__.py │ ├── test_struct │ │ └── __init__.py │ ├── test_typedef │ │ └── __init__.py │ ├── test_unions │ │ └── __init__.py │ ├── test_annotations │ │ └── __init__.py │ └── test_arbitrator │ │ └── __init__.py ├── .gitignore ├── zephyr │ ├── rpmsglite │ │ ├── config │ │ │ ├── boards │ │ │ │ ├── lpcxpresso55s69_cpu0.conf │ │ │ │ ├── lpcxpresso54114_m4.conf │ │ │ │ ├── mimxrt1160_evk_cm7.conf │ │ │ │ ├── mimxrt1170_evk_cm7.conf │ │ │ │ ├── mimxrt1170_evkb_cm7.conf │ │ │ │ ├── lpcxpresso54114_m4.overlay │ │ │ │ ├── lpcxpresso55s69_cpu0.overlay │ │ │ │ ├── mimxrt1160_evk_cm7.overlay │ │ │ │ ├── mimxrt1170_evk_cm7.overlay │ │ │ │ └── mimxrt1170_evkb_cm7.overlay │ │ │ ├── remote │ │ │ │ ├── boards │ │ │ │ │ ├── lpcxpresso54114_m0.conf │ │ │ │ │ ├── lpcxpresso55s69_cpu1.conf │ │ │ │ │ ├── mimxrt1160_evk_cm4.conf │ │ │ │ │ ├── mimxrt1170_evk_cm4.conf │ │ │ │ │ ├── mimxrt1170_evkb_cm4.conf │ │ │ │ │ ├── lpcxpresso54114_m0.overlay │ │ │ │ │ └── lpcxpresso55s69_cpu1.overlay │ │ │ │ └── prj.conf │ │ │ ├── Kconfig │ │ │ ├── prj.conf │ │ │ └── rpmsg_config.h │ │ ├── test_arbitrator │ │ │ ├── config │ │ │ │ ├── boards │ │ │ │ │ ├── lpcxpresso55s69_cpu0.conf │ │ │ │ │ ├── lpcxpresso54114_m4.conf │ │ │ │ │ ├── mimxrt1160_evk_cm7.conf │ │ │ │ │ ├── mimxrt1170_evk_cm7.conf │ │ │ │ │ ├── mimxrt1170_evkb_cm7.conf │ │ │ │ │ ├── lpcxpresso54114_m4.overlay │ │ │ │ │ ├── lpcxpresso55s69_cpu0.overlay │ │ │ │ │ ├── mimxrt1160_evk_cm7.overlay │ │ │ │ │ ├── mimxrt1170_evk_cm7.overlay │ │ │ │ │ └── mimxrt1170_evkb_cm7.overlay │ │ │ │ ├── remote │ │ │ │ │ ├── boards │ │ │ │ │ │ ├── lpcxpresso54114_m0.conf │ │ │ │ │ │ ├── lpcxpresso55s69_cpu1.conf │ │ │ │ │ │ ├── mimxrt1160_evk_cm4.conf │ │ │ │ │ │ ├── mimxrt1170_evk_cm4.conf │ │ │ │ │ │ ├── mimxrt1170_evkb_cm4.conf │ │ │ │ │ │ ├── lpcxpresso54114_m0.overlay │ │ │ │ │ │ └── lpcxpresso55s69_cpu1.overlay │ │ │ │ │ └── prj.conf │ │ │ │ ├── prj.conf │ │ │ │ └── rpmsg_config.h │ │ │ ├── testcase.yaml │ │ │ ├── sysbuild.cmake │ │ │ ├── CMakeLists.txt │ │ │ ├── remote │ │ │ │ └── CMakeLists.txt │ │ │ └── common.cmake │ │ ├── test_arrays │ │ │ ├── testcase.yaml │ │ │ ├── sysbuild.cmake │ │ │ ├── CMakeLists.txt │ │ │ └── remote │ │ │ │ └── CMakeLists.txt │ │ ├── test_binary │ │ │ ├── testcase.yaml │ │ │ ├── sysbuild.cmake │ │ │ ├── CMakeLists.txt │ │ │ └── remote │ │ │ │ └── CMakeLists.txt │ │ ├── test_const │ │ │ ├── testcase.yaml │ │ │ ├── sysbuild.cmake │ │ │ ├── CMakeLists.txt │ │ │ └── remote │ │ │ │ └── CMakeLists.txt │ │ ├── test_enums │ │ │ ├── testcase.yaml │ │ │ ├── sysbuild.cmake │ │ │ ├── CMakeLists.txt │ │ │ └── remote │ │ │ │ └── CMakeLists.txt │ │ ├── test_lists │ │ │ ├── testcase.yaml │ │ │ ├── sysbuild.cmake │ │ │ ├── CMakeLists.txt │ │ │ └── remote │ │ │ │ └── CMakeLists.txt │ │ ├── test_shared │ │ │ ├── testcase.yaml │ │ │ ├── sysbuild.cmake │ │ │ ├── remote │ │ │ │ └── CMakeLists.txt │ │ │ └── CMakeLists.txt │ │ ├── test_struct │ │ │ ├── testcase.yaml │ │ │ ├── sysbuild.cmake │ │ │ ├── CMakeLists.txt │ │ │ └── remote │ │ │ │ └── CMakeLists.txt │ │ ├── test_unions │ │ │ ├── testcase.yaml │ │ │ ├── sysbuild.cmake │ │ │ ├── CMakeLists.txt │ │ │ └── remote │ │ │ │ └── CMakeLists.txt │ │ ├── test_builtin │ │ │ ├── testcase.yaml │ │ │ ├── sysbuild.cmake │ │ │ ├── CMakeLists.txt │ │ │ └── remote │ │ │ │ └── CMakeLists.txt │ │ ├── test_typedef │ │ │ ├── testcase.yaml │ │ │ ├── sysbuild.cmake │ │ │ ├── CMakeLists.txt │ │ │ └── remote │ │ │ │ └── CMakeLists.txt │ │ ├── test_annotations │ │ │ ├── testcase.yaml │ │ │ ├── sysbuild.cmake │ │ │ ├── remote │ │ │ │ └── CMakeLists.txt │ │ │ └── CMakeLists.txt │ │ ├── test_callbacks │ │ │ ├── testcase.yaml │ │ │ ├── sysbuild.cmake │ │ │ ├── CMakeLists.txt │ │ │ ├── remote │ │ │ │ └── CMakeLists.txt │ │ │ └── common.cmake │ │ └── cmake │ │ │ ├── rpmsg_lite.cmake │ │ │ └── sysbuild.cmake │ ├── uart │ │ ├── test_arrays │ │ │ ├── testcase.yaml │ │ │ └── CMakeLists.txt │ │ ├── test_binary │ │ │ ├── testcase.yaml │ │ │ └── CMakeLists.txt │ │ ├── test_const │ │ │ ├── testcase.yaml │ │ │ └── CMakeLists.txt │ │ ├── test_enums │ │ │ ├── testcase.yaml │ │ │ └── CMakeLists.txt │ │ ├── test_lists │ │ │ ├── testcase.yaml │ │ │ └── CMakeLists.txt │ │ ├── test_shared │ │ │ ├── testcase.yaml │ │ │ └── CMakeLists.txt │ │ ├── test_struct │ │ │ ├── testcase.yaml │ │ │ └── CMakeLists.txt │ │ ├── test_unions │ │ │ ├── testcase.yaml │ │ │ └── CMakeLists.txt │ │ ├── test_builtin │ │ │ ├── testcase.yaml │ │ │ └── CMakeLists.txt │ │ ├── test_typedef │ │ │ ├── testcase.yaml │ │ │ └── CMakeLists.txt │ │ ├── test_callbacks │ │ │ └── testcase.yaml │ │ ├── test_annotations │ │ │ ├── testcase.yaml │ │ │ └── CMakeLists.txt │ │ ├── test_arbitrator │ │ │ ├── testcase.yaml │ │ │ └── config │ │ │ │ └── prj.conf │ │ ├── config │ │ │ └── prj.conf │ │ └── cmake │ │ │ └── unit_test.cmake │ └── cmake │ │ └── variables.cmake ├── common │ ├── unit_test_common.erpc │ ├── gtest │ │ └── gtimer.c │ ├── addOne.cpp │ ├── addOne.hpp │ └── unit_test.h ├── test_const │ ├── CMakeLists.txt │ └── test_const_client_impl.cpp ├── test_enums │ └── CMakeLists.txt ├── test_lists │ └── CMakeLists.txt ├── test_binary │ ├── CMakeLists.txt │ └── test_binary.erpc ├── test_builtin │ └── CMakeLists.txt ├── test_shared │ ├── CMakeLists.txt │ └── Makefile ├── test_typedef │ └── CMakeLists.txt ├── arithmetic.erpc ├── test_unions │ ├── CMakeLists.txt │ └── variables.mk ├── test_arrays │ ├── CMakeLists.txt │ └── variables.mk ├── test_struct │ ├── CMakeLists.txt │ └── variables.mk ├── test_annotations │ ├── CMakeLists.txt │ ├── external.h │ ├── test_annotations_client_impl.cpp │ └── variables.mk ├── java_impl_tests │ ├── src │ │ ├── test │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── github │ │ │ │ └── embeddedrpc │ │ │ │ └── erpc │ │ │ │ └── tests │ │ │ │ ├── server │ │ │ │ ├── services │ │ │ │ │ ├── TestConstService.java │ │ │ │ │ ├── CommonService.java │ │ │ │ │ ├── TestAnnotationsService.java │ │ │ │ │ └── TestBinaryService.java │ │ │ │ ├── TestConstServer.java │ │ │ │ ├── TestListsServer.java │ │ │ │ ├── TestEnumsServer.java │ │ │ │ ├── TestArraysServer.java │ │ │ │ ├── TestBinaryServer.java │ │ │ │ ├── TestBuiltinServer.java │ │ │ │ ├── TestAnnotationsServer.java │ │ │ │ ├── TestTypedefServer.java │ │ │ │ └── TestStructServer.java │ │ │ │ └── TestingClient.java │ │ └── main │ │ │ └── java │ │ │ └── io │ │ │ └── github │ │ │ └── embeddedrpc │ │ │ └── erpc │ │ │ └── tests │ │ │ └── common │ │ │ └── myEnum.java │ └── .gitignore ├── prj.conf ├── readme.txt ├── test_arbitrator │ └── test_arbitrator.erpc └── test_callbacks │ ├── variables.mk │ └── Makefile ├── erpcgen ├── .gitignore ├── src │ ├── cpptemplate │ │ └── .gitignore │ ├── templates │ │ ├── py_global_init.template │ │ ├── c_crc.template │ │ ├── py_init.template │ │ ├── py_interface.template │ │ ├── java_const.template │ │ └── cpp_client_header.template │ ├── Utils.hpp │ ├── format_string.hpp │ ├── Utils.cpp │ ├── ParseErrors.cpp │ ├── HexValues.hpp │ ├── os_config.hpp │ └── types │ │ └── Program.hpp ├── test │ ├── .gitignore │ ├── imports │ │ ├── test21.erpc │ │ ├── test2.erpc │ │ └── test3 │ │ │ └── test3.erpc │ ├── test_includes │ │ └── test_includes_union.h │ ├── test_include.yml │ ├── test_import.yml │ ├── example.yml │ ├── test_extern_c.yml │ └── test_retain_c.yml ├── embedded-rpc.xcodeproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ └── creed.xcuserdatad │ │ ├── WorkspaceSettings.xcsettings │ │ └── xcdebugger │ │ └── Expressions.xcexplist ├── VisualStudio_v14 │ ├── stdbool.h │ ├── erpcgen.vcxproj.user │ ├── stdafx.cpp │ ├── targetver.h │ ├── stdafx.h │ ├── readme_erpcgen.txt │ ├── .gitignore │ └── erpcgen.sln └── README.md ├── doxygen ├── .gitignore ├── rpc_block_diagram.png ├── mainpage_erpcgen.md └── html_footer.html ├── erpc_python ├── .gitignore ├── setup.cfg ├── erpc │ ├── erpc_version.py │ ├── __init__.py │ └── crc16.py └── README_Pypi.md ├── examples ├── zephyr │ ├── matrix_multiply_rpmsglite │ │ ├── boards │ │ │ ├── lpcxpresso55s69_cpu0.conf │ │ │ ├── lpcxpresso54114_m4.conf │ │ │ ├── mimxrt1160_evk_cm7.conf │ │ │ ├── mimxrt1170_evk_cm7.conf │ │ │ ├── mimxrt1170_evkb_cm7.conf │ │ │ ├── lpcxpresso54114_m4.overlay │ │ │ ├── lpcxpresso55s69_cpu0.overlay │ │ │ ├── mimxrt1160_evk_cm7.overlay │ │ │ ├── mimxrt1170_evk_cm7.overlay │ │ │ └── mimxrt1170_evkb_cm7.overlay │ │ ├── remote │ │ │ ├── boards │ │ │ │ ├── lpcxpresso54114_m0.conf │ │ │ │ ├── lpcxpresso55s69_cpu1.conf │ │ │ │ ├── mimxrt1160_evk_cm4.conf │ │ │ │ ├── mimxrt1170_evk_cm4.conf │ │ │ │ ├── mimxrt1170_evkb_cm4.conf │ │ │ │ ├── lpcxpresso54114_m0.overlay │ │ │ │ └── lpcxpresso55s69_cpu1.overlay │ │ │ ├── prj.conf │ │ │ └── src │ │ │ │ └── service │ │ │ │ ├── erpc_matrix_multiply_interface.cpp │ │ │ │ └── erpc_matrix_multiply.erpc │ │ ├── sample.yaml │ │ ├── Kconfig │ │ ├── prj.conf │ │ ├── Kconfig.sysbuild │ │ ├── src │ │ │ └── service │ │ │ │ ├── erpc_matrix_multiply_interface.cpp │ │ │ │ └── erpc_matrix_multiply.erpc │ │ └── sysbuild.cmake │ ├── matrix_multiply_uart │ │ ├── sample.yaml │ │ ├── prj.conf │ │ ├── src │ │ │ └── service │ │ │ │ ├── erpc_matrix_multiply_interface.cpp │ │ │ │ ├── erpc_matrix_multiply.erpc │ │ │ │ └── erpc_matrix_multiply_interface.hpp │ │ └── CMakeLists.txt │ ├── matrix_multiply_mbox │ │ ├── boards │ │ │ ├── mimxrt1160_evk_cm7.conf │ │ │ ├── mimxrt1170_evk_cm7.conf │ │ │ ├── mimxrt1170_evkb_cm7.conf │ │ │ ├── mimxrt1160_evk_cm7.overlay │ │ │ ├── mimxrt1170_evk_cm7.overlay │ │ │ └── mimxrt1170_evkb_cm7.overlay │ │ ├── remote │ │ │ ├── boards │ │ │ │ ├── mimxrt1160_evk_cm4.conf │ │ │ │ ├── mimxrt1170_evk_cm4.conf │ │ │ │ └── mimxrt1170_evkb_cm4.conf │ │ │ ├── prj.conf │ │ │ └── src │ │ │ │ └── service │ │ │ │ ├── erpc_matrix_multiply_interface.cpp │ │ │ │ └── erpc_matrix_multiply.erpc │ │ ├── sample.yaml │ │ ├── prj.conf │ │ ├── Kconfig │ │ ├── Kconfig.sysbuild │ │ ├── src │ │ │ └── service │ │ │ │ ├── erpc_matrix_multiply_interface.cpp │ │ │ │ ├── erpc_matrix_multiply.erpc │ │ │ │ └── erpc_matrix_multiply_interface.hpp │ │ └── sysbuild.cmake │ └── matrix_multiply_tcp │ │ ├── sample.yaml │ │ ├── src │ │ └── service │ │ │ ├── erpc_matrix_multiply_interface.cpp │ │ │ ├── erpc_matrix_multiply.erpc │ │ │ └── erpc_matrix_multiply_interface.hpp │ │ └── CMakeLists.txt ├── hello_world │ ├── config.h │ ├── hello_world.erpc │ ├── java │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── org │ │ │ └── example │ │ │ ├── Main.java │ │ │ ├── TextServiceService.java │ │ │ ├── Server.java │ │ │ └── Client.java │ └── py │ │ ├── config.py │ │ └── main_client.py ├── matrix_multiply_python │ └── service │ │ ├── __init__.py │ │ ├── erpc_matrix_multiply │ │ ├── common.py │ │ ├── interface.py │ │ └── __init__.py │ │ └── erpc_matrix_multiply.erpc ├── CMakeLists.txt ├── idl │ └── ble │ │ └── bluetooth.erpc ├── matrix_multiply_java │ ├── .gitignore │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── github │ │ │ └── embeddedrpc │ │ │ └── erpc │ │ │ └── example │ │ │ └── erpc_matrix_multiply │ │ │ ├── interfaces │ │ │ └── IMatrixMultiplyService.java │ │ │ └── common │ │ │ └── Constants.java │ │ └── resources │ │ └── erpc_matrix_multiply.erpc ├── MCUXPRESSO_SDK │ ├── erpc_two_way_rpc │ │ └── service │ │ │ ├── erpc_two_way_rpc_Core1Interface_interface.cpp │ │ │ ├── erpc_two_way_rpc_Core0Interface_common.hpp │ │ │ ├── erpc_two_way_rpc_Core1Interface_common.hpp │ │ │ ├── erpc_two_way_rpc_Core0Interface_common.h │ │ │ └── erpc_two_way_rpc_Core1Interface_common.h │ └── erpc_matrix_multiply │ │ └── service │ │ ├── erpc_matrix_multiply_interface.cpp │ │ └── erpc_matrix_multiply.erpc └── matrix_multiply_tcp_c │ └── erpc_matrix_multiply.erpc ├── erpc_c ├── config │ └── config.dox ├── infra │ ├── erpc_utils.hpp │ ├── infra.dox │ ├── erpc_version.h │ └── erpc_utils.cpp ├── port │ ├── port.dox │ ├── erpc_port_mbed.cpp │ ├── erpc_sysgpio.h │ ├── erpc_endianness_undefined.h │ └── erpc_spidev.h ├── CMakeLists.txt └── setup │ └── setup.dox ├── utilities ├── styles │ ├── VSC │ │ ├── .vscodeignore │ │ ├── img │ │ │ ├── erpcPic.png │ │ │ └── templatePic.png │ │ ├── CHANGELOG.md │ │ ├── .vscode │ │ │ └── launch.json │ │ └── language-configuration.json │ └── README.txt └── README.txt ├── zephyr └── module.yml ├── .gitpod.yml ├── CONTRIBUTING.md ├── erpcsniffer └── readme.txt ├── .gitpod.Dockerfile ├── erpc_java ├── src │ └── main │ │ └── java │ │ └── io │ │ └── github │ │ └── embeddedrpc │ │ └── erpc │ │ ├── server │ │ └── ThreadServer.java │ │ ├── codec │ │ ├── CodecError.java │ │ ├── BasicCodecFactory.java │ │ └── CodecFactory.java │ │ ├── transport │ │ ├── RequestError.java │ │ ├── Transport.java │ │ └── TransportError.java │ │ └── auxiliary │ │ └── RequestError.java └── .gitignore ├── .clang-format-ignore ├── .vscode └── README.md ├── run_tests.sh ├── .github ├── ISSUE_TEMPLATE │ ├── question.md │ ├── feature_request.md │ └── bug_report.md ├── workflows │ ├── greetings.yml │ └── clang-format.yml └── PULL_REQUEST_TEMPLATE.md └── CMakePresets.json /test/python_impl_tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /erpcgen/.gitignore: -------------------------------------------------------------------------------- 1 | .vs 2 | .cache 3 | 4 | -------------------------------------------------------------------------------- /doxygen/.gitignore: -------------------------------------------------------------------------------- 1 | erpc 2 | erpcgen 3 | 4 | -------------------------------------------------------------------------------- /test/python_impl_tests/test_arrays/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/python_impl_tests/test_binary/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/python_impl_tests/test_builtin/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/python_impl_tests/test_const/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/python_impl_tests/test_enums/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/python_impl_tests/test_lists/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/python_impl_tests/test_struct/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/python_impl_tests/test_typedef/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/python_impl_tests/test_unions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/.gitignore: -------------------------------------------------------------------------------- 1 | results 2 | erpc_outputs 3 | test 4 | -------------------------------------------------------------------------------- /test/python_impl_tests/test_annotations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/python_impl_tests/test_arbitrator/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /erpc_python/.gitignore: -------------------------------------------------------------------------------- 1 | erpc_test 2 | .eggs 3 | dist 4 | build 5 | *.egg-info 6 | 7 | 8 | -------------------------------------------------------------------------------- /erpcgen/src/cpptemplate/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.d 3 | cpptempl_test 4 | tags 5 | html 6 | 7 | -------------------------------------------------------------------------------- /erpcgen/test/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .cache 3 | config_local.py 4 | runs 5 | results.xml 6 | 7 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/boards/lpcxpresso55s69_cpu0.conf: -------------------------------------------------------------------------------- 1 | CONFIG_SECOND_CORE_MCUX=y 2 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/boards/lpcxpresso55s69_cpu0.conf: -------------------------------------------------------------------------------- 1 | CONFIG_SECOND_CORE_MCUX=y 2 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/boards/lpcxpresso55s69_cpu0.conf: -------------------------------------------------------------------------------- 1 | CONFIG_SECOND_CORE_MCUX=y 2 | -------------------------------------------------------------------------------- /doxygen/rpc_block_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EmbeddedRPC/erpc/HEAD/doxygen/rpc_block_diagram.png -------------------------------------------------------------------------------- /erpc_c/config/config.dox: -------------------------------------------------------------------------------- 1 | /*! 2 | @defgroup config Configuration 3 | @brief Configuration settings 4 | */ 5 | 6 | 7 | -------------------------------------------------------------------------------- /erpc_python/setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | universal = 1 3 | 4 | [egg_info] 5 | tag_build = 6 | tag_date = 0 7 | 8 | -------------------------------------------------------------------------------- /examples/hello_world/config.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define ERPC_HOSTNAME "localhost" 4 | #define ERPC_PORT 8811 5 | -------------------------------------------------------------------------------- /utilities/styles/VSC/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | .gitignore 4 | vsc-extension-quickstart.md 5 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/boards/lpcxpresso54114_m4.conf: -------------------------------------------------------------------------------- 1 | CONFIG_SECOND_CORE_MCUX=y 2 | CONFIG_INCLUDE_REMOTE_DIR=y 3 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/boards/mimxrt1160_evk_cm7.conf: -------------------------------------------------------------------------------- 1 | CONFIG_INCLUDE_REMOTE_DIR=y 2 | CONFIG_SECOND_CORE_MCUX=y 3 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/boards/mimxrt1170_evk_cm7.conf: -------------------------------------------------------------------------------- 1 | CONFIG_INCLUDE_REMOTE_DIR=y 2 | CONFIG_SECOND_CORE_MCUX=y 3 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/remote/boards/lpcxpresso54114_m0.conf: -------------------------------------------------------------------------------- 1 | CONFIG_SECOND_CORE_MCUX=y 2 | CONFIG_BUILD_OUTPUT_HEX=y 3 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/remote/boards/lpcxpresso55s69_cpu1.conf: -------------------------------------------------------------------------------- 1 | CONFIG_SECOND_CORE_MCUX=y 2 | CONFIG_BUILD_OUTPUT_HEX=y 3 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arrays/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.rpmsglite.arrays: 3 | sysbuild: true 4 | harness: gtest -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_binary/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.rpmsglite.binary: 3 | sysbuild: true 4 | harness: gtest -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_const/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.rpmsglite.const: 3 | sysbuild: true 4 | harness: gtest -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_enums/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.rpmsglite.enums: 3 | sysbuild: true 4 | harness: gtest -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_lists/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.rpmsglite.lists: 3 | sysbuild: true 4 | harness: gtest -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_shared/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.rpmsglite.shared: 3 | sysbuild: true 4 | harness: gtest -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_struct/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.rpmsglite.struct: 3 | sysbuild: true 4 | harness: gtest -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_unions/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.rpmsglite.unions: 3 | sysbuild: true 4 | harness: gtest -------------------------------------------------------------------------------- /utilities/styles/VSC/img/erpcPic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EmbeddedRPC/erpc/HEAD/utilities/styles/VSC/img/erpcPic.png -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_builtin/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.rpmsglite.builtin: 3 | sysbuild: true 4 | harness: gtest -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_typedef/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.rpmsglite.typedef: 3 | sysbuild: true 4 | harness: gtest -------------------------------------------------------------------------------- /utilities/styles/VSC/img/templatePic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EmbeddedRPC/erpc/HEAD/utilities/styles/VSC/img/templatePic.png -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/boards/lpcxpresso54114_m4.conf: -------------------------------------------------------------------------------- 1 | CONFIG_SECOND_CORE_MCUX=y 2 | CONFIG_INCLUDE_REMOTE_DIR=y 3 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/boards/mimxrt1160_evk_cm7.conf: -------------------------------------------------------------------------------- 1 | CONFIG_INCLUDE_REMOTE_DIR=y 2 | CONFIG_SECOND_CORE_MCUX=y 3 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/boards/mimxrt1170_evk_cm7.conf: -------------------------------------------------------------------------------- 1 | CONFIG_INCLUDE_REMOTE_DIR=y 2 | CONFIG_SECOND_CORE_MCUX=y 3 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/boards/mimxrt1170_evkb_cm7.conf: -------------------------------------------------------------------------------- 1 | CONFIG_INCLUDE_REMOTE_DIR=y 2 | CONFIG_SECOND_CORE_MCUX=y 3 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_annotations/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.rpmsglite.annotations: 3 | sysbuild: true 4 | harness: gtest -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/boards/lpcxpresso54114_m4.conf: -------------------------------------------------------------------------------- 1 | CONFIG_SECOND_CORE_MCUX=y 2 | CONFIG_INCLUDE_REMOTE_DIR=y 3 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/boards/mimxrt1160_evk_cm7.conf: -------------------------------------------------------------------------------- 1 | CONFIG_INCLUDE_REMOTE_DIR=y 2 | CONFIG_SECOND_CORE_MCUX=y 3 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/boards/mimxrt1170_evk_cm7.conf: -------------------------------------------------------------------------------- 1 | CONFIG_INCLUDE_REMOTE_DIR=y 2 | CONFIG_SECOND_CORE_MCUX=y 3 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_callbacks/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.rpmsglite.callbacks: 3 | sysbuild: true 4 | harness: gtest -------------------------------------------------------------------------------- /zephyr/module.yml: -------------------------------------------------------------------------------- 1 | name: erpc 2 | build: 3 | cmake: ./zephyr 4 | kconfig: ./zephyr/Kconfig 5 | samples: 6 | - ./examples/zephyr 7 | -------------------------------------------------------------------------------- /examples/hello_world/hello_world.erpc: -------------------------------------------------------------------------------- 1 | interface TextService 2 | { 3 | printText(string text) -> bool 4 | oneway stopServer() 5 | } 6 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/remote/boards/lpcxpresso54114_m0.conf: -------------------------------------------------------------------------------- 1 | CONFIG_SECOND_CORE_MCUX=y 2 | CONFIG_BUILD_OUTPUT_HEX=y 3 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/remote/boards/lpcxpresso55s69_cpu1.conf: -------------------------------------------------------------------------------- 1 | CONFIG_SECOND_CORE_MCUX=y 2 | CONFIG_BUILD_OUTPUT_HEX=y 3 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/remote/boards/lpcxpresso54114_m0.conf: -------------------------------------------------------------------------------- 1 | CONFIG_SECOND_CORE_MCUX=y 2 | CONFIG_BUILD_OUTPUT_HEX=y 3 | -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | image: 2 | file: .gitpod.Dockerfile 3 | - command: apt-get update && apt-get install flex 4 | 5 | tasks: 6 | - init: make 7 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_uart/sample.yaml: -------------------------------------------------------------------------------- 1 | sample: 2 | description: eRPC Matrix multiplication 3 | name: eRPC Matrix multiplication 4 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/remote/boards/lpcxpresso55s69_cpu1.conf: -------------------------------------------------------------------------------- 1 | CONFIG_SECOND_CORE_MCUX=y 2 | CONFIG_BUILD_OUTPUT_HEX=y 3 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/boards/mimxrt1160_evk_cm7.conf: -------------------------------------------------------------------------------- 1 | CONFIG_MBOX_NXP_IMX_MU=y 2 | CONFIG_INCLUDE_REMOTE_DIR=y 3 | CONFIG_SECOND_CORE_MCUX=y -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/sample.yaml: -------------------------------------------------------------------------------- 1 | sample: 2 | description: eRPC Matrix multiplication 3 | name: eRPC Matrix multiplication 4 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_tcp/sample.yaml: -------------------------------------------------------------------------------- 1 | sample: 2 | description: eRPC TCP Matrix multiplication 3 | name: eRPC Matrix TCP multiplication 4 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/boards/mimxrt1170_evk_cm7.conf: -------------------------------------------------------------------------------- 1 | CONFIG_MBOX_NXP_IMX_MU=y 2 | CONFIG_INCLUDE_REMOTE_DIR=y 3 | CONFIG_SECOND_CORE_MCUX=y 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution 2 | 3 | Contribution details are described in our [wiki/Contributing](https://github.com/EmbeddedRPC/erpc/wiki/Contributing) 4 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/boards/mimxrt1170_evkb_cm7.conf: -------------------------------------------------------------------------------- 1 | CONFIG_MBOX_NXP_IMX_MU=y 2 | CONFIG_SECOND_CORE_MCUX=y 3 | CONFIG_INCLUDE_REMOTE_DIR=y 4 | -------------------------------------------------------------------------------- /test/common/unit_test_common.erpc: -------------------------------------------------------------------------------- 1 | @group("unit_test_common") 2 | @id(0) 3 | interface Common { 4 | oneway quit() 5 | getServerAllocated() -> int32 6 | } -------------------------------------------------------------------------------- /utilities/README.txt: -------------------------------------------------------------------------------- 1 | eRPC utilities 2 | ----------------- 3 | 4 | This folder contains utilities which bring additional benefit 5 | to eRPC apps developers. 6 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/remote/boards/mimxrt1160_evk_cm4.conf: -------------------------------------------------------------------------------- 1 | CONFIG_BUILD_OUTPUT_INFO_HEADER=y 2 | CONFIG_BUILD_OUTPUT_HEX=y 3 | CONFIG_SECOND_CORE_MCUX=y 4 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/remote/boards/mimxrt1170_evk_cm4.conf: -------------------------------------------------------------------------------- 1 | CONFIG_BUILD_OUTPUT_INFO_HEADER=y 2 | CONFIG_BUILD_OUTPUT_HEX=y 3 | CONFIG_SECOND_CORE_MCUX=y 4 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/remote/boards/mimxrt1160_evk_cm4.conf: -------------------------------------------------------------------------------- 1 | CONFIG_BUILD_OUTPUT_INFO_HEADER=y 2 | CONFIG_BUILD_OUTPUT_HEX=y 3 | CONFIG_SECOND_CORE_MCUX=y 4 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/remote/boards/mimxrt1170_evk_cm4.conf: -------------------------------------------------------------------------------- 1 | CONFIG_BUILD_OUTPUT_INFO_HEADER=y 2 | CONFIG_BUILD_OUTPUT_HEX=y 3 | CONFIG_SECOND_CORE_MCUX=y 4 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/remote/boards/mimxrt1170_evkb_cm4.conf: -------------------------------------------------------------------------------- 1 | CONFIG_BUILD_OUTPUT_INFO_HEADER=y 2 | CONFIG_BUILD_OUTPUT_HEX=y 3 | CONFIG_SECOND_CORE_MCUX=y 4 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/remote/boards/mimxrt1160_evk_cm4.conf: -------------------------------------------------------------------------------- 1 | CONFIG_BUILD_OUTPUT_INFO_HEADER=y 2 | CONFIG_BUILD_OUTPUT_HEX=y 3 | CONFIG_SECOND_CORE_MCUX=y 4 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/remote/boards/mimxrt1170_evk_cm4.conf: -------------------------------------------------------------------------------- 1 | CONFIG_BUILD_OUTPUT_INFO_HEADER=y 2 | CONFIG_BUILD_OUTPUT_HEX=y 3 | CONFIG_SECOND_CORE_MCUX=y 4 | -------------------------------------------------------------------------------- /utilities/styles/README.txt: -------------------------------------------------------------------------------- 1 | styles 2 | ----------------- 3 | 4 | This folder contains text editors styles for editing eRPC specific files. 5 | (IDL files, template files, ...) 6 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/remote/boards/mimxrt1160_evk_cm4.conf: -------------------------------------------------------------------------------- 1 | CONFIG_MBOX_NXP_IMX_MU=y 2 | CONFIG_BUILD_OUTPUT_INFO_HEADER=y 3 | CONFIG_BUILD_OUTPUT_HEX=y 4 | CONFIG_SECOND_CORE_MCUX=y -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/remote/boards/mimxrt1170_evk_cm4.conf: -------------------------------------------------------------------------------- 1 | CONFIG_MBOX_NXP_IMX_MU=y 2 | CONFIG_BUILD_OUTPUT_INFO_HEADER=y 3 | CONFIG_BUILD_OUTPUT_HEX=y 4 | CONFIG_SECOND_CORE_MCUX=y 5 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/remote/boards/mimxrt1170_evkb_cm4.conf: -------------------------------------------------------------------------------- 1 | CONFIG_MBOX_NXP_IMX_MU=y 2 | CONFIG_BUILD_OUTPUT_INFO_HEADER=y 3 | CONFIG_BUILD_OUTPUT_HEX=y 4 | CONFIG_SECOND_CORE_MCUX=y 5 | -------------------------------------------------------------------------------- /test/test_const/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | generate_erpc_test_variables() 8 | generate_erpc_test() 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/test_enums/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | generate_erpc_test_variables() 8 | generate_erpc_test() 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/test_lists/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | generate_erpc_test_variables() 8 | generate_erpc_test() 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/test_binary/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | generate_erpc_test_variables() 8 | generate_erpc_test() 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/test_builtin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | generate_erpc_test_variables() 8 | generate_erpc_test() 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/test_shared/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | generate_erpc_test_variables() 8 | generate_erpc_test() 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/test_typedef/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | generate_erpc_test_variables() 8 | generate_erpc_test() 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/boards/mimxrt1170_evkb_cm7.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2023-2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | CONFIG_INCLUDE_REMOTE_DIR=y 7 | CONFIG_SECOND_CORE_MCUX=y 8 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.rpmsglite.arbitrator: 3 | sysbuild: true 4 | harness: gtest 5 | timeout: 60 6 | extra_configs: 7 | - CONFIG_THREAD_CUSTOM_DATA=y -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/sample.yaml: -------------------------------------------------------------------------------- 1 | sample: 2 | description: eRPC Matrix multiplication using MBOX transport layer 3 | name: eRPC MBOX Matrix multiplication 4 | common: 5 | sysbuild: true 6 | tags: mbox 7 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_binary/sysbuild.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2023 NXP 2 | # 3 | # SPDX-License-Identifier: BSD-3-Clause 4 | 5 | # Include sysbuild cmake, that is same for all tests 6 | include(${APP_DIR}/../cmake/sysbuild.cmake) -------------------------------------------------------------------------------- /test/arithmetic.erpc: -------------------------------------------------------------------------------- 1 | program erpc_test 2 | 3 | interface Arithmetic { 4 | add(float a, float b) -> float 5 | sub(float a, float b) -> float 6 | } 7 | 8 | interface Server { 9 | oneway quit() 10 | } 11 | 12 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/boards/mimxrt1170_evkb_cm7.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2023-2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | CONFIG_INCLUDE_REMOTE_DIR=y 7 | CONFIG_SECOND_CORE_MCUX=y 8 | -------------------------------------------------------------------------------- /test/zephyr/uart/test_arrays/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.uart.arrays: 3 | harness: pytest 4 | tags: 5 | - pytest 6 | harness_config: 7 | pytest_root: 8 | - "../../../python_impl_tests/test_arrays/" -------------------------------------------------------------------------------- /test/zephyr/uart/test_binary/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.uart.binary: 3 | harness: pytest 4 | tags: 5 | - pytest 6 | harness_config: 7 | pytest_root: 8 | - "../../../python_impl_tests/test_binary/" -------------------------------------------------------------------------------- /test/zephyr/uart/test_const/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.uart.const: 3 | harness: pytest 4 | tags: 5 | - pytest 6 | harness_config: 7 | pytest_root: 8 | - "../../../python_impl_tests/test_const/" -------------------------------------------------------------------------------- /test/zephyr/uart/test_enums/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.uart.enums: 3 | harness: pytest 4 | tags: 5 | - pytest 6 | harness_config: 7 | pytest_root: 8 | - "../../../python_impl_tests/test_enums/" -------------------------------------------------------------------------------- /test/zephyr/uart/test_lists/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.uart.lists: 3 | harness: pytest 4 | tags: 5 | - pytest 6 | harness_config: 7 | pytest_root: 8 | - "../../../python_impl_tests/test_lists/" -------------------------------------------------------------------------------- /test/zephyr/uart/test_shared/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.uart.shared: 3 | harness: pytest 4 | tags: 5 | - pytest 6 | harness_config: 7 | pytest_root: 8 | - "../../../python_impl_tests/test_shared/" -------------------------------------------------------------------------------- /test/zephyr/uart/test_struct/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.uart.struct: 3 | harness: pytest 4 | tags: 5 | - pytest 6 | harness_config: 7 | pytest_root: 8 | - "../../../python_impl_tests/test_struct" -------------------------------------------------------------------------------- /test/zephyr/uart/test_unions/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.uart.unions: 3 | harness: pytest 4 | tags: 5 | - pytest 6 | harness_config: 7 | pytest_root: 8 | - "../../../python_impl_tests/test_unions/" -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_enums/sysbuild.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | # Include sysbuild cmake, that is same for all tests 7 | include(${APP_DIR}/../cmake/sysbuild.cmake) -------------------------------------------------------------------------------- /test/zephyr/uart/test_builtin/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.uart.builtin: 3 | harness: pytest 4 | tags: 5 | - pytest 6 | harness_config: 7 | pytest_root: 8 | - "../../../python_impl_tests/test_builtin/" -------------------------------------------------------------------------------- /test/zephyr/uart/test_typedef/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.uart.typedef: 3 | harness: pytest 4 | tags: 5 | - pytest 6 | harness_config: 7 | pytest_root: 8 | - "../../../python_impl_tests/test_typedef/" -------------------------------------------------------------------------------- /erpcsniffer/readme.txt: -------------------------------------------------------------------------------- 1 | multicore/erpc/erpcsniffer/readme.txt 2 | 3 | Directory Structure 4 | 5 | src - Contains source code for erpcsniffer application. 6 | 7 | Currently supported OS is Linux. Supported transport is tcp and serial. 8 | -------------------------------------------------------------------------------- /test/test_unions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | generate_erpc_test_variables() 8 | 9 | set(ERPC_NAME "test") 10 | 11 | generate_erpc_test() 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arrays/sysbuild.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | # Include sysbuild cmake, that is same for all tests 8 | include(${APP_DIR}/../cmake/sysbuild.cmake) -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_builtin/sysbuild.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | # Include sysbuild cmake, that is same for all tests 8 | include(${APP_DIR}/../cmake/sysbuild.cmake) -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_callbacks/sysbuild.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | # Include sysbuild cmake, that is same for all tests 8 | include(${APP_DIR}/../cmake/sysbuild.cmake) -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_const/sysbuild.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | # Include sysbuild cmake, that is same for all tests 8 | include(${APP_DIR}/../cmake/sysbuild.cmake) -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_lists/sysbuild.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | # Include sysbuild cmake, that is same for all tests 8 | include(${APP_DIR}/../cmake/sysbuild.cmake) -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_shared/sysbuild.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | # Include sysbuild cmake, that is same for all tests 8 | include(${APP_DIR}/../cmake/sysbuild.cmake) -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_struct/sysbuild.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | # Include sysbuild cmake, that is same for all tests 8 | include(${APP_DIR}/../cmake/sysbuild.cmake) -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_typedef/sysbuild.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | # Include sysbuild cmake, that is same for all tests 8 | include(${APP_DIR}/../cmake/sysbuild.cmake) -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_unions/sysbuild.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | # Include sysbuild cmake, that is same for all tests 8 | include(${APP_DIR}/../cmake/sysbuild.cmake) -------------------------------------------------------------------------------- /test/zephyr/uart/test_callbacks/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.uart.callbacks: 3 | harness: pytest 4 | tags: 5 | - pytest 6 | harness_config: 7 | pytest_root: 8 | - "../../../python_impl_tests/test_callbacks/" -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_annotations/sysbuild.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | # Include sysbuild cmake, that is same for all tests 8 | include(${APP_DIR}/../cmake/sysbuild.cmake) -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/sysbuild.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | # Include sysbuild cmake, that is same for all tests 8 | include(${APP_DIR}/../cmake/sysbuild.cmake) -------------------------------------------------------------------------------- /test/zephyr/uart/test_annotations/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.uart.annotations: 3 | harness: pytest 4 | tags: 5 | - pytest 6 | harness_config: 7 | pytest_root: 8 | - "../../../python_impl_tests/test_annotations/" -------------------------------------------------------------------------------- /test/zephyr/uart/test_arbitrator/testcase.yaml: -------------------------------------------------------------------------------- 1 | tests: 2 | erpc.uart.arbitrator: 3 | harness: pytest 4 | tags: 5 | - pytest 6 | harness_config: 7 | pytest_root: 8 | - "../../../python_impl_tests/test_arbitrator/" -------------------------------------------------------------------------------- /.gitpod.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM gitpod/workspace-full 2 | 3 | # Install custom tools, runtimes, etc. 4 | # For example "bastet", a command-line tetris clone: 5 | # RUN brew install bastet 6 | # 7 | # More information: https://www.gitpod.io/docs/config-docker/ 8 | -------------------------------------------------------------------------------- /erpc_python/erpc/erpc_version.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright 2017-2025 NXP 4 | # All rights reserved. 5 | # 6 | # SPDX-License-Identifier: BSD-3-Clause 7 | 8 | # Should be same as in erpc_version.h 9 | ERPC_VERSION = "1.14.0" 10 | -------------------------------------------------------------------------------- /erpcgen/test/imports/test21.erpc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | import "test3/test3.erpc" -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/remote/boards/mimxrt1170_evkb_cm4.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2023-2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | CONFIG_BUILD_OUTPUT_INFO_HEADER=y 7 | CONFIG_BUILD_OUTPUT_HEX=y 8 | CONFIG_SECOND_CORE_MCUX=y 9 | -------------------------------------------------------------------------------- /erpcgen/embedded-rpc.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/test_arrays/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | generate_erpc_test_variables() 8 | 9 | set(TEST_ERPC_OUT_DIR ${ERPC_OUT_ROOT_DIR}) 10 | 11 | generate_erpc_test() 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/test_struct/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | generate_erpc_test_variables() 8 | 9 | set(ERPC_NAME_APP "test_ArithmeticService") 10 | 11 | generate_erpc_test() 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/remote/boards/mimxrt1170_evkb_cm4.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2023-2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | CONFIG_BUILD_OUTPUT_INFO_HEADER=y 7 | CONFIG_BUILD_OUTPUT_HEX=y 8 | CONFIG_SECOND_CORE_MCUX=y 9 | -------------------------------------------------------------------------------- /examples/matrix_multiply_python/service/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017 NXP 2 | # All rights reserved. 3 | # 4 | # 5 | # SPDX-License-Identifier: BSD-3-Clause 6 | 7 | # 8 | # Generated by erpcgen 1.14.0 on Wed May 28 10:34:55 2025. 9 | # 10 | # AUTOGENERATED - DO NOT EDIT 11 | # 12 | 13 | -------------------------------------------------------------------------------- /erpcgen/VisualStudio_v14/stdbool.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | // This header exists solely to resolve the missing header in VC++. 11 | -------------------------------------------------------------------------------- /erpc_java/src/main/java/io/github/embeddedrpc/erpc/server/ThreadServer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | package io.github.embeddedrpc.erpc.server; 8 | 9 | /** 10 | * Threaded server. 11 | */ 12 | public class ThreadServer { 13 | } 14 | -------------------------------------------------------------------------------- /test/test_annotations/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | generate_erpc_test_variables() 8 | 9 | set(TEST_EXT_INCLUDES ${CURRENT_DIR}) 10 | set(TEST_EXT_SOURCES ${TEST_COMMON_DIR}/addOne.cpp) 11 | 12 | generate_erpc_test() 13 | 14 | 15 | -------------------------------------------------------------------------------- /utilities/styles/VSC/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to the "erpc-code-style" extension will be documented in this file. 4 | 5 | Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. 6 | 7 | ## [Unreleased] 8 | 9 | - Initial release 10 | -------------------------------------------------------------------------------- /test/common/gtest/gtimer.c: -------------------------------------------------------------------------------- 1 | //#include "fsl_tstmr_driver.h" 2 | 3 | // This function is used for measuring time in google test framework, returns 4 | // elapsed time from reset in milliseconds 5 | unsigned int clock() 6 | { 7 | // return TSTMR_DRV_ReadTimeStamp(0)/1000; 8 | // TODO 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /erpcgen/test/imports/test2.erpc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | import "test21.erpc" 11 | 12 | interface ArithmeticService2 { 13 | oneway hello5(int32 a); 14 | } 15 | -------------------------------------------------------------------------------- /examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | if (CONFIG_ERPC_MATRIX_MULTIPLY_TCP) 8 | add_subdirectory(${ERPC_EXAMPLES}/matrix_multiply_tcp_c) 9 | endif() 10 | 11 | if (CONFIG_ERPC_HELLO_WORLD) 12 | add_subdirectory(${ERPC_EXAMPLES}/hello_world) 13 | endif() -------------------------------------------------------------------------------- /test/zephyr/uart/test_binary/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 10 | project(${APP_TYPE}) 11 | 12 | # Include test 13 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 14 | -------------------------------------------------------------------------------- /test/zephyr/uart/test_builtin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 10 | project(${APP_TYPE}) 11 | 12 | # Include test 13 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 14 | -------------------------------------------------------------------------------- /test/zephyr/uart/test_const/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 10 | project(${APP_TYPE}) 11 | 12 | # Include test 13 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 14 | -------------------------------------------------------------------------------- /test/zephyr/uart/test_enums/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 10 | project(${APP_TYPE}) 11 | 12 | # Include test 13 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 14 | -------------------------------------------------------------------------------- /test/zephyr/uart/test_lists/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 10 | project(${APP_TYPE}) 11 | 12 | # Include test 13 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 14 | -------------------------------------------------------------------------------- /test/zephyr/uart/test_shared/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 10 | project(${APP_TYPE}) 11 | 12 | # Include test 13 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 14 | -------------------------------------------------------------------------------- /test/zephyr/uart/test_typedef/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 10 | project(${APP_TYPE}) 11 | 12 | # Include test 13 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 14 | -------------------------------------------------------------------------------- /erpcgen/src/templates/py_global_init.template: -------------------------------------------------------------------------------- 1 | {% if mlComment != "" %} 2 | {$mlComment} 3 | 4 | {% endif %} 5 | # 6 | # Generated by erpcgen {$erpcVersion} on {$todaysDate}. 7 | # 8 | # AUTOGENERATED - DO NOT EDIT 9 | # 10 | 11 | {% if empty(crc16) == false %} 12 | ERPC_GENERATED_SHIM_CODE_CRC = {$crc16} 13 | {% endif -- empty(crc16) == false %} 14 | -------------------------------------------------------------------------------- /test/java_impl_tests/src/test/java/io/github/embeddedrpc/erpc/tests/server/services/TestConstService.java: -------------------------------------------------------------------------------- 1 | package io.github.embeddedrpc.erpc.tests.server.services; 2 | 3 | import io.github.embeddedrpc.erpc.tests.test_const.erpc_outputs.test.server.AbstractEmptyInterfaceService; 4 | 5 | public class TestConstService extends AbstractEmptyInterfaceService { 6 | } 7 | -------------------------------------------------------------------------------- /test/zephyr/uart/test_unions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 10 | project(${APP_TYPE}) 11 | 12 | set(ERPC_NAME test) 13 | 14 | # Include test 15 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 16 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/Kconfig: -------------------------------------------------------------------------------- 1 | # Copyright 2023-2024 NXP 2 | # 3 | # SPDX-License-Identifier: BSD-3-Clause 4 | 5 | source "Kconfig.zephyr" 6 | 7 | config INCLUDE_REMOTE_DIR 8 | bool "Include remote core header directory" 9 | help 10 | Include remote build header files. Can be used if primary image 11 | needs to be aware of size or base address of secondary image 12 | -------------------------------------------------------------------------------- /.clang-format-ignore: -------------------------------------------------------------------------------- 1 | #list of ignored files to format 2 | ./erpc_c/port/erpc_serial.cpp 3 | ./erpcgen/src/cpptemplate/cpptempl.hpp 4 | ./erpcgen/src/cpptemplate/cpptempl.cpp 5 | ./erpcgen/src/cpptemplate/cpptempl_test.cpp 6 | ./erpcgen/test/test_includes/test_includes_union.h 7 | ./test/common/gtest/gtest.h 8 | ./test/common/gtest/gtest.cpp 9 | ./test/common/retarget_cpp_streamed_io.c 10 | -------------------------------------------------------------------------------- /erpcgen/test/test_includes/test_includes_union.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 NXP 3 | * All rights reserved. 4 | * 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | #ifndef TEST_INCLUDES_UNION 10 | #define TEST_INCLUDES_UNION 11 | 12 | #include 13 | 14 | typedef union unionType 15 | { 16 | int32_t x; 17 | float y; 18 | }unionType; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_uart/prj.conf: -------------------------------------------------------------------------------- 1 | # C++ Language Support 2 | CONFIG_CPP=y 3 | CONFIG_STD_CPP20=y 4 | CONFIG_GLIBCXX_LIBCPP=y 5 | CONFIG_NEWLIB_LIBC=y 6 | 7 | # eRPC 8 | CONFIG_ERPC=y 9 | CONFIG_ERPC_TRANSPORT_UART=y 10 | 11 | # UART 12 | CONFIG_CONSOLE=n 13 | CONFIG_UART_CONSOLE=n 14 | 15 | # Compiler 16 | CONFIG_MAIN_STACK_SIZE=4096 17 | CONFIG_HEAP_MEM_POOL_SIZE=8192 18 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/prj.conf: -------------------------------------------------------------------------------- 1 | # C++ Language Support 2 | CONFIG_CPP=y 3 | CONFIG_STD_CPP20=y 4 | CONFIG_NEWLIB_LIBC=y 5 | CONFIG_GLIBCXX_LIBCPP=y 6 | 7 | # Compiler 8 | CONFIG_MAIN_STACK_SIZE=4096 9 | CONFIG_HEAP_MEM_POOL_SIZE=8192 10 | CONFIG_NO_OPTIMIZATIONS=y 11 | 12 | # eRPC 13 | CONFIG_ERPC=y 14 | CONFIG_ERPC_TRANSPORT_MBOX=y 15 | 16 | # MBOX 17 | CONFIG_MBOX=y 18 | 19 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_const/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "client") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | # Include test 16 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 17 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_enums/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "client") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | # Include test 16 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 17 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_lists/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "client") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | # Include test 16 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 17 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/Kconfig: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2023-2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | source "Kconfig.zephyr" 8 | 9 | config INCLUDE_REMOTE_DIR 10 | bool "Include remote core header directory" 11 | help 12 | Include remote build header files. Can be used if primary image 13 | needs to be aware of size or base address of secondary image 14 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_binary/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "client") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | # Include test 16 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 17 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_builtin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "client") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | # Include test 16 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 17 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_typedef/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "client") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | # Include test 16 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 17 | -------------------------------------------------------------------------------- /test/zephyr/uart/test_arrays/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 10 | project(${APP_TYPE}) 11 | 12 | set(TEST_ERPC_OUT_DIR ${ERPC_OUT_ROOT_DIR}) 13 | 14 | # Include test 15 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 16 | -------------------------------------------------------------------------------- /test/zephyr/uart/test_struct/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 10 | project(${APP_TYPE}) 11 | 12 | set(ERPC_NAME_APP test_ArithmeticService) 13 | 14 | # Include test 15 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 16 | -------------------------------------------------------------------------------- /erpcgen/src/templates/c_crc.template: -------------------------------------------------------------------------------- 1 | {% if mlComment != ""%} 2 | {$mlComment} 3 | 4 | {% endif %} 5 | {$commonHeader()} 6 | #if !defined({$crcGuardMacro}) 7 | #define {$crcGuardMacro} 8 | 9 | #if !defined(ERPC_GENERATED_CRC) 10 | #define ERPC_GENERATED_CRC {$crc16} 11 | #else 12 | #error "Macro 'ERPC_GENERATED_CRC' shouldn't be defined at this moment." 13 | #endif 14 | 15 | #endif // {$crcGuardMacro} 16 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/Kconfig: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2023-2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | source "Kconfig.zephyr" 8 | 9 | config INCLUDE_REMOTE_DIR 10 | bool "Include remote core header directory" 11 | help 12 | Include remote build header files. Can be used if primary image 13 | needs to be aware of size or base address of secondary image 14 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_const/remote/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "server") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | # Include test 16 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 17 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_enums/remote/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "server") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | # Include test 16 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 17 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_lists/remote/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "server") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | # Include test 16 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 17 | -------------------------------------------------------------------------------- /.vscode/README.md: -------------------------------------------------------------------------------- 1 | # VSCode project settings 2 | 3 | This settings are applied if this folder is opened in VSCode. 4 | 5 | ## Extension 6 | 7 | Please install `Makefile Tools` extension to build/run from VSCode. To run erpcgen (currently only for Linux), debug target need be build and temporary IDL file need be created in same directory as binary is created with file name `test.erpc`. See `.vscode/launch.json` file. 8 | -------------------------------------------------------------------------------- /examples/hello_world/java/src/main/java/org/example/Main.java: -------------------------------------------------------------------------------- 1 | package org.example; 2 | 3 | import java.io.IOException; 4 | 5 | public class Main { 6 | public static void main(String[] args) throws IOException { 7 | if (args[0].equals("client")) { 8 | new Client().run(); 9 | } else if (args[0].equals("server")) { 10 | new Server().run(); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_binary/remote/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "server") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | # Include test 16 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 17 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_builtin/remote/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "server") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | # Include test 16 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 17 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_shared/remote/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "server") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | # Include test 16 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 17 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_typedef/remote/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "server") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | # Include test 16 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 17 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_annotations/remote/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "server") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | # Include test 16 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 17 | -------------------------------------------------------------------------------- /test/zephyr/uart/test_annotations/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 10 | project(${APP_TYPE}) 11 | 12 | set(TEST_EXT_SOURCES ${TEST_COMMON_DIR}/addOne.cpp) 13 | 14 | # Include test 15 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 16 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/remote/prj.conf: -------------------------------------------------------------------------------- 1 | # C++ Language Support 2 | CONFIG_CPP=y 3 | CONFIG_STD_CPP20=y 4 | CONFIG_NEWLIB_LIBC=y 5 | CONFIG_GLIBCXX_LIBCPP=y 6 | 7 | # Compiler 8 | CONFIG_MAIN_STACK_SIZE=4096 9 | CONFIG_HEAP_MEM_POOL_SIZE=8192 10 | CONFIG_NO_OPTIMIZATIONS=y 11 | 12 | # eRPC 13 | CONFIG_ERPC=y 14 | CONFIG_ERPC_TRANSPORT_MBOX=y 15 | 16 | # MBOX 17 | CONFIG_MBOX=y 18 | 19 | CONFIG_STDOUT_CONSOLE=n 20 | -------------------------------------------------------------------------------- /run_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # exit when any command fails 4 | set -e 5 | 6 | make clean 7 | if [ "$1" = "clang" ]; then 8 | echo "Compiling by clang compiler." 9 | CC=clang CXX=clang++ make all 10 | python3 test/run_unit_tests.py clang 11 | else 12 | echo "Compiling by default gnu compiler." 13 | CC=gcc CXX=g++ make all 14 | python3 test/run_unit_tests.py gcc 15 | fi 16 | 17 | pytest erpcgen/test/ 18 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_unions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "client") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | set(ERPC_NAME test) 16 | 17 | # Include test 18 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 19 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/Kconfig.sysbuild: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2023-2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | source "share/sysbuild/Kconfig" 8 | 9 | config REMOTE_BOARD 10 | string 11 | default "mimxrt1170_evkb_cm4" if $(BOARD) = "mimxrt1170_evkb_cm7" 12 | default "mimxrt1170_evk_cm4" if $(BOARD) = "mimxrt1170_evk_cm7" 13 | default "mimxrt1160_evk_cm4" if $(BOARD) = "mimxrt1160_evk_cm7" 14 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_unions/remote/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "server") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | set(ERPC_NAME test) 16 | 17 | # Include test 18 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 19 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_callbacks/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "client") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | include(${APP_DIR}/common.cmake) 16 | 17 | # Include test 18 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 19 | -------------------------------------------------------------------------------- /test/prj.conf: -------------------------------------------------------------------------------- 1 | CONFIG_ERPC_GENERATOR=y 2 | CONFIG_ERPC_TESTS=y 3 | CONFIG_ERPC_LIB=n 4 | 5 | CONFIG_ERPC_TESTS.client=y 6 | CONFIG_ERPC_TESTS.server=y 7 | 8 | CONFIG_ERPC_TESTS.transport.tcp=y 9 | CONFIG_ERPC_TESTS.transport.tcp.host="localhost" 10 | CONFIG_ERPC_TESTS.transport.tcp.port=12345 11 | 12 | CONFIG_ERPC_TESTS.transport.serial=n 13 | #CONFIG_ERPC_TESTS.transport.serial.port="COM4" 14 | #CONFIG_ERPC_TESTS.transport.serial.baud=115200 15 | 16 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_struct/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "client") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | set(ERPC_NAME_APP test_ArithmeticService) 16 | 17 | # Include test 18 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 19 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arrays/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "client") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | set(TEST_ERPC_OUT_DIR ${ERPC_OUT_ROOT_DIR}) 16 | 17 | # Include test 18 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 19 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_callbacks/remote/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "server") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | include(${APP_DIR}/common.cmake) 16 | 17 | # Include test 18 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 19 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/boards/lpcxpresso54114_m4.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | / { 8 | chosen { 9 | /* 10 | * shared memory reserved for the inter-processor communication 11 | */ 12 | zephyr,ipc_shm = &sramx1; 13 | zephyr,ipc = &mailbox0; 14 | }; 15 | 16 | sramx1:memory@4000000{ 17 | compatible = "mmio-sram"; 18 | reg = <0x4000000 0x8000>; 19 | }; 20 | }; 21 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_struct/remote/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "server") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | set(ERPC_NAME_APP test_ArithmeticService) 16 | 17 | # Include test 18 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 19 | -------------------------------------------------------------------------------- /erpcgen/VisualStudio_v14/erpcgen.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -g java -p "com.nxp.erpc.app" -v .\erpcgen_mockup.erpc 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /erpcgen/test/test_include.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: python import 3 | desc: 4 | idl: | 5 | @include("sys") 6 | program test 7 | 8 | interface foo { 9 | bar(in string x) -> void 10 | } 11 | lang: py 12 | test/common.py: 13 | - import sys 14 | --- 15 | name: C include 16 | desc: 17 | idl: | 18 | @include("stdio.h") 19 | program test; 20 | 21 | interface foo { 22 | bar(in string x) -> void 23 | } 24 | test_common.h: 25 | - '#include "stdio.h"' 26 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/remote/boards/lpcxpresso54114_m0.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | / { 8 | chosen { 9 | /* 10 | * shared memory reserved for the inter-processor communication 11 | */ 12 | zephyr,ipc_shm = &sramx1; 13 | zephyr,ipc = &mailbox0; 14 | }; 15 | 16 | sramx1:memory@4000000{ 17 | compatible = "mmio-sram"; 18 | reg = <0x4000000 0x8000>; 19 | }; 20 | }; 21 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_annotations/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "client") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | set(TEST_EXT_SOURCES ${TEST_COMMON_DIR}/addOne.cpp) 16 | 17 | # Include test 18 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 19 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arrays/remote/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "server") 11 | 12 | include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/unit_test.cmake) 13 | project(${APP_TYPE}) 14 | 15 | set(TEST_ERPC_OUT_DIR ${ERPC_OUT_ROOT_DIR}) 16 | 17 | # Include test 18 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 19 | -------------------------------------------------------------------------------- /doxygen/mainpage_erpcgen.md: -------------------------------------------------------------------------------- 1 | # About eRPC generator {#mainpage} 2 | 3 | The eRPC generator (erpcgen) is a tool which generates the shim code for a server and client side. The generated shim code handles marshaling and unmarshaling a request. On the server side after unmarshaling, it implements a function call to the appropriate function based on request. An IDL (Interface Definition Language) is used to tell the generator tool about data types and RPC services. 4 | -------------------------------------------------------------------------------- /erpcgen/embedded-rpc.xcodeproj/project.xcworkspace/xcuserdata/creed.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/boards/lpcxpresso54114_m4.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023-2024 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | / { 8 | chosen { 9 | /* 10 | * shared memory reserved for the inter-processor communication 11 | */ 12 | zephyr,ipc_shm = &sramx1; 13 | zephyr,ipc = &mailbox0; 14 | }; 15 | 16 | sramx1:memory@4000000{ 17 | compatible = "mmio-sram"; 18 | reg = <0x4000000 0x8000>; 19 | }; 20 | }; 21 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/boards/lpcxpresso54114_m4.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | / { 8 | chosen { 9 | /* 10 | * shared memory reserved for the inter-processor communication 11 | */ 12 | zephyr,ipc_shm = &sramx1; 13 | zephyr,ipc = &mailbox0; 14 | }; 15 | 16 | sramx1:memory@4000000{ 17 | compatible = "mmio-sram"; 18 | reg = <0x4000000 0x8000>; 19 | }; 20 | }; 21 | -------------------------------------------------------------------------------- /test/common/addOne.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | #include "addOne.hpp" 10 | 11 | //////////////////////////////////////////////////////////////////////////////// 12 | // Code 13 | //////////////////////////////////////////////////////////////////////////////// 14 | 15 | int addOne(int x) 16 | { 17 | return ++x; 18 | } 19 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/remote/boards/lpcxpresso54114_m0.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | / { 8 | chosen { 9 | /* 10 | * shared memory reserved for the inter-processor communication 11 | */ 12 | zephyr,ipc_shm = &sramx1; 13 | zephyr,ipc = &mailbox0; 14 | }; 15 | 16 | sramx1:memory@4000000{ 17 | compatible = "mmio-sram"; 18 | reg = <0x4000000 0x8000>; 19 | }; 20 | }; 21 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/remote/boards/lpcxpresso54114_m0.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023-2024 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | / { 8 | chosen { 9 | /* 10 | * shared memory reserved for the inter-processor communication 11 | */ 12 | zephyr,ipc_shm = &sramx1; 13 | zephyr,ipc = &mailbox0; 14 | }; 15 | 16 | sramx1:memory@4000000{ 17 | compatible = "mmio-sram"; 18 | reg = <0x4000000 0x8000>; 19 | }; 20 | }; 21 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_shared/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | # Copyright 2024 NXP 7 | # 8 | # SPDX-License-Identifier: BSD-3-Clause 9 | # 10 | 11 | cmake_minimum_required(VERSION 3.20.0) 12 | 13 | # Zephyr 14 | set(APP_TYPE "client") 15 | 16 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 17 | project(${APP_TYPE}) 18 | 19 | # Include test 20 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 21 | -------------------------------------------------------------------------------- /erpc_java/src/main/java/io/github/embeddedrpc/erpc/codec/CodecError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | package io.github.embeddedrpc.erpc.codec; 8 | 9 | /** 10 | * Codec error. 11 | */ 12 | public class CodecError extends RuntimeException { 13 | /** 14 | * Request error. 15 | * 16 | * @param message error message 17 | */ 18 | public CodecError(String message) { 19 | super(message); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /erpcgen/README.md: -------------------------------------------------------------------------------- 1 | # ERPCGEN 2 | ## Directory Structure 3 | 4 | - bin - Contains scripts used during building erpcgen application. 5 | - src - Contains source code for erpcgen application. 6 | - test - Contains erpcgen tests 7 | - VisualStudio_v14 - Contains Visual Studio 2017 project files for building erpcgen application under windows. 8 | 9 | 10 | ## Files 11 | 12 | - Makefile - Contains code to build erpcgen under Linux and OS X. 13 | - CMakeLists.txt - Contains code to build erpcgen under Linux and OS X. 14 | -------------------------------------------------------------------------------- /erpcgen/src/Utils.hpp: -------------------------------------------------------------------------------- 1 | /* Copyright 2023 NXP 2 | * Copyright 2023 ACRIOS Systems s.r.o. 3 | * All rights reserved. 4 | * 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | #ifndef _EMBEDDED_RPC__UTILS_H_ 10 | #define _EMBEDDED_RPC__UTILS_H_ 11 | 12 | #include 13 | #include 14 | 15 | namespace erpcgen { 16 | 17 | void replaceAll(std::string &str, const std::string &from, const std::string &to); 18 | 19 | } // namespace erpcgen 20 | 21 | #endif //_EMBEDDED_RPC__UTILS_H_ 22 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/prj.conf: -------------------------------------------------------------------------------- 1 | # C++ Language Support 2 | CONFIG_CPP=y 3 | CONFIG_STD_CPP20=y 4 | CONFIG_NEWLIB_LIBC=y 5 | CONFIG_GLIBCXX_LIBCPP=y 6 | 7 | # Compiler 8 | CONFIG_MAIN_STACK_SIZE=4096 9 | CONFIG_HEAP_MEM_POOL_SIZE=8192 10 | 11 | # eRPC 12 | CONFIG_ERPC=y 13 | CONFIG_ERPC_TRANSPORT_RPMSG_LITE=y 14 | 15 | # RPMSG Lite 16 | CONFIG_IPM=y 17 | CONFIG_EVENTS=y 18 | CONFIG_PRINTK=y 19 | CONFIG_RPMSGLITE=y 20 | CONFIG_RPMSGLITE_QUEUE=y 21 | CONFIG_RPMSGLITE_NS=y 22 | CONFIG_TIMESLICE_SIZE=1 -------------------------------------------------------------------------------- /erpcgen/src/format_string.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #if !defined(_format_string_h_) 10 | #define _format_string_h_ 11 | 12 | #include 13 | #include 14 | 15 | /*! 16 | * \brief Returns a formatted STL string using printf format strings. 17 | */ 18 | std::string format_string(const char *fmt, ...); 19 | 20 | #endif // _format_string_h_ 21 | -------------------------------------------------------------------------------- /erpcgen/test/imports/test3/test3.erpc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | interface ArithmeticService6 { 11 | oneway hello1(int32 a); 12 | } 13 | 14 | interface ArithmeticService5 { 15 | oneway hello2(int32 a); 16 | } 17 | 18 | interface ArithmeticService4 { 19 | oneway hello3(int32 a); 20 | } 21 | 22 | interface ArithmeticService7 { 23 | oneway hello4(int32 a); 24 | } -------------------------------------------------------------------------------- /erpcgen/test/test_import.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: C/Py import 3 | desc: C/Py import test is the same. 4 | idl: | 5 | import "imports/test2.erpc" 6 | 7 | c_test_client.h: 8 | - void hello1(int32_t a); 9 | - void hello2(int32_t a); 10 | - void hello3(int32_t a); 11 | - void hello4(int32_t a); 12 | - void hello5(int32_t a); 13 | 14 | c_test_server.h: 15 | - void hello1(int32_t a); 16 | - void hello2(int32_t a); 17 | - void hello3(int32_t a); 18 | - void hello4(int32_t a); 19 | - void hello5(int32_t a); 20 | -------------------------------------------------------------------------------- /erpc_java/src/main/java/io/github/embeddedrpc/erpc/transport/RequestError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | package io.github.embeddedrpc.erpc.transport; 8 | 9 | /** 10 | * Request error. 11 | */ 12 | public class RequestError extends RuntimeException { 13 | /** 14 | * Request error. 15 | * 16 | * @param message error message 17 | */ 18 | public RequestError(String message) { 19 | super(message); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /erpc_c/infra/erpc_utils.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 ACRIOS Systems s.r.o. 3 | * All rights reserved. 4 | * 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | #include 10 | 11 | namespace erpc { 12 | typedef void *functionPtr_t; 13 | typedef functionPtr_t *arrayOfFunctionPtr_t; 14 | 15 | bool findIndexOfFunction(const arrayOfFunctionPtr_t sourceArrayOfFunctionPtr, uint16_t sourceArrayLength, 16 | const functionPtr_t functionPtr, uint16_t &retVal); 17 | } // namespace erpc 18 | -------------------------------------------------------------------------------- /erpcgen/VisualStudio_v14/stdafx.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | // stdafx.cpp : source file that includes just the standard includes 11 | // erpcgen.pch will be the pre-compiled header 12 | // stdafx.obj will contain the pre-compiled type information 13 | 14 | #include "stdafx.h" 15 | 16 | // TODO: reference any additional headers you need in STDAFX.H 17 | // and not in this file 18 | -------------------------------------------------------------------------------- /erpcgen/src/Utils.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright 2023 NXP 2 | * Copyright 2023 ACRIOS Systems s.r.o. 3 | * All rights reserved. 4 | * 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | #include "Utils.hpp" 10 | 11 | void erpcgen::replaceAll(std::string &str, const std::string &from, const std::string &to) 12 | { 13 | size_t start_pos = 0; 14 | while ((start_pos = str.find(from, start_pos)) != std::string::npos) 15 | { 16 | str.replace(start_pos, from.length(), to); 17 | start_pos += to.length(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/boards/lpcxpresso55s69_cpu0.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | / { 8 | chosen { 9 | /* 10 | * shared memory reserved for the inter-processor communication 11 | */ 12 | 13 | zephyr,ipc_shm = &sram4duplicate; 14 | zephyr,ipc = &mailbox0; 15 | }; 16 | 17 | /* This is a duplication of sram4, workaround */ 18 | sram4duplicate: memory@20040000 { 19 | compatible = "mmio-sram"; 20 | reg = <0x20040000 DT_SIZE_K(16)>; 21 | }; 22 | }; 23 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/remote/boards/lpcxpresso55s69_cpu1.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | / { 8 | chosen { 9 | /* 10 | * shared memory reserved for the inter-processor communication 11 | */ 12 | 13 | zephyr,ipc_shm = &sram4duplicate; 14 | zephyr,ipc = &mailbox0; 15 | }; 16 | 17 | /* This is a duplication of sram4, workaround */ 18 | sram4duplicate: memory@20040000 { 19 | compatible = "mmio-sram"; 20 | reg = <0x20040000 DT_SIZE_K(16)>; 21 | }; 22 | }; 23 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/boards/lpcxpresso55s69_cpu0.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023-2024 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | / { 8 | chosen { 9 | /* 10 | * shared memory reserved for the inter-processor communication 11 | */ 12 | 13 | zephyr,ipc_shm = &sram4duplicate; 14 | zephyr,ipc = &mailbox0; 15 | }; 16 | 17 | /* This is a duplication of sram4, workaround */ 18 | sram4duplicate: memory@20040000 { 19 | compatible = "mmio-sram"; 20 | reg = <0x20040000 DT_SIZE_K(16)>; 21 | }; 22 | }; 23 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/remote/prj.conf: -------------------------------------------------------------------------------- 1 | # C++ Language Support 2 | CONFIG_CPP=y 3 | CONFIG_STD_CPP20=y 4 | CONFIG_NEWLIB_LIBC=y 5 | CONFIG_GLIBCXX_LIBCPP=y 6 | 7 | # Compiler 8 | CONFIG_MAIN_STACK_SIZE=4096 9 | CONFIG_HEAP_MEM_POOL_SIZE=8192 10 | 11 | # eRPC 12 | CONFIG_ERPC=y 13 | CONFIG_ERPC_TRANSPORT_RPMSG_LITE=y 14 | 15 | # RPMSG Lite 16 | CONFIG_IPM=y 17 | CONFIG_EVENTS=y 18 | CONFIG_PRINTK=y 19 | CONFIG_RPMSGLITE=y 20 | CONFIG_RPMSGLITE_QUEUE=y 21 | CONFIG_RPMSGLITE_NS=y 22 | CONFIG_TIMESLICE_SIZE=1 23 | 24 | CONFIG_STDOUT_CONSOLE=n 25 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/boards/lpcxpresso55s69_cpu0.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | / { 8 | chosen { 9 | /* 10 | * shared memory reserved for the inter-processor communication 11 | */ 12 | 13 | zephyr,ipc_shm = &sram4duplicate; 14 | zephyr,ipc = &mailbox0; 15 | }; 16 | 17 | /* This is a duplication of sram4, workaround */ 18 | sram4duplicate: memory@20040000 { 19 | compatible = "mmio-sram"; 20 | reg = <0x20040000 DT_SIZE_K(16)>; 21 | }; 22 | }; 23 | -------------------------------------------------------------------------------- /erpcgen/VisualStudio_v14/targetver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | #pragma once 11 | 12 | // Including SDKDDKVer.h defines the highest available Windows platform. 13 | 14 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 15 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 16 | 17 | #include 18 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/remote/boards/lpcxpresso55s69_cpu1.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | / { 8 | chosen { 9 | /* 10 | * shared memory reserved for the inter-processor communication 11 | */ 12 | 13 | zephyr,ipc_shm = &sram4duplicate; 14 | zephyr,ipc = &mailbox0; 15 | }; 16 | 17 | /* This is a duplication of sram4, workaround */ 18 | sram4duplicate: memory@20040000 { 19 | compatible = "mmio-sram"; 20 | reg = <0x20040000 DT_SIZE_K(16)>; 21 | }; 22 | }; 23 | -------------------------------------------------------------------------------- /examples/hello_world/py/config.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2023 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | def lead_config(path: str = "config.h") -> dict: 7 | """ Load config macros from C header file""" 8 | result = {} 9 | 10 | with open(path, "r") as file: 11 | context = file.read().split("#define ")[1:] 12 | for c in context: 13 | cfg = c.split(" ") 14 | if len(cfg) > 1: 15 | val = cfg[1].strip().replace("\"", "") 16 | result[cfg[0]] = val 17 | 18 | return result 19 | -------------------------------------------------------------------------------- /examples/matrix_multiply_python/service/erpc_matrix_multiply/common.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017 NXP 2 | # All rights reserved. 3 | # 4 | # 5 | # SPDX-License-Identifier: BSD-3-Clause 6 | 7 | # 8 | # Generated by erpcgen 1.14.0 on Wed May 28 10:34:55 2025. 9 | # 10 | # AUTOGENERATED - DO NOT EDIT 11 | # 12 | 13 | 14 | # Constant variable declarations 15 | #This const defines the matrix size. The value has to be the same as the 16 | #Matrix array dimension. Do not forget to re-generate the erpc code once the 17 | #matrix size is changed in the erpc file 18 | matrix_size = 5 19 | 20 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/remote/boards/lpcxpresso55s69_cpu1.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023-2024 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | / { 8 | chosen { 9 | /* 10 | * shared memory reserved for the inter-processor communication 11 | */ 12 | 13 | zephyr,ipc_shm = &sram4duplicate; 14 | zephyr,ipc = &mailbox0; 15 | }; 16 | 17 | /* This is a duplication of sram4, workaround */ 18 | sram4duplicate: memory@20040000 { 19 | compatible = "mmio-sram"; 20 | reg = <0x20040000 DT_SIZE_K(16)>; 21 | }; 22 | }; 23 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "client") 11 | 12 | set(APPLICATION_CONFIG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/config) 13 | set(CONFIG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/config) 14 | 15 | include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/unit_test.cmake) 16 | project(${APP_TYPE}) 17 | 18 | include(${APP_DIR}/common.cmake) 19 | 20 | # Include test 21 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 22 | -------------------------------------------------------------------------------- /erpc_c/port/port.dox: -------------------------------------------------------------------------------- 1 | /*! 2 | @defgroup port Porting 3 | @brief Porting layer 4 | */ 5 | 6 | /*! 7 | @defgroup port_mem Memory 8 | @brief Memory allocation 9 | @ingroup port 10 | */ 11 | 12 | /*! 13 | @defgroup port_threads Threads 14 | @brief Threading model 15 | @ingroup port 16 | */ 17 | 18 | /*! 19 | @defgroup port_serial Serial 20 | @brief Serial port 21 | @ingroup port 22 | */ 23 | 24 | /*! 25 | @defgroup port_spidev SPIdev 26 | @brief SPIdev port 27 | @ingroup port 28 | */ 29 | 30 | /*! 31 | @defgroup port_sysgpio SysGPIO 32 | @brief SysGPIO port 33 | @ingroup port 34 | */ -------------------------------------------------------------------------------- /erpcgen/src/ParseErrors.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #include "ParseErrors.hpp" 10 | 11 | using namespace erpcgen; 12 | 13 | //////////////////////////////////////////////////////////////////////////////// 14 | // Code 15 | //////////////////////////////////////////////////////////////////////////////// 16 | 17 | const char *syntax_error2::what() const NOEXCEPT NOTHROW 18 | { 19 | return m_what.c_str(); 20 | } 21 | -------------------------------------------------------------------------------- /erpcgen/VisualStudio_v14/stdafx.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | // stdafx.h : include file for standard system include files, 11 | // or project specific include files that are used frequently, but 12 | // are changed infrequently 13 | // 14 | 15 | #pragma once 16 | 17 | #include "targetver.h" 18 | 19 | #include 20 | #include 21 | 22 | // TODO: reference additional headers your program requires here 23 | -------------------------------------------------------------------------------- /examples/matrix_multiply_python/service/erpc_matrix_multiply/interface.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017 NXP 2 | # All rights reserved. 3 | # 4 | # 5 | # SPDX-License-Identifier: BSD-3-Clause 6 | 7 | # 8 | # Generated by erpcgen 1.14.0 on Wed May 28 10:34:55 2025. 9 | # 10 | # AUTOGENERATED - DO NOT EDIT 11 | # 12 | 13 | # Abstract base class for MatrixMultiplyService 14 | class IMatrixMultiplyService(object): 15 | SERVICE_ID = 1 16 | ERPCMATRIXMULTIPLY_ID = 1 17 | 18 | def erpcMatrixMultiply(self, matrix1, matrix2, result_matrix): 19 | raise NotImplementedError() 20 | 21 | 22 | -------------------------------------------------------------------------------- /erpc_c/port/erpc_port_mbed.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, Embedded Planet, Inc 3 | * All rights reserved. 4 | * 5 | * For supporting transports and examples see: 6 | * https://github.com/EmbeddedPlanet/mbed-rpc 7 | * 8 | * SPDX-License-Identifier: BSD-3-Clause 9 | */ 10 | 11 | #include "erpc_port.h" 12 | 13 | #if ERPC_THREADS_IS(MBED) 14 | 15 | #include 16 | 17 | using namespace std; 18 | 19 | void *erpc_malloc(size_t size) 20 | { 21 | void *p = malloc(size); 22 | return p; 23 | } 24 | 25 | void erpc_free(void *ptr) 26 | { 27 | free(ptr); 28 | } 29 | #endif 30 | -------------------------------------------------------------------------------- /erpcgen/test/example.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: i32 3 | desc: Test of int32 params and return 4 | idl: | 5 | interface xyz { 6 | add(int32 a, int32 b) -> int32 7 | } 8 | test.h: 9 | - int32_t add(int32_t a, int32_t b); 10 | test_client.cpp: 11 | - int32_t add(int32_t a, int32_t b) 12 | - out->write(a) 13 | - out->write(b) 14 | - int32_t result 15 | - in->read(&result) 16 | - return result 17 | 18 | --- 19 | name: py 20 | desc: Python example 21 | idl: | 22 | interface xyz { 23 | oneway quit() 24 | } 25 | lang: py 26 | test/interface.py: 27 | - def quit(self) 28 | 29 | 30 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/remote/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | # Zephyr 10 | set(APP_TYPE "server") 11 | 12 | set(APPLICATION_CONFIG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../config/remote) 13 | set(CONFIG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../config) 14 | 15 | include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/unit_test.cmake) 16 | project(${APP_TYPE}) 17 | 18 | include(${APP_DIR}/common.cmake) 19 | 20 | # Include test 21 | include(${ZEPHYR_TEST_CMAKE_DIR}/test.cmake) 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: Question regarding to eRPC 4 | title: "[QUESTION]" 5 | labels: question 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## If you didn't find answer in existing open/closed issues you may ask here 11 | 14 | 15 | ## Steps you didn't forgot to do 16 | 17 | - [ ] I checked if there is no related issue opened/closed. 18 | - [ ] I checked that there doesn't exist opened/closed PR which is solving this issue. 19 | - [ ] I looked in documentation if there is related information. 20 | -------------------------------------------------------------------------------- /test/java_impl_tests/src/test/java/io/github/embeddedrpc/erpc/tests/server/TestConstServer.java: -------------------------------------------------------------------------------- 1 | package io.github.embeddedrpc.erpc.tests.server; 2 | 3 | import io.github.embeddedrpc.erpc.server.Service; 4 | import io.github.embeddedrpc.erpc.tests.TestingServer; 5 | import io.github.embeddedrpc.erpc.tests.server.services.CommonService; 6 | import org.junit.jupiter.api.Test; 7 | 8 | public class TestConstServer { 9 | 10 | @Test 11 | public void testConstServer(){ 12 | TestingServer server = new TestingServer(new Service[]{ new CommonService()}); 13 | server.run(); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /test/java_impl_tests/src/test/java/io/github/embeddedrpc/erpc/tests/server/services/CommonService.java: -------------------------------------------------------------------------------- 1 | package io.github.embeddedrpc.erpc.tests.server.services; 2 | 3 | import io.github.embeddedrpc.erpc.tests.TestingServer; 4 | import io.github.embeddedrpc.erpc.tests.test_const.erpc_outputs.test_unit_test_common.server.AbstractCommonService; 5 | 6 | public class CommonService extends AbstractCommonService { 7 | 8 | @Override 9 | public void quit() { 10 | TestingServer.stop(); 11 | } 12 | 13 | @Override 14 | public int getServerAllocated() { 15 | return 0; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/zephyr/uart/config/prj.conf: -------------------------------------------------------------------------------- 1 | # C++ Language Support 2 | CONFIG_CPP=y 3 | CONFIG_STD_CPP17=y 4 | CONFIG_GLIBCXX_LIBCPP=y 5 | 6 | CONFIG_NEWLIB_LIBC=y 7 | CONFIG_NEWLIB_LIBC_NANO=y 8 | 9 | # Compiler 10 | CONFIG_MAIN_STACK_SIZE=4096 11 | CONFIG_HEAP_MEM_POOL_SIZE=8192 12 | CONFIG_NO_OPTIMIZATIONS=y 13 | 14 | # eRPC 15 | CONFIG_ERPC=y 16 | CONFIG_ERPC_TRANSPORT_UART=y 17 | 18 | # UART 19 | CONFIG_CONSOLE=n 20 | CONFIG_UART_CONSOLE=n 21 | 22 | CONFIG_THREAD_NAME=y 23 | CONFIG_SCHED_CPU_MASK=y 24 | CONFIG_THREAD_ANALYZER=y 25 | 26 | CONFIG_LOG=y 27 | CONFIG_LOG_MODE_IMMEDIATE=y 28 | CONFIG_LOG_OVERRIDE_LEVEL=3 -------------------------------------------------------------------------------- /erpc_java/src/main/java/io/github/embeddedrpc/erpc/codec/BasicCodecFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | package io.github.embeddedrpc.erpc.codec; 8 | 9 | /** 10 | * Implementation of CodeFactory for BasicCodec. 11 | */ 12 | public final class BasicCodecFactory extends CodecFactory { 13 | @Override 14 | protected Codec createCodec() { 15 | return new BasicCodec(); 16 | } 17 | 18 | @Override 19 | protected Codec createCodec(final byte[] array) { 20 | return new BasicCodec(array); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /erpc_c/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | include(erpc_c_sources.cmake) 8 | # Create erpc library 9 | add_library(erpc STATIC ${ERPC_C_SOURCES}) 10 | set_target_properties(erpc PROPERTIES PUBLIC_HEADER "${ERPC_C_HEADERS}") 11 | 12 | target_include_directories(erpc PUBLIC ${ERPC_C_INCLUDES} ${ERPC_C}/config) 13 | 14 | # Required for TCP transport 15 | if(WIN32) 16 | target_link_libraries(erpc PRIVATE wsock32 ws2_32) 17 | endif() 18 | 19 | # Install erpc as library 20 | install(TARGETS erpc PUBLIC_HEADER DESTINATION include/erpc/) 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /utilities/styles/VSC/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "1.0.0", 7 | "configurations": [{ 8 | "name": "Debug eRPC syntax highlighting", 9 | "type": "extensionHost", 10 | "request": "launch", 11 | "args": [ 12 | "--extensionDevelopmentPath=${workspaceFolder}" 13 | ] 14 | }] 15 | } 16 | -------------------------------------------------------------------------------- /doxygen/html_footer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /erpcgen/test/test_extern_c.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: extern c empty 3 | desc: do the extern "C" blocks get produced for empty input 4 | idl: "" 5 | test_common.h: 6 | - | 7 | #if defined(__cplusplus) 8 | extern "C" { 9 | #endif 10 | - | 11 | #if defined(__cplusplus) 12 | } 13 | #endif 14 | 15 | --- 16 | name: extern c 17 | desc: do the extern "C" blocks get produced for non-empty input 18 | idl: | 19 | interface Foo { 20 | foofn() -> void 21 | } 22 | test_common.h: 23 | - | 24 | #if defined(__cplusplus) 25 | extern "C" { 26 | #endif 27 | - | 28 | #if defined(__cplusplus) 29 | } 30 | #endif 31 | -------------------------------------------------------------------------------- /CMakePresets.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 6, 3 | "cmakeMinimumRequired": { 4 | "major": 3, 5 | "minor": 20, 6 | "patch": 0 7 | }, 8 | "configurePresets": [ 9 | { 10 | "name": "mingw64", 11 | "displayName": "Mingw64 eRPC config", 12 | "description": "Default Mingw64 preset for eRPC", 13 | "generator": "MinGW Makefiles", 14 | "binaryDir": "${sourceDir}/build", 15 | "cacheVariables": { 16 | "CMAKE_C_COMPILER": "gcc", 17 | "CMAKE_CXX_COMPILER": "g++" 18 | }, 19 | "environment": { 20 | "PATH": "${sourceDir}/mingw64/bin;$penv{PATH}" 21 | } 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /.github/workflows/greetings.yml: -------------------------------------------------------------------------------- 1 | name: Greetings 2 | 3 | on: [pull_request, issues] 4 | 5 | jobs: 6 | greeting: 7 | runs-on: ubuntu-latest 8 | permissions: 9 | issues: write 10 | pull-requests: write 11 | steps: 12 | - uses: actions/first-interaction@v1 13 | with: 14 | repo-token: ${{ secrets.GITHUB_TOKEN }} 15 | issue-message: 'Hi eRPC user. Thank you for your interest and welcome. We hope you will enjoy this framework well.' 16 | pr-message: 'Hi eRPC user. Thank you for your PR. We are appreciating that and we will try to review it as soon as possible. We hope you are enjoying this framework so far.' 17 | -------------------------------------------------------------------------------- /examples/idl/ble/bluetooth.erpc: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright (c) 2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016-2017 NXP 4 | * All rights reserved. 5 | * 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | @outputDir("bluetooth") 11 | @py_types_name_strip_suffix("_t") 12 | program bluetooth 13 | 14 | import "ble_common.erpc" 15 | 16 | type gapGenericCallback_t = uint32 // fnptr 17 | type hciHostToControllerInterface_t = uint32 18 | 19 | 20 | @group("ble_api") 21 | interface host { 22 | 23 | _Ble_HostInitialize( 24 | ) -> bleResult_t 25 | 26 | } 27 | 28 | 29 | import "ble_gatt.erpc" 30 | import "ble_gap.erpc" 31 | 32 | 33 | -------------------------------------------------------------------------------- /erpc_c/port/erpc_sysgpio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 NXP 3 | * All rights reserved. 4 | * 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | #ifndef _ERPC_SYSGPIO_H_ 10 | #define _ERPC_SYSGPIO_H_ 11 | 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | #define ERPC_SYSGPIO_STATUS_SUCCESS 0 17 | 18 | int gpio_export(int gpio); 19 | int gpio_direction(int gpio, int direction); 20 | int gpio_set_edge(int gpio, char *edge); 21 | int gpio_read(int gpio); 22 | 23 | int gpio_open(int gpio); 24 | int gpio_close(int fd); 25 | int gpio_poll(int fd, int timeout); 26 | 27 | #if __cplusplus 28 | } 29 | #endif 30 | 31 | #endif /* _ERPC_SYSGPIO_H_ */ 32 | -------------------------------------------------------------------------------- /erpcgen/src/HexValues.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #if !defined(_HexValues_h_) 10 | #define _HexValues_h_ 11 | 12 | #include 13 | 14 | //! \brief Determines whether \a c is a hex digit character. 15 | bool isHexDigit(char c); 16 | 17 | //! \brief Converts a hexadecimal character to the integer equivalent. 18 | uint8_t hexCharToInt(char c); 19 | 20 | //! \brief Converts a hex-encoded byte to the integer equivalent. 21 | uint8_t hexByteToInt(const char *encodedByte); 22 | 23 | #endif // _HexValues_h_ 24 | -------------------------------------------------------------------------------- /erpcgen/embedded-rpc.xcodeproj/project.xcworkspace/xcuserdata/creed.xcuserdatad/xcdebugger/Expressions.xcexplist: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | 10 | 11 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /erpc_c/infra/infra.dox: -------------------------------------------------------------------------------- 1 | /*! 2 | @defgroup infra Infrastructure 3 | @brief C++ core 4 | */ 5 | 6 | /*! 7 | @defgroup infra_transport Transports 8 | @brief Superclasses for building transports. 9 | @ingroup infra 10 | */ 11 | 12 | /*! 13 | @defgroup infra_utility Utilities 14 | @brief Utility code used by the infrastructure. 15 | @ingroup infra 16 | */ 17 | 18 | /*! 19 | @defgroup infra_server Server 20 | @brief Server classes. 21 | @ingroup infra 22 | */ 23 | 24 | /*! 25 | @defgroup infra_client Client 26 | @brief Client classes 27 | @ingroup infra 28 | */ 29 | 30 | /*! 31 | @defgroup infra_codec Serialization 32 | @brief Classes used for message serialization. 33 | @ingroup infra 34 | */ 35 | -------------------------------------------------------------------------------- /erpc_java/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | !**/src/main/**/target/ 4 | !**/src/test/**/target/ 5 | 6 | ### IntelliJ IDEA ### 7 | .idea/modules.xml 8 | .idea/jarRepositories.xml 9 | .idea/compiler.xml 10 | .idea/libraries/ 11 | *.iws 12 | *.iml 13 | *.ipr 14 | 15 | ### Eclipse ### 16 | .apt_generated 17 | .classpath 18 | .factorypath 19 | .project 20 | .settings 21 | .springBeans 22 | .sts4-cache 23 | 24 | ### NetBeans ### 25 | /nbproject/private/ 26 | /nbbuild/ 27 | /dist/ 28 | /nbdist/ 29 | /.nb-gradle/ 30 | build/ 31 | !**/src/main/**/build/ 32 | !**/src/test/**/build/ 33 | 34 | ### VS Code ### 35 | .vscode/ 36 | 37 | ### Mac OS ### 38 | .DS_Store 39 | /.idea/ 40 | -------------------------------------------------------------------------------- /examples/matrix_multiply_java/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | !**/src/main/**/target/ 4 | !**/src/test/**/target/ 5 | 6 | ### IntelliJ IDEA ### 7 | .idea/modules.xml 8 | .idea/jarRepositories.xml 9 | .idea/compiler.xml 10 | .idea/libraries/ 11 | *.iws 12 | *.iml 13 | *.ipr 14 | 15 | ### Eclipse ### 16 | .apt_generated 17 | .classpath 18 | .factorypath 19 | .project 20 | .settings 21 | .springBeans 22 | .sts4-cache 23 | 24 | ### NetBeans ### 25 | /nbproject/private/ 26 | /nbbuild/ 27 | /dist/ 28 | /nbdist/ 29 | /.nb-gradle/ 30 | build/ 31 | !**/src/main/**/build/ 32 | !**/src/test/**/build/ 33 | 34 | ### VS Code ### 35 | .vscode/ 36 | 37 | ### Mac OS ### 38 | .DS_Store -------------------------------------------------------------------------------- /examples/hello_world/java/src/main/java/org/example/TextServiceService.java: -------------------------------------------------------------------------------- 1 | package org.example; 2 | 3 | import io.github.embeddedrpc.erpc.server.SimpleServer; 4 | import org.example.hello_world.server.AbstractTextServiceService; 5 | 6 | public class TextServiceService extends AbstractTextServiceService { 7 | SimpleServer server; 8 | 9 | public TextServiceService(SimpleServer g_server) { 10 | this.server = g_server; 11 | } 12 | 13 | @Override 14 | public boolean printText(String text) { 15 | System.out.println(text); 16 | return true; 17 | } 18 | 19 | @Override 20 | public void stopServer() { 21 | server.stop(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /examples/MCUXPRESSO_SDK/erpc_two_way_rpc/service/erpc_two_way_rpc_Core1Interface_interface.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018,2023 NXP 3 | * All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | */ 7 | 8 | /* 9 | * Generated by erpcgen 1.14.0 on Wed May 28 10:34:55 2025. 10 | * 11 | * AUTOGENERATED - DO NOT EDIT 12 | */ 13 | 14 | 15 | #include "erpc_two_way_rpc_Core1Interface_interface.hpp" 16 | 17 | #if 11400 != ERPC_VERSION_NUMBER 18 | #error "The generated shim code version is different to the rest of eRPC code." 19 | #endif 20 | 21 | 22 | using namespace std; 23 | using namespace erpcShim; 24 | 25 | Core1Interface_interface::~Core1Interface_interface(void) 26 | { 27 | } 28 | -------------------------------------------------------------------------------- /test/java_impl_tests/src/test/java/io/github/embeddedrpc/erpc/tests/server/TestListsServer.java: -------------------------------------------------------------------------------- 1 | package io.github.embeddedrpc.erpc.tests.server; 2 | 3 | import io.github.embeddedrpc.erpc.server.Service; 4 | import io.github.embeddedrpc.erpc.tests.TestingServer; 5 | import io.github.embeddedrpc.erpc.tests.server.services.CommonService; 6 | import io.github.embeddedrpc.erpc.tests.server.services.TestListsService; 7 | import org.junit.jupiter.api.Test; 8 | 9 | public class TestListsServer { 10 | 11 | @Test 12 | public void testListsServer() { 13 | TestingServer server = new TestingServer(new Service[]{new TestListsService(), new CommonService()}); 14 | server.run(); 15 | } 16 | } -------------------------------------------------------------------------------- /erpc_java/src/main/java/io/github/embeddedrpc/erpc/transport/Transport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | package io.github.embeddedrpc.erpc.transport; 8 | 9 | /** 10 | * Transport interface. 11 | */ 12 | public interface Transport { 13 | /** 14 | * Send data through transport layer. 15 | * 16 | * @param message data to be sent. 17 | */ 18 | void send(byte[] message); 19 | 20 | /** 21 | * Receive data from transport layer. 22 | * 23 | * @return byte array 24 | */ 25 | byte[] receive(); 26 | 27 | /** 28 | * Close transport layer. 29 | */ 30 | void close(); 31 | } 32 | -------------------------------------------------------------------------------- /examples/matrix_multiply_java/src/main/java/io/github/embeddedrpc/erpc/example/erpc_matrix_multiply/interfaces/IMatrixMultiplyService.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated by erpcgen 1.14.0 on Wed May 28 10:34:53 2025. 3 | * 4 | * AUTOGENERATED - DO NOT EDIT 5 | */ 6 | 7 | package io.github.embeddedrpc.erpc.example.erpc_matrix_multiply.interfaces; 8 | 9 | 10 | 11 | 12 | import io.github.embeddedrpc.erpc.auxiliary.Reference; 13 | 14 | import java.util.List; 15 | 16 | public interface IMatrixMultiplyService { 17 | int SERVICE_ID = 1; 18 | int ERPCMATRIXMULTIPLY_ID = 1; 19 | 20 | void erpcMatrixMultiply(int[][] matrix1, int[][] matrix2, Reference result_matrix); 21 | } 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/Kconfig.sysbuild: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2023-2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | source "share/sysbuild/Kconfig" 8 | 9 | config RPMSG_LITE_REMOTE_BOARD 10 | string 11 | default "lpcxpresso54114_m0" if $(BOARD) = "lpcxpresso54114_m4" 12 | default "lpcxpresso55s69_cpu1" if $(BOARD) = "lpcxpresso55s69_cpu0" 13 | default "mps2_an521_remote" if $(BOARD) = "mps2_an521" 14 | default "v2m_musca_b1_ns" if $(BOARD) = "v2m_musca_b1" 15 | default "mimxrt1170_evk_cm4" if $(BOARD) = "mimxrt1170_evk_cm7" 16 | default "mimxrt1160_evk_cm4" if $(BOARD) = "mimxrt1160_evk_cm7" 17 | default "mimxrt1170_evkb_cm4" if $(BOARD) = "mimxrt1170_evkb_cm7" 18 | -------------------------------------------------------------------------------- /test/java_impl_tests/src/test/java/io/github/embeddedrpc/erpc/tests/server/TestEnumsServer.java: -------------------------------------------------------------------------------- 1 | package io.github.embeddedrpc.erpc.tests.server; 2 | 3 | import io.github.embeddedrpc.erpc.server.Service; 4 | import io.github.embeddedrpc.erpc.tests.TestingServer; 5 | import io.github.embeddedrpc.erpc.tests.server.services.CommonService; 6 | import io.github.embeddedrpc.erpc.tests.server.services.TestEnumsService; 7 | import org.junit.jupiter.api.Test; 8 | 9 | public class TestEnumsServer { 10 | 11 | @Test 12 | public void testEnumServer() { 13 | TestingServer server = new TestingServer(new Service[]{new TestEnumsService(), new CommonService()}); 14 | server.run(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/java_impl_tests/src/test/java/io/github/embeddedrpc/erpc/tests/server/TestArraysServer.java: -------------------------------------------------------------------------------- 1 | package io.github.embeddedrpc.erpc.tests.server; 2 | 3 | import io.github.embeddedrpc.erpc.server.Service; 4 | import io.github.embeddedrpc.erpc.tests.TestingServer; 5 | import io.github.embeddedrpc.erpc.tests.server.services.CommonService; 6 | import io.github.embeddedrpc.erpc.tests.server.services.TestArraysService; 7 | import org.junit.jupiter.api.Test; 8 | 9 | public class TestArraysServer { 10 | 11 | @Test 12 | public void testArraysServer() { 13 | TestingServer server = new TestingServer(new Service[]{new TestArraysService(), new CommonService()}); 14 | server.run(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/java_impl_tests/src/test/java/io/github/embeddedrpc/erpc/tests/server/TestBinaryServer.java: -------------------------------------------------------------------------------- 1 | package io.github.embeddedrpc.erpc.tests.server; 2 | 3 | import io.github.embeddedrpc.erpc.server.Service; 4 | import io.github.embeddedrpc.erpc.tests.TestingServer; 5 | import io.github.embeddedrpc.erpc.tests.server.services.CommonService; 6 | import io.github.embeddedrpc.erpc.tests.server.services.TestBinaryService; 7 | import org.junit.jupiter.api.Test; 8 | 9 | public class TestBinaryServer { 10 | 11 | @Test 12 | public void testBinaryServer() { 13 | TestingServer server = new TestingServer(new Service[]{new TestBinaryService(), new CommonService()}); 14 | server.run(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/java_impl_tests/src/test/java/io/github/embeddedrpc/erpc/tests/server/TestBuiltinServer.java: -------------------------------------------------------------------------------- 1 | package io.github.embeddedrpc.erpc.tests.server; 2 | 3 | import io.github.embeddedrpc.erpc.server.Service; 4 | import io.github.embeddedrpc.erpc.tests.TestingServer; 5 | import io.github.embeddedrpc.erpc.tests.server.services.CommonService; 6 | import io.github.embeddedrpc.erpc.tests.server.services.TestBuiltinService; 7 | import org.junit.jupiter.api.Test; 8 | 9 | public class TestBuiltinServer { 10 | 11 | @Test 12 | public void testBuiltinServer() { 13 | TestingServer server = new TestingServer(new Service[]{new TestBuiltinService(), new CommonService()}); 14 | server.run(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/zephyr/uart/test_arbitrator/config/prj.conf: -------------------------------------------------------------------------------- 1 | # C++ Language Support 2 | CONFIG_CPP=y 3 | CONFIG_STD_CPP17=y 4 | CONFIG_GLIBCXX_LIBCPP=y 5 | 6 | CONFIG_NEWLIB_LIBC=y 7 | CONFIG_NEWLIB_LIBC_NANO=y 8 | 9 | # Compiler 10 | CONFIG_MAIN_STACK_SIZE=4096 11 | CONFIG_HEAP_MEM_POOL_SIZE=8192 12 | CONFIG_NO_OPTIMIZATIONS=y 13 | 14 | # eRPC 15 | CONFIG_ERPC=y 16 | CONFIG_ERPC_TRANSPORT_UART=y 17 | 18 | # UART 19 | CONFIG_CONSOLE=n 20 | CONFIG_UART_CONSOLE=n 21 | 22 | CONFIG_THREAD_CUSTOM_DATA=y 23 | CONFIG_ERPC_ARBITRATED_CLIENT=y 24 | CONFIG_POLL=y 25 | 26 | CONFIG_THREAD_NAME=y 27 | CONFIG_SCHED_CPU_MASK=y 28 | CONFIG_THREAD_ANALYZER=y 29 | 30 | CONFIG_LOG=y 31 | CONFIG_LOG_MODE_IMMEDIATE=y 32 | CONFIG_LOG_OVERRIDE_LEVEL=3 -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/boards/mimxrt1160_evk_cm7.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023-2024 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | / { 8 | chosen { 9 | /* Delete ipc chosen property where old IPM mailbox driver bellow is 10 | * configured. 11 | */ 12 | /delete-property/ zephyr,ipc; 13 | }; 14 | 15 | soc { 16 | /* Delete IPM Driver node nxp,imx-mu */ 17 | /delete-node/ mailbox@40c48000; 18 | 19 | /* Attach MBOX driver to MU Unit */ 20 | mbox:mbox@40c48000 { 21 | compatible = "nxp,mbox-imx-mu"; 22 | reg = <0x40c48000 0x4000>; 23 | interrupts = <118 0>; 24 | rx-channels = <4>; 25 | #mbox-cells = <1>; 26 | status = "okay"; 27 | }; 28 | }; 29 | }; -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/boards/mimxrt1170_evk_cm7.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023-2024 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | / { 8 | chosen { 9 | /* Delete ipc chosen property where old IPM mailbox driver bellow is 10 | * configured. 11 | */ 12 | /delete-property/ zephyr,ipc; 13 | }; 14 | 15 | soc { 16 | /* Delete IPM Driver node nxp,imx-mu */ 17 | /delete-node/ mailbox@40c48000; 18 | 19 | /* Attach MBOX driver to MU Unit */ 20 | mbox:mbox@40c48000 { 21 | compatible = "nxp,mbox-imx-mu"; 22 | reg = <0x40c48000 0x4000>; 23 | interrupts = <118 0>; 24 | rx-channels = <4>; 25 | #mbox-cells = <1>; 26 | status = "okay"; 27 | }; 28 | }; 29 | }; 30 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/boards/mimxrt1170_evkb_cm7.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023-2024 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | / { 8 | chosen { 9 | /* Delete ipc chosen property where old IPM mailbox driver bellow is 10 | * configured. 11 | */ 12 | /delete-property/ zephyr,ipc; 13 | }; 14 | 15 | soc { 16 | /* Delete IPM Driver node nxp,imx-mu */ 17 | /delete-node/ mailbox@40c48000; 18 | 19 | /* Attach MBOX driver to MU Unit */ 20 | mbox:mbox@40c48000 { 21 | compatible = "nxp,mbox-imx-mu"; 22 | reg = <0x40c48000 0x4000>; 23 | interrupts = <118 0>; 24 | rx-channels = <4>; 25 | #mbox-cells = <1>; 26 | status = "okay"; 27 | }; 28 | }; 29 | }; 30 | -------------------------------------------------------------------------------- /test/java_impl_tests/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | !**/src/main/**/target/ 4 | !**/src/test/**/target/ 5 | 6 | # Allow java tests 7 | !**/src/test/ 8 | 9 | ### IntelliJ IDEA ### 10 | .idea/modules.xml 11 | .idea/jarRepositories.xml 12 | .idea/compiler.xml 13 | .idea/libraries/ 14 | *.iws 15 | *.iml 16 | *.ipr 17 | 18 | ### Eclipse ### 19 | .apt_generated 20 | .classpath 21 | .factorypath 22 | .project 23 | .settings 24 | .springBeans 25 | .sts4-cache 26 | 27 | ### NetBeans ### 28 | /nbproject/private/ 29 | /nbbuild/ 30 | /dist/ 31 | /nbdist/ 32 | /.nb-gradle/ 33 | build/ 34 | !**/src/main/**/build/ 35 | !**/src/test/**/build/ 36 | 37 | ### VS Code ### 38 | .vscode/ 39 | 40 | ### Mac OS ### 41 | .DS_Store -------------------------------------------------------------------------------- /test/java_impl_tests/src/test/java/io/github/embeddedrpc/erpc/tests/server/TestAnnotationsServer.java: -------------------------------------------------------------------------------- 1 | package io.github.embeddedrpc.erpc.tests.server; 2 | 3 | import io.github.embeddedrpc.erpc.server.Service; 4 | import io.github.embeddedrpc.erpc.tests.TestingServer; 5 | import io.github.embeddedrpc.erpc.tests.server.services.CommonService; 6 | import io.github.embeddedrpc.erpc.tests.server.services.TestAnnotationsService; 7 | import org.junit.jupiter.api.Test; 8 | 9 | public class TestAnnotationsServer { 10 | @Test 11 | public void testAnnotationsServer() { 12 | TestingServer server = new TestingServer(new Service[]{new TestAnnotationsService(), new CommonService()}); 13 | server.run(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /erpcgen/src/templates/py_init.template: -------------------------------------------------------------------------------- 1 | {% if mlComment != "" %} 2 | {$mlComment} 3 | 4 | {% endif %} 5 | # 6 | # Generated by erpcgen {$erpcVersion} on {$todaysDate}. 7 | # 8 | # AUTOGENERATED - DO NOT EDIT 9 | # 10 | 11 | try: 12 | from erpc import erpc_version 13 | version = erpc_version.ERPC_VERSION 14 | except ImportError: 15 | version = "unknown" 16 | if version != "{$erpcVersion}": 17 | raise ValueError("The generated shim code version ({$erpcVersion}) is different to the rest of eRPC code (%s). \ 18 | Install newer version by running \"python setup.py install\" in folder erpc/erpc_python/." % repr(version)) 19 | 20 | from . import common 21 | from . import client 22 | from . import server 23 | from . import interface 24 | -------------------------------------------------------------------------------- /erpc_c/infra/erpc_version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016-2025 NXP 4 | * All rights reserved. 5 | * 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | #ifndef _ERPC_VERSION_H_ 11 | #define _ERPC_VERSION_H_ 12 | 13 | /*! 14 | * @addtogroup infra 15 | * @{ 16 | */ 17 | 18 | //////////////////////////////////////////////////////////////////////////////// 19 | // Definitions 20 | //////////////////////////////////////////////////////////////////////////////// 21 | 22 | //! @brief String version of eRPC. 23 | #define ERPC_VERSION "1.14.0" 24 | //! @brief Integer version of eRPC. 25 | #define ERPC_VERSION_NUMBER 11400 26 | 27 | /*! @} */ 28 | 29 | #endif /* _ERPC_VERSION_H_ */ 30 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/src/service/erpc_matrix_multiply_interface.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | /* 10 | * Generated by erpcgen 1.14.0 on Wed May 28 10:34:56 2025. 11 | * 12 | * AUTOGENERATED - DO NOT EDIT 13 | */ 14 | 15 | 16 | #include "erpc_matrix_multiply_interface.hpp" 17 | 18 | #if 11400 != ERPC_VERSION_NUMBER 19 | #error "The generated shim code version is different to the rest of eRPC code." 20 | #endif 21 | 22 | 23 | using namespace std; 24 | using namespace erpcShim; 25 | 26 | MatrixMultiplyService_interface::~MatrixMultiplyService_interface(void) 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_tcp/src/service/erpc_matrix_multiply_interface.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | /* 10 | * Generated by erpcgen 1.14.0 on Wed May 28 10:34:56 2025. 11 | * 12 | * AUTOGENERATED - DO NOT EDIT 13 | */ 14 | 15 | 16 | #include "erpc_matrix_multiply_interface.hpp" 17 | 18 | #if 11400 != ERPC_VERSION_NUMBER 19 | #error "The generated shim code version is different to the rest of eRPC code." 20 | #endif 21 | 22 | 23 | using namespace std; 24 | using namespace erpcShim; 25 | 26 | MatrixMultiplyService_interface::~MatrixMultiplyService_interface(void) 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_uart/src/service/erpc_matrix_multiply_interface.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | /* 10 | * Generated by erpcgen 1.14.0 on Wed May 28 10:34:56 2025. 11 | * 12 | * AUTOGENERATED - DO NOT EDIT 13 | */ 14 | 15 | 16 | #include "erpc_matrix_multiply_interface.hpp" 17 | 18 | #if 11400 != ERPC_VERSION_NUMBER 19 | #error "The generated shim code version is different to the rest of eRPC code." 20 | #endif 21 | 22 | 23 | using namespace std; 24 | using namespace erpcShim; 25 | 26 | MatrixMultiplyService_interface::~MatrixMultiplyService_interface(void) 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /erpc_c/infra/erpc_utils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 ACRIOS Systems s.r.o. 3 | * All rights reserved. 4 | * 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | #include "erpc_utils.hpp" 10 | 11 | bool erpc::findIndexOfFunction(const arrayOfFunctionPtr_t sourceArrayOfFunctionPtr, uint16_t sourceArrayLength, 12 | const functionPtr_t functionPtr, uint16_t &retVal) 13 | { 14 | uint32_t index; 15 | bool find = false; 16 | for (index = 0; index < sourceArrayLength; index++) 17 | { 18 | if (sourceArrayOfFunctionPtr[index] == functionPtr) 19 | { 20 | retVal = index; 21 | find = true; 22 | break; 23 | } 24 | } 25 | return find; 26 | } 27 | -------------------------------------------------------------------------------- /examples/MCUXPRESSO_SDK/erpc_matrix_multiply/service/erpc_matrix_multiply_interface.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | /* 10 | * Generated by erpcgen 1.14.0 on Wed May 28 10:34:55 2025. 11 | * 12 | * AUTOGENERATED - DO NOT EDIT 13 | */ 14 | 15 | 16 | #include "erpc_matrix_multiply_interface.hpp" 17 | 18 | #if 11400 != ERPC_VERSION_NUMBER 19 | #error "The generated shim code version is different to the rest of eRPC code." 20 | #endif 21 | 22 | 23 | using namespace std; 24 | using namespace erpcShim; 25 | 26 | MatrixMultiplyService_interface::~MatrixMultiplyService_interface(void) 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/remote/src/service/erpc_matrix_multiply_interface.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | /* 10 | * Generated by erpcgen 1.14.0 on Wed May 28 10:34:56 2025. 11 | * 12 | * AUTOGENERATED - DO NOT EDIT 13 | */ 14 | 15 | 16 | #include "erpc_matrix_multiply_interface.hpp" 17 | 18 | #if 11400 != ERPC_VERSION_NUMBER 19 | #error "The generated shim code version is different to the rest of eRPC code." 20 | #endif 21 | 22 | 23 | using namespace std; 24 | using namespace erpcShim; 25 | 26 | MatrixMultiplyService_interface::~MatrixMultiplyService_interface(void) 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/src/service/erpc_matrix_multiply_interface.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | /* 10 | * Generated by erpcgen 1.14.0 on Wed May 28 10:34:56 2025. 11 | * 12 | * AUTOGENERATED - DO NOT EDIT 13 | */ 14 | 15 | 16 | #include "erpc_matrix_multiply_interface.hpp" 17 | 18 | #if 11400 != ERPC_VERSION_NUMBER 19 | #error "The generated shim code version is different to the rest of eRPC code." 20 | #endif 21 | 22 | 23 | using namespace std; 24 | using namespace erpcShim; 25 | 26 | MatrixMultiplyService_interface::~MatrixMultiplyService_interface(void) 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/remote/prj.conf: -------------------------------------------------------------------------------- 1 | # C++ Language Support 2 | CONFIG_CPP=y 3 | CONFIG_STD_CPP17=y 4 | CONFIG_GLIBCXX_LIBCPP=y 5 | 6 | CONFIG_NEWLIB_LIBC=y 7 | CONFIG_NEWLIB_LIBC_NANO=y 8 | 9 | # Compiler 10 | CONFIG_MAIN_STACK_SIZE=4096 11 | CONFIG_HEAP_MEM_POOL_SIZE=8192 12 | CONFIG_NO_OPTIMIZATIONS=y 13 | 14 | # eRPC 15 | CONFIG_ERPC=y 16 | CONFIG_ERPC_TRANSPORT_RPMSG_LITE=y 17 | 18 | # RPMSG Lite 19 | CONFIG_IPM=y 20 | CONFIG_EVENTS=y 21 | CONFIG_PRINTK=y 22 | CONFIG_RPMSGLITE=y 23 | CONFIG_RPMSGLITE_QUEUE=y 24 | CONFIG_RPMSGLITE_NS=y 25 | CONFIG_TIMESLICE_SIZE=1 26 | 27 | CONFIG_THREAD_CUSTOM_DATA=y 28 | CONFIG_ERPC_ARBITRATED_CLIENT=y 29 | CONFIG_POLL=y 30 | 31 | CONFIG_THREAD_NAME=y 32 | CONFIG_SCHED_CPU_MASK=y 33 | CONFIG_THREAD_ANALYZER=y -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/remote/src/service/erpc_matrix_multiply_interface.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | /* 10 | * Generated by erpcgen 1.14.0 on Wed May 28 10:34:56 2025. 11 | * 12 | * AUTOGENERATED - DO NOT EDIT 13 | */ 14 | 15 | 16 | #include "erpc_matrix_multiply_interface.hpp" 17 | 18 | #if 11400 != ERPC_VERSION_NUMBER 19 | #error "The generated shim code version is different to the rest of eRPC code." 20 | #endif 21 | 22 | 23 | using namespace std; 24 | using namespace erpcShim; 25 | 26 | MatrixMultiplyService_interface::~MatrixMultiplyService_interface(void) 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /erpcgen/test/test_retain_c.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: testing in out retain annotation 3 | desc: 4 | idl: | 5 | struct A { 6 | list x 7 | } 8 | 9 | interface I { 10 | testR1(in A inA @retain, out A outA @retain) -> @retain A 11 | } 12 | 13 | test_server.cpp: 14 | - not: free_A_struct(inA) 15 | - not: erpc_free(inA) 16 | - not: free_A_struct(outA) 17 | - not: erpc_free(outA) 18 | - not: free_A_struct(result) 19 | - not: erpc_free(result) 20 | 21 | --- 22 | name: testing inout retain annotation 23 | desc: 24 | idl: | 25 | struct A { 26 | list x 27 | } 28 | 29 | interface I { 30 | testR2(inout A inoutA @retain) -> void 31 | } 32 | 33 | test_server.cpp: 34 | - not: free_A_struct(inoutA) 35 | - not: erpc_free(inoutA) 36 | -------------------------------------------------------------------------------- /test/java_impl_tests/src/test/java/io/github/embeddedrpc/erpc/tests/server/TestTypedefServer.java: -------------------------------------------------------------------------------- 1 | package io.github.embeddedrpc.erpc.tests.server; 2 | 3 | import io.github.embeddedrpc.erpc.server.Service; 4 | import io.github.embeddedrpc.erpc.tests.TestingServer; 5 | import io.github.embeddedrpc.erpc.tests.server.services.CommonService; 6 | import io.github.embeddedrpc.erpc.tests.server.services.TestTypedefService; 7 | import org.junit.jupiter.api.Test; 8 | 9 | public class TestTypedefServer { 10 | @Test 11 | public void testTypedefServer() { 12 | TestingServer server = new TestingServer(new Service[]{ 13 | new TestTypedefService(), 14 | new CommonService() 15 | }); 16 | server.run(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /erpc_c/port/erpc_endianness_undefined.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-License-Identifier: BSD-3-Clause 3 | */ 4 | 5 | #ifndef _ERPC_ENDIANNESS_UNDEFINED_H_ 6 | #define _ERPC_ENDIANNESS_UNDEFINED_H_ 7 | 8 | // Disabling endianness agnostic feature. 9 | #define ERPC_WRITE_AGNOSTIC_16(value) 10 | #define ERPC_WRITE_AGNOSTIC_32(value) 11 | #define ERPC_WRITE_AGNOSTIC_64(value) 12 | #define ERPC_WRITE_AGNOSTIC_FLOAT(value) 13 | #define ERPC_WRITE_AGNOSTIC_DOUBLE(value) 14 | #define ERPC_WRITE_AGNOSTIC_PTR(value) 15 | 16 | #define ERPC_READ_AGNOSTIC_16(value) 17 | #define ERPC_READ_AGNOSTIC_32(value) 18 | #define ERPC_READ_AGNOSTIC_64(value) 19 | #define ERPC_READ_AGNOSTIC_FLOAT(value) 20 | #define ERPC_READ_AGNOSTIC_DOUBLE(value) 21 | #define ERPC_READ_AGNOSTIC_PTR(value) 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /examples/matrix_multiply_java/src/main/java/io/github/embeddedrpc/erpc/example/erpc_matrix_multiply/common/Constants.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated by erpcgen 1.14.0 on Wed May 28 10:34:53 2025. 3 | * 4 | * AUTOGENERATED - DO NOT EDIT 5 | */ 6 | package io.github.embeddedrpc.erpc.example.erpc_matrix_multiply.common; 7 | 8 | 9 | 10 | 11 | 12 | import java.util.ArrayList; 13 | import java.util.List; 14 | 15 | public final class Constants { 16 | /*! This const defines the matrix size. The value has to be the same as the 17 | Matrix array dimension. Do not forget to re-generate the erpc code once the 18 | matrix size is changed in the erpc file */ 19 | public static final int matrix_size = 5; 20 | 21 | private Constants() { 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/remote/prj.conf: -------------------------------------------------------------------------------- 1 | # C++ Language Support 2 | CONFIG_CPP=y 3 | CONFIG_STD_CPP17=y 4 | CONFIG_GLIBCXX_LIBCPP=y 5 | 6 | CONFIG_NEWLIB_LIBC=y 7 | CONFIG_NEWLIB_LIBC_NANO=y 8 | 9 | # Compiler 10 | CONFIG_MAIN_STACK_SIZE=4096 11 | CONFIG_HEAP_MEM_POOL_SIZE=8192 12 | CONFIG_NO_OPTIMIZATIONS=y 13 | 14 | # eRPC 15 | CONFIG_ERPC=y 16 | CONFIG_ERPC_TRANSPORT_RPMSG_LITE=y 17 | 18 | # RPMSG Lite 19 | CONFIG_IPM=y 20 | CONFIG_EVENTS=y 21 | CONFIG_PRINTK=y 22 | CONFIG_RPMSGLITE=y 23 | CONFIG_RPMSGLITE_QUEUE=y 24 | CONFIG_RPMSGLITE_NS=y 25 | CONFIG_TIMESLICE_SIZE=1 26 | 27 | CONFIG_THREAD_CUSTOM_DATA=y 28 | CONFIG_ERPC_ARBITRATED_CLIENT=y 29 | CONFIG_POLL=y 30 | 31 | CONFIG_THREAD_NAME=y 32 | CONFIG_SCHED_CPU_MASK=y 33 | CONFIG_THREAD_ANALYZER=y -------------------------------------------------------------------------------- /test/common/addOne.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | #ifndef _EMBEDDED_RPC__ADDONE_H_ 11 | #define _EMBEDDED_RPC__ADDONE_H_ 12 | 13 | //////////////////////////////////////////////////////////////////////////////// 14 | // Definitions 15 | //////////////////////////////////////////////////////////////////////////////// 16 | 17 | typedef int includedInt_t; 18 | 19 | //////////////////////////////////////////////////////////////////////////////// 20 | // API 21 | //////////////////////////////////////////////////////////////////////////////// 22 | 23 | int addOne(int x); 24 | 25 | #endif // _EMBEDDED_RPC__ADDONE_H_ 26 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/boards/mimxrt1160_evk_cm7.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023-2024 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | #include 8 | 9 | / { 10 | chosen { 11 | zephyr,ipc_shm = &ocram2_overlay; 12 | }; 13 | 14 | /* OpenAMP fails with full 512K OCRAM2 memory region as shared memory. 15 | * Define a subset of the OCRAM2 region for demo to use 16 | * Note that shared memory must have specific MPU attributes set. 17 | */ 18 | ocram2_overlay: memory@202c0000{ 19 | compatible = "zephyr,memory-region", "mmio-sram"; 20 | reg = <0x202c0000 DT_SIZE_K(16)>; 21 | zephyr,memory-region="OCRAM2_OVERLAY"; 22 | zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_IO) )>; 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/boards/mimxrt1170_evk_cm7.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023-2024 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | #include 8 | 9 | / { 10 | chosen { 11 | zephyr,ipc_shm = &ocram2_overlay; 12 | }; 13 | 14 | /* OpenAMP fails with full 512K OCRAM2 memory region as shared memory. 15 | * Define a subset of the OCRAM2 region for demo to use 16 | * Note that shared memory must have specific MPU attributes set. 17 | */ 18 | ocram2_overlay: memory@202c0000{ 19 | compatible = "zephyr,memory-region", "mmio-sram"; 20 | reg = <0x202c0000 DT_SIZE_K(16)>; 21 | zephyr,memory-region="OCRAM2_OVERLAY"; 22 | zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_IO) )>; 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /erpc_c/port/erpc_spidev.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 NXP 3 | * All rights reserved. 4 | * 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | #ifndef _ERPC_SPIDEV_H_ 10 | #define _ERPC_SPIDEV_H_ 11 | 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | #define ERPC_SPIDEV_STATUS_SUCCESS 0 17 | #define ERPC_SPIDEV_STATUS_FAIL -1 18 | 19 | int spidev_open(const char *port); 20 | int spidev_set_mode(int fd, unsigned char mode); 21 | int spidev_set_speed(int fd, unsigned int speed_hz); 22 | int spidev_set_wordbits(int fd, unsigned char bits); 23 | int spidev_transfer(int fd, const unsigned char *tx_buf, unsigned char *rx_buf, unsigned int len); 24 | int spidev_close(int fd); 25 | 26 | #if __cplusplus 27 | } 28 | #endif 29 | 30 | #endif /* _ERPC_SPIDEV_H_ */ 31 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/boards/mimxrt1170_evkb_cm7.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023-2024 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | #include 8 | 9 | / { 10 | chosen { 11 | zephyr,ipc_shm = &ocram2_overlay; 12 | }; 13 | 14 | /* OpenAMP fails with full 512K OCRAM2 memory region as shared memory. 15 | * Define a subset of the OCRAM2 region for demo to use 16 | * Note that shared memory must have specific MPU attributes set. 17 | */ 18 | ocram2_overlay: memory@202c0000{ 19 | compatible = "zephyr,memory-region", "mmio-sram"; 20 | reg = <0x202c0000 DT_SIZE_K(16)>; 21 | zephyr,memory-region="OCRAM2_OVERLAY"; 22 | zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_IO) )>; 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /erpc_c/setup/setup.dox: -------------------------------------------------------------------------------- 1 | /*! 2 | @defgroup setup Setup API 3 | @brief C language setup functions. 4 | */ 5 | 6 | /*! 7 | @defgroup server_setup Server Setup 8 | @ingroup setup 9 | @brief Server side setup and control functions. 10 | */ 11 | 12 | /*! 13 | @defgroup client_setup Client Setup 14 | @ingroup setup 15 | @brief Client side setup functions. 16 | */ 17 | 18 | /*! 19 | @defgroup message_buffer_factory_setup Message Buffer Factory Setup 20 | @ingroup setup 21 | @brief Message Buffer Factory setup functions. 22 | */ 23 | 24 | /*! 25 | @defgroup transport_setup Transport Setup 26 | @ingroup setup 27 | @brief Transport layer initialization. 28 | */ 29 | 30 | /*! 31 | @defgroup port_setup_extensions Extension Setup 32 | @ingroup setup 33 | @brief Extension setup functions. 34 | */ 35 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/boards/mimxrt1160_evk_cm7.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023-2024 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | #include 8 | 9 | / { 10 | chosen { 11 | zephyr,ipc_shm = &ocram2_overlay; 12 | }; 13 | 14 | /* OpenAMP fails with full 512K OCRAM2 memory region as shared memory. 15 | * Define a subset of the OCRAM2 region for demo to use 16 | * Note that shared memory must have specific MPU attributes set. 17 | */ 18 | ocram2_overlay: memory@202c0000{ 19 | compatible = "zephyr,memory-region", "mmio-sram"; 20 | reg = <0x202c0000 DT_SIZE_K(16)>; 21 | zephyr,memory-region="OCRAM2_OVERLAY"; 22 | zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_IO) )>; 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/boards/mimxrt1170_evk_cm7.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023-2024 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | #include 8 | 9 | / { 10 | chosen { 11 | zephyr,ipc_shm = &ocram2_overlay; 12 | }; 13 | 14 | /* OpenAMP fails with full 512K OCRAM2 memory region as shared memory. 15 | * Define a subset of the OCRAM2 region for demo to use 16 | * Note that shared memory must have specific MPU attributes set. 17 | */ 18 | ocram2_overlay: memory@202c0000{ 19 | compatible = "zephyr,memory-region", "mmio-sram"; 20 | reg = <0x202c0000 DT_SIZE_K(16)>; 21 | zephyr,memory-region="OCRAM2_OVERLAY"; 22 | zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_IO) )>; 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/boards/mimxrt1170_evkb_cm7.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023-2024 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | #include 8 | 9 | / { 10 | chosen { 11 | zephyr,ipc_shm = &ocram2_overlay; 12 | }; 13 | 14 | /* OpenAMP fails with full 512K OCRAM2 memory region as shared memory. 15 | * Define a subset of the OCRAM2 region for demo to use 16 | * Note that shared memory must have specific MPU attributes set. 17 | */ 18 | ocram2_overlay: memory@202c0000{ 19 | compatible = "zephyr,memory-region", "mmio-sram"; 20 | reg = <0x202c0000 DT_SIZE_K(16)>; 21 | zephyr,memory-region="OCRAM2_OVERLAY"; 22 | zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_IO) )>; 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/boards/mimxrt1160_evk_cm7.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023-2024 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | #include 8 | 9 | / { 10 | chosen { 11 | zephyr,ipc_shm = &ocram2_overlay; 12 | }; 13 | 14 | /* OpenAMP fails with full 512K OCRAM2 memory region as shared memory. 15 | * Define a subset of the OCRAM2 region for demo to use 16 | * Note that shared memory must have specific MPU attributes set. 17 | */ 18 | ocram2_overlay: memory@202c0000{ 19 | compatible = "zephyr,memory-region", "mmio-sram"; 20 | reg = <0x202c0000 DT_SIZE_K(23)>; 21 | zephyr,memory-region="OCRAM2_OVERLAY"; 22 | zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_IO) )>; 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/boards/mimxrt1170_evk_cm7.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023-2024 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | #include 8 | 9 | / { 10 | chosen { 11 | zephyr,ipc_shm = &ocram2_overlay; 12 | }; 13 | 14 | /* OpenAMP fails with full 512K OCRAM2 memory region as shared memory. 15 | * Define a subset of the OCRAM2 region for demo to use 16 | * Note that shared memory must have specific MPU attributes set. 17 | */ 18 | ocram2_overlay: memory@202c0000{ 19 | compatible = "zephyr,memory-region", "mmio-sram"; 20 | reg = <0x202c0000 DT_SIZE_K(23)>; 21 | zephyr,memory-region="OCRAM2_OVERLAY"; 22 | zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_IO) )>; 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/boards/mimxrt1170_evkb_cm7.overlay: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023-2024 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | #include 8 | 9 | / { 10 | chosen { 11 | zephyr,ipc_shm = &ocram2_overlay; 12 | }; 13 | 14 | /* OpenAMP fails with full 512K OCRAM2 memory region as shared memory. 15 | * Define a subset of the OCRAM2 region for demo to use 16 | * Note that shared memory must have specific MPU attributes set. 17 | */ 18 | ocram2_overlay: memory@202c0000{ 19 | compatible = "zephyr,memory-region", "mmio-sram"; 20 | reg = <0x202c0000 DT_SIZE_K(16)>; 21 | zephyr,memory-region="OCRAM2_OVERLAY"; 22 | zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_IO) )>; 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /examples/matrix_multiply_python/service/erpc_matrix_multiply/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017 NXP 2 | # All rights reserved. 3 | # 4 | # 5 | # SPDX-License-Identifier: BSD-3-Clause 6 | 7 | # 8 | # Generated by erpcgen 1.14.0 on Wed May 28 10:34:55 2025. 9 | # 10 | # AUTOGENERATED - DO NOT EDIT 11 | # 12 | 13 | try: 14 | from erpc import erpc_version 15 | version = erpc_version.ERPC_VERSION 16 | except ImportError: 17 | version = "unknown" 18 | if version != "1.14.0": 19 | raise ValueError("The generated shim code version (1.14.0) is different to the rest of eRPC code (%s). \ 20 | Install newer version by running \"python setup.py install\" in folder erpc/erpc_python/." % repr(version)) 21 | 22 | from . import common 23 | from . import client 24 | from . import server 25 | from . import interface 26 | -------------------------------------------------------------------------------- /test/readme.txt: -------------------------------------------------------------------------------- 1 | /multicore/erpc/test/readme.txt 2 | 3 | Directory Structure 4 | 5 | common - Contains board specific code common to all tests to help enable testing 6 | on target platforms and common files for tests. 7 | 8 | mk - Contains common makefiles for building tests. 9 | 10 | results - Contains the results for all unit tests in xml format. 11 | 12 | skeleton - Holds skeleton files that can be used if a new unit test directory 13 | needs to be added. 14 | 15 | Each test_xxx/ subdirectory contains acceptance tests. These tests can be built 16 | on Linux or OS X with gcc using makefiles. Run '$make' inside one of the 17 | test_xxx/ folders to build the test client and test server. Then run 18 | '$make run-ut-server' to start the server, and run '$make run-ut-client' to run 19 | the unit tests. 20 | 21 | -------------------------------------------------------------------------------- /test/common/unit_test.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Freescale Semiconductor, Inc. 3 | * Copyright 2016 - 2020 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | #ifndef _EMBEDDED_RPC__UNIT_TEST_H_ 10 | #define _EMBEDDED_RPC__UNIT_TEST_H_ 11 | 12 | #include "erpc_simple_server.hpp" 13 | 14 | //////////////////////////////////////////////////////////////////////////////// 15 | // Function Prototypes 16 | //////////////////////////////////////////////////////////////////////////////// 17 | 18 | void add_services(erpc::SimpleServer *server); 19 | 20 | void remove_services(erpc::SimpleServer *server); 21 | 22 | void add_common_service(erpc::SimpleServer *server); 23 | 24 | void remove_common_service(erpc::SimpleServer *server); 25 | 26 | #endif // _EMBEDDED_RPC__UNIT_TEST_H_ 27 | -------------------------------------------------------------------------------- /erpcgen/src/os_config.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | #ifndef _EMBEDDED_RPC__OS_CONFIG_ 11 | #define _EMBEDDED_RPC__OS_CONFIG_ 12 | //////////////////////////////////////////////////////////////////////////////// 13 | // Definitions 14 | //////////////////////////////////////////////////////////////////////////////// 15 | 16 | // Macro to hide noexcept keyword for Visual C++. 17 | #if WIN32 18 | #define NOEXCEPT 19 | #else 20 | #define NOEXCEPT noexcept 21 | #endif // NOEXCEPT 22 | 23 | // Macro to add throw() keyword for MinGW C++. 24 | #if __MINGW32__ 25 | #define NOTHROW throw() 26 | #else 27 | #define NOTHROW 28 | #endif // NOTHROW 29 | #endif // _EMBEDDED_RPC__OS_CONFIG_ 30 | -------------------------------------------------------------------------------- /erpcgen/src/templates/py_interface.template: -------------------------------------------------------------------------------- 1 | {% if mlComment != "" %} 2 | {$mlComment} 3 | 4 | {% endif %} 5 | # 6 | # Generated by erpcgen {$erpcVersion} on {$todaysDate}. 7 | # 8 | # AUTOGENERATED - DO NOT EDIT 9 | # 10 | 11 | {% for iface in group.interfaces %} 12 | {% if iface.mlComment %} 13 | {$iface.mlComment} 14 | {% else %} 15 | # Abstract base class for {$iface.name} 16 | {% endif %} 17 | class I{$iface.name}(object): 18 | SERVICE_ID = {$iface.id} 19 | {% for fn in iface.functions %} 20 | {$upper(fn.name)}_ID = {$fn.id} 21 | {% endfor -- fn %} 22 | 23 | {% for fn in iface.functions if fn.isNonExternalFunction == true %} 24 | {% if fn.mlComment %} 25 | {$fn.mlComment} 26 | {% endif %} 27 | def {$fn.prototype}: 28 | raise NotImplementedError() 29 | 30 | {% endfor -- fn %} 31 | 32 | {% endfor -- iface %} 33 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/prj.conf: -------------------------------------------------------------------------------- 1 | # C++ Language Support 2 | CONFIG_CPP=y 3 | CONFIG_STD_CPP17=y 4 | CONFIG_GLIBCXX_LIBCPP=y 5 | 6 | CONFIG_NEWLIB_LIBC=y 7 | CONFIG_NEWLIB_LIBC_NANO=y 8 | 9 | # Compiler 10 | CONFIG_MAIN_STACK_SIZE=4096 11 | CONFIG_HEAP_MEM_POOL_SIZE=8192 12 | CONFIG_NO_OPTIMIZATIONS=y 13 | 14 | # eRPC 15 | CONFIG_ERPC=y 16 | CONFIG_ERPC_TRANSPORT_RPMSG_LITE=y 17 | 18 | # RPMSG Lite 19 | CONFIG_IPM=y 20 | CONFIG_EVENTS=y 21 | CONFIG_PRINTK=y 22 | CONFIG_RPMSGLITE=y 23 | CONFIG_RPMSGLITE_QUEUE=y 24 | CONFIG_RPMSGLITE_NS=y 25 | CONFIG_TIMESLICE_SIZE=1 26 | 27 | CONFIG_THREAD_CUSTOM_DATA=y 28 | CONFIG_ERPC_ARBITRATED_CLIENT=y 29 | CONFIG_POLL=y 30 | 31 | CONFIG_THREAD_NAME=y 32 | CONFIG_SCHED_CPU_MASK=y 33 | CONFIG_THREAD_ANALYZER=y 34 | 35 | CONFIG_LOG=y 36 | CONFIG_LOG_MODE_IMMEDIATE=y 37 | CONFIG_LOG_OVERRIDE_LEVEL=3 -------------------------------------------------------------------------------- /erpc_java/src/main/java/io/github/embeddedrpc/erpc/auxiliary/RequestError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | package io.github.embeddedrpc.erpc.auxiliary; 8 | 9 | /** 10 | * Request error thrown when unexpected situation occurred during sending and receiving message. 11 | */ 12 | public class RequestError extends RuntimeException { 13 | /** 14 | * Request error. 15 | * 16 | * @param message error message 17 | */ 18 | public RequestError(String message) { 19 | super(message); 20 | } 21 | 22 | /** 23 | * Request error. 24 | * @param message error message 25 | * @param cause error chain 26 | */ 27 | public RequestError(String message, Throwable cause) { 28 | super(message, cause); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /erpcgen/VisualStudio_v14/readme_erpcgen.txt: -------------------------------------------------------------------------------- 1 | Building erpcgen for Windows using Visual Studio 2 | ================================================ 3 | 4 | 5 | Requirements 6 | ------------ 7 | 8 | 1. Visual Studio 2017 or later. 9 | 10 | This version is required for the C++17 support. 11 | 12 | 2. Win flex-bison 13 | 14 | Direct link to the latests win flex-bison release download: 15 | [https://sourceforge.net/projects/winflexbison/files/win_flex_bison3-latest.zip/download] 16 | 17 | 18 | Extract win flex-bison zip contents directly into the erpc/erpcgen/VisualStudio_v14 directory 19 | (not into a subdirectory). 20 | 21 | Build output 22 | ------------ 23 | 24 | Visual Studio build output is available in these directories: 25 | 26 | erpc/erpcgen/VisualStudio_v14/Debug 27 | erpc/erpcgen/VisualStudio_v14/Release 28 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/prj.conf: -------------------------------------------------------------------------------- 1 | # C++ Language Support 2 | CONFIG_CPP=y 3 | CONFIG_STD_CPP17=y 4 | CONFIG_GLIBCXX_LIBCPP=y 5 | 6 | CONFIG_NEWLIB_LIBC=y 7 | CONFIG_NEWLIB_LIBC_NANO=y 8 | 9 | # Compiler 10 | CONFIG_MAIN_STACK_SIZE=4096 11 | CONFIG_HEAP_MEM_POOL_SIZE=32000 12 | CONFIG_NO_OPTIMIZATIONS=y 13 | 14 | # eRPC 15 | CONFIG_ERPC=y 16 | CONFIG_ERPC_TRANSPORT_RPMSG_LITE=y 17 | 18 | # RPMSG Lite 19 | CONFIG_IPM=y 20 | CONFIG_EVENTS=y 21 | CONFIG_PRINTK=y 22 | CONFIG_RPMSGLITE=y 23 | CONFIG_RPMSGLITE_QUEUE=y 24 | CONFIG_RPMSGLITE_NS=y 25 | CONFIG_TIMESLICE_SIZE=1 26 | 27 | CONFIG_THREAD_CUSTOM_DATA=y 28 | CONFIG_ERPC_ARBITRATED_CLIENT=y 29 | CONFIG_POLL=y 30 | 31 | CONFIG_THREAD_NAME=y 32 | CONFIG_SCHED_CPU_MASK=y 33 | CONFIG_THREAD_ANALYZER=y 34 | 35 | CONFIG_LOG=y 36 | CONFIG_LOG_MODE_IMMEDIATE=y 37 | CONFIG_LOG_OVERRIDE_LEVEL=3 -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/sysbuild.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2023-2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | # Add external project 8 | ExternalZephyrProject_Add( 9 | APPLICATION remote_server 10 | SOURCE_DIR ${APP_DIR}/remote 11 | BOARD ${SB_CONFIG_RPMSG_LITE_REMOTE_BOARD} 12 | ) 13 | 14 | # Add dependencies so that the remote sample will be built first 15 | # This is required because some primary cores need information from the 16 | # remote core's build, such as the output image's LMA 17 | add_dependencies(matrix_multiply_rpmsglite remote_server) 18 | sysbuild_add_dependencies(CONFIGURE matrix_multiply_rpmsglite remote_server) 19 | 20 | if(SB_CONFIG_BOOTLOADER_MCUBOOT) 21 | # Make sure MCUboot is flashed first 22 | sysbuild_add_dependencies(FLASH matrix_multiply_rpmsglite mcuboot) 23 | endif() 24 | -------------------------------------------------------------------------------- /erpcgen/VisualStudio_v14/.gitignore: -------------------------------------------------------------------------------- 1 | # flex and bison output 2 | erpcgen_lexer.flex.cpp 3 | erpcgen_parser.tab.cpp 4 | erpcgen_parser.tab.hpp 5 | 6 | # templates 7 | cpp_client_source.cpp 8 | cpp_client_header.cpp 9 | cpp_server_header.cpp 10 | cpp_server_source.cpp 11 | cpp_coders.cpp 12 | c_common_header.cpp 13 | c_client_source.cpp 14 | c_client_header.cpp 15 | c_server_header.cpp 16 | c_server_source.cpp 17 | cpp_common_functions.cpp 18 | c_defines.cpp 19 | c_crc.cpp 20 | py_client.cpp 21 | py_coders.cpp 22 | py_common.cpp 23 | py_init.cpp 24 | py_server.cpp 25 | py_interface.cpp 26 | py_global_init.cpp 27 | java_*.cpp 28 | 29 | # win flex-bison files 30 | data 31 | custom_build_rules 32 | FlexLexer.h 33 | UNISTD_ERROR.readme 34 | win_bison.exe 35 | win_flex.exe 36 | README.txt 37 | .vs 38 | changelog.md 39 | README.md 40 | 41 | #boost libraries 42 | boost_* 43 | -------------------------------------------------------------------------------- /examples/matrix_multiply_java/src/main/resources/erpc_matrix_multiply.erpc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | program erpc_matrix_multiply 8 | 9 | /*! This const defines the matrix size. The value has to be the same as the 10 | Matrix array dimension. Do not forget to re-generate the erpc code once the 11 | matrix size is changed in the erpc file */ 12 | const int32 matrix_size = 5; 13 | 14 | /*! This is the matrix array type. The dimension has to be the same as the 15 | matrix size const. Do not forget to re-generate the erpc code once the 16 | matrix size is changed in the erpc file */ 17 | type Matrix = int32[matrix_size][matrix_size]; 18 | 19 | interface MatrixMultiplyService { 20 | erpcMatrixMultiply(in Matrix matrix1, in Matrix matrix2, out Matrix result_matrix) -> void 21 | } 22 | -------------------------------------------------------------------------------- /erpc_python/README_Pypi.md: -------------------------------------------------------------------------------- 1 | # eRPC Python Infrastructure 2 | 3 | This folder contains the Python implementation of the eRPC infrastructure. 4 | 5 | The eRPC project is stored on Github: [github.com/EmbeddedRPC/erpc](https://github.com/EmbeddedRPC/erpc) 6 | 7 | The Python implementation of eRPC is fully compatible with the C/C++ implementation at the 8 | protocol level. Also, the classes mirror those in the C++ infrastructure. 9 | 10 | Installation: 11 | 12 | To install the eRPC Python infrastructure, run the setup.py script like this: 13 | 14 | ```sh 15 | pip install erpc 16 | ``` 17 | 18 | Once installed, you can access the infrastructure via a standard import statement. 19 | 20 | ```python 21 | import erpc 22 | xport = erpc.transport.SerialTransport("/dev/ttyS1", 115200) 23 | client = erpc.client.ClientManager(xport, erpc.basic_codec.BasicCodec) 24 | ``` 25 | -------------------------------------------------------------------------------- /examples/matrix_multiply_tcp_c/erpc_matrix_multiply.erpc: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2017-2024 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | program erpc_matrix_multiply 8 | 9 | /*! This const defines the matrix size. The value has to be the same as the 10 | Matrix array dimension. Do not forget to re-generate the erpc code once the 11 | matrix size is changed in the erpc file */ 12 | const int32 matrix_size = 5; 13 | 14 | /*! This is the matrix array type. The dimension has to be the same as the 15 | matrix size const. Do not forget to re-generate the erpc code once the 16 | matrix size is changed in the erpc file */ 17 | type Matrix = int32[matrix_size][matrix_size]; 18 | 19 | interface MatrixMultiplyService { 20 | erpcMatrixMultiply(in Matrix matrix1, in Matrix matrix2, out Matrix result_matrix) -> void 21 | quitServer() -> void 22 | } 23 | -------------------------------------------------------------------------------- /test/zephyr/cmake/variables.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | # Set test implementation directory 8 | set(TEST_SOURCE_DIR ${ERPC_ROOT_DIR}/test/${TEST_NAME}) 9 | set(TEST_COMMON_DIR ${ERPC_ROOT_DIR}/test/common) 10 | 11 | # Set test name 12 | set(ERPC_NAME "test") 13 | set(ERPC_NAME_APP ${ERPC_NAME}) 14 | 15 | # Directory where test is generated 16 | set(TEST_OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}) 17 | 18 | # Directory where eRPC shim is generated 19 | set(ERPC_OUT_ROOT_DIR ${TEST_OUT_DIR}) 20 | set(ERPC_OUT_DIR erpc_outputs) 21 | set(TEST_ERPC_OUT_DIR ${ERPC_OUT_ROOT_DIR}/${ERPC_OUT_DIR}) 22 | 23 | # Disable/Enable ERPC Shim generation; Source code has to be added to TEST_CLIENT_SOURCES/TEST_SERVER_SOURCES 24 | set(GENERATE_ERPC_IDL_FILES TRUE) 25 | 26 | # IDL file 27 | set(IDL_FILE ${TEST_SOURCE_DIR}/${TEST_NAME}.erpc) -------------------------------------------------------------------------------- /examples/hello_world/java/src/main/java/org/example/Server.java: -------------------------------------------------------------------------------- 1 | package org.example; 2 | 3 | import io.github.embeddedrpc.erpc.codec.BasicCodecFactory; 4 | import io.github.embeddedrpc.erpc.server.SimpleServer; 5 | import io.github.embeddedrpc.erpc.transport.TCPTransport; 6 | import io.github.embeddedrpc.erpc.transport.Transport; 7 | 8 | import java.io.IOException; 9 | 10 | public class Server { 11 | public void run() throws IOException { 12 | Config cfg = new Config("../config.h"); 13 | 14 | Transport transport = new TCPTransport(cfg.getInt("ERPC_PORT")); 15 | SimpleServer server = new SimpleServer(transport, new BasicCodecFactory()); 16 | 17 | server.addService(new TextServiceService(server)); 18 | 19 | System.out.println("Starting server."); 20 | server.run(); 21 | System.out.println("Server stopped."); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /test/java_impl_tests/src/test/java/io/github/embeddedrpc/erpc/tests/server/TestStructServer.java: -------------------------------------------------------------------------------- 1 | package io.github.embeddedrpc.erpc.tests.server; 2 | 3 | import io.github.embeddedrpc.erpc.server.Service; 4 | import io.github.embeddedrpc.erpc.tests.TestingServer; 5 | import io.github.embeddedrpc.erpc.tests.server.services.CommonService; 6 | import io.github.embeddedrpc.erpc.tests.server.services.TestStructService1; 7 | import io.github.embeddedrpc.erpc.tests.server.services.TestStructService2; 8 | import org.junit.jupiter.api.Test; 9 | 10 | public class TestStructServer { 11 | @Test 12 | public void testListsServer() { 13 | TestingServer server = new TestingServer(new Service[]{ 14 | new TestStructService1(), 15 | new TestStructService2(), 16 | new CommonService() 17 | }); 18 | server.run(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/matrix_multiply_python/service/erpc_matrix_multiply.erpc: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2017 NXP 3 | * All rights reserved. 4 | * 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | program erpc_matrix_multiply 10 | 11 | /*! This const defines the matrix size. The value has to be the same as the 12 | Matrix array dimension. Do not forget to re-generate the erpc code once the 13 | matrix size is changed in the erpc file */ 14 | const int32 matrix_size = 5; 15 | 16 | /*! This is the matrix array type. The dimension has to be the same as the 17 | matrix size const. Do not forget to re-generate the erpc code once the 18 | matrix size is changed in the erpc file */ 19 | type Matrix = int32[matrix_size][matrix_size]; 20 | 21 | interface MatrixMultiplyService { 22 | erpcMatrixMultiply(in Matrix matrix1, in Matrix matrix2, out Matrix result_matrix) -> void 23 | } 24 | -------------------------------------------------------------------------------- /test/test_const/test_const_client_impl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | #include "gtest.h" 10 | #include "test_common.h" 11 | #include "unit_test_wrapped.h" 12 | 13 | //////////////////////////////////////////////////////////////////////////////// 14 | // Unit test Implementation code 15 | //////////////////////////////////////////////////////////////////////////////// 16 | 17 | void initInterfaces(erpc_client_t client) {} 18 | 19 | TEST(test_const, CheckConsts) 20 | { 21 | EXPECT_EQ(a, 3); 22 | EXPECT_EQ((float)b, (float)3.14); 23 | EXPECT_STREQ("feedbabe", c); 24 | EXPECT_EQ((float)d, (float)3.14); 25 | EXPECT_EQ(x, 11); 26 | EXPECT_EQ(y, 20); 27 | 28 | EXPECT_EQ(mass, 100); 29 | EXPECT_EQ(accel, (float)-9.8); 30 | } 31 | -------------------------------------------------------------------------------- /test/zephyr/uart/cmake/unit_test.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | # App type and transport 8 | set(APP_TYPE "server") 9 | set(TRANSPORT "zephyr_uart") 10 | 11 | # Zephyr APPLICATION_CONFIG_DIR and CONFIG_DIR 12 | if(NOT DEFINED APPLICATION_CONFIG_DIR) 13 | set(APPLICATION_CONFIG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../config) 14 | endif() 15 | 16 | if(NOT DEFINED CONFIG_DIR) 17 | set(CONFIG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../config) 18 | endif() 19 | 20 | # Include zephyr 21 | find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) 22 | 23 | # Common variables 24 | get_filename_component(TEST_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME) 25 | set(ERPC_ROOT_DIR ${ZEPHYR_ERPC_MODULE_DIR}) 26 | set(ZEPHYR_TEST_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR}/../../cmake) 27 | 28 | # Include test's variables 29 | include(${ZEPHYR_TEST_CMAKE_DIR}/variables.cmake) -------------------------------------------------------------------------------- /erpcgen/src/templates/java_const.template: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated by erpcgen {$erpcVersion} on {$todaysDate}. 3 | * 4 | * AUTOGENERATED - DO NOT EDIT 5 | */ 6 | package {$groupPackage}.common; 7 | 8 | {% if not empty(group.symbolsMap.structs) %}import {$groupPackage}.common.structs.*;{% elif not empty(structs)%}import {$groupPackage}.common.structs.*;{% endif %} 9 | {% if not empty(enums)%}import {$groupPackage}.common.enums.*;{% endif %} 10 | 11 | {% for inc in includes %} 12 | import {$inc}; 13 | {% endfor -- includes %} 14 | 15 | import java.util.ArrayList; 16 | import java.util.List; 17 | 18 | public final class Constants { 19 | {% for c in consts %} 20 | {$>c.mlComment} 21 | public static final {$c.type.typeName} {$c.name} = {$c.value}{$getTypeValuePosfix(c.type)};{% if c.ilComment %} {$c.ilComment}{% endif %} 22 | {% endfor %} 23 | 24 | private Constants() { 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /test/java_impl_tests/src/test/java/io/github/embeddedrpc/erpc/tests/server/services/TestAnnotationsService.java: -------------------------------------------------------------------------------- 1 | package io.github.embeddedrpc.erpc.tests.server.services; 2 | 3 | import io.github.embeddedrpc.erpc.tests.common.myEnum; 4 | import io.github.embeddedrpc.erpc.tests.test_annotations.test.common.structs.fooStruct; 5 | import io.github.embeddedrpc.erpc.tests.test_annotations.test.server.AbstractAnnotateTestService; 6 | 7 | 8 | public class TestAnnotationsService extends AbstractAnnotateTestService { 9 | @Override 10 | public int add(int a, int b) { 11 | return a + b; 12 | } 13 | 14 | @Override 15 | public void testIfFooStructExist(fooStruct a) { 16 | } 17 | 18 | 19 | @Override 20 | public void testIfMyEnumExist(myEnum a) { 21 | 22 | } 23 | 24 | @Override 25 | public int testIfMyIntAndConstExist(int a) { 26 | return a; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /erpc_java/src/main/java/io/github/embeddedrpc/erpc/codec/CodecFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | package io.github.embeddedrpc.erpc.codec; 8 | 9 | /** 10 | * Abstract class for Code factory. Allow to create specific codec. 11 | */ 12 | public abstract class CodecFactory { 13 | /** 14 | * Create new empty Codec. 15 | * 16 | * @return Empty Codec 17 | */ 18 | public Codec create() { 19 | return createCodec(); 20 | } 21 | 22 | /** 23 | * Create new Codec from initial bytes. 24 | * 25 | * @param array Initial bytes for Codec 26 | * @return New Codec 27 | */ 28 | public Codec create(byte[] array) { 29 | return createCodec(array); 30 | } 31 | 32 | protected abstract Codec createCodec(); 33 | 34 | protected abstract Codec createCodec(byte[] array); 35 | } 36 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_callbacks/common.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | set(ERPC_NAME_APP test_core0) 8 | 9 | # Define required IDL files 10 | set(TEST_ERPC_FILES 11 | ${TEST_ERPC_OUT_DIR}/${ERPC_NAME_APP}_interface.cpp 12 | ${TEST_ERPC_OUT_DIR}/${ERPC_NAME_APP}_${APP_TYPE}.cpp 13 | ${TEST_ERPC_OUT_DIR}/c_${ERPC_NAME_APP}_${APP_TYPE}.cpp 14 | 15 | ${TEST_ERPC_OUT_DIR}/${ERPC_NAME}_core1_interface.cpp 16 | 17 | ${TEST_ERPC_OUT_DIR}/${ERPC_NAME}_unit_test_common_interface.cpp 18 | ${TEST_ERPC_OUT_DIR}/${ERPC_NAME}_unit_test_common_${APP_TYPE}.cpp 19 | ${TEST_ERPC_OUT_DIR}/c_${ERPC_NAME}_unit_test_common_${APP_TYPE}.cpp 20 | ) 21 | 22 | set(TEST_SOURCES 23 | ${TEST_ERPC_FILES} 24 | 25 | ${TEST_SOURCE_DIR}/${TEST_NAME}_${APP_TYPE}_impl.cpp 26 | ${TEST_COMMON_DIR}/unit_test_${TRANSPORT}_${APP_TYPE}.cpp 27 | ) 28 | -------------------------------------------------------------------------------- /erpc_java/src/main/java/io/github/embeddedrpc/erpc/transport/TransportError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | package io.github.embeddedrpc.erpc.transport; 8 | 9 | /** 10 | * Transport runtime exception. 11 | */ 12 | public class TransportError extends RuntimeException { 13 | /** 14 | * Transport error. 15 | */ 16 | public TransportError() { 17 | super(); 18 | } 19 | 20 | /** 21 | * Transport error. 22 | * 23 | * @param message error message 24 | */ 25 | public TransportError(String message) { 26 | super(message); 27 | } 28 | 29 | /** 30 | * Transport error. 31 | * 32 | * @param message error message 33 | * @param cause error chain 34 | */ 35 | public TransportError(String message, Throwable cause) { 36 | super(message, cause); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /.github/workflows/clang-format.yml: -------------------------------------------------------------------------------- 1 | name: clang-format lint 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - uses: actions/checkout@v4 11 | - uses: DoozyX/clang-format-lint-action@v0.16.2 12 | with: 13 | source: '.' 14 | exclude: './examples/zephyr/matrix_multiply_mbox/remote/src/service 15 | ./examples/zephyr/matrix_multiply_mbox/src/service 16 | ./examples/zephyr/matrix_multiply_rpmsglite/remote/src/service 17 | ./examples/zephyr/matrix_multiply_rpmsglite/src/service 18 | ./examples/zephyr/matrix_multiply_tcp/src/service 19 | ./examples/zephyr/matrix_multiply_uart/src/service 20 | ./examples/MCUXPRESSO_SDK/erpc_matrix_multiply/service 21 | ./examples/MCUXPRESSO_SDK/erpc_two_way_rpc/service' 22 | clangFormatVersion: 16 23 | -------------------------------------------------------------------------------- /examples/MCUXPRESSO_SDK/erpc_two_way_rpc/service/erpc_two_way_rpc_Core0Interface_common.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018,2023 NXP 3 | * All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | */ 7 | 8 | /* 9 | * Generated by erpcgen 1.14.0 on Wed May 28 10:34:55 2025. 10 | * 11 | * AUTOGENERATED - DO NOT EDIT 12 | */ 13 | 14 | 15 | #if !defined(_erpc_two_way_rpc_Core0Interface_common_hpp_) 16 | #define _erpc_two_way_rpc_Core0Interface_common_hpp_ 17 | 18 | 19 | #include 20 | #include 21 | 22 | #include "erpc_version.h" 23 | 24 | #if 11400 != ERPC_VERSION_NUMBER 25 | #error "The generated shim code version is different to the rest of eRPC code." 26 | #endif 27 | 28 | 29 | #if !defined(ERPC_TYPE_DEFINITIONS_ERPC_TWO_WAY_RPC) 30 | #define ERPC_TYPE_DEFINITIONS_ERPC_TWO_WAY_RPC 31 | 32 | #endif // ERPC_TYPE_DEFINITIONS_ERPC_TWO_WAY_RPC 33 | 34 | 35 | #endif // _erpc_two_way_rpc_Core0Interface_common_hpp_ 36 | -------------------------------------------------------------------------------- /examples/MCUXPRESSO_SDK/erpc_two_way_rpc/service/erpc_two_way_rpc_Core1Interface_common.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018,2023 NXP 3 | * All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | */ 7 | 8 | /* 9 | * Generated by erpcgen 1.14.0 on Wed May 28 10:34:55 2025. 10 | * 11 | * AUTOGENERATED - DO NOT EDIT 12 | */ 13 | 14 | 15 | #if !defined(_erpc_two_way_rpc_Core1Interface_common_hpp_) 16 | #define _erpc_two_way_rpc_Core1Interface_common_hpp_ 17 | 18 | 19 | #include 20 | #include 21 | 22 | #include "erpc_version.h" 23 | 24 | #if 11400 != ERPC_VERSION_NUMBER 25 | #error "The generated shim code version is different to the rest of eRPC code." 26 | #endif 27 | 28 | 29 | #if !defined(ERPC_TYPE_DEFINITIONS_ERPC_TWO_WAY_RPC) 30 | #define ERPC_TYPE_DEFINITIONS_ERPC_TWO_WAY_RPC 31 | 32 | #endif // ERPC_TYPE_DEFINITIONS_ERPC_TWO_WAY_RPC 33 | 34 | 35 | #endif // _erpc_two_way_rpc_Core1Interface_common_hpp_ 36 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_uart/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2023 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) 10 | 11 | project(erpc_matrix_multiply_example C CXX) 12 | 13 | target_sources(app PRIVATE 14 | ${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp 15 | ${CMAKE_CURRENT_SOURCE_DIR}/src/erpc_error_handler.cpp 16 | ${CMAKE_CURRENT_SOURCE_DIR}/src/service/c_erpc_matrix_multiply_server.cpp 17 | ${CMAKE_CURRENT_SOURCE_DIR}/src/service/erpc_matrix_multiply_interface.cpp 18 | ${CMAKE_CURRENT_SOURCE_DIR}/src/service/erpc_matrix_multiply_server.cpp 19 | ) 20 | 21 | target_include_directories(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) 22 | target_include_directories(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/service) 23 | 24 | target_include_directories(erpc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) 25 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_tcp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2023-2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | cmake_minimum_required(VERSION 3.20.0) 8 | 9 | find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) 10 | 11 | project(erpc_matrix_multiply_example C CXX) 12 | 13 | target_sources(app PRIVATE 14 | ${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp 15 | ${CMAKE_CURRENT_SOURCE_DIR}/src/erpc_error_handler.cpp 16 | ${CMAKE_CURRENT_SOURCE_DIR}/src/service/c_erpc_matrix_multiply_server.cpp 17 | ${CMAKE_CURRENT_SOURCE_DIR}/src/service/erpc_matrix_multiply_interface.cpp 18 | ${CMAKE_CURRENT_SOURCE_DIR}/src/service/erpc_matrix_multiply_server.cpp 19 | ) 20 | 21 | target_include_directories(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) 22 | target_include_directories(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/service) 23 | 24 | target_include_directories(erpc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) 25 | -------------------------------------------------------------------------------- /utilities/styles/VSC/language-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | // symbol used for single line comment. Remove this entry if your language does not support line comments 4 | "lineComment": "//", 5 | // symbols used for start and end a block comment. Remove this entry if your language does not support block comments 6 | "blockComment": [ "/*", "*/" ] 7 | }, 8 | // symbols used as brackets 9 | "brackets": [ 10 | ["{", "}"], 11 | ["[", "]"], 12 | ["(", ")"] 13 | ], 14 | // symbols that are auto closed when typing 15 | "autoClosingPairs": [ 16 | ["{", "}"], 17 | ["[", "]"], 18 | ["(", ")"], 19 | ["\"", "\""], 20 | ["'", "'"] 21 | ], 22 | // symbols that can be used to surround a selection 23 | "surroundingPairs": [ 24 | ["{", "}"], 25 | ["[", "]"], 26 | ["(", ")"], 27 | ["\"", "\""], 28 | ["'", "'"] 29 | ] 30 | } -------------------------------------------------------------------------------- /erpcgen/VisualStudio_v14/erpcgen.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Express 2012 for Windows Desktop 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "erpcgen", "erpcgen.vcxproj", "{B314F839-7BC9-471E-AA64-78FC946473F6}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {B314F839-7BC9-471E-AA64-78FC946473F6}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {B314F839-7BC9-471E-AA64-78FC946473F6}.Debug|Win32.Build.0 = Debug|Win32 14 | {B314F839-7BC9-471E-AA64-78FC946473F6}.Release|Win32.ActiveCfg = Release|Win32 15 | {B314F839-7BC9-471E-AA64-78FC946473F6}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /erpcgen/src/templates/cpp_client_header.template: -------------------------------------------------------------------------------- 1 | {% if mlComment != "" %} 2 | {$mlComment} 3 | 4 | {% endif %} 5 | {$commonHeader()} 6 | 7 | #if !defined({$clientCppGuardMacro}) 8 | #define {$clientCppGuardMacro} 9 | 10 | #include "{$interfaceCppHeaderName}" 11 | 12 | #include "erpc_client_manager.h" 13 | {$fillNamespaceBegin()>} 14 | 15 | {% for iface in group.interfaces %} 16 | class {$iface.clientClassName}: public {$iface.interfaceClassName} 17 | { 18 | public: 19 | {$iface.clientClassName}(erpc::ClientManager *manager); 20 | 21 | virtual ~{$iface.clientClassName}(); 22 | {% for fn in iface.functions if fn.isNonExternalFunction == true %} 23 | 24 | {% if fn.mlComment %} 25 | {$fn.mlComment} 26 | {% endif %} 27 | virtual {$fn.prototypeInterface}; 28 | {% endfor -- fn %} 29 | 30 | protected: 31 | erpc::ClientManager *m_clientManager; 32 | }; 33 | 34 | {% endfor -- iface %} 35 | {$fillNamespaceEnd()} 36 | #endif // {$clientCppGuardMacro} 37 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "[FEATURE]" 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Is your feature request related to a problem? Please describe 11 | 14 | 15 | ## Describe the solution you'd like 16 | 19 | 20 | ## Describe alternatives you've considered 21 | 24 | 25 | ## Steps you didn't forgot to do 26 | 27 | - [ ] I checked if there is no related issue opened/closed. 28 | - [ ] I checked that there doesn't exist opened PR which is solving this issue. 29 | 30 | ## Additional context 31 | 34 | -------------------------------------------------------------------------------- /erpc_python/erpc/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright 2016-2025 NXP 4 | # 5 | # SPDX-License-Identifier: BSD-3-Clause 6 | 7 | import os 8 | from typing import Any 9 | # Yocto and python27 combination 10 | if "IS_YOCTO" in os.environ: 11 | from . import erpc_version 12 | else: 13 | from . import arbitrator 14 | from . import basic_codec 15 | from . import codec 16 | from . import client 17 | from . import crc16 18 | from . import server 19 | from . import simple_server 20 | from . import transport 21 | 22 | class Reference(object): 23 | """ Simple container class used for pass by reference. 24 | """ 25 | 26 | def __init__(self, value: Any = None): 27 | # Read/write attribute holding the referent. 28 | self.value = value 29 | 30 | def __str__(self): 31 | return "<%s@%x value=%s>" % (self.__class__.__name__, id(self), repr(self.value)) 32 | 33 | def __repr__(self): 34 | return self.__str__() 35 | -------------------------------------------------------------------------------- /test/test_arbitrator/test_arbitrator.erpc: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright (c) 2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | @crc 10 | @output_dir("erpc_outputs/") 11 | @namespace("") 12 | program test; 13 | 14 | @group("firstInterface") 15 | interface FirstInterface 16 | { 17 | whenReady() -> void 18 | oneway firstSendInt(int32 a) 19 | firstReceiveInt() -> int32 20 | stopSecondSide() -> void 21 | getResultFromSecondSide() -> int32 22 | oneway testCasesAreDone() 23 | oneway quitFirstInterfaceServer() 24 | nestedCallTest() -> int32 25 | @nested 26 | callSecondSide() -> int32 27 | } 28 | 29 | @group("secondInterface") 30 | interface SecondInterface 31 | { 32 | oneway secondSendInt(int32 a) 33 | secondReceiveInt() -> int32 34 | oneway quitSecondInterfaceServer() 35 | oneway enableFirstSide() 36 | @nested 37 | callFirstSide() -> int32 38 | } 39 | -------------------------------------------------------------------------------- /examples/hello_world/py/main_client.py: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | # 4 | # Copyright 2023 NXP 5 | # 6 | # SPDX-License-Identifier: BSD-3-Clause 7 | # 8 | 9 | from erpc.basic_codec import BasicCodec 10 | from erpc.client import ClientManager 11 | from erpc.transport import TCPTransport 12 | 13 | import config 14 | from shim import hello_world 15 | 16 | 17 | def main(): 18 | # load configuration macros from C header file 19 | cfg = config.lead_config("../config.h") 20 | 21 | # init eRPC client infrastructure 22 | transport = TCPTransport(cfg["ERPC_HOSTNAME"], int(cfg["ERPC_PORT"]), False) 23 | client_manager = ClientManager(transport, BasicCodec) 24 | 25 | # init eRPC client 26 | client = hello_world.client.TextServiceClient(client_manager) 27 | 28 | # do eRPC call 29 | if client.printText("Hello world!"): 30 | print("Message received by server.") 31 | 32 | # Stop server 33 | client.stopServer() 34 | 35 | 36 | if __name__ == "__main__": 37 | main() 38 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_tcp/src/service/erpc_matrix_multiply.erpc: -------------------------------------------------------------------------------- 1 | //Copyright below will be added into all generated files. 2 | /*! 3 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 4 | * Copyright 2016 NXP 5 | * All rights reserved. 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | program erpc_matrix_multiply 11 | 12 | /*! This const defines the matrix size. The value has to be the same as the 13 | Matrix array dimension. Do not forget to re-generate the erpc code once the 14 | matrix size is changed in the erpc file */ 15 | const int32 matrix_size = 5; 16 | 17 | /*! This is the matrix array type. The dimension has to be the same as the 18 | matrix size const. Do not forget to re-generate the erpc code once the 19 | matrix size is changed in the erpc file */ 20 | type Matrix = int32[matrix_size][matrix_size]; 21 | 22 | interface MatrixMultiplyService { 23 | erpcMatrixMultiply(in Matrix matrix1, in Matrix matrix2, out Matrix result_matrix) -> void 24 | } 25 | -------------------------------------------------------------------------------- /test/java_impl_tests/src/test/java/io/github/embeddedrpc/erpc/tests/TestingClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 NXP 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | package io.github.embeddedrpc.erpc.tests; 8 | 9 | import io.github.embeddedrpc.erpc.client.ClientManager; 10 | import io.github.embeddedrpc.erpc.codec.BasicCodecFactory; 11 | import io.github.embeddedrpc.erpc.codec.Codec; 12 | import io.github.embeddedrpc.erpc.tests.Connection; 13 | import io.github.embeddedrpc.erpc.transport.SerialTransport; 14 | import io.github.embeddedrpc.erpc.transport.TCPTransport; 15 | import io.github.embeddedrpc.erpc.transport.Transport; 16 | 17 | import java.io.IOException; 18 | 19 | public abstract class TestingClient { 20 | protected final ClientManager clientManager; 21 | 22 | public TestingClient() { 23 | clientManager = new ClientManager( 24 | Connection.getConnectionFromSystemProperties(), 25 | new BasicCodecFactory() 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[BUG] " 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Describe the bug 11 | 14 | 15 | ## To Reproduce 16 | 19 | 20 | ## Expected behavior 21 | 24 | 25 | ## Screenshots 26 | 29 | 30 | ## Desktop (please complete the following information) 31 | 32 | - OS: 33 | - eRPC Version: 34 | 35 | ## Steps you didn't forgot to do 36 | 37 | - [ ] I checked if there is no related issue opened/closed. 38 | - [ ] I checked that there doesn't exist opened PR which is solving this issue. 39 | 40 | ## Additional context 41 | 44 | -------------------------------------------------------------------------------- /examples/MCUXPRESSO_SDK/erpc_matrix_multiply/service/erpc_matrix_multiply.erpc: -------------------------------------------------------------------------------- 1 | //Copyright below will be added into all generated files. 2 | /*! 3 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 4 | * Copyright 2016 NXP 5 | * All rights reserved. 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | program erpc_matrix_multiply 11 | 12 | /*! This const defines the matrix size. The value has to be the same as the 13 | Matrix array dimension. Do not forget to re-generate the erpc code once the 14 | matrix size is changed in the erpc file */ 15 | const int32 matrix_size = 5; 16 | 17 | /*! This is the matrix array type. The dimension has to be the same as the 18 | matrix size const. Do not forget to re-generate the erpc code once the 19 | matrix size is changed in the erpc file */ 20 | type Matrix = int32[matrix_size][matrix_size]; 21 | 22 | interface MatrixMultiplyService { 23 | erpcMatrixMultiply(in Matrix matrix1, in Matrix matrix2, out Matrix result_matrix) -> void 24 | } 25 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/src/service/erpc_matrix_multiply.erpc: -------------------------------------------------------------------------------- 1 | //Copyright below will be added into all generated files. 2 | /*! 3 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 4 | * Copyright 2016 NXP 5 | * All rights reserved. 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | program erpc_matrix_multiply 11 | 12 | /*! This const defines the matrix size. The value has to be the same as the 13 | Matrix array dimension. Do not forget to re-generate the erpc code once the 14 | matrix size is changed in the erpc file */ 15 | const int32 matrix_size = 5; 16 | 17 | /*! This is the matrix array type. The dimension has to be the same as the 18 | matrix size const. Do not forget to re-generate the erpc code once the 19 | matrix size is changed in the erpc file */ 20 | type Matrix = int32[matrix_size][matrix_size]; 21 | 22 | interface MatrixMultiplyService { 23 | erpcMatrixMultiply(in Matrix matrix1, in Matrix matrix2, out Matrix result_matrix) -> void 24 | } 25 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_uart/src/service/erpc_matrix_multiply.erpc: -------------------------------------------------------------------------------- 1 | //Copyright below will be added into all generated files. 2 | /*! 3 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 4 | * Copyright 2016 NXP 5 | * All rights reserved. 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | program erpc_matrix_multiply 11 | 12 | /*! This const defines the matrix size. The value has to be the same as the 13 | Matrix array dimension. Do not forget to re-generate the erpc code once the 14 | matrix size is changed in the erpc file */ 15 | const int32 matrix_size = 5; 16 | 17 | /*! This is the matrix array type. The dimension has to be the same as the 18 | matrix size const. Do not forget to re-generate the erpc code once the 19 | matrix size is changed in the erpc file */ 20 | type Matrix = int32[matrix_size][matrix_size]; 21 | 22 | interface MatrixMultiplyService { 23 | erpcMatrixMultiply(in Matrix matrix1, in Matrix matrix2, out Matrix result_matrix) -> void 24 | } 25 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/remote/src/service/erpc_matrix_multiply.erpc: -------------------------------------------------------------------------------- 1 | //Copyright below will be added into all generated files. 2 | /*! 3 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 4 | * Copyright 2016 NXP 5 | * All rights reserved. 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | program erpc_matrix_multiply 11 | 12 | /*! This const defines the matrix size. The value has to be the same as the 13 | Matrix array dimension. Do not forget to re-generate the erpc code once the 14 | matrix size is changed in the erpc file */ 15 | const int32 matrix_size = 5; 16 | 17 | /*! This is the matrix array type. The dimension has to be the same as the 18 | matrix size const. Do not forget to re-generate the erpc code once the 19 | matrix size is changed in the erpc file */ 20 | type Matrix = int32[matrix_size][matrix_size]; 21 | 22 | interface MatrixMultiplyService { 23 | erpcMatrixMultiply(in Matrix matrix1, in Matrix matrix2, out Matrix result_matrix) -> void 24 | } 25 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/src/service/erpc_matrix_multiply.erpc: -------------------------------------------------------------------------------- 1 | //Copyright below will be added into all generated files. 2 | /*! 3 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 4 | * Copyright 2016 NXP 5 | * All rights reserved. 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | program erpc_matrix_multiply 11 | 12 | /*! This const defines the matrix size. The value has to be the same as the 13 | Matrix array dimension. Do not forget to re-generate the erpc code once the 14 | matrix size is changed in the erpc file */ 15 | const int32 matrix_size = 5; 16 | 17 | /*! This is the matrix array type. The dimension has to be the same as the 18 | matrix size const. Do not forget to re-generate the erpc code once the 19 | matrix size is changed in the erpc file */ 20 | type Matrix = int32[matrix_size][matrix_size]; 21 | 22 | interface MatrixMultiplyService { 23 | erpcMatrixMultiply(in Matrix matrix1, in Matrix matrix2, out Matrix result_matrix) -> void 24 | } 25 | -------------------------------------------------------------------------------- /test/test_annotations/external.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | #ifndef _EMBEDDED_RPC__EXTERNAL_H_ 11 | #define _EMBEDDED_RPC__EXTERNAL_H_ 12 | 13 | //////////////////////////////////////////////////////////////////////////////// 14 | // Definitions 15 | //////////////////////////////////////////////////////////////////////////////// 16 | 17 | #include 18 | 19 | // Enumerators data types declarations 20 | typedef enum myEnum 21 | { 22 | one = 0, 23 | two = 1, 24 | three = 2 25 | } myEnum; 26 | 27 | // Aliases data types declarations 28 | typedef int32_t myInt; 29 | 30 | typedef struct fooStruct fooStruct; 31 | 32 | // Structures data types declarations 33 | struct fooStruct 34 | { 35 | int32_t x; 36 | float y; 37 | }; 38 | 39 | // Constant variable declarations 40 | const int32_t i = 4; 41 | 42 | #endif // _EMBEDDED_RPC__EXTERNAL_H_ 43 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_rpmsglite/remote/src/service/erpc_matrix_multiply.erpc: -------------------------------------------------------------------------------- 1 | //Copyright below will be added into all generated files. 2 | /*! 3 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 4 | * Copyright 2016 NXP 5 | * All rights reserved. 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | program erpc_matrix_multiply 11 | 12 | /*! This const defines the matrix size. The value has to be the same as the 13 | Matrix array dimension. Do not forget to re-generate the erpc code once the 14 | matrix size is changed in the erpc file */ 15 | const int32 matrix_size = 5; 16 | 17 | /*! This is the matrix array type. The dimension has to be the same as the 18 | matrix size const. Do not forget to re-generate the erpc code once the 19 | matrix size is changed in the erpc file */ 20 | type Matrix = int32[matrix_size][matrix_size]; 21 | 22 | interface MatrixMultiplyService { 23 | erpcMatrixMultiply(in Matrix matrix1, in Matrix matrix2, out Matrix result_matrix) -> void 24 | } 25 | -------------------------------------------------------------------------------- /examples/hello_world/java/src/main/java/org/example/Client.java: -------------------------------------------------------------------------------- 1 | package org.example; 2 | 3 | import io.github.embeddedrpc.erpc.client.ClientManager; 4 | import io.github.embeddedrpc.erpc.codec.BasicCodecFactory; 5 | import io.github.embeddedrpc.erpc.transport.TCPTransport; 6 | import io.github.embeddedrpc.erpc.transport.Transport; 7 | import org.example.hello_world.client.TextServiceClient; 8 | 9 | import java.io.IOException; 10 | 11 | public class Client { 12 | public void run() throws IOException { 13 | Config cfg = new Config("../config.h"); 14 | 15 | Transport transport = new TCPTransport(cfg.getString("ERPC_HOSTNAME"), cfg.getInt("ERPC_PORT")); 16 | ClientManager clientManager = new ClientManager(transport, new BasicCodecFactory()); 17 | TextServiceClient client = new TextServiceClient(clientManager); 18 | 19 | if (client.printText("Hello world!")) { 20 | System.out.println("Server received message."); 21 | } 22 | 23 | client.stopServer(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/config/rpmsg_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Mentor Graphics Corporation 3 | * All rights reserved. 4 | * Copyright (c) 2015 Xilinx, Inc. All rights reserved. 5 | * Copyright 2016 Freescale Semiconductor, Inc. All rights reserved. 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | #ifndef RPMSG_CONFIG_H_ 11 | #define RPMSG_CONFIG_H_ 12 | 13 | #include "erpc_config_internal.h" 14 | 15 | /* RPMsg config values */ 16 | /* START { */ 17 | #define RL_MS_PER_INTERVAL (1) 18 | 19 | #define RL_BUFFER_PAYLOAD_SIZE (ERPC_DEFAULT_BUFFER_SIZE) 20 | 21 | #define RL_BUFFER_COUNT (ERPC_DEFAULT_BUFFERS_COUNT) 22 | 23 | #define RL_API_HAS_ZEROCOPY (1) 24 | 25 | #define RL_USE_STATIC_API (1) 26 | 27 | #define RL_USE_MCMGR_IPC_ISR_HANDLER (1) 28 | 29 | #define RL_ASSERT(x) \ 30 | do \ 31 | { \ 32 | if (!(x)) \ 33 | while (1) \ 34 | ; \ 35 | } while (0); 36 | /* } END */ 37 | 38 | #endif /* RPMSG_CONFIG_H_ */ 39 | -------------------------------------------------------------------------------- /erpc_python/erpc/crc16.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2016 Freescale Semiconductor, Inc. 4 | # Copyright 2016-2025 NXP 5 | # 6 | # SPDX-License-Identifier: BSD-3-Clause 7 | 8 | from typing import Union 9 | 10 | class Crc16: 11 | POLY = 0x1021 12 | 13 | def __init__(self, crcStart: int=0xEF4A): 14 | self._crc_start = crcStart 15 | self._table = [self.compute_table(i) for i in range(256)] 16 | 17 | def compute_table(self, i: int): 18 | crc = 0 19 | i <<= 8 20 | for _ in range(8): 21 | temp = crc ^ i 22 | crc <<= 1 23 | if temp & 0x8000: 24 | crc ^= self.POLY 25 | i <<= 1 26 | return crc 27 | 28 | def compute_crc16(self, data: Union[str, bytes]) -> int: 29 | if isinstance(data, str): 30 | data = bytes(data.encode()) 31 | crc = self._crc_start 32 | for c in data: 33 | crc = ((crc << 8) ^ self._table[((crc >> 8) ^ c) & 0xff]) & 0xffff 34 | return crc 35 | -------------------------------------------------------------------------------- /test/test_annotations/test_annotations_client_impl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | #include "c_test_client.h" 10 | #include "gtest.h" 11 | #include "unit_test_wrapped.h" 12 | 13 | //////////////////////////////////////////////////////////////////////////////// 14 | // Unit test Implementation code 15 | //////////////////////////////////////////////////////////////////////////////// 16 | 17 | void initInterfaces(erpc_client_t client) 18 | { 19 | initAnnotateTest_client(client); 20 | } 21 | 22 | TEST(test_annotations, AnnotationServiceID) 23 | { 24 | EXPECT_EQ(kAnnotateTest_service_id, 5); 25 | } 26 | 27 | TEST(test_annotations, IncludeAnnotationCheck) 28 | { 29 | EXPECT_EQ(addOne(4), 5); 30 | 31 | includedInt_t testInt = 5; 32 | EXPECT_EQ(testInt, 5); 33 | } 34 | 35 | TEST(test_annotations, testIfMyIntAndConstExist) 36 | { 37 | EXPECT_EQ(i, testIfMyIntAndConstExist(i)); 38 | } 39 | -------------------------------------------------------------------------------- /test/test_binary/test_binary.erpc: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright (c) 2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | //Add data structures and function prototypes here 10 | //using Freescale's eRPC IDL language 11 | @c:include("myAlloc.hpp") 12 | @output_dir("erpc_outputs") 13 | program test; 14 | 15 | import "../common/unit_test_common.erpc" 16 | 17 | interface Binary { 18 | //sendReceiveBinary(binary a) -> binary 19 | oneway sendBinary(binary a) 20 | //receiveBinary() -> binary 21 | test_binary_allDirection(binary a, in binary b, inout binary e) -> void 22 | test_binary_allDirectionLength(binary a @length(p1), in binary b, inout binary d, uint32 p1) -> void 23 | // test_binary_allDirectionLength(binary a @length(p1), in binary b, inout binary c @length(p2), inout binary d, uint32 p1, inout uint32 p2) -> void 24 | //test_binary_allDirection(binary a, in binary b, out binary c, out byref binary d, inout binary e) -> void 25 | } 26 | -------------------------------------------------------------------------------- /test/java_impl_tests/src/test/java/io/github/embeddedrpc/erpc/tests/server/services/TestBinaryService.java: -------------------------------------------------------------------------------- 1 | package io.github.embeddedrpc.erpc.tests.server.services; 2 | 3 | import io.github.embeddedrpc.erpc.auxiliary.Reference; 4 | import io.github.embeddedrpc.erpc.tests.test_binary.erpc_outputs.test.server.AbstractBinaryService; 5 | 6 | public class TestBinaryService extends AbstractBinaryService { 7 | @Override 8 | public void sendBinary(byte[] a) { 9 | System.out.println("sendBinary reached"); 10 | } 11 | 12 | @Override 13 | public void test_binary_allDirection(byte[] a, byte[] b, Reference e) { 14 | System.out.println("test_binary_allDirection reached"); 15 | e.set(new byte[5]); 16 | 17 | for (int i = 0; i < 5; i++) { 18 | e.get()[i] = (byte) (a[i] * b[i]); 19 | } 20 | } 21 | 22 | @Override 23 | public void test_binary_allDirectionLength(byte[] a, byte[] b, Reference d) { 24 | System.out.println("test_binary_allDirectionLength reached"); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/cmake/rpmsg_lite.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | # Selects the secondary board based on the board set during build. 8 | 9 | message(STATUS "BOARD: ${BOARD}") 10 | 11 | if(BOARD STREQUAL "lpcxpresso54114_m4") 12 | set(RPMSG_LITE_REMOTE_BOARD "lpcxpresso54114_m0") 13 | elseif(BOARD STREQUAL "lpcxpresso55s69_cpu0") 14 | set(RPMSG_LITE_REMOTE_BOARD "lpcxpresso55s69_cpu1") 15 | elseif(BOARD STREQUAL "mps2_an521") 16 | set(RPMSG_LITE_REMOTE_BOARD "mps2_an521_remote") 17 | elseif(BOARD STREQUAL "v2m_musca_b1") 18 | set(RPMSG_LITE_REMOTE_BOARD "v2m_musca_b1_ns") 19 | elseif(BOARD STREQUAL "mimxrt1170_evk_cm7") 20 | set(RPMSG_LITE_REMOTE_BOARD "mimxrt1170_evk_cm4") 21 | elseif(BOARD STREQUAL "mimxrt1160_evk_cm7") 22 | set(RPMSG_LITE_REMOTE_BOARD "mimxrt1160_evk_cm4") 23 | elseif(BOARD STREQUAL "mimxrt1170_evkb_cm7") 24 | set(RPMSG_LITE_REMOTE_BOARD "mimxrt1170_evkb_cm4") 25 | else() 26 | message(FATAL "RMPSG-Lite: Unsupported board.") 27 | endif() 28 | 29 | 30 | -------------------------------------------------------------------------------- /erpcgen/src/types/Program.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | #ifndef _EMBEDDED_RPC__PROGRAM_H_ 11 | #define _EMBEDDED_RPC__PROGRAM_H_ 12 | 13 | #include "DataType.hpp" 14 | #include "Symbol.hpp" 15 | 16 | #include 17 | 18 | //////////////////////////////////////////////////////////////////////////////// 19 | // Classes 20 | //////////////////////////////////////////////////////////////////////////////// 21 | 22 | namespace erpcgen { 23 | 24 | /*! 25 | * @brief Program declaration. 26 | * 27 | */ 28 | class Program : public Symbol 29 | { 30 | public: 31 | /*! 32 | * @brief Constructor. 33 | * 34 | * This function set symbol token to given token. 35 | * 36 | * @param[in] tok Given token. 37 | */ 38 | explicit Program(const Token &tok) : Symbol(symbol_type_t::kProgramSymbol, tok) {} 39 | }; 40 | 41 | } // namespace erpcgen 42 | 43 | #endif // _EMBEDDED_RPC__PROGRAM_H_ 44 | -------------------------------------------------------------------------------- /examples/MCUXPRESSO_SDK/erpc_two_way_rpc/service/erpc_two_way_rpc_Core0Interface_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018,2023 NXP 3 | * All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | */ 7 | 8 | /* 9 | * Generated by erpcgen 1.14.0 on Wed May 28 10:34:55 2025. 10 | * 11 | * AUTOGENERATED - DO NOT EDIT 12 | */ 13 | 14 | 15 | #if !defined(_erpc_two_way_rpc_Core0Interface_common_h_) 16 | #define _erpc_two_way_rpc_Core0Interface_common_h_ 17 | 18 | 19 | #if defined(__cplusplus) 20 | extern "C" 21 | { 22 | #endif 23 | #include 24 | #include 25 | #include 26 | 27 | #include "erpc_version.h" 28 | 29 | #if 11400 != ERPC_VERSION_NUMBER 30 | #error "The generated shim code version is different to the rest of eRPC code." 31 | #endif 32 | 33 | 34 | #if !defined(ERPC_TYPE_DEFINITIONS_ERPC_TWO_WAY_RPC) 35 | #define ERPC_TYPE_DEFINITIONS_ERPC_TWO_WAY_RPC 36 | 37 | #endif // ERPC_TYPE_DEFINITIONS_ERPC_TWO_WAY_RPC 38 | 39 | #if defined(__cplusplus) 40 | } 41 | #endif 42 | 43 | #endif // _erpc_two_way_rpc_Core0Interface_common_h_ 44 | -------------------------------------------------------------------------------- /examples/MCUXPRESSO_SDK/erpc_two_way_rpc/service/erpc_two_way_rpc_Core1Interface_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018,2023 NXP 3 | * All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | */ 7 | 8 | /* 9 | * Generated by erpcgen 1.14.0 on Wed May 28 10:34:55 2025. 10 | * 11 | * AUTOGENERATED - DO NOT EDIT 12 | */ 13 | 14 | 15 | #if !defined(_erpc_two_way_rpc_Core1Interface_common_h_) 16 | #define _erpc_two_way_rpc_Core1Interface_common_h_ 17 | 18 | 19 | #if defined(__cplusplus) 20 | extern "C" 21 | { 22 | #endif 23 | #include 24 | #include 25 | #include 26 | 27 | #include "erpc_version.h" 28 | 29 | #if 11400 != ERPC_VERSION_NUMBER 30 | #error "The generated shim code version is different to the rest of eRPC code." 31 | #endif 32 | 33 | 34 | #if !defined(ERPC_TYPE_DEFINITIONS_ERPC_TWO_WAY_RPC) 35 | #define ERPC_TYPE_DEFINITIONS_ERPC_TWO_WAY_RPC 36 | 37 | #endif // ERPC_TYPE_DEFINITIONS_ERPC_TWO_WAY_RPC 38 | 39 | #if defined(__cplusplus) 40 | } 41 | #endif 42 | 43 | #endif // _erpc_two_way_rpc_Core1Interface_common_h_ 44 | -------------------------------------------------------------------------------- /test/test_callbacks/variables.mk: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------- 2 | # Copyright 2017 NXP 3 | # All Rights Reserved. 4 | # 5 | # THIS SOFTWARE IS PROVIDED BY FREESCALE "AS IS" AND ANY EXPRESS OR IMPLIED 6 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 7 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 8 | # SHALL FREESCALE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 9 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 10 | # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 11 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 12 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 13 | # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 14 | # OF SUCH DAMAGE. 15 | #------------------------------------------------------------------------------- 16 | 17 | ERPC_NAME_APP=test_core0 18 | INCLUDES += $(TEST_ROOT)/$(TEST_NAME) 19 | -------------------------------------------------------------------------------- /test/test_shared/Makefile: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------- 2 | # Copyright 2017 NXP 3 | # All rights reserved. 4 | # 5 | # THIS SOFTWARE IS PROVIDED BY FREESCALE "AS IS" AND ANY EXPRESS OR IMPLIED 6 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 7 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 8 | # SHALL FREESCALE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 9 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 10 | # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 11 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 12 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 13 | # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 14 | # OF SUCH DAMAGE. 15 | #------------------------------------------------------------------------------- 16 | 17 | include ../../mk/erpc_common.mk 18 | 19 | include ../mk/unit_test.mk 20 | 21 | -------------------------------------------------------------------------------- /test/test_unions/variables.mk: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------- 2 | # Copyright (C) 2014 Freescale Semiconductor, Inc. 3 | # Copyright 2016 NXP 4 | # All Rights Reserved. 5 | # 6 | # THIS SOFTWARE IS PROVIDED BY FREESCALE "AS IS" AND ANY EXPRESS OR IMPLIED 7 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 8 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 9 | # SHALL FREESCALE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 10 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 11 | # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 12 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 13 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 14 | # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 15 | # OF SUCH DAMAGE. 16 | #------------------------------------------------------------------------------- 17 | 18 | ERPC_NAME=test 19 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/common.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | if (APP_TYPE STREQUAL "client") 8 | set(APP_TYPE_SECOND "server") 9 | elseif(APP_TYPE STREQUAL "server") 10 | set(APP_TYPE_SECOND "client") 11 | else() 12 | message(FATAL "Unmown APP_TYPE. Set it to the 'client' or 'server'.") 13 | endif() 14 | 15 | 16 | set(TEST_ERPC_FILES 17 | ${TEST_ERPC_OUT_DIR}/${ERPC_NAME}_firstInterface_interface.cpp 18 | ${TEST_ERPC_OUT_DIR}/${ERPC_NAME}_firstInterface_${APP_TYPE}.cpp 19 | ${TEST_ERPC_OUT_DIR}/c_${ERPC_NAME}_firstInterface_${APP_TYPE}.cpp 20 | 21 | ${TEST_ERPC_OUT_DIR}/${ERPC_NAME}_secondInterface_interface.cpp 22 | ${TEST_ERPC_OUT_DIR}/${ERPC_NAME}_secondInterface_${APP_TYPE_SECOND}.cpp 23 | ${TEST_ERPC_OUT_DIR}/c_${ERPC_NAME}_secondInterface_${APP_TYPE_SECOND}.cpp 24 | ) 25 | 26 | set(TEST_SOURCES 27 | ${TEST_ERPC_FILES} 28 | 29 | ${TEST_SOURCE_DIR}/${TEST_NAME}_${APP_TYPE}_impl.cpp 30 | ${TEST_COMMON_DIR}/unit_test_${TRANSPORT}_arbitrator_${APP_TYPE}.cpp 31 | ) -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/sysbuild.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2023-2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | if("${SB_CONFIG_REMOTE_BOARD}" STREQUAL "") 8 | message(FATAL_ERROR 9 | "Target ${BOARD} not supported for this sample. " 10 | "There is no remote board selected in Kconfig.sysbuild") 11 | endif() 12 | 13 | set(REMOTE_APP remote) 14 | 15 | ExternalZephyrProject_Add( 16 | APPLICATION ${REMOTE_APP} 17 | SOURCE_DIR ${APP_DIR}/${REMOTE_APP} 18 | BOARD ${SB_CONFIG_REMOTE_BOARD} 19 | ) 20 | 21 | native_simulator_set_child_images(${DEFAULT_IMAGE} ${REMOTE_APP}) 22 | 23 | native_simulator_set_final_executable(${DEFAULT_IMAGE}) 24 | 25 | if ("${BOARD}" STREQUAL "mimxrt1170_evkb_cm7" OR 26 | "${BOARD}" STREQUAL "mimxrt1170_evk_cm7" OR 27 | "${BOARD}" STREQUAL "mimxrt1160_evk_cm7" 28 | ) 29 | # For these NXP boards the main core application is dependent on 30 | # 'zephyr_image_info.h' generated by remote application. 31 | 32 | # Let's build the remote application first 33 | add_dependencies(${DEFAULT_IMAGE} ${REMOTE_APP}) 34 | endif() -------------------------------------------------------------------------------- /test/java_impl_tests/src/main/java/io/github/embeddedrpc/erpc/tests/common/myEnum.java: -------------------------------------------------------------------------------- 1 | package io.github.embeddedrpc.erpc.tests.common; 2 | 3 | import io.github.embeddedrpc.erpc.codec.Codec; 4 | 5 | /** 6 | * Custom enum implementation for testing. 7 | */ 8 | public enum myEnum { 9 | one(0), 10 | two(1), 11 | three(2); 12 | 13 | private final Integer value; 14 | 15 | myEnum(Integer value) { 16 | this.value = value; 17 | } 18 | 19 | public int getValue() { 20 | return value; 21 | } 22 | 23 | public static myEnum get(int value) { 24 | if (value == 0) { 25 | return one; 26 | } 27 | 28 | if (value == 1) { 29 | return two; 30 | } 31 | 32 | if (value == 2) { 33 | return three; 34 | } 35 | 36 | return null; 37 | } 38 | 39 | public static myEnum read(Codec codec) { 40 | return get(codec.readInt32()); 41 | } 42 | 43 | public void write(Codec codec) { 44 | codec.writeInt32(this.getValue()); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /test/test_callbacks/Makefile: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------- 2 | # Copyright 2017 NXP 3 | # All rights reserved. 4 | # 5 | # THIS SOFTWARE IS PROVIDED BY FREESCALE "AS IS" AND ANY EXPRESS OR IMPLIED 6 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 7 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 8 | # SHALL FREESCALE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 9 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 10 | # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 11 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 12 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 13 | # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 14 | # OF SUCH DAMAGE. 15 | #------------------------------------------------------------------------------- 16 | 17 | include ../../mk/erpc_common.mk 18 | 19 | include ../mk/unit_test.mk 20 | 21 | -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/cmake/sysbuild.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2024 NXP 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | get_filename_component(CURRENT_DIR_NAME ${APP_DIR} NAME) 8 | set(SERVER ${CURRENT_DIR_NAME}_remote) 9 | set(CLIENT ${CURRENT_DIR_NAME}) 10 | 11 | # Include RPMSG_LITE_REMOTE_BOARD variable base on BOARD 12 | include(${APP_DIR}/../cmake/rpmsg_lite.cmake) 13 | 14 | # Add external project 15 | ExternalZephyrProject_Add( 16 | APPLICATION ${SERVER} 17 | SOURCE_DIR ${APP_DIR}/remote 18 | BOARD ${RPMSG_LITE_REMOTE_BOARD} 19 | ) 20 | 21 | # Add dependencies so that the remote sample will be built first 22 | # This is required because some primary cores need information from the 23 | # remote core's build, such as the output image's LMA 24 | add_dependencies(${CLIENT} ${SERVER}) 25 | sysbuild_add_dependencies(FLASH ${CLIENT} ${SERVER}) 26 | sysbuild_add_dependencies(CONFIGURE ${CLIENT} ${SERVER}) 27 | 28 | if(SB_CONFIG_BOOTLOADER_MCUBOOT) 29 | # Make sure MCUboot is flashed first 30 | sysbuild_add_dependencies(FLASH ${CLIENT} mcuboot) 31 | endif() 32 | -------------------------------------------------------------------------------- /test/test_arrays/variables.mk: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------- 2 | # Copyright (C) 2014 Freescale Semiconductor, Inc. 3 | # Copyright 2016 NXP 4 | # All Rights Reserved. 5 | # 6 | # THIS SOFTWARE IS PROVIDED BY FREESCALE "AS IS" AND ANY EXPRESS OR IMPLIED 7 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 8 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 9 | # SHALL FREESCALE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 10 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 11 | # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 12 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 13 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 14 | # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 15 | # OF SUCH DAMAGE. 16 | #------------------------------------------------------------------------------- 17 | 18 | ERPC_OUT_DIR=$(RPC_OBJS_ROOT) -------------------------------------------------------------------------------- /test/zephyr/rpmsglite/test_arbitrator/config/rpmsg_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Mentor Graphics Corporation 3 | * All rights reserved. 4 | * Copyright (c) 2015 Xilinx, Inc. All rights reserved. 5 | * Copyright 2016 Freescale Semiconductor, Inc. All rights reserved. 6 | * 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | #ifndef RPMSG_CONFIG_H_ 11 | #define RPMSG_CONFIG_H_ 12 | 13 | #include "erpc_config_internal.h" 14 | 15 | /* RPMsg config values */ 16 | /* START { */ 17 | #define RL_MS_PER_INTERVAL (1) 18 | 19 | #define RL_BUFFER_PAYLOAD_SIZE (ERPC_DEFAULT_BUFFER_SIZE) 20 | 21 | #define RL_BUFFER_COUNT (ERPC_DEFAULT_BUFFERS_COUNT) 22 | 23 | #define RL_API_HAS_ZEROCOPY (1) 24 | 25 | #define RL_USE_STATIC_API (0) 26 | 27 | #define RL_USE_MCMGR_IPC_ISR_HANDLER (1) 28 | 29 | // #define SH_MEM_TOTAL_SIZE (22527) 30 | 31 | #define RL_ASSERT(x) \ 32 | do \ 33 | { \ 34 | if (!(x)) \ 35 | while (1) \ 36 | ; \ 37 | } while (0); 38 | /* } END */ 39 | 40 | #endif /* RPMSG_CONFIG_H_ */ 41 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Pull request 2 | 3 | ## Choose Correct 4 | 5 | - [ ] bug 6 | - [ ] feature 7 | 8 | ## Describe the pull request 9 | 12 | 13 | ## To Reproduce 14 | 17 | 18 | ## Expected behavior 19 | 22 | 23 | ## Screenshots 24 | 27 | 28 | ## Desktop (please complete the following information): 29 | 30 | - OS: 31 | - eRPC Version: 32 | 33 | ## Steps you didn't forgot to do 34 | 35 | - [ ] I checked if other PR isn't solving this issue. 36 | - [ ] I read Contribution details and did appropriate actions. 37 | - [ ] PR code is tested. 38 | - [ ] PR code is formatted. 39 | - [ ] Allow edits from maintainers pull request option is set (recommended). 40 | 41 | ## Additional context 42 | 45 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_mbox/src/service/erpc_matrix_multiply_interface.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | /* 10 | * Generated by erpcgen 1.14.0 on Wed May 28 10:34:56 2025. 11 | * 12 | * AUTOGENERATED - DO NOT EDIT 13 | */ 14 | 15 | 16 | #if !defined(_erpc_matrix_multiply_interface_hpp_) 17 | #define _erpc_matrix_multiply_interface_hpp_ 18 | 19 | #include "erpc_matrix_multiply_common.hpp" 20 | 21 | namespace erpcShim 22 | { 23 | 24 | 25 | // Abstract base class for MatrixMultiplyService 26 | class MatrixMultiplyService_interface 27 | { 28 | public: 29 | static const uint8_t m_serviceId = 1; 30 | static const uint8_t m_erpcMatrixMultiplyId = 1; 31 | 32 | virtual ~MatrixMultiplyService_interface(void); 33 | 34 | virtual void erpcMatrixMultiply(Matrix matrix1, Matrix matrix2, Matrix result_matrix) = 0; 35 | private: 36 | }; 37 | } // erpcShim 38 | 39 | 40 | #endif // _erpc_matrix_multiply_interface_hpp_ 41 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_tcp/src/service/erpc_matrix_multiply_interface.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | /* 10 | * Generated by erpcgen 1.14.0 on Wed May 28 10:34:56 2025. 11 | * 12 | * AUTOGENERATED - DO NOT EDIT 13 | */ 14 | 15 | 16 | #if !defined(_erpc_matrix_multiply_interface_hpp_) 17 | #define _erpc_matrix_multiply_interface_hpp_ 18 | 19 | #include "erpc_matrix_multiply_common.hpp" 20 | 21 | namespace erpcShim 22 | { 23 | 24 | 25 | // Abstract base class for MatrixMultiplyService 26 | class MatrixMultiplyService_interface 27 | { 28 | public: 29 | static const uint8_t m_serviceId = 1; 30 | static const uint8_t m_erpcMatrixMultiplyId = 1; 31 | 32 | virtual ~MatrixMultiplyService_interface(void); 33 | 34 | virtual void erpcMatrixMultiply(Matrix matrix1, Matrix matrix2, Matrix result_matrix) = 0; 35 | private: 36 | }; 37 | } // erpcShim 38 | 39 | 40 | #endif // _erpc_matrix_multiply_interface_hpp_ 41 | -------------------------------------------------------------------------------- /examples/zephyr/matrix_multiply_uart/src/service/erpc_matrix_multiply_interface.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. 3 | * Copyright 2016 NXP 4 | * All rights reserved. 5 | * 6 | * SPDX-License-Identifier: BSD-3-Clause 7 | */ 8 | 9 | /* 10 | * Generated by erpcgen 1.14.0 on Wed May 28 10:34:56 2025. 11 | * 12 | * AUTOGENERATED - DO NOT EDIT 13 | */ 14 | 15 | 16 | #if !defined(_erpc_matrix_multiply_interface_hpp_) 17 | #define _erpc_matrix_multiply_interface_hpp_ 18 | 19 | #include "erpc_matrix_multiply_common.hpp" 20 | 21 | namespace erpcShim 22 | { 23 | 24 | 25 | // Abstract base class for MatrixMultiplyService 26 | class MatrixMultiplyService_interface 27 | { 28 | public: 29 | static const uint8_t m_serviceId = 1; 30 | static const uint8_t m_erpcMatrixMultiplyId = 1; 31 | 32 | virtual ~MatrixMultiplyService_interface(void); 33 | 34 | virtual void erpcMatrixMultiply(Matrix matrix1, Matrix matrix2, Matrix result_matrix) = 0; 35 | private: 36 | }; 37 | } // erpcShim 38 | 39 | 40 | #endif // _erpc_matrix_multiply_interface_hpp_ 41 | -------------------------------------------------------------------------------- /test/test_annotations/variables.mk: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------- 2 | # Copyright (C) 2014 Freescale Semiconductor, Inc. 3 | # Copyright 2016 NXP 4 | # All Rights Reserved. 5 | # 6 | # THIS SOFTWARE IS PROVIDED BY FREESCALE "AS IS" AND ANY EXPRESS OR IMPLIED 7 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 8 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 9 | # SHALL FREESCALE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 10 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 11 | # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 12 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 13 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 14 | # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 15 | # OF SUCH DAMAGE. 16 | #------------------------------------------------------------------------------- 17 | 18 | INCLUDES += $(TEST_ROOT)/$(TEST_NAME) 19 | -------------------------------------------------------------------------------- /test/test_struct/variables.mk: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------- 2 | # Copyright (C) 2014-2016 Freescale Semiconductor, Inc. 3 | # Copyright 2016 NXP 4 | # All Rights Reserved. 5 | # 6 | # THIS SOFTWARE IS PROVIDED BY FREESCALE "AS IS" AND ANY EXPRESS OR IMPLIED 7 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 8 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 9 | # SHALL FREESCALE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 10 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 11 | # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 12 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 13 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 14 | # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 15 | # OF SUCH DAMAGE. 16 | #------------------------------------------------------------------------------- 17 | 18 | ERPC_NAME_APP=test_ArithmeticService 19 | --------------------------------------------------------------------------------