Installation Instructions
Rust and tooling
Base Rust installation
Go to https://rustup.rs and follow the instructions.
Windows: Do install the optional components of the C++ build tools package. The installation size may take up to 2 GB of disk space.
probe-run
probe-run
is a custom Cargo runner that lets you run embedded apps as if they were native apps. Install version v0.1.4 or newer:
$ cargo install probe-run
cargo-generate
cargo-generate
generates a new Rust project from a predefined template of choice for you. Install it like so:
$ cargo install cargo-generate
flip-link
install flip-link
cargo install flip-link
Rust Analyzer
If you use Visual Studio Code, we recommend you install Rust Analyzer to help you during development.
Windows: It's OK to ignore the message about git
not being installed, if you get one!
OS specific dependencies
Linux only: Access USB Devices as non-root User
Some of our tools depend on pkg-config
and libudev.pc
. Ensure you have the proper packages installed; on Debian based distributions you can use:
$ sudo apt-get install libudev-dev libusb-1.0-0-dev
To access the USB devices as a non-root user, follow these steps:
- Create the following file with the displayed contents. You'll need root permissions to create the file.
$ cat /etc/udev/rules.d/50-knurling.rules
# udev rules to allow access to USB devices as a non-root user
# nRF52840 Development Kit
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1015", TAG+="uaccess"
- Run the following command to make the new udev rules effective
$ sudo udevadm control --reload-rules
Windows only: Zadig JLink driver
On Windows you'll need to associate the nRF52840 Development Kit's USB device to the WinUSB driver.
To do that connect the nRF52840 DK to your PC using micro-USB port J2 (as done before) then download and run the Zadig tool.
In Zadig's graphical user interface,
-
Select the 'List all devices' option from the Options menu at the top.
-
From the device (top) drop down menu select "BULK interface (Interface 2)"
-
Once that device is selected,
1366 1015
should be displayed in the USB ID field. That's the Vendor ID - Product ID pair. -
Select 'WinUSB' as the target driver (right side)
-
Click "Install WinUSB driver". The process may take a few minutes to complete.