-
Notifications
You must be signed in to change notification settings - Fork 9
Home
By default PCA10040 (nrf52832) is used as compile target. To build issue the following command inside the nrf5/ folder:
make
make flash
Alternativly the target board could be defined:
make BOARD=pca10040
make flash
First, you need to download the SDK containing a bluetooth stack from developer.nordicsemi.com The list below shows which version of the SDK that is supported for the various target boards:
- micro:bit - SDK 10.0 (bluetooth peripheral role)
- pca10000 - SDK 10.0 (bluetooth peripheral role)
- pca10001 - SDK 10.0 (bluetooth peripheral role)
- pca10028 - SDK 10.0 (bluetooth peripheral role)
- pca10031 - SDK 10.0 (bluetooth peripheral role)
- pca10040 - SDK 12.1 (bluetooth central/peripheral role)
- pca10056 - SDK 12.1 (bluetooth central/peripheral role)
When downloaded, the SDK root can be pointed to, which also triggers the makefile to include the bluetooth modules available in micropython.
First prepare the bluetooth folder by downloading Bluetooth LE stacks and headers:
cd bluetooth
./download_ble_stack.sh
cd -
If the Bluetooth stacks has been downloaded, compile the target with the following command:
make BOARD=pca10040 SD=s132
make sd
The make sd will trigger a flash of the bluetooth stack before that application is flashed. Note that also make sd will perform a eraseall on the chip, which could cause 3rd party bootloaders to also be wiped.
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.