diff --git a/deploy.py b/deploy.py index 7af3ce1..808a3fb 100755 --- a/deploy.py +++ b/deploy.py @@ -745,7 +745,8 @@ class OpenSKInstaller: nrfutil_version = __import__("nordicsemi.version").version.NRFUTIL_VERSION if not nrfutil_version.startswith("6."): fatal(("You need to install nrfutil python3 package v6.0 or above. " - f"Found: v{nrfutil_version}")) + f"Found: v{nrfutil_version}. If you use Python >= 3.11, please " + "try version 3.10.")) if not SUPPORTED_BOARDS[self.args.board].nordic_dfu: fatal("This board doesn't support flashing over DFU.") diff --git a/docs/install.md b/docs/install.md index 3a661bd..6cb0698 100644 --- a/docs/install.md +++ b/docs/install.md @@ -25,8 +25,6 @@ following: * python3 and pip (can be installed with the `python3-pip` package on Debian) * the OpenSSL command line tool (can be installed and configured with the `libssl-dev` and `pkg-config` packages on Debian) -* `nrfutil` (can be installed using `pip3 install nrfutil`) if you want to flash - a device with DFU * `uuid-runtime` if you are missing the `uuidgen` command. * `llvm` if you want to use the upgradability feature. @@ -37,6 +35,11 @@ instructions to appropriate binaries for your system. The scripts provided in this project have been tested under Linux and OS X. We haven't tested them on Windows and other platforms. +If you use Python newer than 3.10, then nrfutil for flashing over DFU is +currently not supported. Please use Python 3.10, or play around with [Nordic's +new tool](https://www.nordicsemi.com/Products/Development-tools/nrf-util) +instead. + ### Compiling the firmware If this is your first time installing OpenSK, please skip directly to diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..020ce32 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,13 @@ +# General setup +tockloader == 1.5 +six +intelhex + +# Configure OpenSK (crypto, JTAG lockdown) +colorama +tqdm +cryptography +fido2 >= 1.0.0 + +# DFU install +nrfutil diff --git a/setup.sh b/setup.sh index 6c70397..709c391 100755 --- a/setup.sh +++ b/setup.sh @@ -38,12 +38,9 @@ source tools/gen_key_materials.sh generate_crypto_materials N rustup show -pip3 install --user --upgrade 'tockloader==1.5' six intelhex +pip3 install --upgrade -r requirements.txt # Install dependency to create applications. mkdir -p elf2tab rustup install stable cargo +stable install elf2tab --version 0.7.0 --root elf2tab/ - -# Install python dependencies to factory configure OpenSK (crypto, JTAG lockdown) -pip3 install --user --upgrade colorama tqdm cryptography "fido2>=1.0.0"