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: Using CC2540 usb dongle with USB CDC on simpleBLEPeripheral

Part Number: CC2540

Hello~

 

I want to make cc2540 usb dongle be able to use USB CDC (virtual com port) for communicating with other devices like PC.

 

My cc2540 usb dongle is rolled as slave on simpleBLEPeripheral project and I already checked that it was discoverable and properly worked.

In this situation, I also want my cc2540 usb dongle with USB CDC (virtual Com Port) to communicate with my PC.

 

I think that I have to add my simpleBLEPeripheral project on some thing for USC CDC (virtual Com Port).

I read some thread in this site and tried to do that.

But I got some errors like this.

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

Linking

Error[e46]: Undefined external "usbfwResetHandler::?relay" referred in hal_uart ( C:\Texas Instruments\BLE-CC254x-1.4.2.2\Projects\ble\

SimpleBLEPeripheral\CC2540DB\CC2540\Obj\hal_uart.r51 )

Error[e46]: Undefined external "usbfwSetupHandler::?relay" referred in hal_uart ( C:\Texas Instruments\BLE-CC254x-1.4.2.2\Projects\ble\

SimpleBLEPeripheral\CC2540DB\CC2540\Obj\hal_uart.r51 )

Error[e46]: Undefined external "usbfwInit::?relay" referred in hal_uart ( C:\Texas Instruments\BLE-CC254x-1.4.2.2\Projects\ble\SimpleBLEPeripheral\

CC2540DB\CC2540\Obj\hal_uart.r51 )

Warning[w52]: More than one definition for the byte at address 0x6b in common segment INTVEC. It is defined in module "hal_uart" as well as in module

"hal_key"

Error while running Linker

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

How can I solve this problem???

My settings are below.

 

1. Including Directories

option ->c/c++ complier -> Preprocessor -> Additional include directories

This is my Including Directories (I only added Red lines)

 

$PROJ_DIR$\..\..\common

$PROJ_DIR$\..\..\include

$PROJ_DIR$\..\..\..\..\Components\hal\include

$PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540USB

$PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540USB\usb

$PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540USB\usb\class_cdc

$PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540USB\usb\library

$PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540USB\usb\library\cc2540

$PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540USB\usb\library\usb

$PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540USB\usb\class_cdc

$PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB

$PROJ_DIR$\..\..\..\..\Components\osal\include

$PROJ_DIR$\..\..\..\..\Components\services\saddr

$PROJ_DIR$\..\..\..\..\Components\ble\include

$PROJ_DIR$\..\..\..\..\Components\ble\controller\CC254x\phy

$PROJ_DIR$\..\..\..\..\Components\ble\controller\CC254x\include

$PROJ_DIR$\..\..\..\..\Components\ble\hci

$PROJ_DIR$\..\..\..\..\Components\ble\host

$PROJ_DIR$\..\..\..\..\Components\ble\ROM

$PROJ_DIR$\..\..\common\cc2540

$PROJ_DIR$\..\..\common\npi\npi_np

$PROJ_DIR$\..\..\Profiles\Roles\CC254x

$PROJ_DIR$\..\..\Profiles\Roles

$PROJ_DIR$\..\..\Profiles\SimpleProfile\CC254x

$PROJ_DIR$\..\..\Profiles\SimpleProfile

$PROJ_DIR$\..\..\Profiles\DevInfo

$PROJ_DIR$\..\..\Profiles\Keys\CC254x

$PROJ_DIR$\..\..\Profiles\Keys

 

 

2. Defined Symbols

option ->c/c++ complier -> Preprocessor -> Defined symbols

This is my Defined symbols (I only added Red lines)

 

INT_HEAP_LEN=3072

HALNODEBUG

OSAL_CBTIMER_NUM_TASKS=1

HAL_AES_DMA=TRUE

HAL_DMA=TRUE

POWER_SAVING

xPLUS_BROADCASTER

HAL_LCD=TRUE

HAL_LED=FALSE

HAL_KEY=TRUE

HAL_UART=TRUE

HAL_UART_USB=TRUE

  

3. Include some files to Project and Select Target “CC2540”

I included some files like the picture below.

  

 

 Thank you.

  • Hi,

    I am confused about what you are trying to do. The USB dongle is already able to communicate with the PC over USB. You shouldn't need to add anything to do this.

    -Nathan
  • Hi~ NathanS.. Thank you for your answer.

    I want connect my cc2540 USB Dongle rolled a slave to communicate with my computer using B-tool.

    As I mentioned earlier, my cc2540 USB Dongle is working well as a slave communicating with other BLE device now.

    but I cannot discover my cc2540 USB Dongle when I use B-tool.

    I already checked that my usb driver on Window was OK and cc2540 USB Dongle on other programs was detected well.

    I think I have to configure some things for B-tool's my usb discovery in my program.

    What should I do?

  • Hi,

    What version of BTool are you using? You shouldn't need to configure anything for BTool as long as the port is open. Make sure that no other applications that may be using the port are open, then unplug the dongle and plug it back in. The dongle should show up in BTool.

    -Nathan
  • HI~ 

    B-tool's version is 1.40.15.

    I don't think that it is the problem of the B-tool's version

    because when I use same USB dongle on other programs, it could be detective in B-tool.

  • Hi,

    There is nothing else you need to do to configure it to use BTool. I would check again not nothing else is using the port. Does it show up in device manager?

    -Nathan