small medium large xlarge

20 Jun 2013, 23:02
Darren Beckwith (1 post)

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?

10 Dec 2013, 04:09
James Grenning (190 posts)

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?


You must be logged in to comment