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

ble.h compiling error with GCC C++

Hi

We develop an application on nRF51822 the with GCC C++ and try to include the file ble.h in a .cpp file. As soon when I include the file in the .cpp file I get compiling errors that SVCALL isn't defined.

I included it with the extern "C" definition, did not help either.

"#"ifdef __cplusplus extern "C" { "#"endif

"#"include "ble.h" "#"ifdef __cplusplus } "#"endif

The Compiler errors:

arm-eabi\com.sysprogs.arm.nordic.nrf5x/nRF51/components/softdevice/S110/headers/ble_gap.h: In function 'uint32_t sd_ble_gap_auth_key_reply(uint16_t, uint8_t, const uint8_t*)':

warning : asm operand 0 probably doesn't match constraints

arm-eabi\com.sysprogs.arm.nordic.nrf5x\nRF51\components\softdevice\S110\headers\ble_gap.h(1206,1): note: in expansion of macro 'SVCALL' 1> SVCALL(SD_BLE_GAP_AUTH_KEY_REPLY, uint32_t, sd_ble_gap_auth_key_reply(uint16_t conn_handle, uint8_t key_type, uint8_t const *p_key));

Compiler CFlags: "-ffunction-sections -O0" CXXFLAGS: "-ffunction-sections -fno-exceptions -fno-rtti -O0 -std=c++11"

Is there any other flag on the compiler to set? I mean, we compiled other nRF libraries without any problems, which call SVCALL as well.

Thanks, Armin

Parents Reply Children
No Data
Related