nRF Connect for VS Code: Kconfig & GUI config failing with SDK v1.8.0 (macOS)

HI, 

I've gotten round to trying to setup a development envoironment with nRF Connect SDK & VS Code which I've been really looking forward to. 

I've installed nRF SDK v1.8.0 from the NRF connect desktop app's toolchain manager. I've also installed all the required VS code extensions.

I then went to setup an example project: "zephyr/samples/bluetooth/peripheral_hr ", using a freestanding envoironment. It succesfully builds and flashes my nRF52840 dk, and seems to work. 

I tried to then use the guiconfig to see what modules I can add and start playing around, the following error is produced in the terminal when I try to start it:


-- west build: running target guiconfig
[0/1] cd /Users/myusername/myprojectname/myprojectname/build/zephyr/kconfig &...phyr/scripts/kconfig/guiconfig.py /opt/nordic/ncs/v1.8.0/zephyr/Kconfig
Traceback (most recent call last):
  File "/opt/nordic/ncs/v1.8.0/zephyr/scripts/kconfig/guiconfig.py", line 77, in <module>
    from tkinter import *
  File "/opt/nordic/ncs/v1.8.0/toolchain/Cellar/[email protected]/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 37, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ImportError: dlopen(/opt/nordic/ncs/v1.8.0/toolchain/opt/[email protected]/libexec/_tkinter.cpython-39-darwin.so, 2): Library not loaded: /opt/nordic/ncs/v1.8.0/toolchain/opt/tcl-tk/lib/libtcl8.6.dylib
  Referenced from: /opt/nordic/ncs/v1.8.0/toolchain/opt/[email protected]/libexec/_tkinter.cpython-39-darwin.so
  Reason: image not found
FAILED: CMakeFiles/guiconfig /Users/myusername/myprojectname/myprojectname/build/CMakeFiles/guiconfig 

It seems the python interpreter used cannot find the Tk gui package. I'm not quite sure if it's trying to use one of my system interpet

Also, Im not sure if this is supposed to anything but clicking 'Kconfig' just says "Unable to find Kconfig information to display. Please select a Kconfig file first"

Further more, there is an error message in the zephyr files Kconfig.defconfig, I'm not sure if this is related:

File: "/opt/nordic/ncs/v1.8.0/zephyr/soc/arm/atmel_sam/Kconfig.defconfig",

"message": "soc/arm/atmel_sam/Kconfig.defconfig:11: error: couldn't parse 'default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency)': macro expanded to blank string",


Parents
  • Hi, 

    Yes I'm starting VS Code from the toolchain manager. I haven't actually adjusted any configurations, as the said error messages pop up soon as  I click "guiconfig" or "kconfig". I've tried one of the 'official' examples: like https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/nrf/samples/bluetooth/peripheral_hr_coded/README.html

    Same issue there.

    For guiconfig, it's clear the python interpreter is being used cannot find the tkinter gui package. I've done some more investigation, and it seems your toolchain has it's own python interpreter bundled with it, as you can see from these lines:

      File "/opt/nordic/ncs/v1.8.0/zephyr/scripts/kconfig/guiconfig.py", line 77, in <module>
        from tkinter import *
      File "/opt/nordic/ncs/v1.8.0/toolchain/Cellar/[email protected]/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 37, in <module>
        import _tkinter # If this fails your Python may not be configured for Tk
    ImportError:

    For kconfig, this message I think might be causing the issue:

    soc/arm/atmel_sam/Kconfig.defconfig:11: error: couldn't parse 'default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency)': macro expanded to blank string

    In the file "/opt/nordic/ncs/v1.8.0/zephyr/soc/arm/atmel_sam/Kconfig.defconfig",

Reply
  • Hi, 

    Yes I'm starting VS Code from the toolchain manager. I haven't actually adjusted any configurations, as the said error messages pop up soon as  I click "guiconfig" or "kconfig". I've tried one of the 'official' examples: like https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/nrf/samples/bluetooth/peripheral_hr_coded/README.html

    Same issue there.

    For guiconfig, it's clear the python interpreter is being used cannot find the tkinter gui package. I've done some more investigation, and it seems your toolchain has it's own python interpreter bundled with it, as you can see from these lines:

      File "/opt/nordic/ncs/v1.8.0/zephyr/scripts/kconfig/guiconfig.py", line 77, in <module>
        from tkinter import *
      File "/opt/nordic/ncs/v1.8.0/toolchain/Cellar/[email protected]/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 37, in <module>
        import _tkinter # If this fails your Python may not be configured for Tk
    ImportError:

    For kconfig, this message I think might be causing the issue:

    soc/arm/atmel_sam/Kconfig.defconfig:11: error: couldn't parse 'default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency)': macro expanded to blank string

    In the file "/opt/nordic/ncs/v1.8.0/zephyr/soc/arm/atmel_sam/Kconfig.defconfig",

Children
Related