Other Parts Discussed in Thread: CC1352R, LAUNCHXL-CC26X2R1, SYSCONFIG,
Hi,
This thread explains how to run the rtls_slave project on a LPSTK_CC1352R. Similar steps could be used to port almost all the projects from LAUNCHXL-CC26X2R1 to LPSTK_CC1352R.
Prepare the files
- In your SDK, copy-paste the folder <SDK>\examples\rtos\CC26X2R1_LAUNCHXL\ble5stack\rtls_slave to <SDK>\examples\rtos\CC1352R1_LAUNCHXL\ble5stack\rtls_slave
- In the file <SDK>\examples\rtos\CC1352R1_LAUNCHXL\ble5stack\rtls_slave\Tools\Defines\rtls_slave_app.opt, replace "-DDeviceFamily_CCCC26X2" by "-DDeviceFamily_CC13X2"
- In <SDK>\examples\rtos\CC1352R1_LAUNCHXL\ble5stack\rtls_slave\tirtos\ccs rename the file rtls_slave_CC26X2R1_LAUNCHXL_tirtos_ccs.projectspec into rtls_slave_CC1352R1_LAUNCHXL_tirtos_ccs.projectspec
- Modify the file rtls_slave_CC1352R1_LAUNCHXL_tirtos_ccs.projectspec.
The goal is to replace all the references to CC26x2 files by references to CC13x2 files
-
- Find all the occurrences of "CC26X2R1_LAUNCHXL", replace by "CC1352R1_LAUNCHXL"
- Find all the occurrences of "/cc26x2r1/", replace by "/cc13x2r1/"
- Find all the occurrences of "_cc26x2.a", replace by "_cc13x2.a"
- Find "-DDeviceFamily_CC26X2", replace by "-DDeviceFamily_CC13X2"
Here is the diff file I get for SDK 4.40:
rtls_slave_CC1352R1_LAUNCHXL_tirtos_ccs.projectspec.diff
diff --git "a/C:\\ti\\simplelink_cc13x2_26x2_sdk_4_40_00_44\\examples\\rtos\\CC26X2R1_LAUNCHXL\\ble5stack\\rtls_slave\\tirtos\\ccs\\rtls_slave_CC26X2R1_LAUNCHXL_tirtos_ccs.projectspec" "b/C:\\ti\\simplelink_cc13x2_26x2_sdk_4_40_00_44\\examples\\rtos\\CC1352R1_LAUNCHXL\\ble5stack\\rtls_slave\\tirtos\\ccs\\rtls_slave_CC1352R1_LAUNCHXL_tirtos_ccs.projectspec" index e3e4032..c004ad9 100644 --- "a/C:\\ti\\simplelink_cc13x2_26x2_sdk_4_40_00_44\\examples\\rtos\\CC26X2R1_LAUNCHXL\\ble5stack\\rtls_slave\\tirtos\\ccs\\rtls_slave_CC26X2R1_LAUNCHXL_tirtos_ccs.projectspec" +++ "b/C:\\ti\\simplelink_cc13x2_26x2_sdk_4_40_00_44\\examples\\rtos\\CC1352R1_LAUNCHXL\\ble5stack\\rtls_slave\\tirtos\\ccs\\rtls_slave_CC1352R1_LAUNCHXL_tirtos_ccs.projectspec" @@ -11,7 +11,7 @@ <project title="rtls_slave app" - name="rtls_slave_CC26X2R1_LAUNCHXL_tirtos_ccs" + name="rtls_slave_CC1352R1_LAUNCHXL_tirtos_ccs" configurations="Release, Debug" toolChain="TI" connection="TIXDS110_Connection.xml" @@ -22,10 +22,10 @@ compilerBuildOptions=" -I${PROJECT_ROOT} -I${PROJECT_ROOT}/${ConfigName} - --cmd_file=${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/examples/rtos/CC26X2R1_LAUNCHXL/ble5stack/rtls_slave/Tools/Defines/rtls_slave_app.opt + --cmd_file=${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/examples/rtos/CC1352R1_LAUNCHXL/ble5stack/rtls_slave/Tools/Defines/rtls_slave_app.opt --cmd_file=${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/ble5stack/config/build_components.opt --cmd_file=${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/ble5stack/config/factory_config.opt - --cmd_file=${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/examples/rtos/CC26X2R1_LAUNCHXL/ble5stack/rtls_slave/build_config.opt + --cmd_file=${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/examples/rtos/CC1352R1_LAUNCHXL/ble5stack/rtls_slave/build_config.opt -I${PROJECT_LOC}/Application -I${PROJECT_LOC}/RTLSCtrl -I${PROJECT_LOC}/Drivers/AOA @@ -43,7 +43,7 @@ --gen_func_subsections=on --display_error_number --diag_wrap=off - -DDeviceFamily_CC26X2 + -DDeviceFamily_CC13X2 -DFLASH_ROM_BUILD -DNVOCMP_NWSAMEITEM=1 -I${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source @@ -76,9 +76,9 @@ linkerBuildOptions=" -x --define=FLASH_ROM_BUILD=2 - -l${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/ble5stack/libraries/cc26x2r1/OneLib.a - -l${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/ble5stack/libraries/cc26x2r1/StackWrapper.a - -l${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/ble5stack/libraries/cc26x2r1/ble_r2.symbols + -l${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/ble5stack/libraries/cc13x2r1/OneLib.a + -l${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/ble5stack/libraries/cc13x2r1/StackWrapper.a + -l${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/ble5stack/libraries/cc13x2r1/ble_r2.symbols --diag_suppress=16002-D --diag_suppress=10247-D --diag_suppress=10325-D @@ -87,11 +87,11 @@ -i${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source -l${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/display/lib/ccs/m4f/display.a -l${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/grlib/lib/ccs/m4f/grlib.a - -l${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/drivers/rf/lib/rf_multiMode_cc26x2.aem4f + -l${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/drivers/rf/lib/rf_multiMode_cc13x2.aem4f -l${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/devices/cc13x2_cc26x2/driverlib/bin/ccs/driverlib.lib - -l${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/drivers/lib/ccs/m4f/drivers_cc26x2.a + -l${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/drivers/lib/ccs/m4f/drivers_cc13x2.a -i${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/kernel/tirtos/packages - -lti/dpl/lib/ccs/m4f/dpl_cc26x2.a + -lti/dpl/lib/ccs/m4f/dpl_cc13x2.a -i${PROJECT_BUILD_DIR}/syscfg -lti/devices/cc13x2_cc26x2/driverlib/bin/ccs/driverlib.lib --warn_sections @@ -222,7 +222,7 @@ </file> <file path="../../Startup/main.c" openOnCreation="false" excludeFromBuild="false" action="copy" targetDirectory="Startup"> </file> - <file path="${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/boards/CC26X2R1_LAUNCHXL/Board.html" openOnCreation="false" excludeFromBuild="false" action="link"> + <file path="${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/source/ti/boards/LPSTK_CC1352R/Board.html" openOnCreation="false" excludeFromBuild="false" action="link"> </file> <file path="../../tirtos/ccs/cc13x2_cc26x2_app.cmd" openOnCreation="false" excludeFromBuild="false" action="copy"> </file>
Import the project
- Open CCS (the technique described here won't directly work for IAR)
- Import the rtls_slave project from <SDK>\examples\rtos\CC1352R1_LAUNCHXL\ble5stack\rtls_slave
- Open the file rtls_slave.syscfg (using SysConfig)
- In SysConfig, open the "device view".
- Click on the button "Switch (BETA)". A new window will appear. Select the board you are using (LPSTK-CC1352R Sensors).
- Confirm your choice and let SysConfig running.
- Review the eventual errors raised by SysConfig.
- Here the error is due to an error in the device selection (here again it should be "LPSTK-CC1352R1"). Modify this!
- When all the errors are cleared, save and close the file.
- Build the project. The project should build without any warning or error.
- Now, connect your LPSTK-CC1352R and flash the device. More guidance on the way to do this is provided here.
I hope this will help,