fatal error: app_version.h: No such file or directory when using nRF5340 DK and nRF Connect for VSC and trying to implement Zephyr versioning

I am using the nRF Connect for Visual Studio Code Add-In running with the nRF Connect 2.5.0 toolchain and was trying to implement the application versioning on a nRF5340 DK following https://docs.zephyrproject.org/latest/build/version/index.html, but I get a fatal error: app_version.h: No such file or directory. I might be missing something but was reading:

To use the version information in application code, the version file must be included, then the fields can be freely used. The include file name is app_version.h (no path is needed)

 

So, it seems like it should work. I've tried with "" and <>.

Parents Reply Children
  • Hello,

    Thank you for your patience.

    I want to be sure that we are using the same methods. Please follow these instructions and report if you get the same build error:

    1. Verify that your toolchain version matches the NCS version.
    2. Add ncs/zephyr/samples/hello_world as an application in the nRF Connect for VS Code extension
    3. Create VERSION and save it to hello_world.
    4. Add 
      VERSION_MAJOR = 1
      VERSION_MINOR = 2
      PATCHLEVEL = 3
      VERSION_TWEAK = 4
      EXTRAVERSION = unstable
       to VERSION
    5. Add #include <app_version.h> to hello_world/src/main.c
    6. Create a build configuration for hello_world with nrf5340dk_nrf5340_cpuapp as the build target and build the sample.

    Best regards,

    Maria

  • I installed and set my apps toolchain to v2.5.0 and it's working now. I didn't really know what step 1 meant. I'm not even sure I know how to change the toolchains.

Related