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

Having issues adding drivers to a new project

I am trying to add the spi and twi drivers to the ble_app_template project, but I keep running into errors. I am using the SDK 12.2.0. How are we supposed to go about adding all of the files we need to get these drivers working on a new project? I have tried adding it through the software components management tool and by just adding the necessary files to a new group. I have also seen both methods used in different example projects. Sorry if there is already a tutorial on how to do this.

Parents
  • Hi,

    There are four things you have to add/verify when adding modules to a Keil project:

    1. Add the source files (.c) for the module to groups in Keil.
    2. Include the header file (.h) in the source file where the module is used.
    3. Add the path to the header file to the include paths in C/C++ project options.
    4. Enable the module in SDK configuration header file. If you cannot find the settings for the desired module in the sdk_config.h file for your project, check in ble_app_template project sdk_config.h file, as this include all modules in the SDK.

    Step 1-3 is described in more details in section Add required files and includes of the Application Timer Tutorial. All steps are shown in below image:

    image description

    Best regards,

    Jørgen

Reply
  • Hi,

    There are four things you have to add/verify when adding modules to a Keil project:

    1. Add the source files (.c) for the module to groups in Keil.
    2. Include the header file (.h) in the source file where the module is used.
    3. Add the path to the header file to the include paths in C/C++ project options.
    4. Enable the module in SDK configuration header file. If you cannot find the settings for the desired module in the sdk_config.h file for your project, check in ble_app_template project sdk_config.h file, as this include all modules in the SDK.

    Step 1-3 is described in more details in section Add required files and includes of the Application Timer Tutorial. All steps are shown in below image:

    image description

    Best regards,

    Jørgen

Children
Related