zephyr icon indicating copy to clipboard operation
zephyr copied to clipboard

Simplify system call stub generation for modules by adding setting to zephyr/module.yml

Open plinnie opened this issue 2 years ago • 1 comments

Describe the solution you'd like The ability to add to the syscall directories for stub generation to a module by declaring a setting in the module.yml, e.g.: zephyr/module.yml

name: my-extra-drivers
build:
  cmake: .
  kconfig: Kconfig
  settings:
    dts_root: .
    syscall_dir: include

Describe alternatives you've considered I've considered adding custom system-calls directly to a fork of Zephyr. However, this requires additional maintenance keeping updated, and does not allow clean separation of in-house extensions of Zephyr and the actual OS source. I've also considered extending the SYSCALL_INCLUDE_DIRS using the module level CMakeLists.txt using the following statements:

[...]
list(APPEND SYSCALL_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include)
set(SYSCALL_INCLUDE_DIRS ${SYSCALL_INCLUDE_DIRS} PARENT_SCOPE)

Though this approach works, it is not as transparent or intuitive as simply adding the path to the module.yml

Additional context At our company we use custom boards for our projects which require some custom hardware interfacing. This some of it requires addition of system calls. We have added a custom pll.h API for external PLLs for example. Our drivers and API are contained in a separate module. However, to make it work we have to add the lines as provided above to the CMakeLists.txt at the module level. It would be more intuitive to be able to simply add the include directory using module configuration.

See discussion on discord: https://discord.com/channels/720317445772017664/720317445772017667/1022095032083288076

plinnie avatar Sep 21 '22 11:09 plinnie

CC @tejlmand

nordicjm avatar Sep 21 '22 11:09 nordicjm

Hi @tejlmand,

This issue, marked as an Enhancement, was opened a while ago and did not get any traction. Please confirm the issue is correctly assigned and re-assign it otherwise.

Please take a moment to review if the issue is still relevant to the project. If it is, please provide feedback and direction on how to move forward. If it is not, has already been addressed, is a duplicate, or is no longer relevant, please close it with a short comment explaining the reason.

@plinnie you are also encouraged to help moving this issue forward by providing additional information and confirming this request/issue is still relevant to you.

Thanks!

zephyrbot avatar Feb 12 '24 18:02 zephyrbot