Errors and flaws are better prevented than detected and mitigated or fixed. Architecture design languages help developers start with a good framework. This page does not talk about tools (yet), but lists languages and formalisms as a start.
Some architecture design languages for embedded systems are MetaH, Avionics ADL, and Philips' Koala. Many software development projects use UML, which isn't specifically intended for embedded systems, although there are related notations. "ROOM (Real-time Object-Oriented Modeling) targets real-time computation, while SysML (Systems Modeling Language) supports modeling both software and hardware ..."
Much of this is taken from "Software Architectures and Embedded Systems: A Match Made in Heaven?", http://doi.ieeecomputersociety.org/10.1109/MS.2005.136 The article lists operating systems, programming languages, etc. for embedded systems. The references are helpful, too.