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.

Parents
  • Hi,

    Can you explain the steps you did to update to v2.5.0? Both for the SDK and the application.

    Maybe most common is to forget to delete the build folder between versions.

    Regards,
    Sigurd Hellesvik

  • Hi Sigurd,

    Iam building an application that contains the child image mcuboot and hci_rpmsg.conf.
    I use vscode to install the new version of the SDK and toolchain.
    I can also confirm that the build error is seen only when upgrading from 2.4.2 to 2.5.0. i.e. 
    In order to re-create the problem we tried to incrementally upgrade from 2.1.1 to 2.5.0..
    i.e.
    Upgrade from 2.1.1 to 2.3.0 ==> No build error related to offsets.h generation.
    Upgrade from 2.3.0 to 2.4.0 ==> No build error related to offsets.h generation.
    Upgrade from 2.4.0 to 2.4.1 ==> No build error related to offsets.h generation.
    Upgrade from 2.4.1 to 2.4.2 ==> No build error related to offsets.h generation.
    Upgrade from 2.4.2 to 2.5.0 ==> Build fails due to offsets.h generation.

    Note: I always made sure to delete the build folder between versions.
    Please let me know if you need further information.

    Thanks,

    Mathi.

  • Yes, i set CONFIG_RTIO now and tried buiding a crypto sample application. The problem is not reproducible when building a sample.

  • Sigurd Hellesvik said:
    Is CONFIG_RTIO set in your sample?

    But in the code that fails?

  • Yes, I have enabled it now and the problem still persists.

    Having said that,

    As a side note - When everything works(for example on 2.1.1), i can see that there are 4 offsets.h files that are generated in our system in the following folders:
    ..../build/hci_rpmsg/b0n/zephyr/include/generated/offsets.h
    ..../build/hci_rpmsg/zephyr/include/generated/offsets.h
    ..../build/mcuboot/zephyr/include/generated/offsets.h
    .../build/zephyr/include/generated/offsets.h

    And, i think the error occurs when the last (highlighted) offsets.h above, was not (yet?) generated.

    Makes me wonder if there is some kind of parallel build happening that is causing this error to occur?
    Does west has any parallell build options that can be controlled? 
    Because, 

    Step1): When clicking on "build"(in vscode) leads to the failure, and upon listing the above folders, all offsets.h are not generated.
    Subsequently,
    Step 2): Clicking on "flash"(in vscode) causes a re-trigger of the build and sometimes causes all of the above 4 offsets.h files to be generated.
    Step3) Clicking on "build" then succeeds.


  • We don't enable CONFIG_RTIO in our configurations, but i do realize now that when the error occurs, the header file related to rtio seems to be getting included as a dependency, only in 2.5.0:
    from C:\ncs\v2.5.0\zephyr\include\zephyr\rtio\rtio.h:31,

    In either case, the problem still persists irrespective of whether CONFIG_RTIO is enabled or disabled.

  • Mathi said:
    Yes, i set CONFIG_RTIO now and tried buiding a crypto sample application.

    QuoteIt seems like the issue is related to i2c code. Can you try to see if you get the same from a sample using i2c?
    For example from the I2C lesson in Devacademy?

Reply Children
No Data
Related