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.

How to build a cc2640 stack image with smaller ROM size?

Other Parts Discussed in Thread: CC2640

Hi,

The majority of BLE protocol stack that we received with CC2640 SDK are in the form of library file.  All the examples applications provide two projects, one for application, one for stack. The stack project does not contain source files except library files CC2640Stack.a and CC2640Stack_HCI_TL.a.

The compiled code size of stack is currently around 70K, occupy more than half of the total flash size of 128K.

70K stack code size is way too much for my application.

I understand the defult BLE stack library is compiled with a general BLE stack with many advanced features, therefore using large ROM. But for my application, I only need BLE Peripheral Role and no need of advanced features.

It seems there are many ways to configure how and what parts of the library that get linked in when building the stack image.

So my question is, how to configure to only use BLE Peripheral Role with basic BLE features to get a stack image with much smaller ROM size?

Best regards,

Xiaodong Xu

  • Hello Xiaodong,

    I'm going to assume you are using BLE 2.1 which does not enable the GATT client role for default simpleBLEPeripheral configurations (~ 4kB savings). Please refer to "10.4 Configuring the BLE Stack" for tips on minimizing flash usage of the BLE Stack image in the BLE 2.1 SW Dev Guide (SWRU393). The most savings will come from disabling OSAL SNV and disabling the GAP Bond Manager.

    Best wishes