# Undefined references (using static allocation)

**URL:** <https://forums.freertos.org/t/undefined-references-using-static-allocation/11012>\
**Category:** Kernel\
**Created:** [October 29, 2020, 9:04pm UTC](https://forums.freertos.org/t/undefined-references-using-static-allocation/11012 "2020-10-29T21:04:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnadler](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/dnadler/32/35_2.png) [@dnadler](https://forums.freertos.org/u/dnadler)\
**Post date:** [October 29, 2020, 9:04pm UTC](https://forums.freertos.org/t/undefined-references-using-static-allocation/11012/1 "2020-10-29T21:04:08Z")

</div>

I tried to allocate a timer using the static method.  
I’ve enabled both static and dynamic allocation:  
#define configSUPPORT\_STATIC\_ALLOCATION 1  
#define configSUPPORT\_DYNAMIC\_ALLOCATION 1  
Got the following errors trying to build:  
…/freertos/freertos\_kernel/tasks.c:1988: undefined reference to `vApplicationGetIdleTaskMemory' /lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: ../freertos/freertos_kernel/timers.c:245: undefined reference to `vApplicationGetTimerTaskMemory’

Any tips much appreciated!  
For now I’ll just use dynamic…  
Thanks in advance,  
Best Regards, Dave

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [October 29, 2020, 9:13pm UTC](https://forums.freertos.org/t/undefined-references-using-static-allocation/11012/2 "2020-10-29T21:13:12Z")

</div>

The application writer needs to provide this function. Here is an example: [https://github.com/aws/amazon-freertos/blob/a126b0c55795be5986f86d4f6ef73bc5ed091c29/demos/demo\_runner/aws\_demo.c#L73](https://github.com/aws/amazon-freertos/blob/a126b0c55795be5986f86d4f6ef73bc5ed091c29/demos/demo_runner/aws_demo.c#L73)

Thanks.

---

<div class="post-metadata">

**Author:** ![dnadler](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/dnadler/32/35_2.png) [@dnadler](https://forums.freertos.org/u/dnadler)\
**Post date:** [October 29, 2020, 9:18pm UTC](https://forums.freertos.org/t/undefined-references-using-static-allocation/11012/3 "2020-10-29T21:18:00Z")

</div>

Thanks @aggarg - I missed that!
