본문으로 건너뛰기
Skillpedia
일반 코딩12k · #11493

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-cmake-build-system/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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:

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 new CMakeLists.txt or FPP file, a moved module, a switched toolchain. Symptoms are confusing missing-target, missing-autocode, or stale-dependency errors rather than compiler errors. Fix with fprime-util generate -f (--ut for the unit-test cache), which purges and regenerates the build cache.
  • Unresolved implementation: every platform must CHOOSES_IMPLEMENTATIONS for every package a module REQUIRES_IMPLEMENTATIONS; a missing choice surfaces as a link error, not a CMake error. Use the _Stub implementation 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_depend sub-builds needs skip_on_sub_build(); platform-specific modules need restrict_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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬