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.

BLE Host Build Config settings - buildconfig.cfg

The sample projects for 1.4.0 have different project configurations for say building using the smartrf05 dev kits or the keyfob for example - but they all refer to the same \config\buildConfig.cfg.

What does the -DHOST_CONFIG do? . It looks like you would need to uncomment the correct config for the type of app you are building - but when you load any project - it will just get the last edited version ( set in compiler options - extra) - which may not be the correct one. If so how do we work out which one to use and what is the effect of using the wrong one?

For instance the peripheralobserver project - I would guess you have dhost set to = PERIPHERAL_CFG+OBSERVER_CFG - but default setting in file is PERIPHERAL_CFG+CENTRAL_CFG

Can anyone clarify the use of the buildConfig setting?

  • Hi Simon,

    For various board setups, you should look in the target directory: C:\Texas Instruments\BLE-CC254x-1.4.0\Components\hal\target. 

    Here you have the different HAL Boards setups:

    • CC2540EB - EM Design
    • CC2540USB  - USB Dongle Design
    • CC2541ARC - Advanced Remote Design
    • CC2541ST - Sensor Tag

    These are individually included in the corresponding project.

    I personally don't use buildConfig.

    Best Regards

    Joakim

  • Hi Joakim,

    The question was actually about buildConig.cfg and which DHOST_CONFIG = line should be uncommented. I was assuming all projects ( int he Tools folder) used the same buildConfig.cfg from BLE\config - but on checking the file path and also the path in the options compiler extras tab, I see that each project has its on buildConfig.cfg file with the 'correct' DHOST_CONFIG setting.

    I assume DHOST_CONFIG is just a pre-processor define used to select options in the ble lib code.

    Just need to confirm that is whats happening, I should be able to work out the correct setting by examining the various sample project config files

    Best Regards

    Simon

  • Hi Simon,

    Correct, one of the lines should be uncommented so that the proper GAP Role is supported. This is mainly to optimize the build. For example, if you are only developing a peripheral role device, uncomment -DHOST_CONFIG=PERIPHERAL_CFG. The projects are generally designed for a specific purpose and has the setting pre-defined. 

    I think the reason behind the config file to move away from using pre-processors. Now we use both instead.

    Did I answer your question?

    Best Regards 

    Joakim