This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

CDC_ACM with softdevice.

Hi,

I have a BLE application, which I want to interface with PC via serial communication through USB.

It seems that just adding Softdevice breaks the USB_CDC_ACM example, which I have ported to Dongle (Worked fine without softdevice).

I have also changed application flash placement to start at 0x26000, so it doesn't collide with Softdevice.

Is it possible to combine cdc_acm with another BLE example, let's say peripheral blinky?

When combining two projects there is a lot of configuration to be merged in config files and more, is there a simple way to merge solutions? (I am using SES)

Also as an alternative connectivity examples work in a way that PC runs the logic through driver and Dongle acts as a physical link or am I misunderstanding the concept?

Awaiting Yours,

Parents
  • UPDATE: It is not necessary to go through the steps below, here is an example that combines the ble_app_uart example with the usb_cdc_acm module.

    I would approach it by starting with a simple ble example (e.g. BLE Blinky Application), then I would add line by line from the USB CDC ACM Example. While doing this you will encounter many errors, which can be resolved by adding the appropriate .c (Include them in the project explorer window to the left) and .h files (include them at the top in the main file, and add the path). You must also remember to enable the necessary peripherals and settings in the sdk_config.h file.

    If you encounter any problems while doing this, please ask.

    Best regards, Simon

  • Thanks for the answer.

    I have ported example to dongle and it works fine without softdevice.

    With SOFTDEVICE_PRESENT macro defined, I can't get it to compile. I have made necessary defines in sdk_config.h and gotten as far as linker, but then I get the following error:

    Output/usbd_cdc_acm_pca10056 Release/Obj/nrf_sdh.o:C:\Mesh Project\nRF5_SDK_15.2.0_9412b96234\nRF5_SDK_15.2.0_9412b96\components\softdevice\common/nrf_sdh.c:89: undefined reference to `__start_sdh_stack_observers'

    The entire SDK folder does not contain anything mentioning `__start_sdh_stack_observers', so I am stuck for now.

    Only file that I changed in SDK itself was nrf_error.h where I commented out #ifndef SOFTDEVICE_PRESENT

    The project is attached. Any tips or ideas what would prevent this example from working?

    3005.usbd_cdc_acm.zip

  • Did you see my update? There I provided a link to an example where the softdevice is combined with the usb_cdc_acm example. The example is located in  examples\peripheral\usbd_ble_uart. But if you did see it and want to do it yourself, please tell me, and I can help you.

Reply Children
Related