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

Problems including nrf_delay.h when compiling with GCC

Hi,

I'm trying to transition my application from SDK 7.2.0 to SDK_9.0.0 and am having some issues when including nrf_delay.h compiling with gcc:

Nordic/nRF51_SDK_9.0.0_2e23562/components/drivers_nrf/hal/nrf_delay.h: In function 'nrf_delay_us': Nordic/nRF51_SDK_9.0.0_2e23562/components/drivers_nrf/hal/nrf_delay.h:52:25: error: expected '=', ',', ';', 'asm' or 'attribute' before 'asm' register uint32_t delay asm ("r0") = number_of_us; ^ Nordic/nRF51_SDK_9.0.0_2e23562/components/drivers_nrf/hal/nrf_delay.h:52:25: warning: implicit declaration of function 'asm' [-Wimplicit-function-declaration] Nordic/nRF51_SDK_9.0.0_2e23562/components/drivers_nrf/hal/nrf_delay.h:52:36: error: lvalue required as left operand of assignment register uint32_t delay asm ("r0") = number_of_us; ^ Nordic/nRF51_SDK_9.0.0_2e23562/components/drivers_nrf/hal/nrf_delay.h:71:13: error: 'delay' undeclared (first use in this function) : "+r" (delay)); ^

Any pointers in the right direction greatly appreciated, Thanks

Related