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

BLE tutorial for SDK 14.0.0

Hi,

Is there any tutorial already for the version 14.0.0 of the SDK (nRF52, more specifically I am using nRF52832)? I would like to know how to configure Advertising, and create Services and Characteristics. The tutorials on the Tutorials page here say they're updated to SDK 11.0.0. I tried to download one example but it doesn't even compile on SDK 14.0.0 (makefile is very different altogether).

The most recent I found is this one

github.com/.../custom_ble_service_example

But even this one (which says it's for 13.0.0) didn't compile. I'm following it tring to adapt into one of the examples that come with the 14.0.0 but I have already found some differences.

Can anyone point me to a tutorial (or even an example) of code on 14.0.0 that creates services and characteristics?

Thanks,

Ilidio.

  • Hi Ilidio,

    I have updated the tutorial in the GitHub repo to be compatible with SDK v14.0.0. Could you see if you get it to compile now?

    Note: I've only tested it with Keil. Let me know if you need to compile it with Make and gcc.

    Edit (29.09.17):

    The example should now compile with make and gcc. I commited and pushed the following changes to the repo

    • Added missing references to the ble_cus.c file in the Makefile
    • Added missing include path for ble_cus.h in the Makefile
    • Modified the linker script RAM according to step 3 in the tutorial.

    Best regards

    Bjørn

  • Thank you Bjørn! Yes, I am using gcc+make. Your new Makefile compiles all sources, but when linking, it returns some errors (undefined references to ble_cus_custom_value_update, ble_cus_init and ble_cus_on_ble_evt). Another question I have: since I am not using Keil, where should I go about changing the memory parameters (IRAM1 in "Options for Target")? Thanks a lot, Ilidio.

  • You should be able to compile the example with out any linker errors if you pull the latest version from the repo, see the edited answer above. In order to modify the memory settings you need to modify the memory section in the linker script(ble_app_template_gcc_nrf52.ld) found in pca10040\s132\armgcc, i.e.

    MEMORY
    {
      FLASH (rx) : ORIGIN = 0x23000, LENGTH = 0x5d000
      RAM (rwx) :  ORIGIN = 0x200020F0, LENGTH = 0xdf10
    }
    
Related