This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC26X2R1: Variable expansion failed for Pre-Build command line.

Guru 14820 points
Part Number: LAUNCHXL-CC26X2R1
Other Parts Discussed in Thread: SIMPLELINK-CC13X2-26X2-SDK, Z-STACK, TIMAC, CC2652R

Hello,

I am trying to build ZED switch project for cc2652 using SIMPLELINK-CC13X2-26X2-SDK_2.40.00.81 In IAR

But I am getting some prebuild error as shown below-

Building configuration: zed_sw_CC26X2R1_LAUNCHXL_tirtos_iar - default
Updating build tree...

0 file(s) deleted.
Updating build tree...
Variable expansion failed for Pre-Build command line.
Offending text: ""$XDCROOT$/xs" --xdcpath="$XDCPATH$" iar.tools.configuro -c "$TOOLKIT_DIR$" --cc "$COMPILER_PATH$" --device "$DEVICE$"
--compileOptions $COMPILER_ARGS_ROOT_QUOTED$ --linkOptions $LINKER_ARGS_QUOTED$ --profile release --projFile "$PROJ_PATH$"
$PROJ_DIR$/app.cfg"

Total number of errors: 1
Total number of warnings: 0

  • Do you use IAR EWARM-8.20.2?
  • using IAR 8.30
  • Try to use 8.20.2.
  • I have encounter too.

    there are no defined variable XDCPATH,XDCROOT and so on in *.custom_argvars file ,so IAR could found out any path to build project.

    I think TI LPRF team don't perform full test on Zstack.

  • Hi Dhanraj,

    Before starting to work with any of the TI Z-Stack projects in the SIMPLELINK-CC13X2-26X2-SDK using IAR, you need to load a set of variables that will be set for your current workspace.

    1. Select Tools -> Configure Custom Argument Variables
    2. Select the Global tab, then click Import
    3. Import the custom argvars from the SDK. The argvars are stored in a SIMPLELINK_CC13XX_CC26XX_SDK.custom_argvars file, which is located in the tools/iar directory of the SDK (<SDK_INSTALL_PATH>/tools/iar/SIMPLELINK_CC13XX_CC26XX_SDK.custom_argvars)
    4. You can open (<SDK_INSTALL_PATH>/tools/iar/SIMPLELINK_CC13XX_CC26XX_SDK.custom_argvars) in a text editor if you need to modify the default path argument variables
    5. Restart IAR

    Regards,
    Ryan
  • after this import ...I m getting new error-

    Building configuration: zed_sw_CC26X2R1_LAUNCHXL_tirtos_iar - default
    Updating build tree...

    0 file(s) deleted.
    Updating build tree...
    Performing Pre-Build Action
    Error while running "c:/ti/xdctools_3_51_01_18_core/xs"
    --xdcpath="c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/kernel/tirtos/packages;c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source" iar.tools.configuro -c "C:\
    Program Files (x86)\IAR Systems\Embedded Workbench 8.1\arm" --cc "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.1\arm\bin\iccarm.exe"
    --device "CC2652R1F" --compileOptions "dummy.c -D ZCL_READ -D ZCL_DISCOVER -D ZCL_WRITE -D ZCL_BASIC -D ZCL_IDENTIFY -D ZCL_SCENES -D
    ZCL_GROUPS -D ZCL_ON_OFF -D TIMAC_ROM_IMAGE_BUILD -D TIMAC_ROM_PATCH -D BOARD_DISPLAY_USE_UART -D FREQ_2_4G -D
    OSAL_PORT2TIRTOS -D OSAL_PORT2TIRTOS_OSALMAP -D STACK_LIBRARY -D RCN_APP_ASSERT -D HAL_ASSERT_SPIN -D ZDO_API_BASIC -D
    TC_LINKKEY_JOIN -D NV_RESTORE -D NV_INIT -D FEATURE_NON_BEACON_MODE -D ZCL_STANDALONE -D MAX_DEVICE_TABLE_ENTRIES=50 -D
    DEVICE_FAMILY=cc26x0 -D CC26X2R1_LAUNCHXL -D DeviceFamily_CC26X2 -D SET_CCFG_BL_CONFIG_BL_LEVEL=0x00 -D
    SET_CCFG_BL_CONFIG_BL_ENABLE=0xC5 -D SET_CCFG_BL_CONFIG_BL_PIN_NUMBER=0x0F -D SET_CCFG_BL_CONFIG_BOOTLOADER_ENABLE=0xC5
    -o C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace\default\Obj --debug --endian=little --cpu=Cortex-M4 --debug --silent -e --aeabi --thumb
    --diag_suppress=Pa050 -fC:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/configPkg/compiler.opt.defs -fC:\ti\
    simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/Stack/Config/f8wenddev.opts -e --fpu=VFPv4_sp --dlib_config \"C:\Program Files (x86)\IAR
    Systems\Embedded Workbench 8.1\arm\inc\c\DLib_Config_Normal.h\" -I C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace\ -I C:\ti\
    simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/Application/StartUp\ -I C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\
    Workspace/Application/LaunchPad\ -I C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/Application/Services\ -I C:\ti\
    simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/Application/ui\ -I C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\
    Workspace/Application/util\ -I C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/Application/ZStackApi\ -I C:\ti\
    simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/Common/gp\ -I C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\
    Workspace/Common/touchlink\ -I C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/Common/zcl\ -I C:\ti\
    simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/Stack/af\ -I C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\
    Workspace/Stack/bdb\ -I $PROJ_DIR/Stack/Config\ -I C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/Stack/gp\ -I C:\ti\
    simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/Stack/MAC/HAL/target\ -I C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\
    Workspace/Stack/MAC/HighLevel\ -I C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/Stack/MAC/LowLevel\ -I C:\ti\
    simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/Stack/MAC\ -I C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\
    Workspace/Stack/nwk\ -I C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/Stack/osal_port\ -I C:\ti\
    simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/Stack/ROM\ -I C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\
    Workspace/Stack/sec\ -I C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/Stack/sys\ -I C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\
    examples\rtos\Workspace/Stack/zdo\ -I C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/Stack/zmac\ -I C:\ti\
    simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/Stack/ZStackTask\ -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/mt\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/services/src/saddr\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/services/src/sdata\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/services/src/appasrt\ -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/stack/af\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/stack/bdb\ -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/stack/bdb/touchlinkapp\
    -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/stack/gp\ -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/stack/api\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/stack/nwk\ -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/stack/sec\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/stack/sys\ -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/stack/zcl\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/stack/zdo\ -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/zmac\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/zmac/f8w\ -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/stack/ui\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack\ -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/fh\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/high_level\ -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/inc\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/inc/cc13xx\ -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/low_level/cc13xx\
    -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/tracer\ -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/hal/src/inc\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/hal/src/target/_common\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/hal/src/target/_common/cc13xx\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/rom\ -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/common/boards\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/common/boards/2_4g\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/common/heapmgr\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/common/osal_port\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/common/osal_port/osal_port_tirtos\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/source/common/nv\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/osal/src/inc/ -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/util\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/common/util\ -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/config\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/startup\ -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/common/api/inc\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/devices/cc13x2_cc26x2\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/devices/cc13x2_cc26x2/inc\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/devices/cc13x2_cc26x2/driverlib\ -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/apps/sw\
    -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/boards/CC26X2R1_LAUNCHXL\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/low_level/cc13xx/2_4g\ -I c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source\ -I
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/posix/iar\ -Ohz" --linkOptions "--no_out_extension -o C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\
    examples\rtos\Workspace\default\Exe\zed_sw_CC26X2R1_LAUNCHXL_tirtos_iar.out --map C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\
    Workspace\default\List\zed_sw_CC26X2R1_LAUNCHXL_tirtos_iar.map --config
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/boards/CC26X2R1_LAUNCHXL/cc26x2lp.icf -fC:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\
    examples\rtos\Workspace/configPkg/linker.cmd
    -fc:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/library/tirtos/iar/timac_rom_PG2_0_rom_api_linker.icf --silent --cpu=Cortex-M4F --redirect
    _Printf=_PrintfSmall c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/zstack/lib/iar//libZStack_nwk_zed_iar.a
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/display/lib/display.arm4f c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/grlib/lib/iar/m4f/grlib.a
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/drivers/rf/lib/rf_multiMode_cc26x2.arm4f
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/drivers/lib/drivers_cc26x2.arm4f
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/ti154stack/library/tirtos/iar/bin//maclib_nosecure_noicall_cc26x2_2_4g.a
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/kernel/tirtos/packages/ti/dpl/lib/dpl_cc26x2.arm4f
    c:/ti/simplelink_cc13x2_26x2_sdk_2_40_00_81/source/ti/devices/cc13x2_cc26x2/driverlib/bin/iar/driverlib.lib --silent --cpu=Cortex-M4F --redirect _Printf=_PrintfSmall
    --redirect _Scanf=_ScanfSmall --semihosting --entry __iar_program_start --vfe --text_out locale" --profile release --projFile "C:\ti\
    simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace\zed_sw_CC26X2R1_LAUNCHXL_tirtos_iar.ewp" C:\ti\
    simplelink_cc13x2_26x2_sdk_2_40_00_81\examples\rtos\Workspace/app.cfg

    Total number of errors: 1
    Total number of warnings: 0
  • Import custom variable invalid,

  • Try placing your workspace inside of C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\tools\iar, this worked on my system without any build errors.

    Regards,
    Ryan
  • Encounter error again mentioned by Dhanraj even open zed_sw_CC26X2R1_LAUNCHXL_tirtos_iar.template.eww with IAR and save project file inside of C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\tools\iar,and restart IAR.
  • BUT why it ask to save workplace at different location?
  • this is a template of IAR project,only a template.

  • Dhanraj,

    If you import the Configure Custom Argument Variables before creating the project workspace then you will be able to choose your location without encountering any errors.

    Regards,
    Ryan
  • oops,I have been process this problem,the correct steps as following:

    1. open IAR application without any project
    2.import global custom variable with C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\tools\iar\SIMPLELINK_CC13X2_26X2_SDK.custom_argvars
    3. open existed IAR template project
    4. save *.eww file inside of C:\ti\simplelink_cc13x2_26x2_sdk_2_40_00_81\tools\iar directory
    5. rebuild project
  • yes I have tested the steps suggested by you @Ryan Brown. I am able to build the project.
    hence i marked your response for "This resolved my issue"
  • All those steps sound weird to me. Why can we just open the *.eww file from project example folder and build directly? Will this be fixed in next SDK release?
  • SDK 2.40 build successful but could not running existed CC2652R Revision C.In other words,could not running any preproduction version.
  • Yes, you have to use rev.E for SDK 2.40.
  • Hi YK,

    The directions were not meant to be confusing, they simply involve importing the Configure Custom Argument Variables into IAR once before creating the project workspace. This is not a mistake or error and is becoming a standard process for SDK releases.

    Regards,
    Ryan
  • Really?! I expect I can open *.eww from IAR and it can be built successfully like old time? Why does it change in new SDK and is it really mandatory?
  • You can use variables in the arguments, which allows you to set up useful tools such as interfacing to a command line revision control system, or running an external tool on the selected file.

    I think TI need a new way to control revision.