Tooling and Workflow
codegen Command-line Tooling
FSDK provides a command-line tool called codegen for generating code and managing FSDK projects. Some common commands include:
Create a new Component Type in a library
codegen componenttype new <library> -n <component>
Generate code for a Component Type
codegen componenttype generate <library> -n <component>
Create a new Deployment project
codegen deployment new <deployment>
Generate code and documentation for a Deployment
codegen deployment generate <deployment>
|
codegen will complete silently if successful. If an error occurs, the tool will print an error message to the console. |
A complete list of codegen commands and options can be found in the FSDK User Manual in the Command-line Tooling chapter.
Development Workflow
A typical development workflow for creating flight software using FSDK consists of the following steps:
-
Identify Hardware Elements: Determine the major hardware Components of your spacecraft and how they will be represented in software. The FSDK may already support some subsystems, but custom Components may be needed for unique hardware or payloads.
-
Define Concept of Operations: Identify how you want to operate your spacecraft, what needs to be done autonomously, data storage requirements, and other operational needs. This will help decide the necessary application-layer Components and their connections.
-
Initial Software Deployment: Use an example Deployment as a starting point and deploy Components to match your spacecraft subsystems and operational concept.
-
Test and Iterate: Generate your Deployment and build your flight software binary file. Deploy and test the flight software on your hardware or, if targeting Linux, on your workstation using tmtclab. Identify areas where existing Components don’t meet your mission needs.
-
Design New Components: Design new Components to fulfill mission-specific requirements, for example, mode management and payload interfacing. Define Component models in XML files using existing Component Types as guides.
-
Generate and Implement Components: Use codegen to generate code for your new Component Types, including stubs for Component functions. Populate the stubs with your code. You can also use the unit test framework for testing.
-
Integrate and Test: Add your new Components to the Deployment. Generate, rebuild, execute, and test the updated flight software.
-
Repeat and Refine: Repeat the process as needed, rapidly iterating and refining your onboard software to meet mission requirements.