# Update FreeRTOS v8.0.1 to FreeRTOS v9.0.0 in Atmel Studio 7 ASF 

**URL:** <https://forums.freertos.org/t/update-freertos-v8-0-1-to-freertos-v9-0-0-in-atmel-studio-7-asf/6812>\
**Category:** Kernel\
**Created:** [October 18, 2017, 11:35am UTC](https://forums.freertos.org/t/update-freertos-v8-0-1-to-freertos-v9-0-0-in-atmel-studio-7-asf/6812 "2017-10-18T11:35:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [October 18, 2017, 11:35am UTC](https://forums.freertos.org/t/update-freertos-v8-0-1-to-freertos-v9-0-0-in-atmel-studio-7-asf/6812/1 "2017-10-18T11:35:17Z")

</div>

**[alvaromuro](https://sourceforge.net/u/alvaromuro/)** wrote on [Wednesday, October 18, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/2eda801e/#fd59):

I am using Atmel SAM L21 Xplained pro A board, with Atmel Studio 7. I opened the demo project OLED1 XPRO example with the ASF(3.35.1) FreeRTOS module, which is v8.0.1.

The standard demo works perfectly. However, I want to use pdMS\_TO\_TICK() function, but it’s not defined, and it seems it was introduced in a later version of FreeRTOS which is not directly accesible from the ASF wizard in Atmel Studio 7.

What are the steps needed to update the FreeRTOS version to use v9 in Atmel Studio 7 for SAM L21 board?

---

<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:** [October 18, 2017, 2:51pm UTC](https://forums.freertos.org/t/update-freertos-v8-0-1-to-freertos-v9-0-0-in-atmel-studio-7-asf/6812/2 "2017-10-18T14:51:34Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Wednesday, October 18, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/2eda801e/#fd59/0fd7):

Once Atmel studio has created the project you can just copy the latest  
FreeRTOS source files and header files over the top of the same files in  
the generated project.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [October 23, 2017, 9:25am UTC](https://forums.freertos.org/t/update-freertos-v8-0-1-to-freertos-v9-0-0-in-atmel-studio-7-asf/6812/3 "2017-10-23T09:25:41Z")

</div>

**[alvaromuro](https://sourceforge.net/u/alvaromuro/)** wrote on [Monday, October 23, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/2eda801e/#684d):

I have done that replacement. I see there is still FreeRTOSConfig.h header, which was created by the demo for V8.0.1. There is no demo for SAML21 with v9.0.0 where I can copy this file from, only for SAMD20.  
How should this file be updated so the OLED demo can function with V9?

Moreover, asf.h from the original demo calls several FreeRTOSheader files, and the ASF wizard shows only v8.0.1. Should something be updated in the ASF header or anywhere else, to configure the ASF to use v9?

---

<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:** [October 23, 2017, 2:18pm UTC](https://forums.freertos.org/t/update-freertos-v8-0-1-to-freertos-v9-0-0-in-atmel-studio-7-asf/6812/4 "2017-10-23T14:18:57Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Monday, October 23, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/2eda801e/#684d/77f9):

> I have done that replacement. I see there is still FreeRTOSConfig.h  
> header, which was created by the demo for V8.0.1.

That should be backward compatible.

> **[FreeRTOS version 9](https://www.freertos.org/FreeRTOS-V9.html)**
>
> New in FreeRTOS V9

> There is no demo for  
> SAML21 with v9.0.0 where I can copy this file from, only for SAMD20.

There is no difference between the SAMD20 and SAML21 as far as the  
FreeRTOS code goes, use the same port files on both.

> How should this file be updated so the OLED demo can function with V9?

I don’t know what the OLED demo is, presumably Atmel code.

> Moreover, asf.h from the original demo calls several FreeRTOSheader  
> files, and the ASF wizard shows only v8.0.1. Should something be updated  
> in the ASF header or anywhere else, to configure the ASF to use v9?

You need to copy the V9 source (.c) and header (.h) files into the  
project. Did you do that? If so, then they are the files being built.  
Nothing in Atmel Studio will change, it won’t know you have updated the  
files so may still say the old version.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [October 26, 2017, 7:36am UTC](https://forums.freertos.org/t/update-freertos-v8-0-1-to-freertos-v9-0-0-in-atmel-studio-7-asf/6812/5 "2017-10-26T07:36:32Z")

</div>

**[alvaromuro](https://sourceforge.net/u/alvaromuro/)** wrote on [Thursday, October 26, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/2eda801e/#7e8a):

I have copied the source and header files into the project, and updated FreeRTOSConfig.h.

When I build, I get the error "undefined reference to ‘vApplicationGetTimerTaskMemory’ and ‘vApplicationGetIdleTaskMemory’ ‘’. I have added both declarations following the instructions here: [http://www.freertos.org/a00110.html#configSUPPORT\_STATIC\_ALLOCATION](http://www.freertos.org/a00110.html#configSUPPORT_STATIC_ALLOCATION)

I added the two declarations into timers.c and tasks.c respectively copying the code from the previous link, but I get same error. I noticed the prototype in tasks.c says:

```auto
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
	extern void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t** ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize );
#endif

```

I guess it’s just simply a matter of knowing where and how this functions should be defined… could a knowledgeable mind shed some light in here?

---

<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:** [October 26, 2017, 9:41pm UTC](https://forums.freertos.org/t/update-freertos-v8-0-1-to-freertos-v9-0-0-in-atmel-studio-7-asf/6812/6 "2017-10-26T21:41:28Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Thursday, October 26, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/2eda801e/#7e8a/3fd2):

vApplicationGetIdleTaskMemory() (and the timer task equivalent) can be  
implemented in any C file that is built, provided they are not declared  
static. Grep the FreeRTOS/Demo directory to find several examples. For  
example line 247 (at the time of writing) here:  
[https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Demo/WIN32-MSVC-Static-Allocation-Only/main.c](https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Demo/WIN32-MSVC-Static-Allocation-Only/main.c)
