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...
> - 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. 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). The problem is in libs like print - you call print, that does an internal call, that calls the serial lib. So that's three stack levels at the point where you use it (could be more, or could be less - JAL uses jumps in stead of calls when it can. I just don't know when it can..) . Joep --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
