You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* MakerDiary nRF52840 MDK USB Dongle: `boards/makerdiary_nrf52840_mdk_usb_dongle/README.md`
40
-
41
-
For all other board targets, see the generic notes below.
5
+
> **NOTE**: There are board-specific READMEs that may be more up to date than the
6
+
generic board-neutral documentation below.
42
7
43
8
## Compile and Flash
44
9
45
10
Prerequisite steps for building the nrf port:
46
11
47
12
git clone <URL>.git circuitpython
48
13
cd circuitpython
49
-
git submodule update --init
14
+
git submodule update --init --recursive
50
15
make -C mpy-cross
51
16
17
+
Some boards have UF2 bootloaders and can simply be flashed in the normal way, by copying
18
+
firmware.uf2 to the BOOT drive.
19
+
52
20
To build and flash issue the following command inside the ports/nrf/ folder:
53
21
54
22
make BOARD=pca10056
55
23
make BOARD=pca10056 flash
56
24
57
-
## Compile and Flash with Bluetooth Stack
58
-
59
-
First prepare the bluetooth folder by downloading Bluetooth LE stacks and headers:
60
-
61
-
./bluetooth/download_ble_stack.sh
62
-
63
-
If the Bluetooth stacks has been downloaded, compile the target with the following command:
64
-
65
-
make BOARD=pca10040 SD=s132
66
-
67
-
The **make sd** will trigger a flash of the bluetooth stack before that application is flashed. Note that **make sd** will perform a full erase of the chip, which could cause 3rd party bootloaders to also be wiped.
68
-
69
-
make BOARD=pca10040 SD=s132 sd
70
-
71
-
Note: further tuning of features to include in bluetooth or even setting up the device to use REPL over Bluetooth can be configured in the `bluetooth_conf.h`.
72
-
73
-
## Target Boards and Make Flags
74
-
75
-
Target Board (BOARD) | Bluetooth Stack (SD) | Bluetooth Support | Flash Util
electronut_labs_papyr | s140 | Peripheral and Scanner | UF2 bootloader
82
-
electronut_labs_blip | s140 | Peripheral and Scanner | Black Magic Probe
83
-
84
25
## Segger Targets
85
26
86
27
Install the necessary tools to flash and debug using Segger:
@@ -107,22 +48,7 @@ run follow command to install [adafruit-nrfutil](https://github.com/adafruit/Ada
107
48
* dfu-gen: Generates a Firmware zip to be used by the DFU flash application.
108
49
* dfu-flash: Triggers the DFU flash application to upload the firmware from the generated Firmware zip file.
109
50
110
-
Example on how to generate and flash feather_nrf52840 target:
111
-
112
-
make BOARD=feather_nrf52840 SD=s140
113
-
make BOARD=feather_nrf52840 SD=s140 dfu-gen dfu-flash
114
-
115
-
## Bluetooth LE REPL
116
-
117
-
The port also implements a BLE REPL driver. This feature is disabled by default, as it will deactivate the UART REPL when activated. As some of the nRF devices only have one UART, using the BLE REPL free's the UART instance such that it can be used as a general UART peripheral not bound to REPL.
118
-
119
-
The configuration can be enabled by editing the `bluetooth_conf.h` and set `MICROPY_PY_BLE_NUS` to 1.
120
51
121
52
When enabled you have different options to test it:
122
53
*[NUS Console for Linux](https://github.com/tralamazza/nus_console) (recommended)
WebBluetooth mode can also be configured by editing `bluetooth_conf.h` and set `BLUETOOTH_WEBBLUETOOTH_REPL` to 1. This will alternate advertisement between Eddystone URL and regular connectable advertisement. The Eddystone URL will point the phone or PC to download [WebBluetooth REPL](https://glennrub.github.io/webbluetooth/micropython/repl/) (experimental), which subsequently can be used to connect to the Bluetooth REPL from the PC or Phone browser.
0 commit comments