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 Reply Children
  • Hello, and thanks for reporting this. 

    According to our team the issue is due to an outdated/incorrect build of the toolchain. The latest kconfig extension should be available, and working, instead of guiconfig

    The team are aware and working on a fix for Mac. 

    Kind regards,
    Øyvind

  • @ Nice, thanks for that. Will give that a go as a temp workaround for now.

  • Please note that the Mac toolchain for v1.8.0 is updated. Reinstall v1.8.0 to fix.

  • @ I've just removed, then re installed v1.8.0:

    Opened my current workspace project and ran guiconfig, it generates the following error:

    > Executing task: /opt/nordic/ncs/v1.8.0/toolchain/bin/west build -d /Users/myusername/myproject/build -t guiconfig <
    
    -- west build: running target guiconfig
    [0/1] cd /Users/myusername/myproject/build/zephyr/kconfig && /opt/nordic/ncs/v1.8.0/toolchain/Cellar/cmake/3.21.1/bin/cm...lchain/opt/[email protected]/bin/python3.9 /opt/nordic/ncs/v1.8.0/zephyr/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 2331, in <module>
    _main()
    File "/opt/nordic/ncs/v1.8.0/zephyr/scripts/kconfig/guiconfig.py", line 105, in _main
    menuconfig(standard_kconfig(__doc__))
    File "/opt/nordic/ncs/v1.8.0/zephyr/scripts/kconfig/guiconfig.py", line 183, in menuconfig
    _create_ui()
    File "/opt/nordic/ncs/v1.8.0/zephyr/scripts/kconfig/guiconfig.py", line 295, in _create_ui
    _root = Tk()
    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 2270, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
    _tkinter.TclError: Can't find a usable init.tcl in the following directories:
    /usr/local/Cellar/tcl-tk/8.6.11_1/lib/tcl8.6 /opt/nordic/ncs/v1.8.0/toolchain/Cellar/[email protected]/3.9.6/lib/tcl8.6 /opt/nordic/ncs/v1.8.0/toolchain/Cellar/[email protected]/lib/tcl8.6 /opt/nordic/ncs/v1.8.0/toolchain/Cellar/[email protected]/3.9.6/library /opt/nordic/ncs/v1.8.0/toolchain/Cellar/[email protected]/library /opt/nordic/ncs/v1.8.0/toolchain/Cellar/[email protected]/tcl8.6.11/library /opt/nordic/ncs/v1.8.0/toolchain/Cellar/tcl8.6.11/library
    
    
    
    This probably means that Tcl wasn't installed properly.

  • _tkinter.TclError: Can't find a usable init.tcl in the following directories: /usr/local/Cellar/tcl-tk/8.6.11_1/lib/tcl8.6

    Do you have another instance/installation of tcltck? The developers are not able to reproduce your issue and refers to using menuconfig or the new kconfig extension.

Related