nRF54L15 protobuf error

Hello, I'm running an example of channel sounding using nRF54L15.

The build is fine, but the following error occurs during flash.

Python is using 3.12.4 version.
As you can see, we're using protobuf version 3.19.6 as well. (The same error occurred in 3.20.0 version)

But I keep getting protobuf errors, how do I fix it?

-------------------------------------------------------------------------

I solved this problem, but another problem occurred.

ModuleNotFoundError: No module named 'constants'

Parents
  • Hello,

    Sorry for the late reply. I was assigned your ticket, but was out of office yesterday. 

    I solved this problem, but another problem occurred.

    ModuleNotFoundError: No module named 'constants'

    Is there any way I can reproduce this issue? If so, can you please give some instructions on how to do it? If it is at all related to your initial issue, it seems like it is a toolchain issue. From the build log (probably from when you are flashing) it seems like it tries to use your default python installation, instead of the python version provided in the toolchain. Did you install a toolchain using VS Code? If so, which one do you use?

    Best regards,
    Edvin

  • Hello, thank you for your answer.

    Initially, I encountered a version-related error with protobuf, so I ran the following command:
    C:\ncs\toolchains\0b393f9e1b\opt\bin\python.exe -m pip install protobuf==3.20.3
    After that, I started getting a 'constants' error.

    ModuleNotFoundError: No module named 'constants'

    I am using SDK v3.0.0, which I downloaded via nRF Connect for Desktop. and I'm using Python 3.12

    I'll be waiting for your reply.

    +

    I referred to the following post on Nordic DevZone:
    RE: nrfutil ModuleNotFoundError: No module named 'constants' 

    I did some research and found that issues occur with Python 3.10 and above because some outdated packages reference attributes like collections.Hashable, which no longer exist.
    Does this mean that SDK v3.0.0 cannot run on Python 3.12?

  • I see. I just tested building the channel_sounding_ras_initiator with both NCS v3.0.0 and v3.0.1 (I recommend that you move to 3.0.1), and none of them triggered any protobuf issues. I do see from your build log that it was, for some reason, trying to use your local version of python, located in "C:\Users\SJIT\AppData\Local\Programs\Python\Python312\Scripts\..." rather than the one from your toolchain.

    Also, after you "fixed it" by installing PyYAML, I am not sure what effect that will have on the toolchain. I suggest you remove the toolchain and reinstall it.

    After you do that, try the following. Make sure that the active build is the application that you are trying to build, and then click:

    Make sure that the toolchain listed is the one you are trying to use. Now, in that terminal, navigate to the root folder for the application:

    cd ..\..\

    and use this command to build:

    west build -b nrf54l15dk/nrf54l15/cpuapp -d build_2

    Does that build without any errors?

    Best regards,

    Edvin

  • Hello,

    Unfortunately, as shown in the image, I tried using the Build and Flash buttons in the nRF Connect SDK Toolchain v3.0.1, but the same error kept occurring.

    However, I was able to resolve the issue and successfully flash the device.

    I tried several methods:

    • Downloaded Python 3.10 and configured both the interpreter and system PATH to use it.

    • I downloaded nrfutil from www.nordicsemi.com/.../nrf-util, manually moved it to the folder C:\ncs\toolchains\0b393f9e1b\opt\bin\Scripts, and ran the command C:\ncs\toolchains\0b393f9e1b\opt\bin\Scripts\nrfutil.exe install device

  • According to google translate, this is what you wrote:

    Hi,

    Unfortunately, I tried using the Build and Flash buttons of the nRF Connect SDK Toolchain v3.0.1 as shown in the image, but I kept getting the same error.

    However, I was able to fix the issue and successfully run the flash.

    I tried several methods:

    Download Python 3.10 and configure the interpreter and system PATH to use it.

    Download nrfutil from www.nordicsemi.com/.../nrf-util and manually place it and run the command nrfutil.exeC:\ncs\toolchains\0b393f9e1b\opt\bin\Scriptsnrfutil.exe install devic

    If you got it working, it is fine, I guess. But you may still run into other issues, if your toolchain is not being correctly set up when building your applications.

    Try building using this terminal and the command "west build -b <board_name> -d build_2"

    But if you have changed things inside the toolchain, I would recommend that you uninstall that toolchain and re-install it again. Building with the toolchain enabled should never try to access your "personal" python instance outside the toolchain.

    Best regards,

    Edvin

  • Hello,


    As you mentioned, I ran the following command:

    west build -b nrf54l15dk/nrf54l15/cpuapp -d C:\ncs\channel_sounding_ras_initiator\build

     
    -- west build: generating a build system
    CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build 
    tool.
    -- Configuring incomplete, errors occurred!
    FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' -DWEST_PYTHON=C:/Users/SJIT/AppData/Local/Programs/Python/Python310/python.exe '-BC:\ncs\channel_sounding_ras_initiator\build' -GNinja -DBOARD=nrf54l15dk/nrf54l15/cpuapp '-SC:\ncs\v3.0.1\zephyr\share\sysbuild' '-DAPP_DIR:PATH=C:\ncs\channel_sounding_ras_initiator'

    However, I encountered an issue with Ninja,
    but I was able to resolve it by adding the following to the PATH:

    set PATH=C:\ncs\toolchains\0b393f9e1b\opt\bin;%PATH%

    and the build was successful.

    However, when I first tried to flash using this command:

    C:\ncs\v3.0.1>west flash -d C:\ncs\channel_sounding_ras_initiator\build

    an error occurred.

    At that time, after I moved the downloaded nrfutil.exe file into C:\ncs\toolchains\0b393f9e1b\opt\bin,
    the flashing worked correctly. 
    Thank you for your respons
  • A new error has occurred.

    After my colleague installed a new (=nothing touched) toolchain and SDK version v3.0.1, they tried to run the build using the command

    west build -b nrf54l15dk/nrf54l15/cpuapp -d build

    but encountered the following error message:
    'west' is not recognized as an internal or external command, operable program, or batch file.

Reply
  • A new error has occurred.

    After my colleague installed a new (=nothing touched) toolchain and SDK version v3.0.1, they tried to run the build using the command

    west build -b nrf54l15dk/nrf54l15/cpuapp -d build

    but encountered the following error message:
    'west' is not recognized as an internal or external command, operable program, or batch file.

Children
No Data
Related