-
Notifications
You must be signed in to change notification settings - Fork 8
Getting Started
Within this section is documentation for getting a development environment set-up to compile Kaidyth Bootloader on your own machine.
Before you get started, you'll need to download and install a few dependencies.
- First, you need to download the latest ARM toolchain
Kaidyth Bootloader has been tested with
2019-q4-major
. Support for other toolchains is at the developers discretion.
After downloading and extracting the toolchain, add the bin/
directory to your $PATH
environment variable.
- Download and install Nordic SDK 16.0.0
Extract the Nordic SDK and set NORDIC_SDK_PATH
environment variable to the extracted directory.
Note that you may need to adjust
components/toolchain/gcc/Makefile.posix
with the path to the ARM GCCbin
directory.
-
Install the nRF Command Line Tools provide
mergehex
andnrfjprog
, which you may need in the event of a bad flash or bootloader change. -
Install micro-ecc library following the instructions at https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fsdk_app_serial_dfu_bootloader.html.
Depending upon your board, the only piece of hardware that you may need is a USB cable in order to flash the Kaidyth Bootloader application to your device.
In the event your chip becomes bricked however and you want to recover, I recommend buying a cheap J-Link SWD Debugger, such as the J-Link EDU Mini as they are at the time of writing only $20 USD.
If you're wanting to use the existing keypair provided with the repository, symlink the provided keys:
ln -s default_private.pem private.pem
ln -s default_dfu_public_key.c dfu_public_key.c
Otherwise, running
make
will generate a build specific keypair for you to use for your bootloader.
Once you have all the software dependencies installed, compiling Kaidyth Bootloader is as simple as running make <board>
. A list of boards will be printed out of a board is not specified.
make
Makefile:5: *** Specified a board to build pca10059, mdk-usb-dongle, sparkfun-pro-mini. Stop.
Once your program is built, you can flash the program directly from make
by running the following command:
-
Put your device into DFU mode. Most devices can be put into DFU by double tapping the RST button. As the reset procedure varies per board, reference the board specific implementation in the Adafruit nRF52 Bootload repository.
-
Flash your board with the appropriate image.
make BOARD=mdk-usb-dongle clean_flash
Flashing may take a few seconds. Do not unplug the dongle during flashing as it may corrupt the chip.
The bootloader can be put into debug mode by setting the DEBUG=1
make variable at compile time.
make DEBUG=1 BOARD=mdk-usb-dongle clean_flash