From 376db6a6071c9d0679089f6b226d57cd884c827a Mon Sep 17 00:00:00 2001 From: Stefan `Sec` Zehl Date: Thu, 26 Jan 2012 23:48:23 +0100 Subject: [PATCH] dbgmesg: show stackpointer --- firmware/l0dable/dbgmesh.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/firmware/l0dable/dbgmesh.c b/firmware/l0dable/dbgmesh.c index 7da067c..0506cb7 100644 --- a/firmware/l0dable/dbgmesh.c +++ b/firmware/l0dable/dbgmesh.c @@ -83,6 +83,7 @@ void m_time(void){ struct tm* tm; int select=0; char c[2]={0,0}; + int sp; getInputWaitRelease(); delayms(100); while(1) { @@ -133,6 +134,11 @@ void m_time(void){ lcdNl(); lcdPrint("Inc:"); lcdPrintInt(meshincctr); + + lcdPrint(" SP:"); + __asm( "mov %0, sp\n" : "=r" (sp) :); + lcdPrint(IntToStrX(sp,4)); + lcdNl(); lcdPrint("Nice:"); lcdPrintInt(meshnice);