Page 2 of 3

Re: OSRpt()

PostPosted: Thu May 08, 2003 9:05 am
by aek
Hi Phil.

Well, one way you can check is to call OSRpt() right after you create everything and before your application starts running ... as long as you only have the interrupts in place to handle printf()'s output, you should be able to get a good "dump" from OSRpt().

Also, I'd be a little surprised if you can do your _SDINT and _SEINT macros inside a function -- the stack frame model doesn't tolerate (I think) extra pushes on the stack without its knowledge ...

I wouldn't be surprised if it took OSRpt() more than 1ms to complete -- there's a lot of putchar() and (s)printf() inside it ...

I'm not yet convinced that you have stack overflow -- I'd be surprised if you were more than 0x100 deep on the stack. The problem is, of course, the length of the (s)printf() args ...

------------------


Re: OSRpt()

PostPosted: Thu May 08, 2003 10:19 am
by Phil W
I'll try your suggestion next week, But I think it is a stack overflow, atleast part of it.

I checked my map file and found my globals and statics and Salvo use ram from 0200h to 09c1h giving me a whopping 63 bytes for stack.

Aah.... serious I think :-)


Phil


Re: OSRpt()

PostPosted: Thu May 08, 2003 11:24 am
by aek
Hi Phil.

Which pre-existing library did you base your custom library #1 on?

I.e. what did your command-line look like when invoking make?

Thanks,

------------------

[This message has been edited by aek (edited May 08, 2003).]


Re: OSRpt()

PostPosted: Fri May 09, 2003 8:05 am
by aek
Hi Phil.

Yeah, 63 bytes for the stack is a wee bit on the small side ...

------------------


Re: OSRpt()

PostPosted: Tue May 20, 2003 4:47 am
by Phil W
Hi aek,

quote:
Originally posted by aek:

Also, I'd be a little surprised if you can do your _SDINT and _SEINT macros inside a function -- the stack frame model doesn't tolerate (I think) extra pushes on the stack without its knowledge ...


Could you please expand on this please?

My assembler days don't have a problem doing this, but I might be missing something with the msp430/IAR setup.

Phil


Re: OSRpt()

PostPosted: Tue May 20, 2003 5:02 am
by aek
Hi Phil.

Your macros push and pop items onto and off the stack, respectively.

From memory, the function's stack frame assumes a certain "state" for the SP and the stack, as it uses SP-relative addressing to access locals and parameters on the stack.

If / when you alter the stack via in-line assembly, you're breaking the compiler's view of what it placed on the stack, and hence when it goes to access, say, a local / auto variable, what it gets will not be what it expects to get because of the extra item(s) you've pushed onto the stack.

If the compiler uses a frame pointer or something similar, then that's not an issue. But I seem to remember that it does SP-relative addressing ...

------------------


Re: OSRpt()

PostPosted: Tue May 20, 2003 10:16 am
by Phil W
Hi aek,

Well I'll beeeee.... Your not a dummy on the wall. :-)

I never thought of that, and I think you are right.

IAR must handle it correctly in the new version 2.10a as they apparently now support inline assembly.

Thanks for your insight.

Phil


Re: OSRpt()

PostPosted: Tue Jul 07, 2009 8:26 am
by tbims23822
www.drop-shopping.com is a premium website for cheap air jordans shoes and other more really nike air jordan shoes.We have varity of cheap air jordan shoes available for wholesale.Cheap China wholesale shoes including cheap Nike shoes and cheap jordan shoes,nike sneakers,nike sneakers discount,air jordan sneakers,air force sneakers.We supply nike sneakers,jordan sneakers,air jordan sneakers,air force sneakers wholesale.You can buy very cheap jordans shoes including cheap women shoes,cheap nike shoes,cheap running shoes from us.


Re: OSRpt()

PostPosted: Tue Jul 07, 2009 9:01 am
by tbims23822
www.drop-shopping.com is a premium website for cheap air jordans shoes and other more really nike air jordan shoes.We have varity of cheap air jordan shoes available for wholesale.Cheap China wholesale shoes including cheap Nike shoes and cheap jordan shoes,nike sneakers,nike sneakers discount,air jordan sneakers,air force sneakers.We supply nike sneakers,jordan sneakers,air jordan sneakers,air force sneakers wholesale.You can buy very cheap jordans shoes including cheap women shoes,cheap nike shoes,cheap running shoes from us.

Re: OSRpt()

PostPosted: Tue Jul 07, 2009 9:13 am
by tbims23822
www.drop-shopping.com is a premium website for cheap air jordans shoes and other more really nike air jordan shoes.We have varity of cheap air jordan shoes available for wholesale.Cheap China wholesale shoes including cheap Nike shoes and cheap jordan shoes,nike sneakers,nike sneakers discount,air jordan sneakers,air force sneakers.We supply nike sneakers,jordan sneakers,air jordan sneakers,air force sneakers wholesale.You can buy very cheap jordans shoes including cheap women shoes,cheap nike shoes,cheap running shoes from us.