Skip to content

Zephyr SYSCALL_INCLUDE_DIRS doesn't take effect #2

@andung07

Description

@andung07

What kind of issue is this?

  • Question.
    This issue tracker is not the place for questions. If you want to ask how to do something,
    or to understand why something isn't working the way you expect it to,
    use Community Forums or Premium Support

  • PlatformIO IDE.
    All issues related to PlatformIO IDE should be reported to appropriate repository:
    PlatformIO IDE for Atom or
    PlatformIO IDE for VSCode

  • Development Platform or Board.
    All issues (building, uploading, adding new boards, etc.) related to PlatformIO development platforms
    should be reported to appropriate repository related to your hardware
    https://github.com/topics/platformio-platform

  • Feature Request.
    Start by telling us what problem you’re trying to solve. Often a solution
    already exists! Don’t send pull requests to implement new features without first getting our
    support. Sometimes we leave features out on purpose to keep the project small.

  • PlatformIO Core.
    If you’ve found a bug, please provide an information below.

You can erase any parts of this template not applicable to your Issue.


Configuration

Operating system: Mac OS 10.15.5

PlatformIO Version (platformio --version): 4.3.4

Description of problem

I am developing a custom out-of-tree driver with __syscall definition. As described here, I need to append the path containing my header definition to SYSCALL_INCLUDE_DIRS list CMake variables. But the scripts/gen_syscalls.py doesn't aware this additional path.

Steps to Reproduce

  1. Create the header file containing some __syscall functions. Let's say uwb.h
__syscall void uwb_configure(struct device *dev, uwb_config_t *config);

static inline void z_impl_uwb_configure(struct device *dev, uwb_config_t *config)
{
    const struct uwb_driver_api *api = (const struct uwb_driver_api *)dev->driver_api;
    return api->configure(dev, config);
}

#include <syscalls/uwb.h>
  1. Add the path in step 1, to zephyr/CMakeLists.txt
list(APPEND SYSCALL_INCLUDE_DIRS
    ${CMAKE_CURRENT_SOURCE_DIR}/include/drivers
)

include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)

zephyr_include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/drivers
  1. Refer the uwb.h in one of user source files in src
  2. Run the build

Actual Results

In file included from src/main.c:31:
zephyr/include/drivers/uwb.h:89:10: fatal error: syscalls/uwb.h: No such file or directory
 #include <syscalls/uwb.h>

Expected Results

Build successfully

Additional info

The additional SYSCALL_INCLUDE_DIRS doesn't take effect. It misses the appointed directory. There is no uwb.h generated in .pio\build\zephyr\include\generated\syscalls

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions