fprime-cmake-build-system
できること
F PrimeのCMakeの層が、モジュールの登録、ビルドのターゲットの設定、プラットフォームの選択をどう行うかを説明します。F Primeの飛行ソフトウェアをビルドするエンジニア向けです。
使う場面
- ✓F Primeのビルドに新しいモジュールを追加するとき。
- ✓新しいプラットフォームやクロスコンパイルのツールチェーンにF Primeを移植するとき。
- ✓F Primeのプロジェクトで生成またはビルドの手順が失敗し、その原因が必要なとき。
スキルのリンク
https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-cmake-build-system/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“新しいF PrimeのモジュールをCMakeのビルドに登録して、generateのエラーを直す手伝いをしてもらえますか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
AIは、F Primeの登録用の関数とビルドの構成を使い、プラットフォームと設定を確認してから、再ビルドして修正を確かめます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Skill: F Prime CMake Build System
F Prime wraps CMake in an API layer so that modules declare sources and autocoder inputs and get autocoding, dictionaries, unit tests, and install rules for free. Canonical references:
- Build system user manual
- API and options reference — generated from the docblocks in
API.cmakeandoptions.cmake; read those files directly, they are the source of truth - Build system SDD (requirements, ops concepts)
Follow those for full syntax and examples; this skill adds orientation, decision criteria, and the failure modes that are easy to get wrong.
1 — Where things live under cmake/
| Path | Contents |
|---|---|
API.cmake |
The public register_fprime_* / add_fprime_subdirectory API |
module.cmake, config_assembler.cmake |
Internal module and configuration processing |
target/ |
Built-in targets: build, ut, dictionary, install, sbom, version |
target/sub-build/ |
Targets run in sub-builds (fpp_locs, fpp_depend, module_info) |
autocoder/ |
Autocoder integration (fpp.cmake, fpp_ut.cmake) |
platform/ |
${FPRIME_PLATFORM}.cmake platform files (Linux, Darwin, templates) |
toolchain/ |
Cross-compile toolchain files |
settings/, options.cmake, flags.cmake, sanitizers.cmake |
Build settings, options, compile flags |
test/ |
pytest suite for the build system itself |
Change the narrowest layer that solves the problem: a module's own
CMakeLists.txt first, then a platform/toolchain file, and only then
cmake/ internals (which affect every project using F Prime).
2 — Which registration call
| Task | Call |
|---|---|
| Component, port, or plain library module | register_fprime_module |
| Deployment producing an F Prime binary | register_fprime_deployment |
| Non-deployment executable / tool | register_fprime_executable |
| Unit test | register_fprime_ut (see fprime-unit-testing) |
| Configuration module (framework, platform, library, or project overrides) | register_fprime_config |
Implementation of a swappable package (e.g. Os_File) |
register_fprime_module + IMPLEMENTS; register_os_implementation for OSAL packages |
Custom build target (<target> + <MODULE>_<target>) |
register_fprime_target / register_fprime_ut_target |
Common directives: SOURCES, AUTOCODER_INPUTS, HEADERS, DEPENDS,
REQUIRES_IMPLEMENTATIONS, CHOOSES_IMPLEMENTATIONS. A new module
directory must also be pulled in with add_fprime_subdirectory from
the including CMakeLists.txt.
Guides: customization / custom targets, configuration modules, implementations, platforms, toolchains, settings.ini, external libraries, OSAL implementation.
3 — Failure modes
- Stale cache: a build cache can go out of date in many ways —
edited
settings.ini, a newCMakeLists.txtor FPP file, a moved module, a switched toolchain. Symptoms are confusing missing-target, missing-autocode, or stale-dependency errors rather than compiler errors. Fix withfprime-util generate -f(--utfor the unit-test cache), which purges and regenerates the build cache. - Unresolved implementation: every platform must
CHOOSES_IMPLEMENTATIONSfor every package a moduleREQUIRES_IMPLEMENTATIONS; a missing choice surfaces as a link error, not a CMake error. Use the_Stubimplementation when a platform lacks the capability; override in the project's configuration module (CHOOSES_IMPLEMENTATIONS) or per deployment, executable, or UT. - Sub-build assumptions: code that must not run during the
fpp_locs/fpp_dependsub-builds needsskip_on_sub_build(); platform-specific modules needrestrict_platforms(...). - Hardcoded host paths or tool locations in a toolchain belong in
an
environment_file, not in committed CMake. - **Bypassing the
よくある質問
CMakeを既に知っている必要がありますか?
基本的なCMakeの知識があると役立ちます。ただし、このスキルはF Prime独自のCMakeのラッパーの層を説明します。
異なるプラットフォームにも対応していますか?
はい。プラットフォームのファイル、ツールチェーンのファイル、OS実装の選び方に対応しています。
正確な規則はどこにありますか?
正確な構文については、このスキルはF Primeのビルドシステムのマニュアルと、そのAPIファイルを参照するよう案内します。
詳細
作者による元の説明
Work with F Prime's custom CMake layer: the `register_fprime_*` API, build targets, toolchains and platform files, implementation selection, configuration modules, sub-builds, and `settings.ini`. Use when adding or wiring a module into a build, adding a custom build target, porting to a new platform or toolchain, choosing or defining an Os implementation, or diagnosing generate/build failures that are not compiler errors.
repo: nasa/fprime
人気
- GitHubのスター
- 12k
- ランキング
- #11493
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
fprime-component-design-fpp
12kエージェントが、承認されたF Primeのコンポーネント要件を、ポート、コマンド、イベント、テレメトリのFPPモデルに変換できるよう支援します。
fprime-component-development
12kエージェントが、要件からインテグレーションテストまで、F Primeのコンポーネントを各開発フェーズで進められるよう支援します。
fprime-component-implementation
12kエージェントが、プロジェクトのルールに従って、F Primeのコンポーネントの自動生成されたハンドラー関数の裏にあるC++のコードを書けるよう支援します。
fprime-component-integration-test
12kエージェントが、実行中のデプロイに対して動く、再利用できるF Primeのコンポーネント用のpytestインテグレーションテストを書けるよう支援します。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。