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

How to add a module to an existing example?

Hello

I would like to add Power Management to the BSP example and I'm doing as follows (using SES 5.10):

  1. add #include "nrf_pwr_mgmt.h" and nrf_pwr_mgmt_init(); to the Main code
  2. add
    #ifndef NRF_PWR_MGMT_ENABLED
    #define NRF_PWR_MGMT_ENABLED 1
    #endif
    to sdk_config.h
  3. add "../../../../../../components/libraries/pwr_mgmt" to Preprocessor in the project options (Common config)
  4. add nrf_pwr_mgmt.c to the project

From this point I keep getting errors and errors. The first being about nrf_mtx.h missing. So I add that as well, but more errors keep poppoing up.

I have the feeling there must be an easier way to do this, isn't it? Perhaps I am missing a step from the four previously mentioned?

Related