# Trouble compiling demo project CORTEX\_LM3S811 with timer support (tasks.c:(.text+0x2e8): undefined reference to \`xTimerCreateTimerTask')

**URL:** <https://forums.freertos.org/t/trouble-compiling-demo-project-cortex-lm3s811-with-timer-support-tasks-c-text-0x2e8-undefined-reference-to-xtimercreatetimertask/11233>\
**Category:** Kernel\
**Created:** [November 29, 2020, 8:11pm UTC](https://forums.freertos.org/t/trouble-compiling-demo-project-cortex-lm3s811-with-timer-support-tasks-c-text-0x2e8-undefined-reference-to-xtimercreatetimertask/11233 "2020-11-29T20:11:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DRG\_developer](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@DRG\_developer](https://forums.freertos.org/u/DRG_developer)\
**Post date:** [November 29, 2020, 8:11pm UTC](https://forums.freertos.org/t/trouble-compiling-demo-project-cortex-lm3s811-with-timer-support-tasks-c-text-0x2e8-undefined-reference-to-xtimercreatetimertask/11233/1 "2020-11-29T20:11:20Z")

</div>

so this is what i added to the FreeRTOSConfig.h:

```
#define configUSE_TIMERS 1
#define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES - 1)
#define configTIMER_TASK_STACK_DEPTH (configMINIMAL_STACK_SIZE * 2)
#define configTIMER_QUEUE_LENGTH 10

```

and then when i compile it ends with:  
\< A LOT OF POSSIBLY NOT INLINABLE FUNCTIONS\>

```
arm-none-eabi-ld: gcc/tasks.o: in function `vTaskStartScheduler':
tasks.c:(.text+0x2e8): undefined reference to `xTimerCreateTimerTask'
make: *** [makedefs:191: gcc/RTOSDemo.axf] Error 1

```

the weird thing is: that is a linker error i think, so gcc did find the xTimerCreateTimerTask. which it should’ve, because timers.c is in the project, timers.h is included in tasks.c and timers.h also has xTimerCreateTimerTask

t

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [November 29, 2020, 8:25pm UTC](https://forums.freertos.org/t/trouble-compiling-demo-project-cortex-lm3s811-with-timer-support-tasks-c-text-0x2e8-undefined-reference-to-xtimercreatetimertask/11233/2 "2020-11-29T20:25:32Z")

</div>

How can you be sure timers.c is being built? If you are building this (very old) makefile then timers.c is not included by default - did you add it?[https://github.com/FreeRTOS/FreeRTOS/blob/master/FreeRTOS/Demo/CORTEX\_LM3S811\_GCC/Makefile](https://github.com/FreeRTOS/FreeRTOS/blob/master/FreeRTOS/Demo/CORTEX_LM3S811_GCC/Makefile)

---

<div class="post-metadata">

**Author:** ![DRG\_developer](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@DRG\_developer](https://forums.freertos.org/u/DRG_developer)\
**Post date:** [November 29, 2020, 8:30pm UTC](https://forums.freertos.org/t/trouble-compiling-demo-project-cortex-lm3s811-with-timer-support-tasks-c-text-0x2e8-undefined-reference-to-xtimercreatetimertask/11233/3 "2020-11-29T20:30:39Z")

</div>

thanks for being critical and not blindly following what i said: you’re right: i forgot to add it to the OBJ of the makefile. guess i got a bit too lazy and expected this to be a automatic object finding script (like %.o: )

guess that’s my next step: convert the makefile!
