NRF-SDK 1.8.0 - can't get west build working (Python issue

I am simply trying to build the hello world (and blinky, results are the same) with NRF-SDK 1.8.0 - it's based on Zephyr 2.7, which is the LTS release.

Target board is 5340. I've installed the toolchains, but during the installation you get some notes already about incompatible modules. Tried building, no luck.

I've tried to resolve those by downgrading some modules. However, no luck.

Does anyone have a working setup for 1.8.0 and the pip list output from that?

Here's the error:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
(.venv) 16:25 jannek@jannek-P720:~/nrf-sdk$ west build -p auto -b nrf5340dk_nrf5340_cpuapp zephyr/samples/hello_world/
-- west build: generating a build system
Including boilerplate (Zephyr base (cached)): /home/jannek/nrf-sdk/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/jannek/nrf-sdk/zephyr/samples/hello_world
-- Using NCS Toolchain 2.6.20240605.1004412633878 for building. (/home/jannek/ncs/toolchains/e9dba88316/cmake)
-- Zephyr version: 2.7.0 (/home/jannek/nrf-sdk/zephyr), build: v2.7.0-ncs1
-- Found west (found suitable version "1.2.0", minimum required is "0.7.1")
-- Board: nrf5340dk_nrf5340_cpuapp
-- Cache files will be written to: /home/jannek/.cache/zephyr
-- Using toolchain: zephyr 0.13.1 (/home/jannek/zephyr-sdk-0.13.1)
-- Found dtc: /home/jannek/ncs/toolchains/e9dba88316/usr/local/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/jannek/nrf-sdk/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts
-- Generated zephyr.dts: /home/jannek/nrf-sdk/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/jannek/nrf-sdk/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /home/jannek/nrf-sdk/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /home/jannek/nrf-sdk/build/zephyr/dts.cmake
Parsing /home/jannek/nrf-sdk/zephyr/Kconfig
Traceback (most recent call last):
File "/home/jannek/nrf-sdk/zephyr/scripts/kconfig/kconfig.py", line 278, in <module>
main()
File "/home/jannek/nrf-sdk/zephyr/scripts/kconfig/kconfig.py", line 30, in main
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

So, AttributeError: Can't get attribute 'Range' on <module 'devicetree.edtlib'

Something in the Python setup must be wrong. Here's the pip list I have in use now.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
pip list
Package Version
------------------------------ -----------
alabaster 0.7.16
anytree 2.12.1
appdirs 1.4.4
arrow 1.2.3
astroid 3.2.4
babel 2.16.0
breathe 4.33.1
canopen 2.3.0
capstone 4.0.2
cbor 1.0.0
cbor2 5.6.4
certifi 2024.7.4
cffi 1.17.0
charset-normalizer 3.3.2
click 8.1.3
cmsis-pack-manager 0.5.3
colorama 0.4.6
colorlog 6.8.2
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

All help would be greatly appreciated.

I think the root cause is that some dependency has not been pinned down and we get something that is much newer now and this causes the issue. I have been able to install it and I had a working setup earlier. I just did pip install --upgrade again for the requirements.txt due to some other issues (which were really not related to this, but NRF tooling otherwise) and that broke the installation.