This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

"twi + softdevice" not working !!! makefile build fails

hello,

my makefile use to work before i add the twi nrf_drv_twi.c file and included the directory INC_PATHS += -I$(abspath ../../../../../../components/drivers_nrf/nrf_soc_nosd)

i get the error below when building at app_util_platform.c:

 app_util_platform.c: In function 'app_util_critical_region_enter':
/Users/brookgebremedhin/nordicSDK11/components/libraries/util/app_util_platform.c:36:3: error: implicit declaration of function 'sd_nvic_critical_region_enter' [-Werror=implicit-function-declaration]
   (void)sd_nvic_critical_region_enter(p_nested);
   ^
/Users/brookgebremedhin/nordicSDK11/components/libraries/util/app_util_platform.c: In function 'app_util_critical_region_exit':
/Users/brookgebremedhin/nordicSDK11/components/libraries/util/app_util_platform.c:49:3: error: implicit declaration of function 'sd_nvic_critical_region_exit' [-Werror=implicit-function-declaration]

if i tell the makefile that i am not using the soft device then it can build. cam anyone show me a working makefile that uses twi and soft device together ?

my makefile is attached below

thanks

Makefile

Parents
  • Do not add the directory ../../../../../../components/drivers_nrf/nrf_soc_nosd to your include path if you are using the SoftDevice. That directory is only for projects that don't use the SoftDevice.

    Instead, add the directory ../../../../../../components/softdevice/s130/headers to your include path.

Reply
  • Do not add the directory ../../../../../../components/drivers_nrf/nrf_soc_nosd to your include path if you are using the SoftDevice. That directory is only for projects that don't use the SoftDevice.

    Instead, add the directory ../../../../../../components/softdevice/s130/headers to your include path.

Children
  • The project needs to have the file nrf_drv_config.h added, and then edited to enable the TWI interface. Either set TWI0_ENABLED to 1 or TWI1_ENABLED to 1, depending on which of the two TWI peripherals you want to use. And set TWI0_USE_EASY_DMA or TWI1_USE_EASY_DMA to 0, since Easy DMA is only supported for nRF52.

  • One of my habits is to search the Nordic SDK for certain file names when they appear in my compiler error messages. This has taught me things that I have trouble finding in the SDK documentation or tutorials.

    I'm using the PCA 10036 board and SDK 0.9.2. There are THREE versions of the file nrf_error.h in SDK 0.9.2. They are located in the following directories:

    components/softdevice/s132/headers
    components/softdevice/s212/headers
    components/drivers_nrf/nrf_soc_nosd
    

    Eventually I figured out that "nosd" stands for "NO SoftDevice." Hope that helps someone else.

Related