A lot of aircraft software is now "designed" to be rehosted (cross-compiled) to allow use directly on flight simulators. This software is included in the (horribly expensive) data package that the airframe manufacturer sells to support each simulator.
There is an ARINC standard (ARINC 610-1) that provides guidance on the incorporation of aircraft equipment into flight training devices:
https://www.arinc.com/cf/store/catal...cfm?item_id=43
Cheers, GY