Newbies - Please Read

jwestmoreland wrote on Thursday, June 25, 2009:

Newbies - here are a few important hints when getting familiar with a real time OS - besides reading the documentation provided by Richard:

*  Timer IRQ
*  Tasks

=>  If you are having difficulty getting your port running - check xTickCount in your debugger - if it is Zero (0) - your timer IRQ isn’t running - hence no running RTOS.

=> Check the # of tasks that are running - uxCurrentNumberOfTasks - if this is Zero (0) - then no tasks are running.

Biggest cause is perhaps insufficient HEAP for your application - your debugger should hit C_EXIT or something similar if this is a problem - or perhaps it will jump to a null pointer and stop.

The two above items are around lines 140 & 141 in the RTOS core file tasks.c - it is approximately 8% down in the file - you should add those two to your watch list.

When working on any new port - I recommend you do this the first time you load into your debugger.

When you are first introduced to real-time operating systems - it can be somewhat overwhelming - but remember, real-time means something is keeping time - such as one of the system hardware timers, so that ISR must be correct.  If it isn’t - then you can’t run an RTOS.  The first most important thing you can do is to get that single ISR running correctly in your port. 

After that, if none of your new tasks run - more than likely you are out of heap.  Check the return values of all of your xTaskCreate calls to make sure you are not out of heap space.  You will have to ‘tune’ your new application to the system constraints (i.e. available memory) with which you are working.

John Westmoreland

rtel wrote on Friday, June 26, 2009:

Thanks John.  Just for everybodies information, SourceForge are scrapping this crappy forum and moving to use a more familiar PHP forum style.  I’m hoping this makes it easier to have ‘sticky’ threads that are always visible.  This would be a good candidate.