From 74e15b2eb56daae3110490bcd33a43c4482c28ce Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 2 Apr 2017 23:07:21 -0400 Subject: [PATCH] checkstack: Be more flexible in finding the timer irq function If __vector_13 doesn't exist then try __vector_17. If neither exists then handle that gracefully. Signed-off-by: Kevin O'Connor --- scripts/checkstack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/checkstack.py b/scripts/checkstack.py index cbeb415d..07d88176 100755 --- a/scripts/checkstack.py +++ b/scripts/checkstack.py @@ -193,7 +193,7 @@ def main(): funcsbyname[funcnameroot] = info mainfunc = funcsbyname.get('sched_main') cmdfunc = funcsbyname.get('command_task') - eventfunc = funcsbyname.get('__vector_13') + eventfunc = funcsbyname.get('__vector_13', funcsbyname.get('__vector_17')) for funcnameroot, info in funcsbyname.items(): if (funcnameroot.startswith('_DECL_taskfuncs_') or funcnameroot.startswith('_DECL_initfuncs_') @@ -207,7 +207,7 @@ def main(): numparams = int(datalines[info.funcaddr][2], 16) stackusage = cmdfunc.basic_stack_usage + 2 + numparams * 4 cmdfunc.noteCall(0, f.funcaddr, stackusage) - if funcnameroot.endswith('_event'): + if funcnameroot.endswith('_event') and eventfunc is not None: eventfunc.noteCall(0, info.funcaddr, eventfunc.basic_stack_usage + 2) # Calculate maxstackusage