> 2009/1/4, Sebastien Lelong <[email protected]>: > > And now I wonder where does this 5 come from... > Stef once had a tool to analyse stack usage. It would be valuble if we > had something like that again... >
Well, when I saw that, I almost trigger a python shell to have a look at it. I'll think about it, but mostly, it should be done in compiler, (improve -debug option, to include ISR calls), don't you think ? > > > - using i2c_hw_slave_isr with "pragma inline" uses 2 stack levels: one > for > > isr, another for i2c read/write calls. You can't be shorter than that... > good! > > > - serial_hardware consumes some stack levels, I can't see why > Noticed that too. And I noticed other very bizarre things... I'll post some more. > > The issue is that stack use not a problem, but concurrent stack use > is. What I mean is that there is no problem when an init routine uses > 4 stack levels. It is called from the main program and then you still > have 4 levels left for interrupts (and an interrupt should not use > that many stack levels). Yes, and that's why there's something I don't understand. I know ISR eats 2 stack level, because commenting it out falls from 3 to 1 of 8 (no serial included). The remaining one is for i2c init, which eats one level. This init is called at main level, so, I'd say include ISR should eat 2 stack, not 3. That is, the init 1 stack should be comprised in ISR stack level's, since there are not concurrent. Am I doing something wrong ? Seb -- Sébastien Lelong http://www.sirloon.net http://sirbot.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jallib?hl=en -~----------~----~----~----~------~----~------~--~---
