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.

CC2640 Problems Building the SimpleBLEPeripheral Example Project

Other Parts Discussed in Thread: CC2640, CC2650

Hi,

I'm trying to compile the SimpleBLEPeripheral Example for the CC2640. I'm getting the following problems when I build the "CC2640App - FlashRom" project.

There's a Error when performing the Pre-Build Action as shown below. 

I'm using IAR ARM 7.40.2.8570.  The "CC2640Stack - FlashROM" project builds with no errors.

----------------

IAR Error - CC2640App - FlashRom

----------------

Building configuration: CC2640App - FlashROM
Updating build tree...
 
Performing Pre-Build Action
"C:\ti\xdctools_3_30_06_67_core/xs" --xdcpath="C:\ti\tirtos_simplelink_2_11_01_09\products\bios_6_41_02_41" iar.tools.configuro -c "C:\Program Files (x86)\IAR_7402\arm" --cc "C:\Program Files (x86)\IAR_7402\arm\bin\iccarm.exe" 
--device "CC2640F128" --compileOptions "-D USE_ICALL -D POWER_SAVING -D HEAPMGR_SIZE=2672 -D TI_DRIVERS_SPI_DMA_INCLUDED -D TI_DRIVERS_LCD_INCLUDED -D ICALL_MAX_NUM_TASKS=3 -D 
ICALL_MAX_NUM_ENTITIES=6 -D xdc_runtime_Assert_DISABLE_ALL -D xdc_runtime_Log_DISABLE_ALL -D MAX_NUM_BLE_CONNS=1 -D CC26XXWARE -D CC26XX --diag_suppress Pa050 -o C:\ti\simplelink\
ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\FlashROM\Obj\ --debug --endian=little --cpu=Cortex-M3 -f C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\
CC26xx\IAR\Application\CC2640\..\..\..\..\..\..\..\Projects\ble\config\buildComponents.opt -f C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\configPkg\compiler.opt.defs -f C:\
ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\..\..\Config\IAR-Boundary.bdef -e --fpu=None --dlib_config \"C:\Program Files (x86)\IAR_7402\arm\INC\c\
DLib_Config_Normal.h\" -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\
Application\CC2640/../../../Source/Application\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Projects/ble/include\ -I C:\ti\simplelink\
ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Projects/ble/ICall/Include\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\
Application\CC2640/../../../../../../../Projects/ble/Profiles/Roles/CC26xx\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Projects/ble/Profiles/Roles\ -I C:\ti\
simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Projects/ble/Profiles/DevInfo\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\
CC26xx\IAR\Application\CC2640/../../../../../../../Projects/ble/Profiles/SimpleProfile/CC26xx\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\
CC2640/../../../../../../../Projects/ble/Profiles/SimpleProfile\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Projects/ble/common/cc26xx\ -I C:\ti\simplelink\
ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Components/applib/heap\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\
Application\CC2640/../../../../../../../Components/ble/hci\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Components/ble/controller/CC26xx/include\ -I C:\ti\
simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Components/ble/host\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\
IAR\Application\CC2640/../../../../../../../Components/hal/target/CC2650/rom\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\
CC2640/../../../../../../../Components/hal/target/CC2650TIRTOS\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Components/hal/target/_common/cc26xx\ -I C:\
ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Components/hal/include\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\
CC26xx\IAR\Application\CC2640/../../../../../../../Components/osal/include\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Components/services/sdata\ -I C:\ti\
simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Components/services/saddr\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\
CC26xx\IAR\Application\CC2640/../../../../../../../Components/icall/include\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Components/ble/include\ -I C:\ti\
tirtos_simplelink_2_11_01_09\products\cc26xxware_2_20_06_14829\ -I C:\ti\tirtos_simplelink_2_11_01_09\packages\ti\drivers\ -I C:\ti\tirtos_simplelink_2_11_01_09\packages\ti\drivers\ti\boards\SRF06EB\CC2650EM_7ID\ -Ohz" 
--linkOptions "-o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\FlashROM\Exe\SimpleBLEPeripheralAppFlashROM.out --config_def RTOS_ROM=1 --map C:\ti\
simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\FlashROM\List\SimpleBLEPeripheralAppFlashROM.map --config C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\
SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\..\..\..\..\..\common\cc26xx\IAR\cc26xx_ble_app.icf --keep __vector_table -f C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\
CC2640\configPkg\linker.cmd -f C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\..\..\Config\IAR-Boundary.xcl C:\ti\tirtos_simplelink_2_11_01_09\products\
cc26xxware_2_20_06_14829\driverlib\bin\iar\driverlib.lib C:\ti\tirtos_simplelink_2_11_01_09\packages\ti\drivers\ti\drivers\lib\drivers_cc26xxware.arm3 --entry __iar_program_start --vfe" --profile release --projFile "C:\ti\simplelink\
ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\CC2640App.ewp"
js: "C:/ti/xdctools_3_30_06_67_core/packages/xdc/xdc.tci", line 354: xdc.services.global.XDCException: xdc.PACKAGE_NOT_FOUND: can't locate the package 'iar.tools.configuro' along the path: 'C:\ti\tirtos_simplelink_2_11_01_09\
products\bios_6_41_02_41;C:\ti\xdctools_3_30_06_67_core/packages;'. Ensure that the package path is set correctly.
Error while running "C:\ti\xdctools_3_30_06_67_core/xs" --xdcpath="C:\ti\tirtos_simplelink_2_11_01_09\products\bios_6_41_02_41" iar.tools.configuro -c "C:\Program Files (x86)\IAR_7402\arm" --cc "C:\Program Files (x86)\IAR_7402\arm\
bin\iccarm.exe" --device "CC2640F128" --compileOptions "-D USE_ICALL -D POWER_SAVING -D HEAPMGR_SIZE=2672 -D TI_DRIVERS_SPI_DMA_INCLUDED -D TI_DRIVERS_LCD_INCLUDED -D ICALL_MAX_NUM_TASKS=3 -D 
ICALL_MAX_NUM_ENTITIES=6 -D xdc_runtime_Assert_DISABLE_ALL -D xdc_runtime_Log_DISABLE_ALL -D MAX_NUM_BLE_CONNS=1 -D CC26XXWARE -D CC26XX --diag_suppress Pa050 -o C:\ti\simplelink\
ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\FlashROM\Obj\ --debug --endian=little --cpu=Cortex-M3 -f C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\
CC26xx\IAR\Application\CC2640\..\..\..\..\..\..\..\Projects\ble\config\buildComponents.opt -f C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\configPkg\compiler.opt.defs -f C:\
ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\..\..\Config\IAR-Boundary.bdef -e --fpu=None --dlib_config \"C:\Program Files (x86)\IAR_7402\arm\INC\c\
DLib_Config_Normal.h\" -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\
Application\CC2640/../../../Source/Application\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Projects/ble/include\ -I C:\ti\simplelink\
ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Projects/ble/ICall/Include\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\
Application\CC2640/../../../../../../../Projects/ble/Profiles/Roles/CC26xx\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Projects/ble/Profiles/Roles\ -I C:\ti\
simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Projects/ble/Profiles/DevInfo\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\
CC26xx\IAR\Application\CC2640/../../../../../../../Projects/ble/Profiles/SimpleProfile/CC26xx\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\
CC2640/../../../../../../../Projects/ble/Profiles/SimpleProfile\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Projects/ble/common/cc26xx\ -I C:\ti\simplelink\
ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Components/applib/heap\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\
Application\CC2640/../../../../../../../Components/ble/hci\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Components/ble/controller/CC26xx/include\ -I C:\ti\
simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Components/ble/host\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\
IAR\Application\CC2640/../../../../../../../Components/hal/target/CC2650/rom\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\
CC2640/../../../../../../../Components/hal/target/CC2650TIRTOS\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Components/hal/target/_common/cc26xx\ -I C:\
ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Components/hal/include\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\
CC26xx\IAR\Application\CC2640/../../../../../../../Components/osal/include\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Components/services/sdata\ -I C:\ti\
simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Components/services/saddr\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\
CC26xx\IAR\Application\CC2640/../../../../../../../Components/icall/include\ -I C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640/../../../../../../../Components/ble/include\ -I C:\ti\
tirtos_simplelink_2_11_01_09\products\cc26xxware_2_20_06_14829\ -I C:\ti\tirtos_simplelink_2_11_01_09\packages\ti\drivers\ -I C:\ti\tirtos_simplelink_2_11_01_09\packages\ti\drivers\ti\boards\SRF06EB\CC2650EM_7ID\ -Ohz" 
--linkOptions "-o C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\FlashROM\Exe\SimpleBLEPeripheralAppFlashROM.out --config_def RTOS_ROM=1 --map C:\ti\
simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\FlashROM\List\SimpleBLEPeripheralAppFlashROM.map --config C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\
SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\..\..\..\..\..\common\cc26xx\IAR\cc26xx_ble_app.icf --keep __vector_table -f C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\
CC2640\configPkg\linker.cmd -f C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\..\..\Config\IAR-Boundary.xcl C:\ti\tirtos_simplelink_2_11_01_09\products\
cc26xxware_2_20_06_14829\driverlib\bin\iar\driverlib.lib C:\ti\tirtos_simplelink_2_11_01_09\packages\ti\drivers\ti\drivers\lib\drivers_cc26xxware.arm3 --entry __iar_program_start --vfe" --profile release --projFile "C:\ti\simplelink\
ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\Application\CC2640\CC2640App.ewp"
 
Total number of errors: 1
Total number of warnings: 0

  • Moving this to "Bluetooth Low Energy" forum.

    Regards,
    Gigi Joseph
  • Your Custom Argument Variables looks weird. I suggest you remove them all and  go to IAR->Tools->Configure Custom Argument Variables and import C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\IAR\SimpleBLEPeripheral.custom_argvars.

  • Hi YiKai,

    I re-imported the SimpleBLEPeripheral.custom_argvars as you suggested and I'm still getting Pre-build error.

    Here's the SimpleBLEPeripheral.custom_argvars that I have installed.  It doesn't look the same as your picture. Specifically the "XDCPATH" is different from mine in your picture.

    =====================================

    SimpleBLEPeripheral.custom_argvars

    =====================================

    <?xml version="1.0" encoding="iso-8859-1"?>

    <iarUserArgVars>
      <group active="true" name="CC26xx TI-RTOS">
        <variable>
          <name>TI_RTOS_DRIVERS_BASE</name>
          <value>C:\ti\tirtos_simplelink_2_11_01_09\packages\ti\drivers</value>
        </variable>
        <variable>
          <name>CC26XXWARE</name>
          <value>C:\ti\tirtos_simplelink_2_11_01_09\products\cc26xxware_2_20_06_14829</value>
        </variable>
        <variable>
          <name>XDCROOT</name>
          <value>C:\ti\xdctools_3_30_06_67_core</value>
        </variable>
        <variable>
          <name>XDCPATH</name>
          <value>C:\ti\tirtos_simplelink_2_11_01_09\products\bios_6_41_02_41</value>
        </variable>
        <variable>
          <name>BOUNDARY</name>
          <value>C:\Program Files (x86)\Texas Instruments\Boundary</value>
        </variable>
      </group>
    </iarUserArgVars>

    Thanks!

  • Hi,

    I suggest first reviewing the Troubleshooting section of the CC2640 FAQ sticky thread. Can you attach your build log as a file after enabling "All" output. Also IAR ARM 7.40.2.8570 hasn't been tested with the SDK, can you try 7.30.4?

    Best wishes
  • Hi,

    I was able to get it to build but I had to do some modifications to the SimpleBLEPeripheral.custom_argvars after I imported it.

    I modified TI_RTOS_DRIVERS_BASE variable definition and I added the variable TI_BOARDS_BASE to correctly call out the path for the specific eval board I was using so that the project could find the Boards.h.

    I also attached my build output below.

    CC2640App-FlashROM_Build_Output.txt

    I also modified the include search paths in the IAR project as shown below.

    $PROJ_DIR$
    $PROJ_DIR$/../../../Source/Application
    $PROJ_DIR$/../../../../../../../Projects/ble/include
    $PROJ_DIR$/../../../../../../../Projects/ble/ICall/Include
    $PROJ_DIR$/../../../../../../../Projects/ble/Profiles/Roles/CC26xx
    $PROJ_DIR$/../../../../../../../Projects/ble/Profiles/Roles
    $PROJ_DIR$/../../../../../../../Projects/ble/Profiles/DevInfo
    $PROJ_DIR$/../../../../../../../Projects/ble/Profiles/SimpleProfile/CC26xx
    $PROJ_DIR$/../../../../../../../Projects/ble/Profiles/SimpleProfile
    $PROJ_DIR$/../../../../../../../Projects/ble/common/cc26xx
    $PROJ_DIR$/../../../../../../../Components/applib/heap
    $PROJ_DIR$/../../../../../../../Components/ble/hci
    $PROJ_DIR$/../../../../../../../Components/ble/controller/CC26xx/include
    $PROJ_DIR$/../../../../../../../Components/ble/host
    $PROJ_DIR$/../../../../../../../Components/hal/target/CC2650/rom
    $PROJ_DIR$/../../../../../../../Components/hal/target/CC2650TIRTOS
    $PROJ_DIR$/../../../../../../../Components/hal/target/_common/cc26xx
    $PROJ_DIR$/../../../../../../../Components/hal/include
    $PROJ_DIR$/../../../../../../../Components/osal/include
    $PROJ_DIR$/../../../../../../../Components/services/sdata
    $PROJ_DIR$/../../../../../../../Components/services/saddr
    $PROJ_DIR$/../../../../../../../Components/icall/include
    $PROJ_DIR$/../../../../../../../Components/ble/include
    $CC26XXWARE$
    $TI_RTOS_DRIVERS_BASE$
    $TI_BOARDS_BASE$\ti\boards\SRF06EB\CC2650EM_7ID

    I try to run the SimpleBLEPeripheral on the IAR debugger after the build but after the call to the BIOS_start() in main() nothing happens.

    I was expecting the RTOS to call the SimpleBLEPeripheral_taskFxn() and then call the SimpleBLEPeripheral_init() to initialize the application then put the task in idle.

    It looks like the CSTACK pointer goes out of range after the BIOS_start() executes as shown in the IAR debugger window below.

    Thanks!