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

Migrating from NRF51422 to NRF51822 gets an error

I am using uVision 5.18a with MDK-Lite ARM toolchain and I downloaded nRF examples for SDK 11.0.0-2.alpha with Pack Installer.

Then I tried to compile "/ble_peripheral/ble_app_uart" with S130 Softdevice and everything goes OK if I use nRF51422_xxAC (=default), but when I try to change device to "nRF51822" I got 18 errors, all of them beeing "error #20: identifier XX is undefined":

*** Using Compiler 'V5.06 update 1 (build 61)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Rebuild target 'nrf51422_xxac_s130'
assembling arm_startup_nrf51.s...
compiling system_nrf51.c...
compiling ble_nus.c...
compiling bsp_btn_ble.c...
compiling ble_srv_common.c...
compiling bsp.c...
compiling main.c...
compiling ble_advdata.c...
compiling nrf_drv_gpiote.c...
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\4.0.0-2.alpha\gpiote\nrf_drv_gpiote.c(43): error:  #20: identifier "GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS" is undefined
...

I also checked flags in "nrf_drv_config.h" which I see inside Project tree under "nRF_Drivers", but it seems that GPIOTE (and other reported features, which are causing errors) is "ON" as expected:

...
/* GPIOTE */
#define GPIOTE_ENABLED 1
#if (GPIOTE_ENABLED == 1)
#define GPIOTE_CONFIG_USE_SWI_EGU false
#define GPIOTE_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW
#define GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS 4
#endif
...

What am I missing?

Related