offsets.h No such file or directory

Hi, 

We have been using SDK version 2.1.1 and currently are in the process of migrating to SDK version 2.5.0.

Would be helpful to get some hint regarding what conditions can lead to the following error when building our application.

In file included from C:\ncs\v2.5.0\zephyr\include\zephyr\app_memory\app_memdomain.h:9,
from C:\ncs\v2.5.0\zephyr\include\zephyr\rtio\rtio.h:31,
from C:\ncs\v2.5.0\zephyr\include\zephyr\drivers\i2c.h:28,
from <our application.h>...
C:\ncs\v2.5.0\zephyr\include\zephyr\linker\linker-defs.h:26:10: fatal error: offsets.h: No such file or directory
26 | #include <offsets.h>
| ^~~~~~~~~~~

Thanks,

Mathi.

  • This works for me, but my driver does follow now (to my besto knowledge) the structure of a module.

    I have `custom_mp2731_driver\dts\bindings\drivers\custom,mp2731.yaml`, which defines the component.

    Then, under `custom_mp2731_driver\zephyr` I placed the driver's code (.c/.h), Kconfig, module.yml and a CMakeLists.txt file which basically contains:

      zephyr_include_directories(.)

      zephyr_library()
      zephyr_library_sources(
        custom_mp2731_driver.c
        )

    I think I need to adapt the CMakeLists.txt for introducing conditional inclusion/compilation in case the module is not enabled in the project file, but it became now TODO.

Related