# vTaskStartScheduler gives error

**URL:** <https://forums.freertos.org/t/vtaskstartscheduler-gives-error/8987>\
**Category:** Kernel\
**Created:** [February 17, 2020, 5:54pm UTC](https://forums.freertos.org/t/vtaskstartscheduler-gives-error/8987 "2020-02-17T17:54:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MattBelle](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@MattBelle](https://forums.freertos.org/u/MattBelle)\
**Post date:** [February 17, 2020, 5:54pm UTC](https://forums.freertos.org/t/vtaskstartscheduler-gives-error/8987/1 "2020-02-17T17:54:34Z")

</div>

Hello,  
This is my first time trying freeRTOS, I am trying to use it on my atmega32 AVR microcontroller, I am using Atmel Studio as my IDE.  
I get these errors when i try to compile my project

 ![image](https://d2v6vdsk2p900z.cloudfront.net/original/1X/5c663175a3ed665f2c76b241f5b671c6a90e5f99.png)

this is my code

> /\*
> 
> - freeRTOS\_tut.c
> - 
> - Created: 2/17/2020 7:09:52 PM
> - Author : Matt Belle  
> \*/  
> #define F\_CPU 8000000UL  
> #include \<avr/io.h\>
> 
> #include “FreeRTOS.h”  
> #include “task.h”
> 
> TaskHandle\_t ledBlinkTaskHandler = NULL;
> 
> void ledBlink(void\* p){  
> /\* Define all variables related to ledBlinkingtask1\*/  
> const uint8\_t blinkDelay = 50 ;  
> /\* make PB0 work as output\*/  
> DDRB |= (1\<\<PB0);  
> /\* Start the infinite task 1 loop \*/  
> while (1)  
> {  
> PORTB ^= (1\<\<PB0); //toggle PB0  
> vTaskDelay(blinkDelay); //wait some time  
> }  
> }
> 
> int main(void)  
> {
> 
> xTaskCreate( ledBlink, “LED1”, configMINIMAL\_STACK\_SIZE, NULL, 1, &ledBlinkTaskHandler);
> 
> vTaskStartScheduler();
> 
> ```
> /* Replace with your application code */
> while (1) 
> {
> }
> 
> ```
> 
> }

---

<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:** [February 17, 2020, 6:36pm UTC](https://forums.freertos.org/t/vtaskstartscheduler-gives-error/8987/2 "2020-02-17T18:36:24Z")

</div>

Anything that starts ‘Application’ is a callback the application writer must provide if that feature is enabled. See [https://www.freertos.org/a00016.html](https://www.freertos.org/a00016.html) If you don’t want to use an Idle hook (callback) then set configUSE\_IDLE\_HOOK to 0 in FreeRTOSConfig.h. [https://www.freertos.org/a00110.html#configUSE\_IDLE\_HOOK](https://www.freertos.org/a00110.html#configUSE_IDLE_HOOK)

---

<div class="post-metadata">

**Author:** ![MattBelle](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@MattBelle](https://forums.freertos.org/u/MattBelle)\
**Post date:** [February 17, 2020, 6:48pm UTC](https://forums.freertos.org/t/vtaskstartscheduler-gives-error/8987/3 "2020-02-17T18:48:28Z")

</div>

Thank you for your fast and helpful reply Richard. @rtel  
Can I ask you one more thing 🙂  
What do you recommend me to do to better understanding freeRTOS and learn how to use it ?

---

<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:** [February 18, 2020, 12:41am UTC](https://forums.freertos.org/t/vtaskstartscheduler-gives-error/8987/4 "2020-02-18T00:41:29Z")

</div>

You could start here. Although the book is out of date so doesn’t contain information on the latest features it is still a good getting started resource. [https://www.freertos.org/Documentation/RTOS\_book.html](https://www.freertos.org/Documentation/RTOS_book.html)
