Files
Interpreter/examples/README.md
T
AdminandCursor 2eb2468119 划定 CMake 模块目录并补充各层 README。
固定 isa/compiler/vm/host 的职责边界,样例与测试单独成目录。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 16:32:07 +08:00

19 lines
639 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# examples
给人看的样例工程,**不是** CMake 库。每个子目录是一份完整工程:`project.toml` + 若干 `.st`
`host` 直接打开,用来跑通最小闭环。自动化断言放 `tests/`
## line1
计划中的最小样例:`MAIN` + `MotorStarter` FB + I/O。
| 文件 | 内容 |
|---|---|
| `project.toml` | `files` / `entry` / `gvl.file` / 可选 `io.*` |
| `globals.st` | 第一版唯一 GVL`VAR_GLOBAL`、I/Q |
| `motor.st` | `FUNCTION_BLOCK MotorStarter`,用 `VAR_EXTERNAL` 引用急停 |
| `main.st` | `PROGRAM MAIN`,实例化 FB,写 `Q0_0` |
不要在仓库根目录散放这些文件。