Logo von Convert Keil To Cmake

Convert Keil To Cmake

Community
sunzhen222
convert-keil-to-cmake

Convert Keil MDK/uVision embedded projects into reproducible CMake builds, normally using Ninja and an Arm GNU toolchain, with concise bilingual build documentation. Use for `.uvprojx` or `.uvoptx` migration, Keil-to-GCC flag and linker-script translation, source/include/define extraction, startup and RTOS port selection, firmware artifact generation, prerequisite checking, generation-only delivery, user build guidance, or parity checks between an existing Keil target and a new CMake target.

Übersicht

Herausgebersunzhen222
Repositoryconvert-keil-to-cmake
Skill-Nameconvert-keil-to-cmake
Sterne
34
Forks
6
Mitgelieferte Dateien
10
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • Mitgelieferte Dateien: 10

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von sunzhen222 auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Convert Keil To Cmake in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/sunzhen222/convert-keil-to-cmake/tree/main
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/sunzhen222/convert-keil-to-cmake.git \
  .claude/skills/convert-keil-to-cmake
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Convert Keil To Cmake in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Convert Keil To Cmake automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Convert Keil To Cmake nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Convert Keil to CMake

Create a maintainable CMake build that preserves the selected Keil target's firmware behavior while separating compiler-specific implementation details.

Workflow

  1. Locate .uvprojx, .uvoptx, startup files, scatter files, linker scripts, device packs, and existing build scripts. Do not edit generated IDE output directories.
  2. Ask for a target only when the project contains multiple materially different targets and the requested target cannot be inferred. Otherwise select the single target or the clearly named production target and state the choice.
  3. Run python scripts/inspect_uvprojx.py <project.uvprojx> [--target <name>] from this skill directory. Treat its JSON as an inventory, then verify paths and target/file overrides against the XML. Pay particular attention to runtime, memory_regions, existing_outputs, keil_build, and source_usage.
  4. Read references/conversion-reference.md before translating toolchain, CPU/FPU/ABI, optimization, scatter, library, startup, assembly, or RTOS settings.
  5. Copy assets/cmake/check_build_env.py into the project root as check_build_env.py, then tailor its required and optional tools to the selected generator, languages, toolchain, artifact steps, and existing project conventions. When Python is not a viable project prerequisite, generate an equivalent check_build_env.bat on Windows or check_build_env.sh on POSIX instead. Generate one appropriate checker, not every variant.
  6. Run the project-local checker before configuring. It must only inspect and report: it must not download software, invoke an installer or package manager, modify PATH, or change machine-wide state. Never install missing prerequisites without the user's explicit authorization.
  7. If required tools are missing, or the user requests no build, continue with generation-only, unverified mode when static project information is sufficient. Generate and statically review the migration files, but do not claim configure, compile, link, artifact, ELF, or parity validation. Report every missing prerequisite and the exact later verification commands.
  8. Reuse assets/cmake/ as a starting point when the repository has no stronger CMake convention. Use stm32-flash.ld.in only for a simple single-Flash/single-RAM layout. Replace every @...@ placeholder; remove unused sections instead of leaving speculative code.
  9. Generate a root CMakeLists.txt, a GNU Arm toolchain file, and a small host build wrapper only when useful. Follow the repository's established naming and directory organization.
  10. In normal validation mode, configure from a new build directory with CMAKE_EXPORT_COMPILE_COMMANDS=ON, build, and compare sources, defines, includes, artifacts, memory layout, and size with Keil. Fix errors rather than suppressing warnings globally.
  11. Run python scripts/validate_conversion.py <project.uvprojx> <build/compile_commands.json> --elf <build/firmware.elf> after a successful link. Pass each intentional compiler-specific replacement as --source-substitution <keil-path>=<gnu-path>.
  12. After generation and any available validation, create a concise project-root CMAKE_BUILD.md from assets/cmake/CMAKE_BUILD.md.in. Write every user-facing section in both Chinese and English, replace all placeholders, and ensure commands and artifact paths exactly match the generated project. Do not report the migration complete until this handoff document exists.

Authorization and Completion Status

  • Treat software installation as a separate, state-changing action. Detecting a missing command does not authorize installing or downloading it. Ask for explicit authorization before using an installer or package manager, changing PATH, or modifying machine-wide configuration; state the proposed tool, source, scope, and command first.
  • Do not make an installation quiet, unattended, or hidden merely to keep the migration moving. If authorization is not given, preserve the diagnostic result and use generation-only mode when possible.
  • Report validated only after the project checker passes, a clean configure and build succeeds, the firmware links, expected artifacts exist, and validate_conversion.py passes.
  • Report generated, unverified when CMake files and the project checker were generated and statically reviewed but any required configure, build, link, artifact, ELF, or parity check was not completed. This is a usable handoff state, not a validated migration.
  • If even generation cannot be completed because essential project data or a parsing runtime is unavailable, report the concrete blocker instead of labeling the result generated or validated.

User Handoff Document

  • Keep CMAKE_BUILD.md short and task-oriented. Include only status, prerequisites/environment check, exact configure/build commands, primary artifacts, and important validation limits or remaining differences.
  • Present Chinese first and English immediately after it within each section. Do not create separate language files, duplicate long logs, narrate the migration history, or paste full source/define/include inventories.
  • State either 已验证 / validated or 已生成、未验证 / generated, unverified prominently. In unverified mode, name the missing tools and unperformed checks without implying successful compilation.
  • Describe each primary artifact by path and purpose, normally .elf, .bin, .hex, .map, and any project-specific packaged image that is actually generated. Do not document hypothetical outputs.
  • Use commands that can be copied from the repository root. Include the project-local environment checker command before configure/build, and document optional clean, flash, or package commands only when those actions exist.

Conversion Rules

  • Make the Keil target the source of truth for source membership and preprocessor settings. Make the MCU datasheet, pack files, startup code, and scatter file the source of truth for architecture and memory layout.
  • Preserve source groups as readable CMake module lists. Use explicit lists for startup, HAL/LL drivers, middleware ports, syscall stubs, and other mutually exclusive implementations. Use GLOB only where the repository already accepts automatic discovery.
  • Keep compiler-specific files separate. Select GNU startup/assembly, GCC RTOS ports, and GCC syscall implementations; never compile Arm Compiler and GCC variants together.
  • Prefer target-scoped CMake commands. Keep CPU flags identical across C, C++, assembly, and link steps. Enable ASM explicitly.
  • Translate the scatter file deliberately. Reuse an existing validated GNU .ld script when present; otherwise create one from the actual memory regions and section rules. Never infer flash origin from total device capacity alone.
  • Preserve optimization and debug intent, but do not mechanically copy Arm Compiler flags into GCC. Record any semantic mismatch that cannot be reproduced exactly.
  • Avoid conflicting CMake build-type flags such as an implicit -O3 followed by a target -Os. Control or document the effective final optimization and do not add NDEBUG unless it matches the selected Keil target.
  • Map Keil MicroLIB deliberately. Inspect printf, floating-point formats, fputc, _write, semihosting markers, and available Flash before selecting newlib, newlib-nano, _printf_float, nosys, or a GCC syscall implementation.
  • Generate .elf, .bin, .hex, .map, and a size report. Preserve additional packaging, signing, OTA, flashing, or simulator steps only when they already belong to the project or the user requests them.
  • Keep the project-local environment checker diagnostic-only and version-controlled with the generated build files. Required tools must match the normal build path; deployment/debug tools should be optional unless the requested build inherently requires them.
  • Do not change application C/C++ code merely to make migration easier unless a genuine compiler portability issue is found. Keep such fixes small and explain them.
  • Do not delete or rewrite the Keil project unless explicitly requested. A migration should remain auditable.

Required Validation

  • Confirm every intended Keil source is represented once and every excluded or alternate-toolchain source remains excluded.
  • Confirm defines and include directories, including file/group overrides where relevant.
  • Confirm MCU core, instruction set, FPU, float ABI, startup object, interrupt vectors, linker entry point, and memory origin/length.
  • Confirm the selected RTOS, CMSIS, HAL/LL, USB, filesystem, C library, and syscall variants.
  • Classify diagnostics as migration errors, pre-existing application warnings, or expected runtime/toolchain warnings. Do not hide behavior-affecting warnings.
  • In validated mode, build from a clean directory and require successful configure and link. Inspect the map and size output; verify .bin and .hex generation. In generation-only mode, mark all of these checks unperformed.
  • When Keil CLI is available, build the same target and compare error count, warnings that affect behavior, code/data size, and key symbols. If hardware is available and flashing is authorized, perform the project's normal smoke check.
  • Report what was migrated, validation performed, remaining differences, and exact build command.
  • Verify CMAKE_BUILD.md is bilingual, concise, free of template placeholders, and consistent with the actual generator, toolchain file, target name, build directory, and artifact paths.
  • Compare Flash load bytes and RAM components separately. State whether reported RAM includes .data, .bss, heap, stack, retained sections, or runtime state.

Repository Style Baseline

When no local convention exists, use the style derived from the reference project:

  • one readable root build definition with named directory variables and module source collections;
  • Ninja out-of-source builds with arm-none-eabi-gcc, objcopy, and size;
  • a dedicated simulator/host branch only if the original repository already supports it;
  • explicit device definitions, GCC middleware ports, startup assembly, and linker script;
  • post-build firmware formats and map/size diagnostics;
  • compile_commands.json, linker-script LINK_DEPENDS, and declared post-build byproducts;
  • a thin wrapper for clean, build, package, copy, or flash actions, keeping optional deployment actions separate from compilation.

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Convert Keil To Cmake?

Convert Keil MDK/uVision embedded projects into reproducible CMake builds, normally using Ninja and an Arm GNU toolchain, with concise bilingual build documentation. Use for `.uvprojx` or `.uvoptx` migration, Keil-to-GCC flag and linker-script translation, source/include/define extraction, startup and RTOS port selection, firmware artifact generation, prerequisite checking, generation-only delivery, user build guidance, or parity checks between an existing Keil target and a new CMake target.

Warum Convert Keil To Cmake in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Convert Keil To Cmake besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Convert Keil To Cmake in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/sunzhen222/convert-keil-to-cmake/tree/main ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Convert Keil To Cmake nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Convert Keil To Cmake verwenden?

So viele Sie möchten. In TypingMind können Sie Convert Keil To Cmake mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Convert Keil To Cmake kostenlos?

Ja. Der Skill wird von sunzhen222 auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇