# Jlink Download

> J-Link Firmware Flashing

- Skill: `changde-tang/jlink-download` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add changde-tang/jlink-download`
- Raw SKILL.md: https://api.skillmd.com/api/skills/changde-tang/jlink-download/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/jlink-download

---


# J-Link Firmware Flashing

Invoke `py_jlink_download.py` to flash firmware files to target chips via J-Link debugger, supporting full process of erase, flash, verify, and reset.

## Tool Script

**Script Path**: `py_jlink_download.py`
**Dependencies**: Python 3.x + `pylink` library

```bash
pip install pylink
```

## Usage

```bash
# Basic usage (default chip GD32F103C8)
python py_jlink_download.py firmware.bin

# Specify chip model
python py_jlink_download.py firmware.bin -d STM32F103C8

# Specify flash start address
python py_jlink_download.py firmware.bin -a 0x08001000

# Skip erase and verify (faster)
python py_jlink_download.py firmware.bin --no-erase --no-verify
```

## Parameter Description

| Parameter     | Short | Description                        | Default       |
| ------------- | ----- | ---------------------------------- | ------------- |
| `firmware`    | -     | Firmware file path (.bin or .hex) | **Required**  |
| `--device`    | `-d`  | Target chip model                  | `GD32F103C8`  |
| `--addr`      | `-a`  | Flash start address                | `0x08000000`  |
| `--no-erase`  | -     | Skip chip erase before flashing   | Default erase |
| `--no-verify` | -     | Skip flash data verification       | Default verify |
| `--no-run`    | -     | Do not reset and run after flash   | Default reset |

## Flash Process

1. Initialize and connect J-Link
2. Connect to target chip (SWD interface)
3. Erase chip (optional)
4. Write firmware file
5. Read memory to verify data (optional)
6. Reset and run program (optional)

## Common Chip Models

- `GD32F103C8` / `GD32F303RC`
- `STM32F103C8` / `STM32F103RET6`

> If chip model is unknown, run `JLinkDevices` command to view the complete device list supported by J-Link.

## Notes

- Ensure J-Link debugger is connected to both computer and target board
- Chip model must exactly match the name in J-Link database
- For `.hex` file flashing, verification step errors can be ignored (hex format contains address information)

