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.

CCS/LAUNCHXL-CC2640R2: BLE5 broadcaster and observer breaks the flahs-space-limit, only 5k for application?

Part Number: LAUNCHXL-CC2640R2
Other Parts Discussed in Thread: CC2642R, CC2652R

Tool/software: Code Composer Studio

Hi Forum-Members,

in my application I only wanna use observer and broadcaster functionality. Only advertising and scanning. The scanner looks on advertising packets, which will parse by my application and if necessary it switch to advertiser, so that another device scanns the transmitted packets. The main-application do many other things like adc-works, uart handling, in-out-handling.

For now (I think) my application will only use ble5 as transmitter / receiver and therefor the lower GAP functionlity, no gatt, no gapbond-manager and so on will be used. In other forum posts there is talk of combi-role and sample with "ble5 simple central" and extend it on TOOLS/buld_config.opt to combo role "-DHOST_CONFIG=CENTRAL_CFG+BROADCASTER_CFG".

I do so and import the ble5-simple-central-example modify the build_config.opt. After compile and link the demo-app size is 119k with best size compiler options (level 4, whole program optimizations). There will be 5k free space, if there is a last flash-last-page in use. Hint: with no optimizations (best for debugging) there is no linking possible, space-limit whith demo-app, without any free space for anything.

It is not possible to have only 5k for user-application. My questions are:

1) How can I get more free space for  application?

2) Is there an example for ccs which only activate the necessary libs for broadcaster / observer and whithout all the needless rest?

3) Can I use BLE5 as receiver / transmitter scenario totaly whithout gap, gatt, bond. Are there lower functions that make the phy and transport (channel hopping and so on)? My interpretation of documentation is, that the gap handles the transport of data and is vital.

Very grateful about answers!

best regards,

Bjoern

  • Part Number: LAUNCHXL-CC2640R2

    Tool/software: Code Composer Studio

    Hi forum members,

    I extend the ble5_simple_broadcaster with observer functionality. Therefore I add the #include <gap_scanner.h>. The compiler makes no error. But the linker dont find the lib / obj  of the GapScan_xyz functions. See screenshot.

    Which linker file i have to add?

    best regards

    Bjoern

  • Hi Bjoern,

    To fix this linker error, you will need to edit build_config.opt, found under TOOLS in the stack project. Under "BLE Host Build Configurations," comment out "-DHOST_CONFIG = BROADCASTER_CFG" and uncomment "-DHOST_CONFIG = CENTRAL_CFG + BROADCASTER_CFG"
  • Hi Jessica Heider,

    thanks for reply.

    After activate the "-DHOST_CONFIG=CENTRAL_CFG+BROADCASTER_CFG" in build_config.opt there are two more problems:

    1) linker now dont find the GattServApp (see screenshot)

    2) the size of my application drops out (with dbg 0-optimizations before central-role it was 80k) it explode to 134k (6k to less). Screenshot shows size with 117k full-size because I go back to full-size-optimizations level 4.

    In my application there will be used only the GAP functionality (no GATT-Services are needed). If the device receive advert-data with the max 31byte-advert-field the application shall handle this about the GAP-Messages. The complete overhead is not neccessary, also the linked dataexchange (central+peripheral) will not used. Only broadcast-advertising and observer functionality will be required. I think there must be a lot of flash-space left to fill this with my application and not with not needed overhead.

    Now my question: Are there possibilites to activate only broadcast / observer functionality without GATT and so on? Perhaps with other methods / functions?

    sincere regards

    Bjoern

  • Hi Bjoern,

    We currently do not support broadcaster/observer multi-role. In order to fix those build errors, you will need to link gattservapp_util.c and sm_ecc.c (CC2640R2_SDK/source/ti/ble5stack/host) into your project. What is your application for? Are there specific BLE5 features that you are using in your project? If not, our BLE4.2 stack does not use as much flash memory. If BLE5 is a necessity, I would recommend considering our CC26x2 device that has more memory. Otherwise, we can try to find a way to reduce memory usage in your application.

  • Hi Bjoern,

    We’re working on a response to this in detail.
    In general flash size is limited on ble5 for cc2640r2
  • Merging threads together since this is relatively the same topic and same author.

    As Sean pointed out, the flash size is inherently limited on CC2640R2 when using the BLE5 stack.

    Have you looked at the CC2642 device? It features BLE5 and has much more flash availability. Typically we recommend people only use the CC2640R2 BLE5 stack when there is not a need for a ton of application code. Because the multi-role-ish type nature, it could be hard to develop your solution as you've pointed out with your code optimization setting comments.

    Can you look into the CC2642? www.ti.com/.../CC2642R
  • Hi Jessica, hi Evan, hi Sean,
    thanks for reply.

    We will need BLE5 because long-range phy-coded-8. This is the first real long-range version whith the benefits of bluetooth (pyh: channel-hopping, business: bluetooth is sexy and sales). Our tests results are ranges of 30mtr in house with walls / doors / loss with safe transmission. The base is one of the best on market, that is the reason on ble5.

    Now we have to look on the other devices you prefer, but there are no distributors in europe who stock the CC2642R and CC2652. So we done ti-register for samples.

    One more question before I close this post: When will the devices CC2642R and CC2652R come to market (no preview / distributor with stock / mass production)?

    best regards,
    Bjoern
  • Hi Bjoern,

    We do not explicitly communicate exact dates publicly on the forum, but I can say we are targeting 1Q 2019. 

    As you've said, we handle our samples and distribution ourselves so feel free to order from the web what you need.