Skip to content

Conversation

@MarekNovakNXP
Copy link
Contributor

  • Adds support for RPMsg sysfs interface
  • Python driver for RPMsg sysfs interface added in a zip file, to be uploaded to pypi or github...
  • RPMsg sysfs kernel module patch added, applicable to version 4.1 of Freescale community Yocto

rpmsg.zip
rpmsg_sysfs_interface.zip

Copy link
Contributor

@flit flit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once the requested changes are made, it's ready to go! Thanks.


import struct
import serial
from rpmsg.sysfs import RpmsgEndpoint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This import will fail if the rpmsg package is not available. Please move it below the rest of the imports and wrap in a try-except statement. You can set a boolean variable to track whether RpmsgEndpoint is available, and use it in RpmsgTransport.

class ConnectionClosed(Exception):
pass

class RpmsgTransport(Transport):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make RpmsgTransport a subclass of FramedTransport. This will allow you to avoid having to do an arbitrary 2048-byte receive. Instead, the FramedTransport will do fixed length receives of the 4-byte frame header followed by the known message length.

@MarekNovakNXP
Copy link
Contributor Author

I have modified this pull request as the RPMsg Python wrapper has changed.
There is no need to specify an arbitrary length now and so there is no need for it being a subclass of FramedTransport. FramedTransport would add some overhead, which is not needed in case of RPMsg.

Added try-except for import of RPMsg.

0001-RPMSG-Adding-Python-transport-layer-for-RPMsg-sysfs-.patch.zip

@hakehuang
Copy link
Contributor

can we possible make it installed by pip install?

@flit
Copy link
Contributor

flit commented Nov 1, 2016

@hakehuang Yes, thanks for reminding me. I forgot to upload to pypi.

@Hadatko
Copy link
Member

Hadatko commented Mar 28, 2017

Please provide patch aligned with latest eRPC code on develop branch.

@Hadatko Hadatko assigned Hadatko and MarekNovakNXP and unassigned Hadatko Mar 28, 2017
@MarekNovakNXP
Copy link
Contributor Author

Closed, replaced by:
[RPMSG] [Python] Adding RPMsg Multiendpoint kernel module support #4

jcdr added a commit to jcdr/erpc that referenced this pull request Oct 9, 2020
…length

This was spotted on a SAML21 controller:
#0  usart_sync_read (io_descr=0x200006dc <USART_0>, buf=0x20000378 <s_msgFactory+8> , length=0) at ../hal/src/hal_usart_sync.c:271
EmbeddedRPC#1  0x000001e0 in io_read (io_descr=0x200006dc <USART_0>, buf=0x20000378 <s_msgFactory+8> , length=0) at ../hal/src/hal_io.c:62
EmbeddedRPC#2  0x0000e3da in erpc::UsartSyncTransport::underlyingReceive (this=0x20000578 <s_transport>, data=0x20000378 <s_msgFactory+8> , size=0) at ../erpc_usart_sync_transport.cpp:29
EmbeddedRPC#3  0x0000dd96 in erpc::FramedTransport::receive (this=0x20000578 <s_transport>, message=0x200026c4) at ../erpc_framed_transport.cpp:63
EmbeddedRPC#4  0x0000d7da in erpc::SimpleServer::runInternalBegin (this=0x20000340 <s_server>, codec=0x200026c0, buff=..., msgType=@0x200026bf: 32, serviceId=@0x200026b8: 536880832, methodId=@0x200026b4: 536871784, sequence=@0x200026b0: 536871784) at ../erpc_simple_server.cpp:64
EmbeddedRPC#5  0x0000d72a in erpc::SimpleServer::runInternal (this=0x20000340 <s_server>) at ../erpc_simple_server.cpp:42
EmbeddedRPC#6  0x0000d99e in erpc::SimpleServer::poll (this=0x20000340 <s_server>) at ../erpc_simple_server.cpp:223
EmbeddedRPC#7  0x0000d44e in erpc_server_poll () at ../erpc_server_setup.cpp:97
EmbeddedRPC#8  0x00006fa4 in main () at ../main.c:72

The UART need to be restarted to recover from a such error, for ex.:
    if (erpc_server_poll()) {
        usart_sync_disable(&USART_0);
        usart_sync_enable(&USART_0);
    }
MichalPrincNXP added a commit that referenced this pull request Feb 1, 2022
- use PYTHON env. variable
MichalPrincNXP added a commit that referenced this pull request Feb 1, 2022
MichalPrincNXP added a commit that referenced this pull request Jan 19, 2024
JanKomarekNXP pushed a commit that referenced this pull request Feb 29, 2024
…sport classes #2

Signed-off-by: Michal Princ (nxa17570) <michal.princ@nxp.com>
JanKomarekNXP added a commit that referenced this pull request Feb 29, 2024
Merge in MCUCORE/mcux-sdk-erpc from feature/RPSDK-1294-erpc-enablement-for-zephyr to release/2.15.0_major_rfp

* commit '8be06c079f8a18c5322a52e509d418056c6fcd3e':
  [RPSDK-1294] Newly added files clang formatting
  [RPSDK-1294] Formal changes
  [RPSDK-1294] Add Zephyr UART transport
  [RPSDK-1294] Update Zephyr threading
  [RPSDK-1294] Update Zephyr port
JanKomarekNXP pushed a commit that referenced this pull request Feb 29, 2024
…plementation #2

Signed-off-by: Michal Princ (nxa17570) <michal.princ@nxp.com>
JanKomarekNXP pushed a commit that referenced this pull request Feb 29, 2024
…gSend implementation #2"

This reverts commit 746b672afa83bf9127d2827e4b763a701b451bdb.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants