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

Cannot compile softdevice files

I am trying to set up a project for the nRF51 by hand and by looking at the example code provided by Nordic.

I am using Softdevice 130 on a nRF51422 and the 12.0.1 SDK.

Right now i am writing the Makefile. But when trying to compile i get this error:

../../nRF5_SDK_12.1.0/components/drivers_nrf/clock/nrf_drv_clock.c: In function 'hfclk_start':
../../nRF5_SDK_12.1.0/components/drivers_nrf/clock/nrf_drv_clock.c:103:15: error: implicit declaration of function 'sd_clock_hfclk_request' [-Werror=implicit-function-declaration]
        (void)sd_clock_hfclk_request();
               ^
../../nRF5_SDK_12.1.0/components/drivers_nrf/clock/nrf_drv_clock.c: In function 'hfclk_stop':
../../nRF5_SDK_12.1.0/components/drivers_nrf/clock/nrf_drv_clock.c:118:15: error: implicit     declaration of function 'sd_clock_hfclk_release' [-Werror=implicit-function-declaration]
         (void)sd_clock_hfclk_release();
               ^
In file included from ../../nRF5_SDK_12.1.0/components/libraries/util/app_error.h:30:0,
                 from ../../nRF5_SDK_12.1.0/components/libraries/util/nrf_assert.h:19,
                 from ../../nRF5_SDK_12.1.0/components/drivers_nrf/clock/nrf_drv_clock.h:19,
                 from ../../nRF5_SDK_12.1.0/components/drivers_nrf/clock/nrf_drv_clock.c:15:
../../nRF5_SDK_12.1.0/components/drivers_nrf/clock/nrf_drv_clock.c: In function 'nrf_drv_clock_hfclk_is_running':
../../nRF5_SDK_12.1.0/components/drivers_nrf/clock/nrf_drv_clock.c:300:25: error: implicit declaration of function 'sd_clock_hfclk_is_running' [-Werror=implicit-function-declaration]
         UNUSED_VARIABLE(sd_clock_hfclk_is_running(&is_running));

It seems like the GCC cannot find the .h file containing the declarations of sd_clock_hfclk_request, sd_clock_hfclk_release and sd_clock_hfclk_is_running.

But the path to this file is already in my Makefile

What am i doing wrong?

Edit

Here is the Makefile.

I am attempting to compile the blinky example. When i can do that, then compile my own project.

Parents
  • Never mind. I made a stupid mistake and did a CTRL-F for "nrf_soc.h" in your makefile.

    I played around with the makefile in the HRS example though, and noticed that you have a slightly different way of adding C flags (SDK Makefile to the right):

    image description

    When I tried to add the flags your way it didn't work. Maybe you can try to add the flags the way it is done in the SDK. The sd_clock_ functions won't compile unless SOFTDEVICE_PRESENT is properly defined for example. I don't know much about this topic so I don't know why it matters, but it is worth a shot.

Reply
  • Never mind. I made a stupid mistake and did a CTRL-F for "nrf_soc.h" in your makefile.

    I played around with the makefile in the HRS example though, and noticed that you have a slightly different way of adding C flags (SDK Makefile to the right):

    image description

    When I tried to add the flags your way it didn't work. Maybe you can try to add the flags the way it is done in the SDK. The sd_clock_ functions won't compile unless SOFTDEVICE_PRESENT is properly defined for example. I don't know much about this topic so I don't know why it matters, but it is worth a shot.

Children
No Data
Related