Skip to content

Commit

Permalink
Merge pull request #258 from NordicSemiconductor/fix/update-to-nrf-bl…
Browse files Browse the repository at this point in the history
…e-driver-4.1.2

Update to nrf ble driver 4.1.2
  • Loading branch information
bencefr authored Jul 21, 2020
2 parents b11e78c + bc6542a commit 86d37a4
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 31 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

find_package(nrf-ble-driver 4.1.1 REQUIRED)
find_package(nrf-ble-driver 4.1.2 REQUIRED)

if (NOT DEFINED CMAKE_JS_INC)
message (
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ These variables can be set in `.npmrc` file in the root of your Electron based p

If there are no precompiled binaries for your platform, the install script will try to build them. You will need a working C++ compiler and the pc-ble-driver library available by cmake find_package.

The recommended way to get pc-ble-driver is using vcpkg. There are two options getting vcpkg. One is to [download](https://github.com/NordicPlayground/vcpkg/releases/tag/2019-06-09) the released version, the other is to clone the repository and checkout tag/2019-06-09.
The recommended way to get pc-ble-driver is using vcpkg. There are two options getting vcpkg. One is to [download](https://github.com/Microsoft/vcpkg/releases/tag/2020.07) the released version, the other is to clone the repository and checkout tag/2020.07.
Afterwards vcpkg must be compiled for the target architecture used by your node executable. Then set the environment variable `VCPKG_ROOT` to the full path of the vcpkg install and repository and it will get automatically picked up when doing `npm install`.

A full example of preparing building on Windows for 64-bit Node:

$ git clone https://github.com/NordicPlayground/vcpkg.git
$ git checkout tags/2019-06-09
$ git clone https://github.com/Microsoft/vcpkg.git
$ git checkout tags/2020.07
$ ./vcpkg/bootstrap.bat
$ ./vcpkg/vcpkg install nrf-ble-driver:x64-windows

Expand Down
36 changes: 18 additions & 18 deletions api/__tests__/__snapshots__/firmwareRegistry-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,59 +3,59 @@
exports[`FirmwareRegistry.getJlinkConnectivityFirmware returns expected jlink firmware info for nrf51 and darwin 1`] = `
Object {
"baudRate": 1000000,
"file": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/connectivity_4.1.1_1m_with_s130_2.0.1.hex",
"file": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/connectivity_4.1.2_1m_with_s130_2.0.1.hex",
"sdBleApiVersion": 2,
"version": "4.1.1",
"version": "4.1.2",
"versionInfoStart": 233472,
}
`;

exports[`FirmwareRegistry.getJlinkConnectivityFirmware returns expected jlink firmware info for nrf51 and linux 1`] = `
Object {
"baudRate": 1000000,
"file": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/connectivity_4.1.1_1m_with_s130_2.0.1.hex",
"file": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/connectivity_4.1.2_1m_with_s130_2.0.1.hex",
"sdBleApiVersion": 2,
"version": "4.1.1",
"version": "4.1.2",
"versionInfoStart": 233472,
}
`;

exports[`FirmwareRegistry.getJlinkConnectivityFirmware returns expected jlink firmware info for nrf51 and win32 1`] = `
Object {
"baudRate": 1000000,
"file": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/connectivity_4.1.1_1m_with_s130_2.0.1.hex",
"file": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/connectivity_4.1.2_1m_with_s130_2.0.1.hex",
"sdBleApiVersion": 2,
"version": "4.1.1",
"version": "4.1.2",
"versionInfoStart": 233472,
}
`;

exports[`FirmwareRegistry.getJlinkConnectivityFirmware returns expected jlink firmware info for nrf52 and darwin 1`] = `
Object {
"baudRate": 1000000,
"file": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/connectivity_4.1.1_1m_with_s132_5.1.0.hex",
"file": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/connectivity_4.1.2_1m_with_s132_5.1.0.hex",
"sdBleApiVersion": 5,
"version": "4.1.1",
"version": "4.1.2",
"versionInfoStart": 327680,
}
`;

exports[`FirmwareRegistry.getJlinkConnectivityFirmware returns expected jlink firmware info for nrf52 and linux 1`] = `
Object {
"baudRate": 1000000,
"file": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/connectivity_4.1.1_1m_with_s132_5.1.0.hex",
"file": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/connectivity_4.1.2_1m_with_s132_5.1.0.hex",
"sdBleApiVersion": 5,
"version": "4.1.1",
"version": "4.1.2",
"versionInfoStart": 327680,
}
`;

exports[`FirmwareRegistry.getJlinkConnectivityFirmware returns expected jlink firmware info for nrf52 and win32 1`] = `
Object {
"baudRate": 1000000,
"file": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/connectivity_4.1.1_1m_with_s132_5.1.0.hex",
"file": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/connectivity_4.1.2_1m_with_s132_5.1.0.hex",
"sdBleApiVersion": 5,
"version": "4.1.1",
"version": "4.1.2",
"versionInfoStart": 327680,
}
`;
Expand All @@ -64,37 +64,37 @@ exports[`FirmwareRegistry.getNordicUSBConnectivityFirmware returns expected nord
Object {
"baudRate": 1000000,
"files": Object {
"application": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/connectivity_4.1.1_usb_for_s132_5.1.0.hex",
"application": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/connectivity_4.1.2_usb_for_s132_5.1.0.hex",
"softdevice": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/s132_nrf52_5.1.0_softdevice.hex",
},
"sdBleApiVersion": 5,
"sdId": 165,
"version": "ble-connectivity 4.1.1+May-07-2019-15-12-19",
"version": "ble-connectivity 4.1.2+Jul-14-2020-05-48-48",
}
`;

exports[`FirmwareRegistry.getNordicUSBConnectivityFirmware returns expected nordicUsb firmware info for linux 1`] = `
Object {
"baudRate": 1000000,
"files": Object {
"application": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/connectivity_4.1.1_usb_for_s132_5.1.0.hex",
"application": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/connectivity_4.1.2_usb_for_s132_5.1.0.hex",
"softdevice": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/s132_nrf52_5.1.0_softdevice.hex",
},
"sdBleApiVersion": 5,
"sdId": 165,
"version": "ble-connectivity 4.1.1+May-07-2019-15-12-19",
"version": "ble-connectivity 4.1.2+Jul-14-2020-05-48-48",
}
`;

exports[`FirmwareRegistry.getNordicUSBConnectivityFirmware returns expected nordicUsb firmware info for win32 1`] = `
Object {
"baudRate": 1000000,
"files": Object {
"application": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/connectivity_4.1.1_usb_for_s132_5.1.0.hex",
"application": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/connectivity_4.1.2_usb_for_s132_5.1.0.hex",
"softdevice": "<PROJECT_ROOT>/build/Release/pc-ble-driver/hex/s132_nrf52_5.1.0_softdevice.hex",
},
"sdBleApiVersion": 5,
"sdId": 165,
"version": "ble-connectivity 4.1.1+May-07-2019-15-12-19",
"version": "ble-connectivity 4.1.2+Jul-14-2020-05-48-48",
}
`;
4 changes: 2 additions & 2 deletions api/firmwareRegistry.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ const hexDir = path.join(currentDir, '..', '..', 'build', 'Release', 'pc-ble-dri
const VERSION_INFO_MAGIC = 0x46D8A517;
const VERSION_INFO_LENGTH = 24;

const connectivityVersion = '4.1.1';
const connectivityApplicationVersionString = 'ble-connectivity 4.1.1+May-07-2019-15-12-19';
const connectivityVersion = '4.1.2';
const connectivityApplicationVersionString = 'ble-connectivity 4.1.2+Jul-14-2020-05-48-48';
const connectivityBaudRate = 1000000;

/*
Expand Down
33 changes: 28 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
parameters:
- name: VCPKG_COMMIT
displayName: VCPKG commit
type: string
default: 38e1a6465beeb7b294a584d1c4ec24b2daab2670
values:
- master
- 38e1a6465beeb7b294a584d1c4ec24b2daab2670
- 2020.06
- 2020.04
- 2020.01
- 2019.12
- 2019.11
- 2019.10
- 2019.09
- 2019.08
- 2019.07
- 2019.06

jobs:
- job: Build
variables:
VCPKG_ROOT: '$(Agent.HomeDirectory)/vcpkg'
VCPKG_REPOSITORY: https://github.com/Microsoft/vcpkg.git
strategy:
matrix:
linux:
Expand Down Expand Up @@ -40,26 +60,29 @@ jobs:
- bash: |
set -o errexit -o pipefail
export PATH=$VCPKG_ROOT:$PATH
git clone https://github.com/NordicPlayground/vcpkg.git $VCPKG_ROOT
$VCPKG_ROOT/bootstrap-vcpkg.sh
git clone $(VCPKG_REPOSITORY) $VCPKG_ROOT
git -C $VCPKG_ROOT checkout ${{ parameters.VCPKG_COMMIT }}
CC=gcc-9 CXX=g++-9 $VCPKG_ROOT/bootstrap-vcpkg.sh
vcpkg install nrf-ble-driver
condition: contains(variables['imageName'], 'ubuntu')
displayName: '[Linux] Install nrf-ble-driver'
- bash: |
set -o errexit -o pipefail
export PATH=$VCPKG_ROOT:$PATH
git clone https://github.com/NordicPlayground/vcpkg.git $VCPKG_ROOT
git clone $(VCPKG_REPOSITORY) $VCPKG_ROOT
git -C $VCPKG_ROOT checkout ${{ parameters.VCPKG_COMMIT }}
# Vcpkg bootstap does not work with Apple Clang and it
# refuses to use it. Explicitly point it to the GCC
# installed in the "Install toolchain" in CC/CXX.
CC=gcc-6 CXX=g++-6 $VCPKG_ROOT/bootstrap-vcpkg.sh
CC=gcc-9 CXX=g++-9 $VCPKG_ROOT/bootstrap-vcpkg.sh
vcpkg install nrf-ble-driver
condition: contains(variables['imageName'], 'mac')
displayName: '[MacOS] Install nrf-ble-driver'
- script: |
set VCPKG_ROOT=$(Agent.HomeDirectory)\vcpkg
set PATH=%VCPKG_ROOT%;%PATH%
git clone https://github.com/NordicPlayground/vcpkg.git %VCPKG_ROOT%
git clone $(VCPKG_REPOSITORY) %VCPKG_ROOT%
git -C %VCPKG_ROOT% checkout ${{ parameters.VCPKG_COMMIT }}
%VCPKG_ROOT%\bootstrap-vcpkg.bat
condition: contains(variables['imageName'], 'win')
displayName: '[Windows] Install vcpkg'
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"jest-bamboo-formatter": "1.0.1",
"jest-serializer-path": "^0.1.15",
"jscs": "^3.0.7",
"jsdoc": "^3.6.2",
"jsdoc": "3.6.4",
"jshint": "^2.10.2",
"minami": "^1.2.3",
"node-pre-gyp-github": "1.4.3",
Expand All @@ -82,4 +82,4 @@
"typings/"
],
"typings": "typings/index.d.ts"
}
}

0 comments on commit 86d37a4

Please sign in to comment.