Newbie problems

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

Newbie problems

Take a look at the previous thread – 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.  Try increasing the heap size.  To do this look in the file FreeRTOS/Demo/AVR_ATMega323_WinAVR/FreeRTOSConfig.h (assuming you are using GCC).  In this file you will see the definition configTOTAL_HEAP_SIZE – you can increase this to 2500 (or more).  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.  This creates three identical tasks that do just this.

Newbie problems

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