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.

Cannot compile

Other Parts Discussed in Thread: CC2650, CC2640

I am trying to compile and debug the KeyFob example using IAR Embedded Workbench. The project generates error below.

Building configuration: CC2640App - FlashROMDbg
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$""

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

Clearly it has to do with variables and custom Arguments that I have set for the project according to "Software Developers Guide"  see below.

 I am missing on TOOLKIT_DIR, COMPILER_PATH, DEVICE, LINKER_ARGS_QUOTED and PROJ_PATH. There is very little information to set these variables. Would be helpful if the values of these variables are provided so that I can compile the project and debug.

I am using IAR Embedded Workbench for ARM version 7.30.1.7768. 

  • Hi,

    Which SDK verison are you using? I am using the ble_cc26xx_2_00_00_42414_alpha sdk with IAR v7.30.4. By default the keyfob demo is configured for CC2650 device and it builds fine. Have you made any changes to the project? Also please move your IAR version to 7.30.4 as that is the compatible version for the BLE SDK.

    Regards,
    Arun
  • Hi Shardul,

    You seem to miss the TI_RTOS_DRIVERS_BASE variable.

    IAR sometimes seem to fail to auto-import these variables. If that happens, simply press "Import" in the window you show and point it to the variables file Projects\ble\KeyFob\CC26xx\IAR\KeyFob.custom_argvars.

    .:svend

  • Hi Arun,

    The issue is resolved but I have problem with driver please see below.
    Thanks
  • Thanks for your help. The variable issue is resolved by using the above mentioned variable file.
    I am now having problem installing driver for "texas instruments XDS100v3". I tried installing the driver using "ti_emupack_setup.exe" file located in “C:\Program Files (x86)\IAR Systems\Embedded Workbench for ARM 6\arm\drivers\ti-xds” but it didn't worked. May be I need a seperate thread for this.
  • Hi,

    Thanks for letting us know of the issue. As for your XDS100v3 driver issue, I would suggest you to install IAR version v7.30.4 for ARM. After installing it, please run emupack.exe as you have mentioned.

    Note: Please uninstall all XDS 100V3 or earlier drivers before installing the latest IAR version. Please check in your installed software path to confirm if any residual drivers are left out.

    Regards,

    Arun

  • Hi Arun,

    I installed v7.30.4 for ARM and I can now find the devices CC26xx listed. The driver I had to install manually form "C:\ti\ccs_base\emulation\windows\xds100_drivers\ftdi" which see to work. The code gets downloaded to the MCU but the only issue is the debug session does not start with error below.

    Wed Mar 04, 2015 16:40:18: Loaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\config\debugger\TexasInstruments\CC26xx.dmac
    Wed Mar 04, 2015 16:40:18: Loaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\config\flashloader\TexasInstruments\FlashCC26xx.mac
    Wed Mar 04, 2015 16:40:27: Connecting to TI XDS100 (Probe no: 06EB12201660)
    Wed Mar 04, 2015 16:40:33: Initial reset was performed
    Wed Mar 04, 2015 16:40:33: TI XDS100/200/ICDI ARM, device revision: 0x00000001, big endian: false, cache: false, board revision: 0x00000000, driver revision: 0x0B020200
    Wed Mar 04, 2015 16:40:33: Watchdog disabled
    Wed Mar 04, 2015 16:40:33: 544 bytes downloaded (5.71 Kbytes/sec)
    Wed Mar 04, 2015 16:40:33: Loaded debugee: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\config\flashloader\TexasInstruments\FlashCC26xx.out
    Wed Mar 04, 2015 16:40:33: Target reset
    Wed Mar 04, 2015 16:40:36: Unloaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\config\flashloader\TexasInstruments\FlashCC26xx.mac
    Wed Mar 04, 2015 16:40:36: Downloaded C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Application\CC2640\FlashROM\Exe\KeyFobDemoAppFlashROM.out to flash memory.
    Wed Mar 04, 2015 16:40:44: Watchdog disabled
    Wed Mar 04, 2015 16:40:44: 25604 bytes downloaded into FLASH (2.27 Kbytes/sec)
    Wed Mar 04, 2015 16:40:44: Loaded debugee: C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Application\CC2640\FlashROM\Exe\KeyFobDemoAppFlashROM.out
    Wed Mar 04, 2015 16:40:44: Target reset
    Wed Mar 04, 2015 16:40:46: Failed to load extra image: C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Application\CC2640\..\..\Stack\CC2640\FlashROM\Exe\KeyFobDemoStackFlashROM.out

    Thanks

    Shardul

  • Hi,

    Have you build the Stack image? Please got the keyFobDemoStack and build the stack image and flash it to the C26XX. After that you can build the KeyFobDemo App and flash it.

    Regards,
    Arun
  • Shardul,

    This happens as Arun says when you have not built the stack image and flashed it first. The reason is that the application project tries to include debug info from the stack image when debugging. (Done in Project settings ->debugger ->Images).

    As for the driver issues you should use IAR >= 7.30.4 install the emupack included with IAR in the ti-xds folder. Without this you might see debugging issues as the chip is not reset properly between debugging sessions. It needs to be installed as administrator (right-click -> Run as administrator).

    .:svend
  • Hi Arun,

    The build for Stack fails with below error.

    Building configuration: CC2640Stack - FlashROM
    Updating build tree...

    Performing Pre-Build Action
    C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\..\..\..\..\..\..\tools\LibSearch\libSearch.exe C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\
    buildConfig.opt C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\..\..\..\..\..\..\tools\LibSearch\parameters.xml C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\
    Stack\CC2640\..\..\..\..\..\Libraries\CC26xx\IAR\ C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\..\..\Lib\CC2640Stack.a FlashROM
    <<< Using Library: CC2640_BLE_peri_HF_CF_FlashROM.a >>>
    <<< Using Library: CC2640_BLE_HCI_TL_None.a >>>

    Linking
    ilinkarm.exe C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\bleDispatch.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\
    FlashROM\Obj\bleUserConfig.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Lib\CC2640Stack.a C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Lib\
    CC2640Stack_HCI_TL.a C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\CommonROM_Init.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\
    Stack\CC2640\FlashROM\Obj\gap.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\gapbondmgr.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\
    IAR\Stack\CC2640\FlashROM\Obj\gattservapp_util.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\hal_assert.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\
    KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\hal_flash_wrapper.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\hal_trng_wrapper.o C:\ti\simplelink\
    ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\ICall_startup.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\mb_PATCH.o C:\
    ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\npi.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\OnBoard.o C:\
    ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\OSAL.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\
    osal_bufmgr.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\osal_cbtimer.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\
    FlashROM\Obj\OSAL_Clock.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\OSAL_ICallBle.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\
    Stack\CC2640\FlashROM\Obj\OSAL_MemoryICall.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\OSAL_PwrMgr.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\
    ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\osal_snv.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\OSAL_Timers.o C:\ti\simplelink\
    ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\pwrmon.o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Obj\ROM_Init.o -o C:\ti\
    simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\Exe\KeyFobDemoStackFlashROM.out --config_def FLASH_ROM_BUILD=1 --config_def CC2650=1 --map C:\ti\simplelink\
    ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\FlashROM\List\KeyFobDemoStackFlashROM.map --config C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\..\..\
    ..\..\..\common\cc26xx\IAR\cc26xx_ble_stack.icf -f C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\..\..\Config\IAR-Boundary.xcl --semihosting C:\ti\simplelink\ble_cc26xx_2_00_00_42893\
    Projects\ble\KeyFob\CC26xx\IAR\Stack\CC2640\..\..\..\..\..\..\common\BLE_ROM_Releases\04242014\ble_rom_PATCH.symbols C:\ti\tirtos_simplelink_2_11_01_09\products\cc26xxware_2_20_06_14829\driverlib\bin\iar\driverlib.lib
    --entry startup_entry --vfe

    IAR ELF Linker V7.30.4.8167/W32 for ARM
    Copyright 2007-2014 IAR Systems AB.
    Error[Lp011]: section placement failed
    unable to allocate space for sections/blocks with a total estimated minimum size of 0x101dc bytes (max align 0x4) in <[0x00010000-0x0001efff]> (total uncommitted space 0xcfd0).

    65 539 bytes of readonly code memory
    8 705 bytes of readonly data memory
    1 299 bytes of readwrite data memory

    Errors: 1
    Warnings: none

    Link time: 0.20 (CPU) 0.20 (elapsed)
    Error while running Linker

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

    Shardul
  • Shardul,

    When building the application/stack sometimes the Boundary tool which optimizes the boundaries between the stack and application image will get out of sync if the build failed for some reason. Re-compiling the stack once more usually resolves this problem.

    .:svend
  • Hi Arun,

    The issue is resolved by building the stack image.

    Regards
    Shardul
  • Thanks

    I had to reinstall stack and then all worked.

    Shardul