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

Issues building PC nRF51 Bluetooth Driver 0.5.0

I'm using windows 10. MinGW v4.8.12 I think, but when I do a g++ --version it says 4.8.1 Python 2.7.9 as per previous post where 2.7.10 didn't work CMake v3.5.0-rc1 Boost v1.56.0 swig v2.0.12

I have successfuly installed all the accessory tools. lots of stuff that wasn't in the readme.md page

you need to make sure your path is set correctly so that it will compile Here is the additional path's that I had to set to get things to work

C:\Users\Shannon\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\bin;c:\Program Files (x86)\Git\bin;c:\python27;C:\Program Files (x86)\CMake\bin;C:\Nordic\swig;c:\MinGW\bin

One that the readme.md file didn't mention where and what to do with swig. I placed it into my Nordic folder, and added it to my path.

I finally got boost to compile properly by adding the Visual C++ for Python folder to my path. this was for ml as it was giving errors.

Ah yes at some point I needed to modify the file \my_deps_directory\nRF51_SDK_8.1.0_b6ed55f\components\serialization\common\struct_ser\s130\ble_gap_struct_serialization.c line 1275 was: err_code = uint8_t_dec(p_buf, buf_len, p_index, &byte); to: err_code = uint8_t_dec((uint8_t*)p_buf, buf_len, p_index, &byte); as the pytonbuild gave me an error.

My current problem is. I got everything compiled and I am running: python ..\pc-ble-driver\scripts\build.py -srp \my_deps_directory -d -b

everything builds, but when linking I get these errors: CMakeFiles\s130_nrf51_ble_driver.dir/objects.a(ser_app_hal_pc.c.obj):ser_app_hal_pc.c:(.text$_ZN5boost6detail5win3223GetTickCount64emulationEv+0x21): undefined reference to _InterlockedCompareExchange' CMakeFiles\s130_nrf51_ble_driver.dir/objects.a(ser_app_hal_pc.c.obj):ser_app_hal_pc.c:(.text$_ZN5boost6detail5win3223GetTickCount64emulationEv+0x56): undefined reference to_InterlockedCompareExchange' CMakeFiles\s130_nrf51_ble_driver.dir/objects.a(ser_app_hal_pc.c.obj):ser_app_hal_pc.c:(.text$_ZN5boost6detail5win3223GetTickCount64emulationEv+0x14b): undefined reference to `_InterlockedCompareExchange' collect2.exe: error: ld returned 1 exit status driver\CMakeFiles\s130_nrf51_ble_driver.dir\build.make:3630: recipe for target 'driver/s130_nrf51_ble_driver.dll' failed mingw32-make[2]: *** [driver/s130_nrf51_ble_driver.dll] Error 1 CMakeFiles\Makefile2:86: recipe for target 'driver/CMakeFiles/s130_nrf51_ble_driver.dir/all' failed mingw32-make[1]: *** [driver/CMakeFiles/s130_nrf51_ble_driver.dir/all] Error 2 Makefile:82: recipe for target 'all' failed

Some help in fixing this would be greatly appreciated.

thank you.

Parents
  • I believe the path for the vc++ was only for ml.exe as it wasn't in MinGW, also the folder for vc++ I included, didn't have any other compiler programs, that would have conflicted with make or gcc etc.

    I have (since your suggestion) used the precompiled .dll files, and examples. these I got working, with minor tweaks using visual studio 2015 with minor tweaks. the copy /y doesn't seem to work, so I quickly copied the .dll and .lib files into the debug folder. will fix this later. and had to comment out the typedef char _Bool; as it seems it's already defined someplace.

    Thank you for your direction, I didn't find this when I was previously doing my searches. maybe put in the readme.md file a pointer to the location of the compiled code.

Reply
  • I believe the path for the vc++ was only for ml.exe as it wasn't in MinGW, also the folder for vc++ I included, didn't have any other compiler programs, that would have conflicted with make or gcc etc.

    I have (since your suggestion) used the precompiled .dll files, and examples. these I got working, with minor tweaks using visual studio 2015 with minor tweaks. the copy /y doesn't seem to work, so I quickly copied the .dll and .lib files into the debug folder. will fix this later. and had to comment out the typedef char _Bool; as it seems it's already defined someplace.

    Thank you for your direction, I didn't find this when I was previously doing my searches. maybe put in the readme.md file a pointer to the location of the compiled code.

Children
No Data
Related