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.

  • That is of course not impossible, but it is unlikely, ninja is ultimately just a task runner and there aren't that many things that it can do wrong. I suspect that something changed in the Zephyr build system (or maybe in the NCS build system). For me, the file with the offsets.h issue is an external project that I add to the main CMakeLists.txt via add_subdirectory, which worked just fine in NCS 2.4.2, but fails now (with NCS 2.5.1). I also have an add_custom_target in my CMakeLists.txt that was added as a dependency to zephyr_final with NCS 2.4.2. After switching to 2.5.1, I had to add it as a dependency to zephyr_pre0 instead, because it wasn't executing at the right time anymore. So something definitely changed in the build system somewhere and I'm willing to bet that that's why we're seeing these issues now.

  • Is there any update on this issue?

    FYI: Our project has two child images: MCUBOOT and HCI_RPMSG.

    I agree with Bogdan's comment - this looks very much like a dependency/order issue. 

  • Hi Tonny,

    We have a lot of users building projects with multiple child images without this error.
    However, since multiple people in this ticket have the same issue, there is likely one thing in common that you do which causes the issue. If we can find out what that is, we can figure out if it is a bug or if there is something that you can do to fix the issue.

    However, I do not yet know enough about the projects to know what this could be yet.

    Here are some questions to things I suspect could impact this:

    How did you install the nRF Connect SDK and its toolchain?
    How did you add mcuboot and hci_rpmsg to your project?
    Do you use sysbuild?

  • Hi Sigurd and thanks for your swift response.

    - I installed the toolchain using the Toolchain Manager from nRF Connect for Desktop

    - mcuboot and hci_rpmsg are added in the child_image folder to the application.

    child_image\hci_rpmsg.conf
    child_image\mcuboot
    child_image\mcuboot\prj.conf
    child_image\mcuboot\boards
    child_image\mcuboot\boards\x_cpuapp.overlay
    

    - We are not using sysbuild.

    We are currently using SDK 2.1.1 and want to upgrade to 2.5.0 but hit the problem with offsets.h.

    Upgrading to 2.4.x does not lead to the problem with offsets.h.

Reply
  • Hi Sigurd and thanks for your swift response.

    - I installed the toolchain using the Toolchain Manager from nRF Connect for Desktop

    - mcuboot and hci_rpmsg are added in the child_image folder to the application.

    child_image\hci_rpmsg.conf
    child_image\mcuboot
    child_image\mcuboot\prj.conf
    child_image\mcuboot\boards
    child_image\mcuboot\boards\x_cpuapp.overlay
    

    - We are not using sysbuild.

    We are currently using SDK 2.1.1 and want to upgrade to 2.5.0 but hit the problem with offsets.h.

    Upgrading to 2.4.x does not lead to the problem with offsets.h.

Children
No Data
Related