What are the build contexts

I created project from blank, and added a build configuration. Now it showing as 1 configuration | 2 contexts, as shown in the screenshot below:

What are these contexts? I cannot see anything below of the sysbuild.

Also when using build and flash under the "Actions", it is loading old hex file, not the recent build. To load recent build, I have to use "Build All configurations" right side of the Applications menu.

Parents
  • Hello,

    This is explained in the in the VS code extension documentation here: https://docs.nordicsemi.com/bundle/nrf-connect-vscode/page/reference/ui_sidebar_applications.html#application-contexts. In short, selecting the 'build' folder allows you to browse the global sysbuild configuration for your project, while if you select your application named 'test,' you can access the configuration and source files specific for that application. This becomes more relevant when you have multiple FW images included in the project such as the mcuboot bootloader.

    Also when using build and flash under the "Actions", it is loading old hex file, not the recent build.

    The flash action will load the current HEX file. If the HEX file is not up to date, it indicates an issue with the build. Note that certain changes, such as adding new overlay files, require a pristine build to be detected and applied to the build.

  • Why the hex file is not updates after new builds (not pristine builds) with changes in src/main.c?
    When selecting Application->test -> build, I can use action -> build to create new build and flash with action-> flash.

    However, if I select Application-> test -> build -> test, and makes some changes in main.c the Action->Build, and flash still loads the older build, not with the new changes in main.c

    Also when selecting lower test, the source code linting is fine

    But if I select the build, linter shows warning:


    Finally, if need to select the lowest test folder to use nRF Kconfig GUI (or to get the complete options)


  • I see the problem now. When you only build the 'test' application image and don't rerun sysbuild, only the zephyr.hex file for that image is generated. It is not added to the final merged.hex file, which is the file loaded to the target device. I have reported this to the extension team.

    Also when selecting lower test, the source code linting is fine

    Intellisense is automatically configured with the correct include paths, etc. for the selected build context . Therefore, to browse the code for your 'test' image, you need to select it first.

  • Yes, it seems like a bug. I guess, I need to avoid sysbuild, when configuring the build setup, until the bug is fixed.

Reply Children
Related