# DigiKey SmartFusion2 Maker Kit FreeRTOS undefined reference

**URL:** <https://forum.digikey.com/t/digikey-smartfusion2-maker-kit-freertos-undefined-reference/3938>\
**Category:** Development Boards, Kits, Programmers\
**Tags:** microchip-technology, evaluation-boards\
**Created:** [July 17, 2019, 2:24pm UTC](https://forum.digikey.com/t/digikey-smartfusion2-maker-kit-freertos-undefined-reference/3938 "2019-07-17T14:24:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![robisonjunior](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robisonjunior/32/4990_2.png) [@robisonjunior](https://forum.digikey.com/u/robisonjunior)\
**Post date:** [July 17, 2019, 2:24pm UTC](https://forum.digikey.com/t/digikey-smartfusion2-maker-kit-freertos-undefined-reference/3938/1 "2019-07-17T14:24:07Z")

</div>

Hi everybody,

Who can help me?

I bought the _DigiKey SmartFusion2 Maker Kit_ and I am testing the example from eewiki:

> **[Getting Started with the Microsemi SmartFusion 2 Maker-Board](https://forum.digikey.com/t/getting-started-with-the-microsemi-smartfusion-2-maker-board/13308)**
>
> Created by Taylor Roorda, last modified on Jul 17, 2019 Introduction The Microsemi Maker-Board is a low cost evaluation kit featuring the SmartFusion 2 SoC. The SmartFusion 2 combines an ARM Cortex-M3 processor with Microsemi’s flash-based...

I am in the last step to build the project but I have 2 errors about the FreeRTOS 9.0 undefined reference:

**undefined reference to `ulGetRunTimeCounterValue’ in tasks.c**

**undefined reference to `vConfigureTimerForRunTimeStats’ in tasks.c**

 ![error_1](https://global.discourse-cdn.com/digikey/original/2X/4/48a8ca6888c67733b9a711cccd7fc17f4397f878.jpeg)

 ![error_2](https://global.discourse-cdn.com/digikey/original/2X/c/c386b3f4a1fef8456b7adc87d69e5db3ccc68101.png)

FreeRTOS 9  
SoftConsole v4.0  
Libero Soc v11.8

Thanks,

Jr

---

<div class="post-metadata">

**Author:** ![Taylor\_1236](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@Taylor\_1236](https://forum.digikey.com/u/Taylor_1236)\
**Post date:** [July 17, 2019, 3:22pm UTC](https://forum.digikey.com/t/digikey-smartfusion2-maker-kit-freertos-undefined-reference/3938/2 "2019-07-17T15:22:41Z")

</div>

I’m guessing your version of FreeRTOS is different than was used in the guide. There are two options:

1. You could disable run time stats altogether if you don’t need them in FreeRTOSConfig.h. Just change the #define to:  
`#define configGENERATE_RUN_TIME_STATS	0`

2. vConfigureTimerForRunTimeStats is defined in RunTimeStatsTimer.c which should be in your project. If it’s not, you can find it in the SmartFusion demo in the FreeRTOS source directory: `FreeRTOSv9.0.0\FreeRTOS\Demo\CORTEX_SmartFusion2_M2S050_SoftConsole\RTOSDemo`

---

<div class="post-metadata">

**Author:** ![RicahrdBarry](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@RicahrdBarry](https://forum.digikey.com/u/RicahrdBarry)\
**Post date:** [July 17, 2019, 4:31pm UTC](https://forum.digikey.com/t/digikey-smartfusion2-maker-kit-freertos-undefined-reference/3938/3 "2019-07-17T16:31:49Z")

</div>

Instructions on using this FreeRTOS feature are here: [https://www.freertos.org/rtos-run-time-stats.html](https://www.freertos.org/rtos-run-time-stats.html)

---

<div class="post-metadata">

**Author:** ![robisonjunior](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robisonjunior/32/4990_2.png) [@robisonjunior](https://forum.digikey.com/u/robisonjunior)\
**Post date:** [July 17, 2019, 6:21pm UTC](https://forum.digikey.com/t/digikey-smartfusion2-maker-kit-freertos-undefined-reference/3938/4 "2019-07-17T18:21:18Z")

</div>

> [@Taylor\_1236](#):
>
> vConfigureTimerForRunTimeStats

Hi Taylor,

Thanks very much for your help !! You resolved the problem.

I am using the same Free RTOS v9.0.0 of the eewiki example.

The problem is about the RunTimeStats.c that you informed. When I inserted this file into the project, the error was solved.

Look in the eewiki example, there is a small problem to solve, in the item: Import Free RTOS line 4: Check the entire **FreeRTOS-Source** directory amd also import **_FreeRTOSConfig._ h** , it is necessary to import the RunTimeStats.c too to work. Just it !!

 ![eewiki_error](https://global.discourse-cdn.com/digikey/original/2X/4/45d1b886136e5ab95a1173318252e6e5e179a292.png) ![fixed](https://global.discourse-cdn.com/digikey/original/2X/e/eb2e078104521daa0fa8e880d458218f1bf13e21.png)

Thanks,

Jr

---

<div class="post-metadata">

**Author:** ![robisonjunior](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robisonjunior/32/4990_2.png) [@robisonjunior](https://forum.digikey.com/u/robisonjunior)\
**Post date:** [July 17, 2019, 6:25pm UTC](https://forum.digikey.com/t/digikey-smartfusion2-maker-kit-freertos-undefined-reference/3938/5 "2019-07-17T18:25:30Z")

</div>

Hi RicahrdBarry,

Thanks for your help and attention.

Jr  
SP-Brazil

---

<div class="post-metadata">

**Author:** ![Taylor\_1236](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@Taylor\_1236](https://forum.digikey.com/u/Taylor_1236)\
**Post date:** [July 17, 2019, 7:08pm UTC](https://forum.digikey.com/t/digikey-smartfusion2-maker-kit-freertos-undefined-reference/3938/6 "2019-07-17T19:08:13Z")

</div>

Strange, I don’t recall having to import that file when I made the project which made me think it was a different FreeRTOS release. Maybe I disabled the run time stats.

Either way, thanks for pointing that out. I’ll make a note to include the file on the wiki.
