Open andung07 opened 4 years ago
I run in a similar Problem. Have a look at your boards
directory inside your platform-repo. There you can see many .json-Files. There you have to add "syscall_include_dirs": "zephyr"
like this:
{
"build": {
"core": "stm32",
"cpu": "cortex-m4",
"extra_flags": "-DSTM32F412Vx -DSTM32F4xx",
"f_cpu": "100000000L",
"mcu": "stm32f412vet6",
"product_line": "STM32F412Vx",
"variant": "my_board_xyz",
"zepyhr": {
"variant": "my_board_xyz",
"syscall_include_dirs": "zephyr" <<===
}
},
"debug": {
"default_tools": [
"stlink"
],
"jlink_device": "STM32F412VE",
"onboard_tools": [
"stlink"
],
...
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.
[x] 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.4Description 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
uwb.h
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>
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
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>