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

Does nRF51_SDK_8.0.0 work with gcc ?

Hi,

I just updated to nRF51_SDK_8.0.0_5fc2c3a.zip and try to compile ble_app_hrs example (with S110 and DFU) with gcc 4.9. I have couple of problems, first is that some of the header files tries to find the headers from component folder and some from Include folder: For example: nrf.h: "#include "../../Include/device/compiler_abstraction.h"

Also I find that there are some variables that are not #define:ed, like: ./sdk/components/libraries/bootloader_dfu/dfu_app_handler.c: In function 'bootloader_start': ./sdk/components/libraries/bootloader_dfu/dfu_app_handler.c:131:42: error: 'BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS' undeclared (first use in this function) BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS);

Compiling file: device_manager_peripheral.c ./sdk/components/ble/device_manager/device_manager_peripheral.c: In function 'gatts_context_store': ./sdk/components/ble/device_manager/device_manager_peripheral.c:1035:36: error: 'BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS' undeclared (first use in this function) uint32_t attr_flags = BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS | BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS;

And I am also wondering why there are some references to S310 even I am using S110 ?

In file included from c:\users\juha\git\identearfirmware\sdk\components\softdevice\s130\headers\ble_gap.h:48:0,

Is there some problems with my SDK installation ?

Juha

Parents
  • it works perfectly for me right out of the install by just typing make

    $ pwd
    /Users/rols/Code/nordic/nrf51/nRF51_SDK_8.0.0/examples/ble_peripheral/ble_app_hrs/pca10028/s110_with_dfu/armgcc
     $ make
    rm -rf _build
    echo  Makefile
    Makefile 
    mkdir _build
    Compiling file: app_button.c
    Compiling file: app_error.c
    
    ... long compile removed ...
    
    Compiling file: softdevice_handler.c
    Compiling file: gcc_startup_nrf51.s
    Linking target: nrf51422_xxac_s110.out
    Preparing: nrf51422_xxac_s110.bin
    Preparing: nrf51422_xxac_s110.hex
    
    text	   data	    bss	    dec	    hex	filename
    26844	    120	   2376	  29340	   729c	_build/nrf51422_xxac_s110.out
    
  • Yes that was rather important information to have left out - makes the question entirely different.

    Simplest and most obvious explanation is that your header include path is pointing at the wrong (old) SDK instead of the current one. e.g.

    BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS
    

    is only defined in ble_gatts.h in SDK 8 so I'm pretty sure you're including the wrong one. Either you have some links wrong, or you haven't copied the SDK into wherever you're building from or you have some hard-coded paths in Eclipse.

Reply
  • Yes that was rather important information to have left out - makes the question entirely different.

    Simplest and most obvious explanation is that your header include path is pointing at the wrong (old) SDK instead of the current one. e.g.

    BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS
    

    is only defined in ble_gatts.h in SDK 8 so I'm pretty sure you're including the wrong one. Either you have some links wrong, or you haven't copied the SDK into wherever you're building from or you have some hard-coded paths in Eclipse.

Children
No Data
Related