Shared Memory Communication

Runtime
elsabz
2020-06-22
2020-06-22
  • elsabz

    elsabz - 2020-06-22

    Good morning codesys world, I tried to install the "Shared Memory Communication" example under Raspberry PI 4. There is a problem in the execution of the myshm.c file. The file was regularly compiled with the "gcc myshm.c -o myshm -lrt" linux command. When I run the generated executable, I immediately receive a "Segmentation fault" error (see attached screenshoot). The file is the original downloaded from the codesys-store, how come it doesn't work? Can anyone help me?

    S.G.

     
  • elsabz

    elsabz - 2020-06-22

    SOLUTION FOUND !!! When executing the "./myshm" executable file, "sudo" must be prefixed for permission. Running the command "sudo ./myshm" always works well. I hope it can also be useful to someone else ...

     
    👍
    1

Log in to post a comment.