robertobucher / pysimCoder

Block diagram editor and real time code generator for Python
GNU General Public License v3.0
150 stars 32 forks source link

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

Open ppisa opened 3 years ago

ppisa commented 3 years ago

/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.

robertobucher commented 3 years ago

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.