Saltar al contenido
Skillpedia
Programación general12 mil · #11493

fprime-cmake-build-system

Qué hace

Explica cómo la capa de CMake de F Prime registra módulos, configura los objetivos de compilación y selecciona plataformas. Está pensada para ingenieros que compilan software de vuelo F Prime.

Cuándo usarla

  • ✓Cuando añades un nuevo módulo a una compilación de F Prime.
  • ✓Cuando portas F Prime a una nueva plataforma o a una cadena de herramientas de compilación cruzada.
  • ✓Cuando falla un paso de generación o de compilación en un proyecto F Prime y necesitas la causa.

Link de la skill

https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-cmake-build-system/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-cmake-build-system/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“¿Puedes ayudarme a registrar mi nuevo módulo de F Prime en la compilación de CMake y corregir el error de generación?”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

La IA usa las funciones de registro de F Prime y la estructura de compilación, revisa la plataforma y la configuración, y luego recompila para confirmar la solución.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de 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
Preguntas frecuentes

¿Necesito saber CMake ya?

Ayuda tener conocimientos básicos de CMake, aunque la skill explica la capa envolvente propia de F Prime.

¿Cubre distintas plataformas?

Sí. Cubre archivos de plataforma, archivos de cadena de herramientas y la elección de una implementación de sistema operativo.

¿Dónde están las reglas exactas?

La skill remite al manual del sistema de compilación de F Prime y a sus archivos de API para la sintaxis exacta.

Detalles

Descripción original del autor

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

Popularidad

Estrellas en GitHub
12 mil
Posición en el ranking
#11493
Licencia
Apache-2.0
Actualizada
2/11/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas