Hi,
I'm using gcc with eclipse to compile ble_app_hrs and I get the following error for all the SVCalls like sd_softdevice_enable, etc...
The following error is flagged off - "Redefinition of sd_softdevice_enable" - as indicated below
uint32_t sd_softdevice_enable(nrf_clock_lfclksrc_t clock_source,
softdevice_assertion_handler_t assertion_handler)
SVCALL(SD_SOFTDEVICE_ENABLE, uint32_t, sd_softdevice_enable(nrf_clock_lfclksrc_t clock_source, softdevice_assertion_handler_t assertion_handler));
-
If SVCALL_AS_NORMAL_FUNCTION is defined then SVCALL is defined as follows
#define SVCALL(number, return_type, signature) return_type signature
What is "SVCALL_AS_NORMAL_FUNCTION"?
-
If the above is not defined, then as per the definition of GNUC, SVCALL is defined as follows
#define SVCALL(number, return_type, signature)
_Pragma("GCC diagnostic ignored "-Wreturn-type"")
_Pragma("GCC diagnostic ignored "-Wunused-function"")
attribute((naked)) static return_type signature
{
__asm(
"svc %0\n"
"bx r14" : : "I" ((uint16_t)number) : "r0"
);
}
Which definition should be used with the gcc compiler? What is the significance of SVCALL_AS_NORMAL_FUNCTION definition?
Regards, Indu