Must toolchain version match SDK version?

Hi.

For a while I have had some issues with the toolchain when using the nRF connect SDK in visual studio code on windows 10. I believe it was after installing SDK version 2.8.0 that I saw the problems first, although I'm not entirely sure. When I use certain commands I get errors in toolchain versions other than 2.8.0. For instance, if I try to build and flash an application using SDK version 1.9.1 and toolchain 1.9.1 I get the attached output.

First of all, is there a workaround to get this to work? I'm currently flashing manually with nrfjprog from command line.

Secondly, should I be matching toolchain versions and SDK versions in the first place? What is the intended/recommended way to use SDK and toolchain versions? If I try build my application with SDK version 1.9.1 and toolchain version 2.8.0 the application appears to run as expected, even with some improvements: resulting merged.hex file is smaller and more warnings are caught in the build process.

[9/27] Linking CXX executable zephyr\zephyr_pre0.elf
[10/27] Generating dev_handles.c
FAILED: zephyr/dev_handles.c
cmd.exe /C "cd /D C:\...\build_191\zephyr && C:\ncs\v1.9.1\toolchain\opt\bin\python.exe C:/ncs/v1.9.1/zephyr/scripts/gen_handles.py --output-source dev_handles.c --kernel C:/.../build_191/zephyr/zephyr_pre0.elf --zephyr-base C:/ncs/v1.9.1/zephyr --start-symbol __device_start"
Traceback (most recent call last):
  File "C:/ncs/v1.9.1/zephyr/scripts/gen_handles.py", line 37, in <module>
    from elftools.elf.elffile import ELFFile
  File "C:\ncs\toolchains\2d382dcd92\opt\bin\Lib\site-packages\elftools\elf\elffile.py", line 41, in <module>
    from ..dwarf.dwarfinfo import DWARFInfo, DebugSectionDescriptor, DwarfConfig
  File "C:\ncs\toolchains\2d382dcd92\opt\bin\Lib\site-packages\elftools\dwarf\dwarfinfo.py", line 17, in <module>
    from .structs import DWARFStructs
  File "C:\ncs\toolchains\2d382dcd92\opt\bin\Lib\site-packages\elftools\dwarf\structs.py", line 10, in <module>
    from logging.config import valid_ident
  File "<frozen zipimport>", line 259, in load_module
  File "logging\config.py", line 30, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "logging\handlers.py", line 26, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "socket.py", line 49, in <module>
ImportError: Module use of python312.dll conflicts with this version of Python.
ninja: build stopped: subcommand failed.
FATAL ERROR: re-build

  • I believe you are still talking about installing and uninstalling the SDKs v2.8.0 and v2.9.0. Did you also remove/uninstall the toolchains? 

  • Hi.

    When uninstalling v2.8.0 and 2.9.0 of I specifically used the following command in VSCode:
    "nRF Connect: Uninstall Toolchain"

    So should be toolchain. Let me know if I should remove SDK as well.

    I also see that I didn't provide the best info in terms of what works and what does not work in my original post, sorry for that. If I try to only build the project it finishes successfully, but if I run "Flash to board" or "Erase and flash to board" it fails during re re-building step.

    So you might be able to reproduce the problem by:

    1. Copy application_update sample from 1.9.1 SDK and common folder in parent directory.
    2. Build for nrf9160dk_nrf9160ns (SDK 1.9.1, Toolchain v2.0.0, nRF Connect for VS Code v2025.4.106)
    3. Complete build successfully.
    4. Edit something some code to trigger a file change.
    5. Run: Erase and flash active image to board.

    ^^This only fails if it has to build and flash in sequence. In my projects, flashing always triggers re-build which is why it is particularly inconvenient. See full attached build log in VSCode below. I have also attached the .vscode-nrf-connect.json for the configuration used. Please let me know if you need anything else.

     *  Executing task: nRF Connect: Generate config nrf9160dk_nrf9160_ns for c:\project\samples\application_update 
    
    Building application_update
    C:\Windows\system32\cmd.exe /d /s /c "west build --build-dir c:/project/samples/application_update/build c:/project/samples/application_update --pristine --board nrf9160dk_nrf9160_ns -- -DNCS_TOOLCHAIN_VERSION=NONE"
    
    -- west build: generating a build system
    Including boilerplate (Zephyr base): C:/ncs/v1.9.1/zephyr/cmake/app/boilerplate.cmake
    -- Application: C:/project/samples/application_update
    -- Zephyr version: 2.7.99 (C:/ncs/v1.9.1/zephyr), build: v2.7.99-ncs1-1
    -- Found Python3: C:/ncs/toolchains/v2.0.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
    -- Board: nrf9160dk_nrf9160_ns, Revision: 0.7.0
    -- Cache files will be written to: C:/ncs/v1.9.1/zephyr/.cache
    -- Found host-tools: zephyr 0.14.1 (C:/ncs/toolchains/v2.0.0/opt/zephyr-sdk)
    -- Found dtc: C:/ncs/toolchains/v2.0.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: zephyr 0.14.1 (C:/ncs/toolchains/v2.0.0/opt/zephyr-sdk)
    -- Found BOARD.dts: C:/ncs/v1.9.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns.dts
    -- Generated zephyr.dts: C:/project/samples/application_update/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/project/samples/application_update/build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/project/samples/application_update/build/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/project/samples/application_update/build/zephyr/dts.cmake
    
    warning: Experimental symbol NET_SOCKETS_OFFLOAD is enabled.
    
    Parsing C:/project/samples/application_update/Kconfig
    Loaded configuration 'C:/ncs/v1.9.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns_defconfig'
    Merged configuration 'C:/project/samples/application_update/prj.conf'
    Configuration saved to 'C:/project/samples/application_update/build/zephyr/.config'
    Kconfig header saved to 'C:/project/samples/application_update/build/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 10.3.0
    -- The CXX compiler identification is GNU 10.3.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    Changed board to secure nrf9160dk_nrf9160 (NOT NS)
    
    === child image spm -  begin ===
    loading initial cache file C:/project/samples/application_update/build/spm/child_image_preload.cmake
    Including boilerplate (Zephyr base): C:/ncs/v1.9.1/zephyr/cmake/app/boilerplate.cmake
    -- Application: C:/ncs/v1.9.1/nrf/samples/spm
    -- Zephyr version: 2.7.99 (C:/ncs/v1.9.1/zephyr), build: v2.7.99-ncs1-1
    -- Found Python3: C:/ncs/toolchains/v2.0.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
    -- Board: nrf9160dk_nrf9160, Revision: 0.7.0
    -- Cache files will be written to: C:/ncs/v1.9.1/zephyr/.cache
    -- Found host-tools: zephyr 0.14.1 (C:/ncs/toolchains/v2.0.0/opt/zephyr-sdk)
    -- Found dtc: C:/ncs/toolchains/v2.0.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: zephyr 0.14.1 (C:/ncs/toolchains/v2.0.0/opt/zephyr-sdk)
    -- Found BOARD.dts: C:/ncs/v1.9.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160.dts
    -- Found devicetree overlay: C:/ncs/v1.9.1/nrf/samples/spm/nrf9160dk_nrf9160.overlay
    -- Generated zephyr.dts: C:/project/samples/application_update/build/spm/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/project/samples/application_update/build/spm/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/project/samples/application_update/build/spm/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/project/samples/application_update/build/spm/zephyr/dts.cmake
    Parsing C:/ncs/v1.9.1/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v1.9.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_defconfig'
    Merged configuration 'C:/ncs/v1.9.1/nrf/samples/spm/prj.conf'
    Merged configuration 'C:/ncs/v1.9.1/nrf/samples/spm/boards/nrf9160dk_nrf9160.conf'
    Merged configuration 'C:/ncs/v1.9.1/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Merged configuration 'C:/project/samples/application_update/build/spm/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to 'C:/project/samples/application_update/build/spm/zephyr/.config'
    Kconfig header saved to 'C:/project/samples/application_update/build/spm/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 10.3.0
    -- The CXX compiler identification is GNU 10.3.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    CMake Warning at C:/ncs/v1.9.1/zephyr/CMakeLists.txt:1687 (message):
      __ASSERT() statements are globally ENABLED
    
    
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/project/samples/application_update/build/spm
    === child image spm -  end ===
    
    Changed board to secure nrf9160dk_nrf9160 (NOT NS)
    
    === child image mcuboot -  begin ===
    Including boilerplate (Zephyr base): C:/ncs/v1.9.1/zephyr/cmake/app/boilerplate.cmake
    loading initial cache file C:/project/samples/application_update/build/mcuboot/child_image_preload.cmake
    -- Application: C:/ncs/v1.9.1/bootloader/mcuboot/boot/zephyr
    -- Zephyr version: 2.7.99 (C:/ncs/v1.9.1/zephyr), build: v2.7.99-ncs1-1
    -- Found Python3: C:/ncs/toolchains/v2.0.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
    -- Board: nrf9160dk_nrf9160, Revision: 0.7.0
    -- Cache files will be written to: C:/ncs/v1.9.1/zephyr/.cache
    -- Found host-tools: zephyr 0.14.1 (C:/ncs/toolchains/v2.0.0/opt/zephyr-sdk)
    -- Found dtc: C:/ncs/toolchains/v2.0.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: zephyr 0.14.1 (C:/ncs/toolchains/v2.0.0/opt/zephyr-sdk)
    -- Found BOARD.dts: C:/ncs/v1.9.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160.dts
    -- Found devicetree overlay: C:/ncs/v1.9.1/bootloader/mcuboot/boot/zephyr/dts.overlay
    -- Generated zephyr.dts: C:/project/samples/application_update/build/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/project/samples/application_update/build/mcuboot/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/project/samples/application_update/build/mcuboot/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/project/samples/application_update/build/mcuboot/zephyr/dts.cmake
    Parsing C:/ncs/v1.9.1/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v1.9.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_defconfig'
    Merged configuration 'C:/ncs/v1.9.1/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration 'C:/ncs/v1.9.1/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Merged configuration 'C:/project/samples/application_update/build/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to 'C:/project/samples/application_update/build/mcuboot/zephyr/.config'
    Kconfig header saved to 'C:/project/samples/application_update/build/mcuboot/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 10.3.0
    -- The CXX compiler identification is GNU 10.3.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    MCUBoot bootloader key file: C:/ncs/v1.9.1/bootloader/mcuboot/root-ec-p256.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/project/samples/application_update/build/mcuboot
    === child image mcuboot -  end ===
    
    CMake Warning at C:/ncs/v1.9.1/nrf/modules/mcuboot/CMakeLists.txt:262 (message):
      
    
            ---------------------------------------------------------
            --- WARNING: Using default MCUBoot key, it should not ---
            --- be used for production.                           ---
            ---------------------------------------------------------
            
    
    
    
    CMake Warning at C:/ncs/v1.9.1/zephyr/CMakeLists.txt:764 (message):
      No SOURCES given to Zephyr library: subsys__net__pkt_filter
    
      Excluding target from build.
    
    
    CMake Warning at C:/ncs/v1.9.1/zephyr/CMakeLists.txt:1687 (message):
      __ASSERT() statements are globally ENABLED
    
    
    -- Found partition manager static configuration: C:/project/samples/application_update/pm_static.yml
    Partition 'mcuboot' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_pad' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary_app' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_secondary' is not included in the dynamic resolving since it is statically defined.
    Partition 'nrf_modem_lib_ctrl' is not included in the dynamic resolving since it is statically defined.
    Partition 'nrf_modem_lib_rx' is not included in the dynamic resolving since it is statically defined.
    Partition 'nrf_modem_lib_sram' is not included in the dynamic resolving since it is statically defined.
    Partition 'nrf_modem_lib_tx' is not included in the dynamic resolving since it is statically defined.
    Partition 'spm' is not included in the dynamic resolving since it is statically defined.
    Partition 'spm_sram' is not included in the dynamic resolving since it is statically defined.
    Partition 'sram_nonsecure' is not included in the dynamic resolving since it is statically defined.
    Partition 'sram_secure' is not included in the dynamic resolving since it is statically defined.
    Dropping partition 'nrf_modem_lib_trace' since its size is 0.
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/project/samples/application_update/build
    -- west build: building application
    [257/267] Linking C executable zephyr\zephyr_pre0.elf
    
    [261/267] Linking C executable zephyr\zephyr_pre1.elf
    
    [267/267] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       65024 B        64 KB     99.22%
                SRAM:       12136 B        32 KB     37.04%
            IDT_LIST:          0 GB         2 KB      0.00%
    [173/183] Linking C executable zephyr\zephyr_pre0.elf
    
    [177/183] Linking C executable zephyr\zephyr_pre1.elf
    
    [183/183] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       33992 B        48 KB     69.16%
                SRAM:       16416 B     211736 B      7.75%
            IDT_LIST:          0 GB         2 KB      0.00%
    [212/233] Linking C executable zephyr\zephyr_pre0.elf
    
    [216/233] Linking C executable zephyr\zephyr_pre1.elf
    
    [225/233] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       96944 B     425472 B     22.79%
                SRAM:       25528 B     211736 B     12.06%
            IDT_LIST:          0 GB         2 KB      0.00%
    [233/233] Generating zephyr/merged.hex
     *  Terminal will be reused by tasks, press any key to close it. 
    
     *  Executing task: nRF Connect: Flash: application_update/build (active) 
    
    Flashing build to motor
    C:\Windows\system32\cmd.exe /d /s /c "west flash -d c:\project\samples\application_update\build --snr 203200665 --erase"
    
    -- west flash: rebuilding
    [0/25] Performing build step for 'spm_subimage'
    ninja: no work to do.
    [1/23] Performing build step for 'mcuboot_subimage'
    ninja: no work to do.
    [2/23] Building C object CMakeFiles/app.dir/src/main.c.obj
    [4/21] Linking C static library app\libapp.a
    [5/21] Linking C executable zephyr\zephyr_pre0.elf
    
    [6/21] Generating dev_handles.c
    FAILED: zephyr/dev_handles.c 
    cmd.exe /C "cd /D C:\project\samples\application_update\build\zephyr && C:\ncs\toolchains\v2.0.0\opt\bin\python.exe C:/ncs/v1.9.1/zephyr/scripts/gen_handles.py --output-source dev_handles.c --kernel C:/project/samples/application_update/build/zephyr/zephyr_pre0.elf --zephyr-base C:/ncs/v1.9.1/zephyr --start-symbol __device_start"
    Traceback (most recent call last):
      File "C:/ncs/v1.9.1/zephyr/scripts/gen_handles.py", line 37, in <module>
        from elftools.elf.elffile import ELFFile
      File "C:\ncs\toolchains\b620d30767\opt\bin\Lib\site-packages\elftools\elf\elffile.py", line 41, in <module>
        from ..dwarf.dwarfinfo import DWARFInfo, DebugSectionDescriptor, DwarfConfig
      File "C:\ncs\toolchains\b620d30767\opt\bin\Lib\site-packages\elftools\dwarf\dwarfinfo.py", line 17, in <module>
        from .structs import DWARFStructs
      File "C:\ncs\toolchains\b620d30767\opt\bin\Lib\site-packages\elftools\dwarf\structs.py", line 10, in <module>
        from logging.config import valid_ident
      File "<frozen zipimport>", line 259, in load_module
      File "logging\config.py", line 30, in <module>
      File "<frozen zipimport>", line 259, in load_module
      File "logging\handlers.py", line 26, in <module>
      File "<frozen zipimport>", line 259, in load_module
      File "socket.py", line 49, in <module>
    ImportError: Module use of python312.dll conflicts with this version of Python.
    ninja: build stopped: subcommand failed.
    FATAL ERROR: re-build in c:\project\samples\application_update\build failed
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it.
    {
      "toolchainPath": "c:\\ncs\\toolchains\\v2.0.0",
      "sdkPath": "c:\\ncs\\v1.9.1",
      "board": "nrf9160dk_nrf9160_ns",
      "boardDir": "c:/ncs/v1.9.1/zephyr/boards/arm/nrf9160dk_nrf9160",
      "boardDirs": [
        "c:/ncs/v1.9.1/zephyr/boards/arm/nrf9160dk_nrf9160"
      ],
      "optimizations": "none",
      "cmakeArgs": [],
      "confFiles": [],
      "buildDirectory": "build",
      "kconfigFragments": [],
      "snippets": [],
      "dtcOverlays": [],
      "extraDtcOverlays": []
    }

  • Can you please try to click "install new toolchain", and then select the folder icon to select the path to your toolchain:

    I note that your .vscode-nrf-connect.json points to "toolchainPath": "c:\\ncs\\toolchains\\v2.0.0"

    Try making it point to your v1.9.1 toolchain folder. 

    Best regards,

    Edvin

  • Which version of the nRF Connect extension for VSCode are you referring to? In the latest version, if I click "install new toolchain" I don't see any versions below 2.0.0 (probably since the support was removed for toolchain versions <2.0.0 in 2025.04.106). I'm also unable to select 1.9.1 as toolchain when adding a build configuration in this version.

    If I downgrade to 2025.1.127, install new toolchain, select 1.9.1, build, edit code and run "Flash active image to board" I get the same error. See attached log and configuration.

    The same problem also happens using sdk v2.5.1 and toolchain 2.5.1 if that is easier to debug in the latest version? I can also try a fresh install (of for instance SDK v2.5.3 and toolchain 2.5.3), install both through VSCode and see if the problem is still there?

    {
      "toolchainPath": "c:\\ncs\\toolchains\\v1.9.1",
      "sdkPath": "c:\\ncs\\v1.9.1",
      "board": "nrf9160dk_nrf9160_ns",
      "boardDirs": [
        "c:/ncs/v1.9.1/zephyr/boards/arm/nrf9160dk_nrf9160"
      ],
      "boardRevision": "",
      "boardDir": "c:/ncs/v1.9.1/zephyr/boards/arm/nrf9160dk_nrf9160",
      "shouldBuild": true,
      "optimizations": "none",
      "cmakeArgs": [],
      "confFiles": [],
      "buildDirectory": "build",
      "kconfigFragments": [],
      "snippets": [],
      "dtcOverlays": [],
      "extraDtcOverlays": []
    }

     *  Executing task: nRF Connect: Generate config nrf9160dk_nrf9160_ns for c:\ncs\v1.9.1\nrf\samples\nrf9160\http_update\application_update 
    
    Building application_update
    C:\Windows\system32\cmd.exe /d /s /c "west build --build-dir c:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build c:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update --pristine --board nrf9160dk_nrf9160_ns -- -DNCS_TOOLCHAIN_VERSION=NONE"
    
    -- west build: generating a build system
    Including boilerplate (Zephyr base): C:/ncs/v1.9.1/zephyr/cmake/app/boilerplate.cmake
    -- Application: C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update
    -- Zephyr version: 2.7.99 (C:/ncs/v1.9.1/zephyr), build: v2.7.99-ncs1-1
    -- Found Python3: C:/ncs/toolchains/v1.9.1/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
    -- Board: nrf9160dk_nrf9160_ns, Revision: 0.7.0
    -- Cache files will be written to: C:/ncs/v1.9.1/zephyr/.cache
    -- Found dtc: C:/ncs/toolchains/v1.9.1/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (c:/ncs/toolchains/v1.9.1/opt)
    -- Found BOARD.dts: C:/ncs/v1.9.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns.dts
    -- Generated zephyr.dts: C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/zephyr/dts.cmake
    
    warning: Experimental symbol NET_SOCKETS_OFFLOAD is enabled.
    
    Parsing C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/Kconfig
    Loaded configuration 'C:/ncs/v1.9.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns_defconfig'
    Merged configuration 'C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/prj.conf'
    Configuration saved to 'C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/zephyr/.config'
    Kconfig header saved to 'C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 9.2.1
    -- The CXX compiler identification is GNU 9.2.1
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/v1.9.1/opt/bin/arm-none-eabi-gcc.exe
    Changed board to secure nrf9160dk_nrf9160 (NOT NS)
    
    === child image spm -  begin ===
    loading initial cache file C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/spm/child_image_preload.cmake
    Including boilerplate (Zephyr base): C:/ncs/v1.9.1/zephyr/cmake/app/boilerplate.cmake
    -- Application: C:/ncs/v1.9.1/nrf/samples/spm
    -- Zephyr version: 2.7.99 (C:/ncs/v1.9.1/zephyr), build: v2.7.99-ncs1-1
    -- Found Python3: C:/ncs/toolchains/v1.9.1/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
    -- Board: nrf9160dk_nrf9160, Revision: 0.7.0
    -- Cache files will be written to: C:/ncs/v1.9.1/zephyr/.cache
    -- Found dtc: C:/ncs/toolchains/v1.9.1/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (c:/ncs/toolchains/v1.9.1/opt)
    -- Found BOARD.dts: C:/ncs/v1.9.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160.dts
    -- Found devicetree overlay: C:/ncs/v1.9.1/nrf/samples/spm/nrf9160dk_nrf9160.overlay
    -- Generated zephyr.dts: C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/spm/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/spm/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/spm/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/spm/zephyr/dts.cmake
    Parsing C:/ncs/v1.9.1/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v1.9.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_defconfig'
    Merged configuration 'C:/ncs/v1.9.1/nrf/samples/spm/prj.conf'
    Merged configuration 'C:/ncs/v1.9.1/nrf/samples/spm/boards/nrf9160dk_nrf9160.conf'
    Merged configuration 'C:/ncs/v1.9.1/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Merged configuration 'C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/spm/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to 'C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/spm/zephyr/.config'
    Kconfig header saved to 'C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/spm/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 9.2.1
    -- The CXX compiler identification is GNU 9.2.1
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/v1.9.1/opt/bin/arm-none-eabi-gcc.exe
    CMake Warning at C:/ncs/v1.9.1/zephyr/CMakeLists.txt:1687 (message):
      __ASSERT() statements are globally ENABLED
    
    
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/spm
    === child image spm -  end ===
    
    Changed board to secure nrf9160dk_nrf9160 (NOT NS)
    
    === child image mcuboot -  begin ===
    Including boilerplate (Zephyr base): C:/ncs/v1.9.1/zephyr/cmake/app/boilerplate.cmake
    loading initial cache file C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/mcuboot/child_image_preload.cmake
    -- Application: C:/ncs/v1.9.1/bootloader/mcuboot/boot/zephyr
    -- Zephyr version: 2.7.99 (C:/ncs/v1.9.1/zephyr), build: v2.7.99-ncs1-1
    -- Found Python3: C:/ncs/toolchains/v1.9.1/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
    -- Board: nrf9160dk_nrf9160, Revision: 0.7.0
    -- Cache files will be written to: C:/ncs/v1.9.1/zephyr/.cache
    -- Found dtc: C:/ncs/toolchains/v1.9.1/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (c:/ncs/toolchains/v1.9.1/opt)
    -- Found BOARD.dts: C:/ncs/v1.9.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160.dts
    -- Found devicetree overlay: C:/ncs/v1.9.1/bootloader/mcuboot/boot/zephyr/dts.overlay
    -- Generated zephyr.dts: C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/mcuboot/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/mcuboot/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/mcuboot/zephyr/dts.cmake
    Parsing C:/ncs/v1.9.1/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v1.9.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_defconfig'
    Merged configuration 'C:/ncs/v1.9.1/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration 'C:/ncs/v1.9.1/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Merged configuration 'C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to 'C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/mcuboot/zephyr/.config'
    Kconfig header saved to 'C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/mcuboot/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 9.2.1
    -- The CXX compiler identification is GNU 9.2.1
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/v1.9.1/opt/bin/arm-none-eabi-gcc.exe
    MCUBoot bootloader key file: C:/ncs/v1.9.1/bootloader/mcuboot/root-ec-p256.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/mcuboot
    === child image mcuboot -  end ===
    
    CMake Warning at C:/ncs/v1.9.1/nrf/modules/mcuboot/CMakeLists.txt:262 (message):
      
    
            ---------------------------------------------------------
            --- WARNING: Using default MCUBoot key, it should not ---
            --- be used for production.                           ---
            ---------------------------------------------------------
            
    
    
    
    CMake Warning at C:/ncs/v1.9.1/zephyr/CMakeLists.txt:764 (message):
      No SOURCES given to Zephyr library: subsys__net__pkt_filter
    
      Excluding target from build.
    
    
    CMake Warning at C:/ncs/v1.9.1/zephyr/CMakeLists.txt:1687 (message):
      __ASSERT() statements are globally ENABLED
    
    
    Dropping partition 'nrf_modem_lib_trace' since its size is 0.
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build
    -- west build: building application
    [257/267] Linking C executable zephyr\zephyr_pre0.elf
    
    [261/267] Linking C executable zephyr\zephyr_pre1.elf
    
    [267/267] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       65024 B        64 KB     99.22%
                SRAM:       12136 B        32 KB     37.04%
            IDT_LIST:          0 GB         2 KB      0.00%
    [173/183] Linking C executable zephyr\zephyr_pre0.elf
    
    [177/183] Linking C executable zephyr\zephyr_pre1.elf
    
    [183/183] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       34072 B        48 KB     69.32%
                SRAM:       16416 B     211736 B      7.75%
            IDT_LIST:          0 GB         2 KB      0.00%
    [212/233] Linking C executable zephyr\zephyr_pre0.elf
    
    [216/233] Linking C executable zephyr\zephyr_pre1.elf
    
    [225/233] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       97356 B     425472 B     22.88%
                SRAM:       25528 B     211736 B     12.06%
            IDT_LIST:          0 GB         2 KB      0.00%
    [233/233] Generating zephyr/merged.hex
     *  Terminal will be reused by tasks, press any key to close it. 
    
     *  Executing task: nRF Connect: Flash: application_update/build (active) 
    
    Flashing build to motor
    C:\Windows\system32\cmd.exe /d /s /c "west flash -d c:\ncs\v1.9.1\nrf\samples\nrf9160\http_update\application_update\build --snr 203200665 --erase"
    
    -- west flash: rebuilding
    [0/25] Performing build step for 'spm_subimage'
    ninja: no work to do.
    [1/23] Performing build step for 'mcuboot_subimage'
    ninja: no work to do.
    [3/21] Building C object CMakeFiles/app.dir/src/main.c.obj
    [4/21] Linking C static library app\libapp.a
    [5/21] Linking C executable zephyr\zephyr_pre0.elf
    
    [6/21] Generating dev_handles.c
    FAILED: zephyr/dev_handles.c 
    cmd.exe /C "cd /D C:\ncs\v1.9.1\nrf\samples\nrf9160\http_update\application_update\build\zephyr && C:\ncs\toolchains\v1.9.1\opt\bin\python.exe C:/ncs/v1.9.1/zephyr/scripts/gen_handles.py --output-source dev_handles.c --kernel C:/ncs/v1.9.1/nrf/samples/nrf9160/http_update/application_update/build/zephyr/zephyr_pre0.elf --zephyr-base C:/ncs/v1.9.1/zephyr --start-symbol __device_start"
    Traceback (most recent call last):
      File "C:/ncs/v1.9.1/zephyr/scripts/gen_handles.py", line 37, in <module>
        from elftools.elf.elffile import ELFFile
      File "C:\ncs\toolchains\b620d30767\opt\bin\Lib\site-packages\elftools\elf\elffile.py", line 41, in <module>
        from ..dwarf.dwarfinfo import DWARFInfo, DebugSectionDescriptor, DwarfConfig
      File "C:\ncs\toolchains\b620d30767\opt\bin\Lib\site-packages\elftools\dwarf\dwarfinfo.py", line 17, in <module>
        from .structs import DWARFStructs
      File "C:\ncs\toolchains\b620d30767\opt\bin\Lib\site-packages\elftools\dwarf\structs.py", line 10, in <module>
        from logging.config import valid_ident
      File "<frozen zipimport>", line 259, in load_module
      File "logging\config.py", line 30, in <module>
      File "<frozen zipimport>", line 259, in load_module
      File "logging\handlers.py", line 26, in <module>
      File "<frozen zipimport>", line 259, in load_module
      File "socket.py", line 49, in <module>
    ImportError: Module use of python312.dll conflicts with this version of Python.
    ninja: build stopped: subcommand failed.
    FATAL ERROR: re-build in c:\ncs\v1.9.1\nrf\samples\nrf9160\http_update\application_update\build failed
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it. 

  • I did another test and reproduced the same error with fresh installation of SDK 2.4.0 and toolchain 2.4.0. All done in VSCode with version 2025.04.186 of the nRF extension:

    1. Install SDK 2.4.0.
    2. Install toolchain 2.4.0.
    3. "Browse samples" -> "2.4.0" -> "HTTP application update sample"
    4. Build for nrf9160dk_nrf9160_ns (Build OK, but non-critical python warning/error in configure step).
    5. Add one character to the first printk (to force rebuild).
    6. Run command "Flash active image to board". - fails

    Please see attached log and configuration.

     *  Executing task: nRF Connect: Generate config nrf9160dk_nrf9160_ns for c:\ncs\v2.4.0\nrf\samples\nrf9160\http_update\application_update 
    
    Building application_update
    C:\Windows\system32\cmd.exe /d /s /c "west build --build-dir c:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build c:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update --pristine --board nrf9160dk_nrf9160_ns -- -DNCS_TOOLCHAIN_VERSION=NONE"
    
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update
    -- CMake version: 3.20.5
    -- Found Python3: C:/ncs/toolchains/31f4403e35/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v2.4.0/zephyr/.cache
    -- Zephyr version: 3.3.99 (C:/ncs/v2.4.0/zephyr)
    -- Found west (found suitable version "1.1.0", minimum required is "0.7.1")
    -- Board: nrf9160dk_nrf9160_ns, Revision: 0.7.0
    -- Found host-tools: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/31f4403e35/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: C:/ncs/v2.4.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns.dts
    -- Generated zephyr.dts: C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build/zephyr/dts.cmake
    Parsing C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/Kconfig
    Loaded configuration 'C:/ncs/v2.4.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns_defconfig'
    Merged configuration 'C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/prj.conf'
    Configuration saved to 'C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build/zephyr/.config'
    Kconfig header saved to 'C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Found Python3: C:/ncs/toolchains/31f4403e35/opt/bin/python.exe (found version "3.8.2") found components: Interpreter 
    Changed board to secure nrf9160dk_nrf9160 (NOT NS)
    
    === child image mcuboot -  begin ===
    loading initial cache file C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build/mcuboot/child_image_preload.cmake
    CMake Warning (dev) at C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build/mcuboot/child_image_preload.cmake:8 (set):
      Syntax error in cmake code at
    
        C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build/mcuboot/child_image_preload.cmake:8
    
      when parsing string
    
        C:\ncs\toolchains\31f4403e35\opt\bin\python.exe
    
      Invalid escape sequence \3
    
      Policy CMP0010 is not set: Bad variable reference syntax is an error.  Run
      "cmake --help-policy CMP0010" for policy details.  Use the cmake_policy
      command to set the policy and suppress this warning.
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/ncs/v2.4.0/bootloader/mcuboot/boot/zephyr
    -- CMake version: 3.20.5
    -- Found Python3: C:/ncs/toolchains/31f4403e35/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v2.4.0/zephyr/.cache
    -- Zephyr version: 3.3.99 (C:/ncs/v2.4.0/zephyr)
    -- Found west (found suitable version "1.1.0", minimum required is "0.7.1")
    -- Board: nrf9160dk_nrf9160, Revision: 0.7.0
    -- Found host-tools: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/31f4403e35/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: C:/ncs/v2.4.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160.dts
    -- Found devicetree overlay: C:/ncs/v2.4.0/bootloader/mcuboot/boot/zephyr/app.overlay
    -- Generated zephyr.dts: C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build/mcuboot/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build/mcuboot/zephyr/dts.cmake
    Parsing C:/ncs/v2.4.0/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v2.4.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_defconfig'
    Merged configuration 'C:/ncs/v2.4.0/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration 'C:/ncs/v2.4.0/nrf/modules/mcuboot/tfm.conf'
    Merged configuration 'C:/ncs/v2.4.0/nrf/modules/mcuboot/fih_low_enable.conf'
    Merged configuration 'C:/ncs/v2.4.0/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Merged configuration 'C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to 'C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build/mcuboot/zephyr/.config'
    Kconfig header saved to 'C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build/mcuboot/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    CMake Warning at C:/ncs/v2.4.0/zephyr/CMakeLists.txt:838 (message):
      No SOURCES given to Zephyr library: lib__libc__common
    
      Excluding target from build.
    
    
    MCUBoot bootloader key file: C:/ncs/v2.4.0/bootloader/mcuboot/root-ec-p256.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build/mcuboot
    === child image mcuboot -  end ===
    
    CMake Warning at C:/ncs/v2.4.0/nrf/modules/mcuboot/CMakeLists.txt:310 (message):
      
    
              ---------------------------------------------------------
              --- WARNING: Using default MCUBoot key, it should not ---
              --- be used for production.                           ---
              ---------------------------------------------------------
              
    
    
    
    CMake Warning at C:/ncs/v2.4.0/zephyr/CMakeLists.txt:838 (message):
      No SOURCES given to Zephyr library: lib__libc__common
    
      Excluding target from build.
    
    
    CMake Warning at C:/ncs/v2.4.0/zephyr/CMakeLists.txt:1864 (message):
      __ASSERT() statements are globally ENABLED
    
    
    Dropping partition 'nrf_modem_lib_trace' since its size is 0.
    Dropping partition 'nonsecure_storage' since it is empty.
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build
    -- west build: building application
    [1/323] Generating include/generated/version.h
    -- Zephyr version: 3.3.99 (C:/ncs/v2.4.0/zephyr), build: v3.3.99-ncs1
    [1/184] Generating include/generated/version.h
    -- Zephyr version: 3.3.99 (C:/ncs/v2.4.0/zephyr), build: v3.3.99-ncs1
    [174/184] Linking C executable zephyr\zephyr_pre0.elf
    
    [178/184] Linking C executable zephyr\zephyr_pre1.elf
    
    [184/184] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       28598 B        48 KB     58.18%
                 RAM:       16368 B        32 KB     49.95%
            IDT_LIST:          0 GB         2 KB      0.00%
    [11/323] Generating ../../tfm/CMakeCache.txt
    -- Found Git: C:/ncs/toolchains/31f4403e35/mingw64/bin/git.exe (found version "2.37.3.windows.1") 
    -- The C compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Found Python3: C:/ncs/toolchains/31f4403e35/opt/bin/python.exe (found version "3.8.2") found components: Interpreter 
    -- Found Python3: C:/ncs/toolchains/31f4403e35/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v2.4.0/zephyr/.cache
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build/tfm
    [22/323] Performing install step for 'tfm'
    -- Install configuration: "MinSizeRel"
    [304/323] Linking C executable zephyr\zephyr_pre0.elf
    
    [308/323] Linking C executable zephyr\zephyr_pre1.elf
    
    [314/323] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:      127340 B       448 KB     27.76%
                 RAM:       38408 B     211608 B     18.15%
            IDT_LIST:          0 GB         2 KB      0.00%
    [318/323] Generating ../../zephyr/app_update.bin
    image.py: sign the payload
    [319/323] Generating ../../zephyr/app_signed.hex
    image.py: sign the payload
    [321/323] Generating ../../zephyr/app_test_update.hex
    image.py: sign the payload
    [323/323] Generating zephyr/merged.hex
     *  Terminal will be reused by tasks, press any key to close it. 
    
     *  Executing task: nRF Connect: Flash: application_update/build (active) 
    
    Flashing build to motor
    C:\Windows\system32\cmd.exe /d /s /c "west flash -d c:\ncs\v2.4.0\nrf\samples\nrf9160\http_update\application_update\build --dev-id 203200665"
    
    -- west flash: rebuilding
    [0/32] Performing build step for 'tfm'
    ninja: no work to do.
    [1/24] Performing build step for 'mcuboot_subimage'
    ninja: no work to do.
    [3/22] Building C object CMakeFiles/app.dir/src/main.c.obj
    [4/22] Linking C static library app\libapp.a
    [5/22] Linking C executable zephyr\zephyr_pre0.elf
    
    [6/22] Generating dev_handles.c
    FAILED: zephyr/dev_handles.c 
    cmd.exe /C "cd /D C:\ncs\v2.4.0\nrf\samples\nrf9160\http_update\application_update\build\zephyr && C:\ncs\toolchains\31f4403e35\opt\bin\python.exe C:/ncs/v2.4.0/zephyr/scripts/build/gen_handles.py --output-source dev_handles.c --output-graphviz dev_graph.dot --num-dynamic-devices 0 --kernel C:/ncs/v2.4.0/nrf/samples/nrf9160/http_update/application_update/build/zephyr/zephyr_pre0.elf --zephyr-base C:/ncs/v2.4.0/zephyr --start-symbol __device_start"
    Traceback (most recent call last):
      File "C:/ncs/v2.4.0/zephyr/scripts/build/gen_handles.py", line 34, in <module>
        from elf_parser import ZephyrElf
      File "C:\ncs\v2.4.0\zephyr\scripts\build\elf_parser.py", line 12, in <module>
        from elftools.elf.elffile import ELFFile
      File "C:\ncs\toolchains\b620d30767\opt\bin\Lib\site-packages\elftools\elf\elffile.py", line 41, in <module>
        from ..dwarf.dwarfinfo import DWARFInfo, DebugSectionDescriptor, DwarfConfig
      File "C:\ncs\toolchains\b620d30767\opt\bin\Lib\site-packages\elftools\dwarf\dwarfinfo.py", line 17, in <module>
        from .structs import DWARFStructs
      File "C:\ncs\toolchains\b620d30767\opt\bin\Lib\site-packages\elftools\dwarf\structs.py", line 10, in <module>
        from logging.config import valid_ident
      File "<frozen zipimport>", line 259, in load_module
      File "logging\config.py", line 30, in <module>
      File "<frozen zipimport>", line 259, in load_module
      File "logging\handlers.py", line 26, in <module>
      File "<frozen zipimport>", line 259, in load_module
      File "socket.py", line 49, in <module>
    ImportError: Module use of python312.dll conflicts with this version of Python.
    ninja: build stopped: subcommand failed.
    FATAL ERROR: re-build in c:\ncs\v2.4.0\nrf\samples\nrf9160\http_update\application_update\build failed
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it. 
    {
      "toolchainPath": "c:\\ncs\\toolchains\\31f4403e35",
      "sdkPath": "c:\\ncs\\v2.4.0",
      "board": "nrf9160dk_nrf9160_ns",
      "boardDir": "c:/ncs/v2.4.0/zephyr/boards/arm/nrf9160dk_nrf9160",
      "boardDirs": [
        "c:/ncs/v2.4.0/zephyr/boards/arm/nrf9160dk_nrf9160"
      ],
      "optimizations": "none",
      "cmakeArgs": [],
      "confFiles": [],
      "buildDirectory": "build",
      "kconfigFragments": [],
      "snippets": [],
      "dtcOverlays": [],
      "extraDtcOverlays": []
    }

Related