# Keil Parser

> Keil Project Configuration Parsing

- Skill: `changde-tang/keil-parser` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add changde-tang/keil-parser`
- Raw SKILL.md: https://api.skillmd.com/api/skills/changde-tang/keil-parser/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: changde-tang (https://skillmd.com/u/changde-tang)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/changde-tang/keil-parser

---


# Keil Project Configuration Parsing

Invoke `py_keil_parser.py` to parse `.uvprojx` project files and get project compilation configuration information.

## Tool Script

**Script Path**: `py_keil_parser.py`
**Dependencies**: Python 3.x standard library (no additional installation required)

## Usage

```bash
python py_keil_parser.py <project file path 1> [project file path 2] ...
```

Supports parsing multiple project files simultaneously.

## Output Structure

Output is in JSON format, containing the following fields:

| Field           | Description                                |
| --------------- | ------------------------------------------ |
| `target_name`   | Project target name                        |
| `defines`       | Macro definition string, separated by semicolons |
| `include_paths` | Include path list                         |
| `source_files`  | Source file list, each item contains `name` and `path` |

### Example Output

```json
{
  "project.uvprojx": {
    "target_name": "Target",
    "defines": "USE_HAL_LIBRARY;STM32F103xB",
    "include_paths": ["../inc/", "../src/"],
    "source_files": [
      {"name": "main.c", "path": "C:/project/main.c"}
    ]
  }
}
```

## Typical Use Cases

- Before calling compilation tools, first parse the project to confirm macro definitions and paths are correct
- Check which source files are included in the project
- Compare configuration differences between two projects

