9.3 Porting From BLE-Stack 1.4.2 to 1.5.0
It is strongly advised to make a backup of your existing project before porting your project.
The instructions below are provided for updating an existing, functional 1.4.2 based application with essential / mandatory updates from 1.5.0.
If your project is based off a BLE-Stack version prior to 1.4.2, follow the instructions in Section 9.4 to port your project to 1.4.2.
Some sample applications were updated, however, none of these updates are mandatory or break BLE compatibility. To take advantage of these sample application updates, diff/merge your target application with the corresponding TI sample application.
- Starting with a functional 1.4.2 installation, copy the following files/folders from a clean, unmodified 1.5.0 installation to your existing 1.4.2 installation. When prompted, overwrite/replace the existing files with the newer 1.5.0 files. Both 1.4.2 and 1.5.0 utilize the same file/path structure and naming. All paths are relative to $BLE_INSTALL$, which is the root installation of the SDK, for example, C:\Texas Instruments\BLE-CC254x-1.5.0.
- All sub folders & .lib files from \Projects\ble\Libraries\*
- \Components\ble\controller\CC254x\include\ll.h
- \Components\ble\include\att.h
- \Components\ble\include\gatt.h
- \Components\osal\mcu\cc2540\osal_snv.c
- \Components\hal\target\CC2540EB\_hal_uart_dma.c and \Components\hal\target\CC2540USB\_hal_uart_dma.c
- \Projects\ble\Profiles\Roles\gapbondmgr.c
- Update the CC2540 USB Library: All library sub folders and files from \Components\hal\target\CC2540USB\*
- The following GATT services have minor updates. Copy the respective service.c file from \Projects\ble\Profiles to your project:
- Cycling Service (CSC)
- Glucose
- Running Service (RSC)
- Thermometer
- The following GATT APIs have a parameter change. Most applications do not use call these APIs directly since they are used internally by the BLE libraries. Refer to gatt.h for the new API definition if your application uses any of these APIs:
- GATT_VerifyReadPermissions
- GATT_VerifyWritePermissions
- BIM for OAD enabled projects: Apply the DMA VLEN initialization to DMAExecCrc in \Projects\ble\util\BIM\app\bim_main.c, see line 347 of 1.5.0 code:
// Use LEN for transfer count
HAL_DMA_SET_VLEN( dmaCh0_p, HAL_DMA_VLEN_USE_LEN );
After making the above modifications, open your updated project with IAR Embedded Workbench for 8051 v10.30.1. IAR will prompt you to confirm that your project is being updated. Select Yes to continue and Save the project after the conversion is complete.
Congratulations! Your 1.4.2 project should now build cleanly using the updated libraries and files from 1.5.0. If any issues are found during the porting process, visit the Bluetooth E2E forum for support.