Creating a Simulink target for Linux with appropriate permissions

2 Ansichten (letzte 30 Tage)
Will Coulter
Will Coulter am 17 Mai 2021
Kommentiert: Will Coulter am 18 Mai 2021
I've been following the guide at https://www.mathworks.com/help/supportpkg/armcortexa/ug/activate-the-application-deployment-feature.html for creating a custom Cortex-A target on Linux. I'm using Beaglebone Black hardware in hopes of making the examples easy to follow.
Unfortunately, the example doesn't appear to work.
If I run using root:root and allow root to login via SSH, then the deployer test fails and /tmp/modelBasicBuild.elf on the target has this content.
Call to sched_setscheduler returned error status (-1).
sched_setscheduler: Operation not permitted
If I run using debian:temppwd, then the tests fail on either hte deployer or scheduler test due to permissions:
You must have root privileges to run the generated code because
generated code requires SCHED_FIFO scheduling class to run correctly.
Try running the executable with the following command: sudo ./<executable name>
As hinted by the documentation and this error, it's likely that the load command needs to run with sudo
The reference target load command may have additional operational dependencies based on the Linux version on your hardware board. For example, some Linux versions require the user have root-level privileges (sudo) to execute generated code. In these cases, you can develop and register your own load command using the reference target load command as a starting point.
Where is documentation on this approach?
  1 Kommentar
Will Coulter
Will Coulter am 18 Mai 2021
It seems that the step that breaks the setup above is setting up the scheduler step. Once the scheduler is set up, then other tests break.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by