Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion to use single main function for all Linux RT targets and conditionalize /dev/nrt open attempt #29

Open
ppisa opened this issue Oct 17, 2021 · 1 comment

Comments

@ppisa
Copy link
Contributor

ppisa commented Oct 17, 2021

/dev/nrt and iopl(3) is not available non-x86 targets and even on x86 ones requires modification
of the system kernel installation by local or laboratory systems administrator.

I suggest to use single Linux linux_main_rt.c for all targets and conditionalize /dev/nrt and iopl(3)
sequence by some define which can be provided in template. Then it would be easy to have one
template without iopl access (i.e. rt.tmf) and another with it (i.e. rt_iopl.tmf).

I prepare pull request, only question is the C processor define name. Some options

  1. CG_WITH_NRT or IOPL
  2. PYSIM_WITH_NRT or IOPL
  3. PYSIM_CG_WITH_NRT or IOPL
  4. WITH_NRT or IOPL
  5. WITH_RAW_IO_ACCESS

I suggest to consider/discuss even some other minor changes.

  • when parameter priority (-p) is set to -1 then do not attempt to switch to FIFO RT policy. It is clear that no real-time or latency guaranties can be provided in such case, but it is great to check RT code build path and generated executable by unprivileged users
  • add support to select value for priority parameter in target selection dialog. One option is "task priority" filed another is to provide there option to specify additional parameters for executable in free form. In the fact both would worth to be provided
  • consider how to specify upload method for the run command, this is for longer discussion but worth to be done to make running of the generated code on RPi, MZ_APO and NuttX targets easy
@robertobucher
Copy link
Owner

Options 1 (CG_WITH_NRT or IOPL) is ok!

For the idea to have the task prority (including -1) in the parameters dialog is good and feasable, We have only to check what happens if it is not defined ("old" diagrams), to see which default values should be defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants