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.

  1. 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.

  2. 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
  3. Modify main.c in the BLE5-Stack 2.00.00 example if additional tasks were added in the BLE5-Stack 1.02.01 project.

  4. 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, replace ICall_freeMsg(pValue); with ICall_free(pValue);
    • Inside SimplePeripheral_keyChangeHandler, replace ICall_freeMsg(pValue); with ICall_free(pValue);
    • Inside SimplePeripheral_advCallback, replace ICall_freeMsg(pValue); with ICall_free(pValue);
    • Inside SimplePeripheral_pairStateCb, replace ICall_freeMsg(pValue); with ICall_free(pValue);
    • Inside SimplePeripheral_passcodeCb, replace ICall_freeMsg(pValue); with ICall_free(pValue);
    • Inside SimplePeripheral_connEvtCB, replace ICall_freeMsg(pValue); with ICall_free(pValue);
  5. If necessary, update the project to use the newer TI-RTOS drivers that are supplied with the SimpleLink CC13x2 / 26x2 SDK.

  6. Refer to the Core SDK release notes for additional information and the TI-RTOS examples included with SimpleLink CC13x2 / 26x2 SDK.

    For additional information on how BLE5-Stack 2.00.00 uses TI-RTOS see TI-RTOS (RTOS Kernel) Overview

    For any utilized TI Drivers, review TI-RTOS Kernel Users Guide and Driver APIs.