BLE5-Stack 1.02.01 to BLE5-Stack 2.00.00¶
This section will describe a way to migrate a project from BLE5-Stack 1.02.01 to a BLE5-Stack 2.00.00 project.
For this migration guide, simple_peripheral from BLE5-Stack 1.02.01 will be ported over to BLE5-Stack 2.00.00. Because the directory structure is nearly identical between the two releases, the recommended approach is to start with a BLE5-Stack 2.00.00 project that contains the same base functionality as the porting target project and merge in any custom functionality.
Choose a BLE5-Stack 2.00.00 example project that contains your target project’s base functionality.
For reference, see available sample projects that start with simple_
In this example, we’re going to use simple_peripheral as the starting BLE5-Stack 2.00.00 sample project.
Transfer all modified application files from BLE5-Stack 1.02.01 into the BLE5-Stack 2.00.00 example project.
In this example, the following files from BLE5-Stack 1.02.01 were moved into simple_peripheral BLE5-Stack 2.00.00 example:
simple_peripheral.c
simple_peripheral.h
simple_gatt_profile.c
simple_gatt_profile.h
Modify
main.c
in the BLE5-Stack 2.00.00 example if additional tasks were added in the BLE5-Stack 1.02.01 project.There has been a bug fix in the sample application code to avoid potential memory corruption. The needed code changes are shown below. It’s recommended to take a look at
simple_peripheral.c
from BLE5-Stack 2.00.00 project if you find this confusing.Inside
SimplePeripheral_charValueChangeCB
, replaceICall_freeMsg(pValue);
withICall_free(pValue);
Inside
SimplePeripheral_keyChangeHandler
, replaceICall_freeMsg(pValue);
withICall_free(pValue);
Inside
SimplePeripheral_advCallback
, replaceICall_freeMsg(pValue);
withICall_free(pValue);
Inside
SimplePeripheral_pairStateCb
, replaceICall_freeMsg(pValue);
withICall_free(pValue);
Inside
SimplePeripheral_passcodeCb
, replaceICall_freeMsg(pValue);
withICall_free(pValue);
Inside
SimplePeripheral_connEvtCB
, replaceICall_freeMsg(pValue);
withICall_free(pValue);
If necessary, update the project to use the newer TI-RTOS drivers that are supplied with the SimpleLink CC13xx/CC26xx SDK.
Refer to the Core SDK release notes for additional information and the TI-RTOS examples included with SimpleLink CC13xx/CC26xx SDK.
For additional information on how BLE5-Stack 2.00.00 uses TI-RTOS see TI-RTOS7 (RTOS Kernel) Overview
For any utilized TI Drivers, review TI-RTOS Kernel (SYS/BIOS) User’s Guide and TI Drivers API Reference.