fprime-cmake-build-system
하는 일
F Prime의 CMake 계층이 모듈을 등록하고, 빌드 타깃을 설정하고, 플랫폼을 고르는 방법을 설명합니다. F Prime 비행 소프트웨어를 빌드하는 엔지니어를 위한 스킬입니다.
사용하는 경우
- ✓F Prime 빌드에 새 모듈을 추가할 때.
- ✓F Prime을 새 플랫폼이나 크로스 컴파일 도구 체인으로 옮길 때.
- ✓F Prime 프로젝트의 generate나 빌드 단계가 실패해 원인이 필요할 때.
스킬 링크
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 자체 래퍼 계층을 설명합니다.
다른 플랫폼도 다루나요?
네. 플랫폼 파일, 도구 체인 파일, 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 통합 테스트를 작성하도록 돕습니다.