WCH Configurator

Pinout & Configuration · GPIO · SPI · I²C · UART · TIMER · ADC · IRQ · BLE · USB  →  C init code
GPIO Mode and Configurationnew
Mode
Configuration 0 items
Chip
-
Package
-
Library
-
Clock
-
Toolchain
VS Code + CMake + MounRiver GCC
Project folder
peripheral_init.c

    
    
  
Made by Amir1387aht (Another)
Email: amir1387aht@gmail.com
GitHub: https://github.com/amir1387aht/WCH-Resources
Pinout & configuration view, Bluetooth LE / USB, VS Code project export: zamanimahdi

Using the exported project in VS Code

  1. Install VS Code and MounRiver Studio (it contains the WCH GCC, OpenOCD and the WCH-Link driver).
  2. Click VS Code project (.zip), unzip it, then in VS Code use File > Open Folder on the unzipped folder.
  3. Click Install on the recommended extensions pop-up (C/C++, CMake Tools, Cortex-Debug, Serial Monitor).
  4. Ctrl+Shift+P > Tasks: Run Task > WCH: Setup. It finds or installs CMake/Ninja, the toolchain and OpenOCD, downloads the official EVT for your chip and saves the paths.
  5. Write code in src/ (all src/*.c files are built). Build with Ctrl+Shift+B, flash with the task WCH: Flash, debug with F5.

Every error ends with a yellow -> line that says how to fix it. The task WCH: Doctor checks the whole setup. The README in the zip has the full guide and a troubleshooting table.

راهنمای فارسی: پوشه را در VS Code باز کنید، تسک WCH: Setup را اجرا کنید، با Ctrl+Shift+B بسازید و با F5 دیباگ کنید.