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

Unable to build nRF51 Bluetooth Driver 0.5.0

I'm trying to build BLE driver 0.5.0 for 64bits.

I've downloaded:

  • MinGW 4.8.2 64bits
  • boost 1.56 and compiled it using address-model=64
  • CMake 3.4.1
  • Python 2.7.11
  • Swig 2.0.12
  • Microsoft Visual C++ Compiler for Python

Now, Im' getting this error upon compilation:

b:/nrfdriver/sdk/nRF51_SDK_8.1.0_b6ed55f/components/device/nrf51.h:119:0, from b:/nrfdriver/sdk/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/nrf_soc.h:50, from b:/nrfdriver/pc-ble-driver-0.5.0/driver/inc_override/nrf_soc.h:21, from b:/nrfdriver/pc-ble-driver-0.5.0/driver/inc_override/app_util_platform.h:26, from b:/nrfdriver/sdk/nRF51_SDK_8.1.0_b6ed55f/components/drivers_nrf/uart/app_uart.h:27, from b:\nrfdriver\pc-ble-driver-0.5.0\driver\src\app_uart_pc.c:13: C:/MinGW/mingw64/lib/gcc/x86_64-w64-mingw32/4.8.2/include/xmmintrin.h: In function 'void _mm_setcsr(unsigned int)': b:/nrfdriver/sdk/nRF51_SDK_8.1.0_b6ed55f/components/toolchain/gcc/core_cm0.h:164:21: error: expected primary-expression before 'volatile' #define __I volatile /*!< Defines 'read only' permissions */ ^ driver\CMakeFiles\s130_nrf51_ble_driver.dir\build.make:297: recipe for target 'driver/CMakeFiles/s130_nrf51_ble_driver.dir/src/app_uart_pc.c .obj' failed

Apparently, it's because core_cm0.h defines #define __I volatile and, later xmmintrin.h from gcc include directory does _mm_setcsr (unsigned int __I) and this fails.

Am I doing something wrong? I don't think this could be caused by the fact that I'm trying to compile 64bits.

Related