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?
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 ...
I've to added in the programm myshm.c the line:
Well, good to know, thanks!
Log in to post a comment.