.. _cc2340r5-cc2340r21-migration-guide:

CC2340R5 to CC2340R21 Porting Guide
**********************************

This section will describe, in general terms, how to migrate
a project developed for the |DEVICE_LOW_PLUS| device to a
|DEVICE_LOW| device running the |SDK|. However, it is important to first
assess the differences between both devices to make sure that the
project migration is possible.
    
Migration Guide
===============

The recommended migration path is to start with a |DEVICE_LOW_PLUS| 
based example project from the |SDK| and follow the next steps:

.. warning::
   The current SDK version only supports Bluetooth LE PHYs.
   Therefore, successful migration of Proprietary RF projects
   has not been fully tested and will be addressed in future
   SDK releases.

1. Import the project into Code Composer Studio.

2. Open SysConfig, go to ``Device View`` and click on ``SWITCH``.

.. _deviceview_switch_configuration_1:
.. figure:: resources/DeviceView_Switch.png
    :align: center

    SysConfig - Switch Device.

3. Once the ``Switch Board or Device`` window is opened, select the
   |DEVICE_LOW| board, or |DEVICE_LOW| device and click on ``CONFIRM``.
   Make sure to save the project changes so that the migration takes place.

.. _deviceview_switch_configuration_2:
.. figure:: resources/Select_R2device.png
    :align: center

    SysConfig - Select |DEVICE_LOW| device.

4. Right click on the imported project folder and select ``Properties``.
   Validate that the |DEVICE_LOW| name shows up at the ``Variant and core``
   field.

.. _deviceview_switch_configuration_3:
.. figure:: resources/check_project_prop.png
    :align: center

    Project Properties - Check migration to |DEVICE_LOW| device.

.. warning:: If a new linker command file is generated after migration (named ``cc23x0r2.cmd`` in the project files)
             please make sure to exclude it from build (or eliminated it from the project files) so that the original
             ``lpf3_app_freertos.cmd`` file is used during build time.

5. Build the project.
