Update flight algorithm based on data collected from SN-1 Flight 1
[fw/altos] / check-stack
1 #!/bin/sh
2 HEADER=$1
3 MEM=$2
4
5 HEADER_STACK=`awk '/#define AO_STACK_START/ {print $3}' $HEADER | nickle`
6 MEM_STACK=`awk '/Stack starts at/ {print $4}' $MEM | nickle`
7
8 if [ "$HEADER_STACK" -lt "$MEM_STACK" ]; then
9         MIN=0x`nickle -e "$MEM_STACK # 16"`
10         echo "Set AO_STACK_START to at least $MIN"
11         exit 1
12 else
13         exit 0
14 fi