We present a new formal approach to the implementation of embedded systems, arrived at by introducing self-management capabilities to the same. We use the ASSL (Autonomic System Specification Language) framework to approach the problem of formal specification and automatic code generation of embedded systems. Some features of ASSL help to specify event-driven embedded systems where hardware is sensed via special metrics intended to drive events and self-management policies. The latter can be specified to handle critical situations in an autonomous reactive manner. Moreover, we present a case study where we use ASSL to specify control software for the wide-angle camera carried on board by NASA’s Voyager II spacecraft