circuitpython/ports/nrf/boards/nrf52840-mdk-usb-dongle/README.md
Glenn Ruben Bakke d0b8554df4 nrf: Change selected boards to utilize pre-flashed bootloader.
The nrf52840-mdk-usb-dongle and pca10050 comes with a pre-flashed
bootloader (OpenBootloader).

This commit updates the boards "mpconfigboard.mk" to use DFU as
default flashing method and set the corresponding BOOTLOADER
settings such that nrf52840_open_bootloader_1.2.x.ld linker
script is used.

The default DFU flashing method can be disabled by issuing "DFU=0"
when invoking make. This will lead to "segger" being used as default
flashing tool. When using "DFU=0", the linker scripts will not
compensate for any MBR and Bootloader region being present, and might
overwrite them if they were present.

The commit also removes the custom linker script specific to
nrf52840-mdk-usb-dongle as it now points to a generic.

Updated nrf52840-mdk-usb-dongle's README.md to be more clear on
how to deploy the built firmware.

The port README.md has also been updated. In the list of target
boards a new column has been added to indicate which bootloader
is present on the target board. And for consistency, changed all
examples in the README.md to use "deploy" instead of "flash".
2020-12-07 20:04:50 +01:00

49 lines
2.0 KiB
Markdown

nRF52840 MDK USB Dongle
=======================
The *[nRF52840 MDK USB
Dongle](https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle)* is a small,
low-cost development board in a USB dongle form-factor powered by an nRF52840
with 1MB flash and 256KB RAM.
This device is pre-installed with [Open
Bootloader](https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle/programming/),
allowing DFU upgrades over USB using Nordic [nRF
Connect](https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Connect-for-desktop)
or [nrfutil](https://github.com/NordicSemiconductor/pc-nrfutil/). To support
Open Bootloader, the flash and memory layout must be adjusted slightly (details
[here](https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial))
from the typical nRF build; this board definition ensure the appropriate build
configuration is used for MicroPython.
Pinout
------
The [pinout
diagram](https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle/#pinout-diagram)
provides an overview of the available pins and their capabilities. All pins are
available in MicroPython, using the pin numbers labelled in the diagram
(excluding the leading port number, *P0*).
The three LEDs are available either through the usual `Pin` mechanism - pins
22-24 - or by `board.LED(n)` where n can be 1, 2 or 3.
Build instructions
------------------
Follow the standard [nRF Port build instructions](../../README.md); but use
`nrf52840-mdk-usb-dongle` as the value for `BOARD`:
make BOARD=nrf52840-mdk-usb-dongle
The build artifacts will be created in `build-nrf52840-mdk-usb-dongle`. Once
built, the target can be deployed to the device as described in
[nRFUtil targets](../../README.md#nrfutil-targets).
An alternative way to deploy to the device, is to open `firmware.hex` using
*nRF Connect* and select *Write*. Detailed instructions can be found on the
[developer
wiki](https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle/programming/).