fprime-cmake-build-system
ما الذي تفعله
يشرح كيف تسجّل طبقة CMake في F Prime الوحدات، وتضبط أهداف البناء، وتختار المنصات. وهي مناسبة للمهندسين الذين يبنون برمجيات طيران F Prime.
متى تستخدمها
- ✓عندما تضيف وحدة جديدة إلى بناء F Prime.
- ✓عندما تنقل F Prime إلى منصة جديدة أو سلسلة أدوات ترجمة متقاطعة.
- ✓عندما تفشل خطوة توليد أو بناء في مشروع F Prime وتحتاج إلى معرفة السبب.
رابط المهارة
https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-cmake-build-system/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“هل تساعدني في تسجيل وحدتي الجديدة في بناء CMake لـ F Prime، وإصلاح خطأ التوليد؟”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يستخدم الوكيل دوال التسجيل الخاصة بـ 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 الغلافية فوقه.
هل تغطي المنصات المختلفة؟
نعم. تغطي ملفات المنصات وملفات سلسلة الأدوات واختيار تنفيذ نظام التشغيل.
أين توجد القواعد الدقيقة؟
تشير المهارة إلى دليل نظام بناء F Prime وملفات الواجهة البرمجية الخاصة به للصياغة الدقيقة.
التفاصيل
الوصف الأصلي من المؤلف
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
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
fprime-component-design-fpp
12kيساعد وكيلك على تحويل متطلبات مكوّن F Prime المعتمدة إلى نموذج FPP يصف منافذه وأوامره وأحداثه وقياساته عن بُعد.
fprime-component-development
12kيساعد وكيلك على توجيه مكوّن F Prime عبر كل مرحلة تطوير، من المتطلبات حتى اختبار التكامل.
fprime-component-implementation
12kيساعد وكيلك على كتابة شيفرة C++ خلف دوال المعالجة المولّدة لمكوّن F Prime، باتباع قواعد المشروع.
fprime-component-integration-test
12kيساعد وكيلك على كتابة اختبارات تكامل pytest قابلة لإعادة الاستخدام لمكوّن F Prime، تعمل على نشر حي.
مهارات مشابهة
diffs
394kيتيح لوكيلك إنتاج فرق تعديلات حقيقي يمكن مشاركته، كرابط عرض أو ملف صورة، بدلاً من ملخص مكتوب يدوياً.
coding-agent
394kيساعد وكيلك على تسليم مهمة برمجة كبيرة إلى Codex أو Claude Code أو OpenCode كعامل في الخلفية، ثم متابعة تقدمها.
gh-issues
394kيساعد وكيلك على إيجاد مشكلات GitHub واختيار ما ستعمل عليه، وفتح طلبات سحب بالإصلاحات، ومتابعة تعليقات المراجعة.