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

What directories/files can I remove if using only BLE?

I have a working set of implementations placed in the 17.0.2 SDK examples directory. The projects use SoftDevice s140 for BLE and flash write operations. I would like to know which directories I can delete in the components directory and have the projects still build and run on the nRF52840 DK and any other MCU that is compatible with an nRF52840 using only BLE. The components directory is quite large. How about the external and external tools? Do I need them?

I want to do this to reduce the size of the package I send to other implementers as well as to simplify the appearance of the project.

Parents Reply Children
  • What I meant by using only BLE is that the project is a BLE peripheral and uses nothing else ANT, NFC, etc., that is also supported by the hardware.

    In the Segger project file I see entries like this:

    ../../../../../../components/nfc/ndef/parser/message;

    Why is the nfc included here? I don't use NFC  OR are you saying I have to guess what files that are included in the project file are not used? If the latter, that is very dangerous. I do not know what the developers did and it may be very likely that stuff I need is in a NFC file as that method/feature might be shared.

  • Hi,

    I have no idea which project you are looking at. If it includes NFC then might be that it's using a NFC for some purpose, for example bonding. 
    But I would suggest to have a look at the .c file that's included. In the BLE examples we tended to include all the directories between different example. But what's used should be only in those .c and .s file. 

    You may need to do some try and error I'm afraid. It's a limitation of the example in the SDK that we include a generic list of header folders. 

  • I am looking at my own project. It does not use the SDK for BLE but SoftDevice.  I started with an existing example to get the board and MCU support and then wrote my app on top of that. The peripherasl I am implementing follow a proposed standard that has not yet been approved, so there is no support for it.

  • You can narrow down which folder you need to keep by looking at the .c file included in the project file. Usually the header files are in the same folder as the .c file or in the include folder at the same level. 

  • The problem with that is that I started with an example project (glucose example) which used the SDK. As I moved over to SoftDevice (at least for Bluetooth and Flash writes) There were certain directories I could remove quite easily, like the Ble Services. But many of the other directories I can't say. Now clearly the h-files and c-files included in the IDE's project files are going to remain from what was in the original glucose project unless I remove them. So what I am trying to do is to remove those that I inherited from the original example but no longer use.  I guess there is no straight forward way to do this unless you are an SDK-SoftDevice developer and know how the entire infrastructure works.

Related