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_ENABLEDThere 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)
With these changes I was able to proceed.Pertti
Thank you for reporting. Our SDK team has now been made aware of these issues.
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
BTW, I thought of using this:curr_ticks = NRF_RTC1->COUNTER;
curr_ticks = app_timer_cnt_get();
But I'm not sure it's the right way to go...
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.
You can put the following wrapper in app_timer_freertos.c as a workaround:
if (__get_IPSR() != 0)
// inside ISR