PX4/Firmware — pull request #1423 by LorenzMeier (2014-11-02 20:15:07+00:00)
Title: Include NuttX revision forcing a hard fault on stack overflows

If the stack overflows, it creates an unexpected ISR hard fault and produces a stack trace.

Using the user stack base 0x10008af8 and subtracting the sp 0x10008360 we arrive at number larger than the user stack size, which is 0x5dc, which allows to infer a stack overflow based on a user report. Previously it would just lock up in the detection function.

Assertion failed at file:irq_unexpectedisr.c line: 86 task: commander
sp: 2000883c
IRQ stack:
base: 200088a0
size: 00000ffc
20008820: 080cb7f1 20008850 080ea591 080fb419 00000046 10007d24 2000883c 00000056
20008840: 0811d204 1000828c 1000828c 080d77ed 00000000 00000000 080d7687 00000010
20008860: 080c77a5 080c777d 080f85a5 20005bb4 080f02e1 00000002 080f0317 00000000
20008880: 00000000 00000000 00000000 00000000 00000000 00000000 080d77ed 1000828c
sp: 10008360
User stack:
base: 10008af8
size: 000005dc
R0: 80000000 00000004 00000000 e000ed04 00000000 00000000 00000000 00000000
R8: 00000000 00000000 10008560 00000000 00000000 10008360 08046749 080d7d52
xPSR: 61000000 BASEPRI: 00000000 CONTROL: 00000000
EXC_RETURN: ffffffe9