生成的 .ino.cpp 会使校验和无效;后台 pio 命令会清除 .pio/build 和 .pio/libdeps。

作者: ellensp创建于 2026年9月23日更新于 2026年9月25日
标签enhancementbuild system

**1. A build invalidates its own checksum.** `compute_project_checksum()` (`platformio/project/helpers.py:93`) hashes the sorted list of every `.c .cc .cpp .h .hpp .s .S` path under `include_dir`, `src_dir` and `lib_dir`. The Arduino `.ino` conversion writes `<name>.ino.cpp` into `src_dir` at the start of a build and removes it at the end. So for the entire duration of every `.ino`-based build, the computed checksum differs from the stored `project.checksum`, and any `pio` invocation during that window sees a mismatch and wipes the build tree.

内容来源: platformio/platformio-core