BLE5-Stack 1.01.02 to BLE5-Stack 1.01.03

This section will describe a way to migrate a project from BLE5-Stack 1.01.02 to a BLE5-Stack 1.01.03 project.

For this migration guide, simple_peripheral from BLE5-Stack 1.01.02 will be ported over to BLE5-Stack 1.01.03. Because the directory structure is nearly identical between the two releases, the recommended approach is to start with a BLE5-Stack 1.01.02 project that contains the same base functionality as the porting target project and merge in any custom functionality.

  1. Choose a BLE5-Stack 1.01.03 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 1.01.03 sample project.

  2. Transfer all modified application files from BLE5-Stack 1.01.02 into the BLE5-Stack 1.01.03 example project.

    In this example, the following files from BLE5-Stack 1.01.02 were moved into simple_peripheral BLE5-Stack 1.01.03 example:

    • simple_peripheral.c
    • simple_peripheral.h
  3. Modify main.c in the BLE5-Stack 1.01.03 example if additional tasks were added in the BLE5-Stack 1.01.02 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 1.01.03 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 CC2640R2 SDK.

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

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

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