If they were planning to open-source this all along, I'm curious if Ardupilot [1] would have worked for this. The Ardupilot flight stack is quite mature for Earth-based aircraft, I suppose they could make it work for Mars with a few modifications.
But they don't really need 90% of the stuff in Ardupilot - driver support for a myriad of sensors and other peripherals, MAVLink protocol, OSD, RC control... All they need is the PID loop and ESC/motor control, and they are using a hardened CPU for that, so the low level interface has to be rewritten. And the visual navigation stuff that's running on Snapdragon doesn't exist in Ardupilot anyway..
[1]: https://github.com/ArduPilot/ardupilot