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.

CC1352P: IAR build problem

Part Number: CC1352P
Other Parts Discussed in Thread: SYSCONFIG

Hi,

I have an IAR project, that builds correctly on one computer.

When trying to build the same project on another computer, I get an IAR error: 

Building configuration: app - EVL_Debug

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$/ble_oad_release.cfg"

Total number of errors: 1

Total number of warnings: 0

Turns out that the "offending" text is: $COMPILER_ARGS_ROOT_QUOTED$.

All other configuration is exactly the same between the two computers: IAR version, SDK, and XDC. proj.custom_args is also the same.

From what I've seen from the IAR documentation, they don't mention the $COMPILER_ARGS_ROOT_QUOTED$ at all. It's also not part of the SDK the XDS or the custom_args file.

Am I missing something? Is there any other requirements for the IAR system?

Thanks, Isak.

  • Hi Isak,

    Which version of IAR are you using? 

    Which version of the SDK are you using? 

    Which project are you trying to build? 

    Thanks, 
    Elin 

  • Hi Elin,

    Ye, sorry I didn't include all the details before...

    IAR: 8.40.2.22891

    sdk: C:\ti\simplelink_cc13x2_26x2_sdk_3_40_00_02

    xdc: C:/ti/xdctools_3_51_02_21_core

    my project is based on the DMM wsnnode example, but it's very different now...

    content of my custom_argvars file:

    <?xml version="1.0" encoding="UTF-8"?>
    <iarUserArgVars>
    <group name="SDK" active="true">
    <variable>
    <name>COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR</name>
    <value>C:\ti\simplelink_cc13x2_26x2_sdk_3_40_00_02</value>
    </variable>
    <variable>
    <name>XDCROOT</name>
    <value>C:/ti/xdctools_3_51_02_21_core</value>
    </variable>
    <variable>
    <name>XDCPATH</name>
    <value>$SDK$/source;$SDK$/kernel/tirtos/packages;$SDK$/kernel/tirtos/packages/iar/tools/configuro/package</value>
    </variable>
    <variable>
    <name>SDK</name>
    <value>$COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR$</value>
    </variable>
    <variable>
    <name>SYSCONFIG_ROOT</name>
    <value>c:\ti\ccs910\ccs\utils\sysconfig</value>
    </variable>
    <variable>
    <name>SDK_COMMON</name>
    <value>$SDK$/source/ti/common</value>
    </variable>
    </group>
    </iarUserArgVars>

    Thanks, Isak.

  • Hi Isak,

    is the SDK paths etc the same as well? I would expect this to be handles by IAR. Strange thing is that IAR does not define it while it defines "COMPILER_ARGS" where the latter does not evaluate at all from an IAR perspective. 

    If you instead insert  $COMPILER_ARGS_ROOT_QUOTED$ for IAR, this is always defined, even before any XDC tools run.

    If you on the other computer try to run a normal example, you see the same issue?

  • Hi,

    Yes, the SDK, XDC and IAR version are the same on all computers.

    Actually, the project does build correctly on multiple computers, The problem on a one specific computer. 

    I even tried to fully reinstall windows, IAR, and all tools. to no avail.

    Indeed, It seems like an IAR issue, but the COMPILER_ARGS_ROOT_QUOTED is kinda IAR's "undocumented feature", and AFAIK, TI is the only one using it.

    I didn't try the original examples, but most probably it will have the same behavior.

    Maybe you have an idea?

    Thanks, Isak.

  • Hi,

    I'm so sorry.

    Turn out it was my fault.

    In my project, I use an environment variable as an argument for the C++ compiler.

    Turn out that if this environment variable is not defined, then IAR will fail to evaluate the $COMPILER_ARGS_ROOT_QUOTED$ argument.

    Unfortunately, IAR didn't specify exactly what was the problem.

    Anyway, all is fine now, and sorry for wasting your time.

    Thanks, Isak.

  • No worries Isak, glad you find the issue. One could have wished for clearer error messages in the IAR build log sometimes :)