Skip the C++. Even it can be a pain to tread through the object code as required for DO-178C Level ‘A’ & ‘B’ systems. Plain ol’ Assembly Language works just fine.
Music to my ears, honestly... Hand-crafted assembly simply cannot be beaten, and for an application like this, it’s completely justified...