{
  "schemaVersion": "1.0",
  "item": {
    "slug": "stm32-cubemx",
    "name": "STM32 CubeMX",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/Aidankong/stm32-cubemx",
    "canonicalUrl": "https://clawhub.ai/Aidankong/stm32-cubemx",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/stm32-cubemx",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=stm32-cubemx",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "references/IOC_structure.md",
      "references/USART_DMA.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/stm32-cubemx"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/stm32-cubemx",
    "agentPageUrl": "https://openagent3.xyz/skills/stm32-cubemx/agent",
    "manifestUrl": "https://openagent3.xyz/skills/stm32-cubemx/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/stm32-cubemx/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Environment Setup",
        "body": "# STM32CubeMX path (modify based on your installation)\nCUBEMX=/path/to/STM32CubeMX/STM32CubeMX\n\n# Project path (adjust for your project)\nPROJECT_DIR=/path/to/your/project\nIOC_FILE=$PROJECT_DIR/your_project.ioc\nSCRIPT_FILE=$PROJECT_DIR/cube_headless.txt"
      },
      {
        "title": "Core Workflow",
        "body": "1. Modify IOC config file → 2. Run CLI to generate code → 3. CMake build verification"
      },
      {
        "title": "Step 1: Modify IOC File",
        "body": "Edit the .ioc file to add/modify peripheral configuration.\n\nKey Configuration Sections:\n\nMcu.IP0=XXX - Peripheral IP list, Mcu.IPNb is the count\nMcu.Pin0=PAx - Pin list, Mcu.PinsNb is the count\nXXX.Signal=YYY - Pin signal mapping\nProjectManager.functionlistsort - Initialization function list"
      },
      {
        "title": "Step 2: Generate Code",
        "body": "# Headless mode (recommended)\n$CUBEMX -q $SCRIPT_FILE\n\n# Script file content\ncat > $SCRIPT_FILE << 'EOF'\nconfig load /path/to/your/project/your_project.ioc\nproject generate\nexit\nEOF"
      },
      {
        "title": "Step 3: Build Verification",
        "body": "cd $PROJECT_DIR\nrm -rf build/Debug\ncmake --preset Debug\ncmake --build build/Debug"
      },
      {
        "title": "CLI Command Reference",
        "body": "CommandPurposeExampleconfig load <path>Load IOC configurationconfig load /path/to/project.iocconfig save <path>Save IOC configurationconfig save /path/to/project.iocproject generateGenerate complete projectproject generateproject toolchain <name>Set toolchainproject toolchain CMakeproject path <path>Set project pathproject path /path/to/projectproject name <name>Set project nameproject name MyProjectload <mcu>Load MCUload STM32F103C8TxsetDriver <IP> <HAL|LL>Set driver typesetDriver ADC LLexitExit programexit"
      },
      {
        "title": "USART + DMA",
        "body": "See references/USART_DMA.md for detailed configuration\n\n# Add IP\nMcu.IP6=USART2\nMcu.IPNb=7\n\n# Pin configuration\nPA2.Signal=USART2_TX\nPA3.Signal=USART2_RX\n\n# USART2 parameters\nUSART2.BaudRate=115200\nUSART2.Dmaenabledrx=1\nUSART2.Dmaenabledtx=1\n\n# DMA configuration\nDma.Request0=USART2_RX\nDma.Request1=USART2_TX\nDma.USART2_RX.0.Instance=DMA1_Channel6\nDma.USART2_TX.1.Instance=DMA1_Channel7\n\n# Interrupts\nNVIC.USART2_IRQn=true\\:0\\:0\\:false\\:false\\:true\\:true\\:true\\:true"
      },
      {
        "title": "ADC Acquisition",
        "body": "# Add ADC1\nMcu.IP0=ADC1\n\n# ADC configuration\nADC1.Channel-1\\#ChannelRegularConversion=ADC_CHANNEL_5\nADC1.Rank-1\\#ChannelRegularConversion=1\nADC1.SamplingTime-1\\#ChannelRegularConversion=ADC_SAMPLETIME_1CYCLE_5\nADC1.NbrOfConversionFlag=1\nADC1.master=1\n\n# Pin\nPA5.Signal=ADCx_IN5\nSH.ADCx_IN5.0=ADC1_IN5,IN5"
      },
      {
        "title": "TIM PWM",
        "body": "# TIM3 configuration\nTIM3.Channel-PWM\\ Generation1\\ CH1=PWM_CHANNEL1\nTIM3.Channel-PWM\\ Generation2\\ CH2=PWM_CHANNEL2\nTIM3.IPParametersWithoutCheck=Prescaler,Period\n\n# Pins\nPA6.Signal=TIM3_CH1\nPA7.Signal=TIM3_CH2"
      },
      {
        "title": "USART",
        "body": "PeripheralTXRXDMA TXDMA RXUSART1PA9PA10DMA1_Ch4DMA1_Ch5USART2PA2PA3DMA1_Ch7DMA1_Ch6USART3PB10PB11DMA1_Ch2DMA1_Ch3"
      },
      {
        "title": "ADC Channels",
        "body": "ChannelPinChannelPinIN0PA0IN5PA5IN1PA1IN6PA6IN2PA2IN7PA7IN3PA3IN8PB0IN4PA4IN9PB1"
      },
      {
        "title": "TIM Channels",
        "body": "TimerCH1CH2CH3CH4TIM1PA8PA9PA10PA11TIM2PA0/PA5/PA15PA1/PB3PA2PA3TIM3PA6/PB4PA7/PB5PB0PB1TIM4PB6PB7PB8PB9"
      },
      {
        "title": "Q1: CLI execution has no effect",
        "body": "Cause: Paths must be absolute\n\n# Wrong\n./STM32CubeMX -q script.txt\n# Correct\n/path/to/STM32CubeMX/STM32CubeMX -q /path/to/project/script.txt"
      },
      {
        "title": "Q2: Generated code missing initialization functions",
        "body": "Cause: functionlistsort does not include the corresponding function\n\n# Add initialization function\nProjectManager.functionlistsort=...,N-MX_XXX_Init-XXX-false-HAL-true"
      },
      {
        "title": "Q3: Peripheral code not generated",
        "body": "Checklist:\n\nIs IP in the Mcu.IPx list?\nIs Mcu.IPNb count correct?\nIs pin Signal configured?"
      },
      {
        "title": "Q4: DMA not associated",
        "body": "Solution: Enable peripheral DMA parameters\n\nUSART2.Dmaenabledrx=1\nUSART2.Dmaenabledtx=1"
      },
      {
        "title": "Quick Reference",
        "body": "# Complete workflow\ncd /path/to/your/project\n# 1. Edit IOC file\n# 2. Generate code\n/path/to/STM32CubeMX/STM32CubeMX -q cube_headless.txt\n# 3. Build\ncmake --preset Debug && cmake --build build/Debug\n# 4. Check size\narm-none-eabi-size build/Debug/your_project.elf"
      },
      {
        "title": "References",
        "body": "references/USART_DMA.md - Complete USART + DMA configuration\nreferences/IOC_structure.md - Detailed IOC file structure\nUM1718 STM32CubeMX User Manual"
      }
    ],
    "body": "STM32CubeMX CLI Operations\nEnvironment Setup\n# STM32CubeMX path (modify based on your installation)\nCUBEMX=/path/to/STM32CubeMX/STM32CubeMX\n\n# Project path (adjust for your project)\nPROJECT_DIR=/path/to/your/project\nIOC_FILE=$PROJECT_DIR/your_project.ioc\nSCRIPT_FILE=$PROJECT_DIR/cube_headless.txt\n\nCore Workflow\n1. Modify IOC config file → 2. Run CLI to generate code → 3. CMake build verification\n\nStep 1: Modify IOC File\n\nEdit the .ioc file to add/modify peripheral configuration.\n\nKey Configuration Sections:\n\nMcu.IP0=XXX - Peripheral IP list, Mcu.IPNb is the count\nMcu.Pin0=PAx - Pin list, Mcu.PinsNb is the count\nXXX.Signal=YYY - Pin signal mapping\nProjectManager.functionlistsort - Initialization function list\nStep 2: Generate Code\n# Headless mode (recommended)\n$CUBEMX -q $SCRIPT_FILE\n\n# Script file content\ncat > $SCRIPT_FILE << 'EOF'\nconfig load /path/to/your/project/your_project.ioc\nproject generate\nexit\nEOF\n\nStep 3: Build Verification\ncd $PROJECT_DIR\nrm -rf build/Debug\ncmake --preset Debug\ncmake --build build/Debug\n\nCLI Command Reference\nCommand\tPurpose\tExample\nconfig load <path>\tLoad IOC configuration\tconfig load /path/to/project.ioc\nconfig save <path>\tSave IOC configuration\tconfig save /path/to/project.ioc\nproject generate\tGenerate complete project\tproject generate\nproject toolchain <name>\tSet toolchain\tproject toolchain CMake\nproject path <path>\tSet project path\tproject path /path/to/project\nproject name <name>\tSet project name\tproject name MyProject\nload <mcu>\tLoad MCU\tload STM32F103C8Tx\nsetDriver <IP> <HAL|LL>\tSet driver type\tsetDriver ADC LL\nexit\tExit program\texit\nCommon Peripheral Configuration Templates\nUSART + DMA\n\nSee references/USART_DMA.md for detailed configuration\n\n# Add IP\nMcu.IP6=USART2\nMcu.IPNb=7\n\n# Pin configuration\nPA2.Signal=USART2_TX\nPA3.Signal=USART2_RX\n\n# USART2 parameters\nUSART2.BaudRate=115200\nUSART2.Dmaenabledrx=1\nUSART2.Dmaenabledtx=1\n\n# DMA configuration\nDma.Request0=USART2_RX\nDma.Request1=USART2_TX\nDma.USART2_RX.0.Instance=DMA1_Channel6\nDma.USART2_TX.1.Instance=DMA1_Channel7\n\n# Interrupts\nNVIC.USART2_IRQn=true\\:0\\:0\\:false\\:false\\:true\\:true\\:true\\:true\n\nADC Acquisition\n# Add ADC1\nMcu.IP0=ADC1\n\n# ADC configuration\nADC1.Channel-1\\#ChannelRegularConversion=ADC_CHANNEL_5\nADC1.Rank-1\\#ChannelRegularConversion=1\nADC1.SamplingTime-1\\#ChannelRegularConversion=ADC_SAMPLETIME_1CYCLE_5\nADC1.NbrOfConversionFlag=1\nADC1.master=1\n\n# Pin\nPA5.Signal=ADCx_IN5\nSH.ADCx_IN5.0=ADC1_IN5,IN5\n\nTIM PWM\n# TIM3 configuration\nTIM3.Channel-PWM\\ Generation1\\ CH1=PWM_CHANNEL1\nTIM3.Channel-PWM\\ Generation2\\ CH2=PWM_CHANNEL2\nTIM3.IPParametersWithoutCheck=Prescaler,Period\n\n# Pins\nPA6.Signal=TIM3_CH1\nPA7.Signal=TIM3_CH2\n\nSTM32F103C8T6 Resource Mapping\nUSART\nPeripheral\tTX\tRX\tDMA TX\tDMA RX\nUSART1\tPA9\tPA10\tDMA1_Ch4\tDMA1_Ch5\nUSART2\tPA2\tPA3\tDMA1_Ch7\tDMA1_Ch6\nUSART3\tPB10\tPB11\tDMA1_Ch2\tDMA1_Ch3\nADC Channels\nChannel\tPin\tChannel\tPin\nIN0\tPA0\tIN5\tPA5\nIN1\tPA1\tIN6\tPA6\nIN2\tPA2\tIN7\tPA7\nIN3\tPA3\tIN8\tPB0\nIN4\tPA4\tIN9\tPB1\nTIM Channels\nTimer\tCH1\tCH2\tCH3\tCH4\nTIM1\tPA8\tPA9\tPA10\tPA11\nTIM2\tPA0/PA5/PA15\tPA1/PB3\tPA2\tPA3\nTIM3\tPA6/PB4\tPA7/PB5\tPB0\tPB1\nTIM4\tPB6\tPB7\tPB8\tPB9\nTroubleshooting\nQ1: CLI execution has no effect\n\nCause: Paths must be absolute\n\n# Wrong\n./STM32CubeMX -q script.txt\n# Correct\n/path/to/STM32CubeMX/STM32CubeMX -q /path/to/project/script.txt\n\nQ2: Generated code missing initialization functions\n\nCause: functionlistsort does not include the corresponding function\n\n# Add initialization function\nProjectManager.functionlistsort=...,N-MX_XXX_Init-XXX-false-HAL-true\n\nQ3: Peripheral code not generated\n\nChecklist:\n\nIs IP in the Mcu.IPx list?\nIs Mcu.IPNb count correct?\nIs pin Signal configured?\nQ4: DMA not associated\n\nSolution: Enable peripheral DMA parameters\n\nUSART2.Dmaenabledrx=1\nUSART2.Dmaenabledtx=1\n\nQuick Reference\n# Complete workflow\ncd /path/to/your/project\n# 1. Edit IOC file\n# 2. Generate code\n/path/to/STM32CubeMX/STM32CubeMX -q cube_headless.txt\n# 3. Build\ncmake --preset Debug && cmake --build build/Debug\n# 4. Check size\narm-none-eabi-size build/Debug/your_project.elf\n\nReferences\nreferences/USART_DMA.md - Complete USART + DMA configuration\nreferences/IOC_structure.md - Detailed IOC file structure\nUM1718 STM32CubeMX User Manual"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/Aidankong/stm32-cubemx",
    "publisherUrl": "https://clawhub.ai/Aidankong/stm32-cubemx",
    "owner": "Aidankong",
    "version": "1.0.3",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/stm32-cubemx",
    "downloadUrl": "https://openagent3.xyz/downloads/stm32-cubemx",
    "agentUrl": "https://openagent3.xyz/skills/stm32-cubemx/agent",
    "manifestUrl": "https://openagent3.xyz/skills/stm32-cubemx/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/stm32-cubemx/agent.md"
  }
}