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.
make -C embed/obj all: Build firmware (.elf,.hex,.lst) using the configuredriscv-none-embed-*toolchain.make -C embed/obj clean: Remove generated objects and output images fromembed/obj/.python3 -m http.server 8000 --directory simulate: Serve the UI simulator locally athttp://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.
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.
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).
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.
Several docs begin with <!-- 此文件禁止AI写入 -->. Treat these as protected by project policy: coordinate edits with maintainers and preserve the banner when updating content manually.