f8f14bf0c7
* ports/nrf/boards: Adding linker script for nrf52832 using BLE stack s132 v.5.0.0. * ports/nrf/drivers/bluetooth: Updating makefile to add BLE_API_VERSION=4 if s132 v5.0.0 is used. * ports/nrf/drivers/bluetooth: Updating BLE stack download script to also download S132 v5.0.0. * ports/nrf/drivers/bluetooth: Updating ble_drv.c to handle BLE_API_VERSION=4 (s132 v5.0.0). * ports/nrf/boards: Updating linker script for nrf52832 with s132 v.5.0.0 bluetooth stack. * ports/nrf/drivers/bluetooth: Removing commented out code in ble_drv.c * ports/nrf/drivers/bluetooth: Updating define of GATT_MTU_SIZE_DEFAULT for SD132v5 to be defined using the new name defined in the SD headers in a more generic way. * ports/nrf/drivers/bluetooth: Cleaning up use of BLE_API_VERSION in the ble_drv.c. Also considering s140v6 API, so not all has been changed to >= if API version 3 and 4 in combo is used. New s140v6 will differ on these, and add a new API not compatible with the API for 3 and 4.
96 lines
2.4 KiB
Bash
Executable File
96 lines
2.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
function download_s110_nrf51_8_0_0
|
|
{
|
|
echo ""
|
|
echo "####################################"
|
|
echo "### Downloading s110_nrf51_8.0.0 ###"
|
|
echo "####################################"
|
|
echo ""
|
|
|
|
mkdir -p $1/s110_nrf51_8.0.0
|
|
cd $1/s110_nrf51_8.0.0
|
|
wget https://www.nordicsemi.com/eng/nordic/download_resource/45846/3/78153065/80234
|
|
mv 80234 temp.zip
|
|
unzip -u temp.zip
|
|
rm temp.zip
|
|
cd -
|
|
}
|
|
|
|
function download_s132_nrf52_2_0_1
|
|
{
|
|
echo ""
|
|
echo "####################################"
|
|
echo "### Downloading s132_nrf52_2.0.1 ###"
|
|
echo "####################################"
|
|
echo ""
|
|
|
|
mkdir -p $1/s132_nrf52_2.0.1
|
|
cd $1/s132_nrf52_2.0.1
|
|
wget https://www.nordicsemi.com/eng/nordic/download_resource/51479/6/84640562/95151
|
|
mv 95151 temp.zip
|
|
unzip -u temp.zip
|
|
rm temp.zip
|
|
cd -
|
|
}
|
|
|
|
function download_s132_nrf52_3_0_0
|
|
{
|
|
echo ""
|
|
echo "####################################"
|
|
echo "### Downloading s132_nrf52_3.0.0 ###"
|
|
echo "####################################"
|
|
echo ""
|
|
|
|
mkdir -p $1/s132_nrf52_3.0.0
|
|
cd $1/s132_nrf52_3.0.0
|
|
|
|
wget https://www.nordicsemi.com/eng/nordic/download_resource/56261/6/26298825/108144
|
|
mv 108144 temp.zip
|
|
unzip -u temp.zip
|
|
rm temp.zip
|
|
cd -
|
|
}
|
|
|
|
|
|
function download_s132_nrf52_5_0_0
|
|
{
|
|
echo ""
|
|
echo "####################################"
|
|
echo "### Downloading s132_nrf52_5.0.0 ###"
|
|
echo "####################################"
|
|
echo ""
|
|
|
|
mkdir -p $1/s132_nrf52_5.0.0
|
|
cd $1/s132_nrf52_5.0.0
|
|
|
|
wget https://www.nordicsemi.com/eng/nordic/download_resource/58987/11/28978944/116068
|
|
mv 116068 temp.zip
|
|
unzip -u temp.zip
|
|
rm temp.zip
|
|
cd -
|
|
}
|
|
|
|
SCRIPT_DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
if [ $# -eq 0 ]; then
|
|
echo "No Bluetooth LE stack defined, downloading all."
|
|
download_s110_nrf51_8_0_0 ${SCRIPT_DIR}
|
|
download_s132_nrf52_2_0_1 ${SCRIPT_DIR}
|
|
download_s132_nrf52_3_0_0 ${SCRIPT_DIR}
|
|
download_s132_nrf52_5_0_0 ${SCRIPT_DIR}
|
|
else
|
|
case $1 in
|
|
"s110_nrf51" )
|
|
download_s110_nrf51_8_0_0 ${SCRIPT_DIR} ;;
|
|
"s132_nrf52_2_0_1" )
|
|
download_s132_nrf52_2_0_1 ${SCRIPT_DIR} ;;
|
|
"s132_nrf52_3_0_0" )
|
|
download_s132_nrf52_3_0_0 ${SCRIPT_DIR} ;;
|
|
"s132_nrf52_5_0_0" )
|
|
download_s132_nrf52_5_0_0 ${SCRIPT_DIR} ;;
|
|
esac
|
|
fi
|
|
|
|
exit 0
|