Showing results for 
Search instead for 
Did you mean: 

Properly add BLE library (.a) to a project

In order to design the Bluetooth Low Energy part of my software, I decided to use BLE Profiles_Lib 3.1.3 Library.

There is a few folder inside this root folder (BLE_application, BlueNRG1_Periph_Driver, Bluetooth_LE, CMSIS, cryptolib, hal, SDK_Eval_BlueNRG1). I saw that depends on your needs, you can decide to include or not some part of these folder.

For example, at this time, I dont need "cryptolib"; so I decided not include the source code.

I included the library (file.a) of the Bluetooth_LE folder and the relative .h. Works fine.

But, reading the PM0257 documentation on how to design my BLE software part, I see that a lof of useful function are not provided in the .a file, but in others .c file of the library. I then need to include each file manually (when the function that I need to use is from a .c and not the .a). I also need to include all relatives .h.
I dont really understand how the BLE Profiles_Lib 3.1.3 Library is setup.

What is the proper way to include this kind of library with STM32cubeIDE ? As I already included the .a.

Do I really need to include all .c (and .h dependencies) when I want to use a function that its not included in the .a ?

Why the .a file of the BLE Profiles_Lib 3.1.3 Library doesnt include "all" the source-code of the folder ? It would be too big to fit in the flash memory of a MCU ?