...and you're willing to use nonstandard attributes, code generators, and a custom preprocessor. At this point, why not C++, seriously?
And can you show me an example of an existing framework for embedded device that's not the spaghetti code I showed?