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

Three errors found from SDK15.2.0

The file components/libraries/timer/app_timer_freertos.c does not have the function app_timer_cnt_get() defined. Compiling libraries that require it (like external/lwip/src/port/nrf_platform_port.c) fails when using FreeRTOS.



Two simple source code problems discovered from the new SDK when enabling commissioning and compiling with -DCOMMISSIONING_ENABLED

There seems to be a ending parenthesis missing from ble_ncfgs.c line 503:

            UNUSED_RETURN_VALUE(sd_ble_gap_phy_update(p_ble_evt->evt.gap_evt.conn_handle, &phys);

The file ipv6_medium_ble.c needed an additional header to compile (external Makefile project, gcc)

#include "app_error.h"

With these changes I was able to proceed.

Pertti

Parents Reply Children
  • Hello!

    Can you suggest a workaround for app_timer_cnt_get() missing in the meantime.
    I'm using it in an existing application that I'm migrating to FreeRTOS on 15.2...

    Any help would be appreciated

    Eliav

  • BTW, I thought of using this:
    curr_ticks = NRF_RTC1->COUNTER;

    instead of 

    curr_ticks = app_timer_cnt_get();

    But I'm not sure it's the right way to go...

  • Hi Eliav,

    My bad, I didn't answered the initial question in your post. In freeRTOS you need to call xTaskGetTickCount instead, or xTaskGetTickCountFromISR if you are using ISR. We don't use app_timer_cnt_get() with freeRTOS.

    Best Regards,

    Marjeris

  • You can put the following wrapper in app_timer_freertos.c as a workaround:

    Best Regards,

    Marjeris