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.

cc2540, IAR Embedded Workbench

Other Parts Discussed in Thread: CC2540

hi,

I want to run a software example of cc2540 using IAR Embedded Workbench, in the step of the Debugging and downloading  the software example to the bord the message below is appear :

" The target cannot be selected when used in another debug session or in other application."

"Warning: no target selected, session aborted" 

Is it possible guide me about this problem and what should I do?

  • Hi Inma,

     

    Can you describe exactly the steps you are doing in order to download

    the firmware into the cc2540 chip?

    In example:

    1. I've connected the evaluation board to PC with an USB cable
    2. I've turned the EB ON.
    3. After I click on "Download and debug" (Ctrl+D) I see the EB and the chip number
      detected in the "download popup window".
    4. The I select the EB board and click OK.

     

    One more thing, do you, by any chance, trying to work with the chip also by another program,

    like smartRF studio, or smartRF flash programmer, if so, just this one, close it and try to debug.

     

    Br,

    Igor



  • Once IAR has opened up, click File > Open > Workspace. Select the following file:
    C:\Texas Instruments\BLE-CC2540\Projects\ble\SimpleBLEPeripheral \CC2540DB\
    SimpleBLEPeripheral.eww
    This is the workspace file for the SimpleBLEPeripheral project


    To build a project, right click on the workspace name “SimpleBLEPeripheral – CC2540 Slave” as
    seen below, and click “Make”:



    This will compile the source code, link the files, and build the project. Any compiler errors or
    warnings will appear in the messages window at the bottom of the screen.
    To download the compiled code into a CC2540 device and debug, connect the keyfob using a
    hardware debugger (such as the CC Debugger, which is included with the CC2540DK-MINI
    development kit) connected to the PC over USB. Find the “Debug” button in the upper right side
    of the IAR window:



    The following pop-up window should appear on the screen, indicating that the code is being
    downloaded to the device:


    The following pop-up window does not appear on the screen, the following message appears:


    " The target cannot be selected when used in another debug session or in other application."

    "Warning: no target selected, session aborted"

    I tried to load the software on the chip through smartRF cc2540 flash programmer and I get the same error.

  • Hi Inma,

     

    Try to do the following:

    1. Unplug the keyfob.
    2. Remove (uninstall) cebal USB driver from windows device menager.
    3. Reboot your PC.
    4. Plug in CC debugger to PC (The drivers should be installed automatically at this point).
    5. Connect the keyfob to the CC debugger as shown in "CC2540 Mini Development Kit 
      User’s Guid", section 5 (do not forget to apply external power to the keyfob).
      Run the flash programmer (Is the keyfob recognized by the flash programmer?)
    6. Check "retain IEEE address", select "erase" option, and click on perform action.
    7. Now, try to download the FW with IAR debugger.

     

    Also, please ensure that you have "Microsoft .NET Framework 3.5 SP1” installed on

    your PC and you are using the latest version of IAR EW

     

    Br,

    Igor

  • Hi Igor,

    I have followed all the steps I have indicated and as the guide all embedded software for the CC2540 is Developed Embedded Workbench for 8051 using
    from IAR v7.51A Software., which is the version I use but I still leave the same warning.

    I download IAR Embedded Workbench for 30 days evaluation version is what you can work through this.

    Thanks,

    Regards.

    Inma.

  • Is the 30 IAR trial version is 8.10?


  • Hello Igor,

    I still have the same target problem, I download the latest version of IAR EW V8.10 but still not working.

    I reset the device but the problem persists.

    Greetings.

    Inma.
  • Hi Inma,

     

    Can you please download the smartRF flash programmer and install it.

    Then apply power to your device and connect it to CC debugger, afterwards

    connect CC debugger to a PC and open the Flash Programmer. Is your

    device recognized by the smartRF flash programmer?

    If the result is positive, close the flash programmer and open IAR, try

    to debug now with IAR embedded workbench (Ctrl+D).

     

    Br,

    Igor

  • Thank you so much to the nice technical support people at TI, for:

    1. Providing a reassuring way to verify that no, I am not the only one who has run into this problem, and

    2. No, TI has done absolutely nothing meaningful to resolve the problem in a helpful way - other than to make suggestions that are guaranteed to waste a lot of time without actually fixing anything.

    In short, the problem is that the SmartRF Programmer will install cebal drivers v2.50, which work fine for the SmartRF programmer by itself, but are NOT compatible with IAR EW8051 7.51A, and probably other versions, too.

    SmartRF Programmer will install Cebal drivers v2.50.

    You need Cebal drivers v2.00 to work with IAR.

    The major problem here is that you have to:

    find the installed drivers and DELETE them

    find the available newer drivers and make them unavailable (by changing path names) or deleting them entirely.

    install the v2.00 drivers and MAKE SURE they are the ones installed by manually pointing the driver installer to their directory

    hope and pray that they do not get overwritten by some 'helpful' program that assumes that OF COURSE you want the lastest drivers, when actually you DON'T.

  • Hi Steve,

    2) Often, different causes may have similar effects. We try to help everyone solve the issue at hand. It is unfortunate if you are not happy with the help you have found in the forums.

    A few comments on your post:

    Steve Kranish said:
    ... SmartRF Programmer will install cebal drivers v2.50, which work fine for the SmartRF programmer by itself, but are NOT compatible with IAR EW8051 7.51A, and probably other versions, too.

    This is partly correct. The latest SmartRF Flash Programmer installs the latest version of Cebal. True. The initial release of IAR EW8051 7.51 only supports the old Cebal driver, but IAR has since the release of 7.51 released several service packs. If you update  your IAR EW8051 7.51 installation (patch M in particular), IAR will recognize devices using both the new and old Cebal driver.

    Steve Kranish said:
    The major problem here is that you have to:

    find the installed drivers and DELETE them

    find the available newer drivers and make them unavailable (by changing path names) or deleting them entirely.

    install the v2.00 drivers and MAKE SURE they are the ones installed by manually pointing the driver installer to their directory

    hope and pray that they do not get overwritten by some 'helpful' program that assumes that OF COURSE you want the lastest drivers, when actually you DON'T.

    An alternative is to follow the steps in the "CCxxxx Development Tools USB Driver Installation Guide" (swra366) if you wish to upgrade/downgrade your Cebal driver. This document can be found on the product page of the different SmartRF softwares. It is also the first hit on Google/Bing if you search for "Cebal driver".

    Edit: And of course: Please let me know if you still have issues with the Cebal drivers.

    Best regards,
    ABO 

  • 全英文的,看不懂。。。

  • This might be a very late post. But have you powered up your keyfob with a battery. If the battery is weak, the cc debugger will not work. I understood this just now.