We are trying to implement TDD within our firmware test but are getting resistance from some of the developers. Their complaint is that TDD will produce thicker code (code that is heavy on the function calls which means greater stack depth) which our micros will not support. While I can see their argument I don’t have a very good response to this. How would you approach this?
Sorry for the late reply Darren
First: If the function calls are extracted and declared as static, a decent compiler will inline them. You might also need to explicitly tell the compiler to inline them.
Second: do you really have a stack depth problem? Has anyone measured it?