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

Making nrf cli application softdevice aware

I'm attempting to make cli application to load from after the softdevice and based on a command enable/disable the BLE functionality. Is there any simple way to do this? Are there any known challenges to this kind of usage?

I have so far done the following changes:

  • Makefile:

Replaced SDK/components/drivers_nrf/nrf_soc_nosd/nrf_nvic.c  and SDK/components/drivers_nrf/nrf_soc_nosd/nrf_soc.c with SDK/components/softdevice/common/nrf_sdh.c and SDK/components/softdevice/common/nrf_sdh_soc.c

Added the following flags

CFLAGS += -DSOFTDEVICE_PRESENT

CFLAGS += -DS140

ASMFLAGS += -DSOFTDEVICE_PRESENT

ASMFLAGS += -DS140

  • gcc_nrf52.ld:

replaced contents with example for ble_app_hrs equivalent linker script file.

  • sdk_config.h:

#define NRF_SDH_ENABLED 1

#define NRF_SDH_SOC_ENABLED 1

Related