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

Adding SoftDevice to existing Eclipse project

Hallo everyone,

I'm using Eclipse IDE for C/C++ Version 2018-12 (4.10.0), my OS is Ubuntu 18.04.2 LTS and my hardware is the NRF52840 DK. I'm using the GCC C and C++ Compiler.

I've got an already existing software which works and now i want to expand it. Currently, the software uses the OpenThread stack to communicate with other devices, now i want to add Bluetooth communication to it and i think that the S140 SoftDevice may be the right choice to handle the concurrent communication. I haven't found any proper guide and i'm not very skilful with Makefiles, so i would like to ask for  an estimate about how complex it is to add the SD and if there is any help you can provide me.

Thanks in advance for your help.

Parents
  • Thank you for your replies, so far, i've just copied the essential files from the SDK ble_thread_dyn_template and adjusted the references. But currently, i'm stuck. The problem seems to be the openthread stack. When i'm including the "nrf_soc.h" file somewhere in my code, the compiler responds with the following errors: 

    Making all in jlink
    CC SEGGER_RTT_V640/RTT/libjlinkrtt_a-SEGGER_RTT.o
    In file included from<directory>/openthread/third_party/NordicSemiconductor/dependencies/../softdevice/s140/headers/nrf_soc.h:52,
    from<directory>/openthread/third_party/NordicSemiconductor/dependencies/app_util_platform.h:56,
    from<directory>/openthread/third_party/NordicSemiconductor/segger_rtt/SEGGER_RTT_Conf.h:75,
    from<directory>/openthread/third_party/jlink/SEGGER_RTT_V640/RTT/SEGGER_RTT.h:67,
    from<directory>/openthread/third_party/jlink/SEGGER_RTT_V640/RTT/SEGGER_RTT.c:82:
    <directory>/openthread/third_party/NordicSemiconductor/dependencies/../softdevice/s140/headers/nrf_soc.h: In function 'sd_mutex_new':
    <directory>/openthread/third_party/NordicSemiconductor/dependencies/../softdevice/s140/headers/nrf_soc.h:464:59: error: unused parameter 'p_mutex' [-Werror=unused-parameter]
    SVCALL(SD_MUTEX_NEW, uint32_t, sd_mutex_new(nrf_mutex_t * p_mutex));
    ~~~~~~~~~~~~~~^~~~~~~
    <directory>/openthread/third_party/NordicSemiconductor/dependencies/../softdevice/s140/headers/nrf_svc.h:66:22: note: in definition of macro 'SVCALL'
    static return_type signature \
    ^~~~~~~~~

    The output would go on, but this is basicly the error the compiler reports for every "SVCALL" in "nrf_soc.h". So far, i'm not using any code from the SDK and my Makefiles do not reference any files from there either (i created a common-switch to exclude the files if i just want my code to compile). Is there an explanation for this?
     

  • Those seems to be just warning of unused variable.  You can ignore it.  The compile flag -Werror=... should be removed.  It is not an error condition.

Reply Children
No Data
Related