Core Flight Software Basics

Key Points

  • Core Flight Software is a free, open-source software architecture created by NASA for their own science and human space missions. It was so successful internally that they made it available to the public.

  • NASA continues to improve both the code and the documentation. You can trust that it works and will continue to be around well into the future.

Introduction

If you need to write software to run your spacecraft, instruments, and maybe even ground systems and aerial drones, you might consider adopting NASA’s Core Flight Software architecture. It’s a flexible, modular framework that aspires to let you reuse your code or the code written by others for things like reaction wheels, communications, robotics, and more.

 

What It Does

Core Flight Software Layers

Core Flight Software is an architecture with three “layers” of code. The first layer handles talking to the operating system for you. NASA has already written the code for Linux, VxWorks, RTEMS, and ARINC 653. If you’re ambitious, you could write your own code for other operating systems as well.

The second layer is called the Core Flight Executive or cFE layer and it’s the brains of the whole thing. It handles timing, messaging, the boot process, tables, and more. This is the part that missions and companies have written themselves hundreds of times over. Adopting this can save you years and hundreds of thousands of dollars.

The final layer is the application layer. Like an iPhone, you install apps that do different things. One app may talk to your radio, another might help you schedule thruster firings, and another might help you write and delete files. Not every mission needs to do the same things, so NASA and the community provide different apps that you can use as you need.

Why It Was Created

Engineers got tired of writing custom code for different space missions. Some programmers were working two or even three missions at a time and they’d have to do things a little bit differently for each program. And painful lessons learned from one project didn’t always help the next project because it was different hardware and software. Eventually, they got fed up with the chaos, got together, and created Core Flight Software.

 

Can You Trust It

Github Commits of cFS

It was first published for public use back in 2011 on SourceForge. It moved in 2019 to GitHub and the image above shows the activity there. NASA treats GitHub as the source of truth for the core components, so the development you see is the true state of the project. In the last year, it averages around two commits per week.

A key point is that NASA is investing considerable effort in certifying it for their Lunar Gateway mission. It’s also planned for use on future science missions. Although NASA and other agencies can be fickle about their support for initiatives sometimes, this is one that seems poised to stick around for at least the next ten years. In an ideal world, companies and organizations will continue to adopt it so it gets the strong backing it needs to keep development going.

That being said, it’s been a couple of years since a major public release and NASA sometimes struggles with funding work that doesn’t specifically support a flight program. And app updates and ancillary packages aren't always up-to-date (although programs tend to customize those more than core components, anyway). 

 

Why You Might Choose It

You have a few options for software architecture including F’ and KubOS. So why would you go with Core Flight Software?

  1. NASA Uses It: They’ve used it on everything from scientific instruments to their lunar Gateway space station. You get the benefit of them scrutinizing every last detail, making sure it’s robust. And you get all the training, documentation, and infrastructure development, too.

  2. NASA is Certifying It: NASA certification is a “big deal”, especially for humans. Commercial companies can spend years and millions of dollars getting NASA to accept software. The benefits to you starting with an architecture that NASA has sunk their own time and money into signing off cannot be understated.

  3. Finding Help: As of 2022, it is exceedingly difficult to find software developers in the space industry. There are several reasons why that is, but if that’s the reality you’re faced with then you’re better off picking a platform where you have a chance of finding and hiring people who can be immediately productive. If you’re using an architecture unique to your business, you could lose months while they get up to speed.

  4. Code Reuse/Portability: Companies and government agencies alike have been writing custom code for their missions for decades. Yes, some parts of algorithms or drivers have been re-used, but you might be surprised how infrequently that happens. If it’s hard for you to find and keep programmers, you need to be thinking about the big picture and how to minimize starting from scratch every time.

 

Curated Videos

  1. https://www.youtube.com/playlist?list=PLutvyFi2kBtux5qEm17QY7m3ehYwcx4KJ
    NASA hosted a workshop in 2016 with speakers covering many topics. There are lots of lessons learned. It would be great to see NASA host something like this again.

  2. https://www.youtube.com/channel/UC2wfvAIkrrgyC4ITwL3zokg
    OpenSatKit is a channel created by Dave McComas, one of the key players in the Core Flight Software story. If you’re looking for ways to get started with this architecture, check out this channel and its website.

 

Curated Links

  1. https://github.com/nasa/cFS
    This is the home site for Core Flight Software. You can download the files, find documentation, and engage with their community.

  2. https://cfs.gsfc.nasa.gov/cFS-OviewBGSlideDeck-ExportControl-Final.pdf
    NASA put together a comprehensive slide deck filled with images and fairly plain language. Well worth a read-through.