# Newbie problems

**URL:** <https://forums.freertos.org/t/newbie-problems/4854>\
**Category:** Kernel\
**Created:** [May 26, 2005, 3:02pm UTC](https://forums.freertos.org/t/newbie-problems/4854 "2005-05-26T15:02:57Z")\
**Posts on this page:** 3\
**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:** [May 26, 2005, 3:02pm UTC](https://forums.freertos.org/t/newbie-problems/4854/1 "2005-05-26T15:02:57Z")

</div>

**nobody** wrote on [Thursday, May 26, 2005](https://sourceforge.net/p/freertos/discussion/382005/thread/d5c8f2e1/#2646):

Hi.

I have just started to learn about RTOS.

I have managed to got the demo for avr work on my atmega128L with stk500 & stk501.

Now i try to add a task to the demo version for avr but the system seems to hang in my taskcreate routine.

Anybody who has the time to explain or has some code that i can add to the demo for example toggle a led connected to porta or something so i can learn how to create a very simple task to start with.

/Mattias

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 26, 2005, 3:16pm UTC](https://forums.freertos.org/t/newbie-problems/4854/2 "2005-05-26T15:16:34Z")

</div>

**nobody** wrote on [Thursday, May 26, 2005](https://sourceforge.net/p/freertos/discussion/382005/thread/d5c8f2e1/#2646/8a4a):

Take a look at the previous thread - [http://sourceforge.net/forum/forum.php?thread\_id=1290807&forum\_id=382005](http://sourceforge.net/forum/forum.php?thread_id=1290807&forum_id=382005)

The Mega128 has more RAM than the 323 - for which the FreeRTOS download is configured.&nbsp; Try increasing the heap size.&nbsp; To do this look in the file FreeRTOS/Demo/AVR\_ATMega323\_WinAVR/FreeRTOSConfig.h (assuming you are using GCC).&nbsp; In this file you will see the definition configTOTAL\_HEAP\_SIZE - you can increase this to 2500 (or more).&nbsp; This will give more RAM to the kernel so it can create more tasks.

To see a simple task that simply flashes an LED at a fixed rate look at the file FreeRTOS/Demo/Common/Minimal/Flash.c.&nbsp; This creates three identical tasks that do just this.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 27, 2005, 11:08am UTC](https://forums.freertos.org/t/newbie-problems/4854/3 "2005-05-27T11:08:47Z")

</div>

**nobody** wrote on [Friday, May 27, 2005](https://sourceforge.net/p/freertos/discussion/382005/thread/d5c8f2e1/#2646/c268):

Thanks for the help!!!  
It works now when i increased the heap size.
