SysConfig Migration¶
If you have an existing CC13x2 or CC26x2 software project and you want to start developing with SysConfig, follow the steps below. This guide assumes you have a stack project from the SimpleLink CC13x2 or CC26x2 2.40 SDK or newer. If this is not the case, please look at the Stack Porting Guides to see how to update to SimpleLink CC13x2 or CC26x2 2.40 SDK.
Note
If you are starting development with a fresh project, you don’t need to migrate from non-SysConfig to SysConfig-enabled project. In SimpleLink CC13x2 / 26x2 SDK v. 2.40 and later, SysConfig-enabled projects are found in the syscfg_preview folder.
1. Add a .syscfg File to Your Project¶
In this guide, we will start with a Z-Stack project, then apply necessary changes to start using SysConfig.
You can use the standalone SysConfig tool to make this file. Please see the SysConfig Standalone Installer Download Page.
- Choose the “Start a new Design” option. Choose your device, part and package.
For the
product
path, add the following for your SDK:{SDK_INSTALL_DIR}\.metadata\product.json
. - Add an RF stack according to your existing project (Z-Stack). Add any TI Drivers configuration that your project requires. If applicable, add one or more Radio Configuration. You can find guidelines for configuring each of these in the Get started with SysConfig chapter.
- Save the file and add it to your project.
If you are using CCS, you can add the file by dragging it into your CCS workspace. When you add the file, the following dialog box will appear and allow you to add SysConfig to your project:
If you are using IAR, follow the steps in Using SysConfig with IAR Workbench before you
add the .syscfg
file. The steps for adding the file are as follows:
- Include the .syscfg file you want to use in the project (right click on the project → Add Files → Navigate to the .syscfg file and add it).
- Create a custom build step: Right click on project → Options → Custom Build → Populate the following:
Option | Populate with the following: |
File Name Extensions | .syscfg |
Command Line | $SYSCONFIG_ROOT$/nw/nw.exe $SYSCONFIG_ROOT$/dist/cli.js -o $PROJ_DIR$ -s “$ COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR$/.metadata/product.json” –compiler iar $FILE_PATH$ |
Output files (one per line) | SysConfig_Generated_Files.ipcf |
Run this tool before all other tools | Checked |
2. Add SysConfig Options¶
If you are using CCS, open the Project Properties and do the following:
- In System Configuration Tool → Basic Options → Name of the board file
(-b, –board), set it to
/ti/boards/.meta/<BOARD_NAME>
. (E.g., if you are using a CC1312R LaunchPad, set the name to/ti/boards/.meta/CC1312R1_LAUNCHXL
). It is not necessary to set the name of the device. - In System Configuration Tool → Basic Options → Root system config
meta data file in a product or SDK (-s, –product), add
${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/.metadata/product.json
.
3. Remove Board Files From Your Project¶
These are not needed as the board configuration is done in SysConfig. E.g. if
you are using a CC1352R LaunchPad, delete the Board.h
,
CC1352R1_LAUNCHXL.h
, and CC1352R1_LAUNCHXL.c
from the project. If your
project contains board files ending with *_fxns.c
or *.cmd
, don’t
delete them.
You can see how to configure your board files and TI driver instances with
SysConfig in Configure The Board Files with SysConfig. If you’re not exactly sure what
peripherals are on your board and you have a TI development board, you can check
the .syscfg
file from an existing syscfg project for your board. E.g.
if you’re using a CC26X2R LaunchPad board, you can check the .syscfg
file
in one of the projects in ${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}
/examples/rtos/CC26X2R1_LAUNCHXL
.
4. Migrate Configuration Header File¶
ti_zstack_config.h
contains build configuration settings. The values of these defines
depend on the saved SysConfig GUI settings. Note that GPD examples have a completely
separate set of configurables compared to all other examples, but they are still
generated to default/sysconfig/ti_zstack_config.h
. Below is a list of the
correspondence between SysConfig configurable name and ti_zstack_config.h
define names.
Non-GPD examples:
Submodule | Configuration | Definition |
---|---|---|
Power Management | Power Mode of Operation | RFD_RCVC_ALWAYS_ON |
Power Management | Poll Period | POLL_RATE |
Radio | Primary Channels | DEFAULT_CHANLIST |
Radio | Secondary Channels | SECONDARY_CHANLIST |
Radio | Minimum Transmissions for Channel Interference | ZDNWKMGR_MIN_TRANSMISSIONS |
Network | PAN ID | ZDAPP_CONFIG_PAN_ID |
Network | Set Extended PAN ID to Extended Address | SET_EPID_AS_EXT_ADDR |
Network | Extended PAN ID | ZDAPP_CONFIG_EPID |
Network | Default Network Key | DEFAULT_KEY |
Network | Link Status Jitter Mask | LINK_STATUS_JITTER_MASK |
Advanced/Joining | Start Delay | NWK_START_DELAY |
Advanced/Joining | Extended Joining Random Mask | EXTENDED_JOINING_RANDOM_MASK |
Advanced/Joining | Beacon Request Delay | BEACON_REQUEST_DELAY |
Advanced/Joining | Beacon Request Delay Mask | BEACON_REQ_DELAY_MASK |
Advanced/Routing | Route Expiry Time | ROUTE_EXPIRY_TIME |
Advanced/Routing | Network Indirect Message Timeout | NWK_INDIRECT_MSG_TIMEOUT |
Advanced/Routing | Max Route Request Entires | MAX_RREQ_ENTRIES |
Advanced/Packet Sending | APS ACK Wait Duration for Polled Devices | APSC_ACK_WAIT_DURATION_POLLED |
Advanced/Packet Sending | Max Frame Retries | APSC_MAX_FRAME_RETRIES |
Advanced/Packet Sending | Max Data Retries | NWK_MAX_DATA_RETRIES |
Advanced/Max Table Sizes | Broadcast Table Size | MAX_BCAST |
Advanced/Max Table Sizes | Group Table Size | APS_MAX_GROUPS |
Advanced/Max Table Sizes | Routing Table Size | MAX_RTG_ENTRIES |
Advanced/Max Table Sizes | Binding Table Size | NWK_MAX_BINDING_ENTRIES |
Advanced/Max Table Sizes | Max Cluster IDs | MAX_BINDING_CLUSTER_IDS |
Advanced/Specific Poll Rates | Queued Message Poll Period | QUEUED_POLL_RATE |
Advanced/Specific Poll Rates | Data Response Poll Period | RESPONSE_POLL_RATE |
Advanced/Specific Poll Rates | Rejoin Message Poll Period | REJOIN_POLL_RATE |
GPD examples:
Submodule | Configuration | Definition |
---|---|---|
Power Management | Power Mode of Operation | BATTERYLESS_DEVICE |
Radio | Channel | GPD_CHANNEL |
Network | Green Power Device Type | DEVICE_ID |
Network | Green Power Device ID Type | GPD_APP_ID |
Network | Green Power Device ID | GPD_ID |
Security | Data Frame Security Level | GP_SECURITY_LEVEL |
Security | Data Frame Security Key Type | EXT_OPT_KEY_TYPE |
Security | Data Frame Security Key | GP_SECURITY_KEY |
Advanced | Data Frame Retries | GPDF_FRAME_DUPLICATES |
Advanced | Auto-commissioning | AUTO_COMMISSIONING |
Advanced | Radio Receive After Transmit | RX_AFTER_TX |
Advanced | Sequence Number Capability | SEQUENCE_NUMBER_CAP |
SysConfig should already come with the standard defaults for both TI-Driver
and Z-Stack configurations.
Once all values have been defined inside of SysConfig, building the project will generate the ti_zstack_config.h
file.
When you have eventually built the project with SysConfig enabled,
you will find the SysConfig-built version of ti_zstack_config.h
in the output
default/sysconfig
folder of the project.
Note
Currently, manually changing the CCS/IAR project creation files (projectspec/ewp, etc.) could have unseen side effects. An easier path may be to import one of the Z-Stack SysConfig examples and migrate your application accordingly.