Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 2.45 KB

File metadata and controls

29 lines (21 loc) · 2.45 KB

Repository Guidelines

Project Structure & Module Organization

embed/ contains the CH32V203 firmware project based on RT-Thread. Core app code is mainly in embed/User/ and embed/drivers/, while embed/rtthread/, embed/Peripheral/, embed/Core/, and embed/Startup/ are RTOS/vendor platform layers. embed/obj/ holds generated artifacts and auto-generated makefiles.

docs/ stores behavior specs (command syntax, UI behavior, data defaults). hardware/ contains pinout and board notes. simulate/ contains the browser-based UI simulator (simulate/index.html). datasheet/ stores reference PDFs.

Build, Test, and Development Commands

  • make -C embed/obj all: Build firmware (.elf, .hex, .lst) using the configured riscv-none-embed-* toolchain.
  • make -C embed/obj clean: Remove generated objects and output images from embed/obj/.
  • python3 -m http.server 8000 --directory simulate: Serve the UI simulator locally at http://localhost:8000.
  • git log --oneline -n 10: Check recent commit style before creating new commits.

If using MounRiver Studio/Eclipse workflow, import from embed/.project and build the obj configuration.

Coding Style & Naming Conventions

Use C (GNU99) with 4-space indentation and braces on new lines, consistent with files in embed/User/ and embed/drivers/. Prefer lowercase snake_case for files and identifiers (drv_gpio.c, set_bind_up, record_clear). Keep hardware-specific logic isolated to driver or board layers; avoid broad edits in vendored RT-Thread or peripheral sources unless necessary.

Testing Guidelines

No automated unit-test suite is currently checked in. Validate changes with:

  • Firmware build success and artifact generation in embed/obj/.
  • Hardware-in-loop checks for command behavior (set_UV, set_OC, record on/off) and output switching.
  • Simulator checks for 240x135 layout and status flash behavior (green/red/yellow).

Commit & Pull Request Guidelines

Match the existing concise style seen in history and changelog: version/date + type + summary (example: # V0.3.0 26/03/05 - FIX: debounce toggle input). Keep commits scoped by subsystem. PRs should include purpose, changed paths, validation evidence (logs or screenshots), and linked issue/task when available.

Documentation Notes

Several docs begin with <!-- 此文件禁止AI写入 -->. Treat these as protected by project policy: coordinate edits with maintainers and preserve the banner when updating content manually.