List of tips on what to check when it hangs

nobody wrote on Saturday, June 24, 2006:

I am quite new to FreeRTOS and often find myself doing some changes to my code, only to find it doesnt work anymore… recognise this? Especially if you change more than just a few lines of code…

So, heres my personal check-list when that happens. Please post also your tips here!

Crash solving for FreeRTOS, AT91SAM7A3-EK and IAR EWARM:

* try to reboot the Eval card

* no bounds check : added too much text to a string (than allocated)?

* no auto size heap: added too much vars for the task heap size?

* some task blocking long times, and locking itself?

* some task in a non-blocking  wait, locking other lower tasks?

* vars in a function are only initialised once

* increase total heap size if added more tasks, queues, semaphores

* check task prios - someone locking the others?

* check irq levels - someone taking over?

* check rtos tick rate, runing too fast/slow?

* try reboot jtag

* try reboot iar ewarm

* constant meant to be float is defined without decimal point

* connected peripheral cant keep up (115200kbps serial port for example)

* queuSendFromIsr must always start with taskwoken=pdFALSE

* any ISR running too much/fast/wild? pwm… adc… dbgu/usart…

* check the A3 errata section in the datasheet

* could be a bug in an example file, in FreeRTOS or the A3 chip, check the web

nobody wrote on Saturday, June 24, 2006:

one more…

* try running in non-debug mode

nobody wrote on Sunday, June 25, 2006:

Some of these (variable initialization, etc) are C related rather than FreeRTOS but maybe some others could form part of a check list in the FAQ section?

nobody wrote on Sunday, June 25, 2006:

Yes, that would be a good idea. Especially if we get more people contributing and someone really good at this sorting, selecting and explaining…

I do think its quite important to have the non RTOS stuff too… The most common C errors and also HW related stuff like trying reboot the card, and compiler related like trying non-debug mode. Also to show that not everything is RTOS blame…;-)  It could be divided into sections, like RTOS, C/Asm, Compiler/GUI, HW, Misc etc for a complete "FreeRTOS Developers checklist"…

What would be nice is an ordered list, listing the most common problems first (roughly), like rebooting the HW that I have to do all the time… but then the different sections fall…

Perhaps:

1. Try rebot your HW (HW)

2. Higher prio task blocking (RTOS)

3. Variable initialization (C/Asm)

4. xxxx x x x x x x  (HW: IAR + AT91)

5. …

/PM