Newbies - Please Read
Posted by John W.
on 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
=> 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.
RE: Newbies - Please Read
Posted by Richard
on 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.
Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd..
See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.