docs(engineering): 补充 ccache 提速与工具链安装排障
- 记录 IDF_CCACHE_ENABLE / CONFIG_IDF_BUILD_USE_CCACHE 加速重复编译 - 说明 export.sh 需 source 而非 ./ 执行、自定义 IDF_TOOLS_PATH 每次重设 - 增加工具链安装失败恢复:清理 ~/.espressif/dist、macOS 证书包、 Apple Silicon Rosetta 2、Windows 杀毒扫描排除 - 经验来自 esp-mosaico/esp-mosaico-vibe,双语同步更新
This commit is contained in:
1 parent
df3990726e
commit
3bacd66efd
6 files changed
+113
No files matched your search
@@ -8,6 +8,8 @@
|
||||
|
||||
- Added the supplied 80-byte CW2017 profile for the specified 520 mAh cell, including content/update-flag checks, verified writes, the required restart sequence, and bounded SOC-readiness polling.
|
||||
|
||||
- Documented ccache support for faster repeated builds (`IDF_CCACHE_ENABLE=1` or `CONFIG_IDF_BUILD_USE_CCACHE=y`), the activation pitfall of running `export.sh` as `./export.sh` in a subshell, re-setting `IDF_TOOLS_PATH` before every activation, toolchain install-failure recovery (clearing `~/.espressif/dist`, macOS certificate bundle, Apple Silicon Rosetta 2), and Windows antivirus scan exclusions (learned from `esp-mosaico/esp-mosaico-vibe`).
|
||||
|
||||
- Reorganized the documentation by function area with a dual entry point: the root `AGENTS.md` is now a thin router (hard constraints + task routing only) and the detailed AI workflow lives in `docs/development/ai-guide.md`; `agent-guide.md` was folded in. `docs/development/` gained a second level (`engineering/`, `ci/`, `release/`), and the `plays/` application archive and `experiences/` moved into a `docs/reference/` area with a dedicated README. Removed `docs/software-design/` (empty scaffold); folded the three `assets/{fonts,images,music}/README` leaves into the `assets/` README; flattened the six `project-completion` sub-documents into a single file; and unified each directory to a single README, eliminating every `INDEX` file and a duplicated experience index. All cross-references and bibliographic links were updated; no content was dropped.
|
||||
|
||||
- Kept the fixed protected `cardid`/Recovery partitions and CI validation for
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
- 加入厂家为优特利 520mAh 电芯生成的 80 字节 CW2017 profile,并实现内容与更新标志检查、写入后校验、规定的重启时序以及有上限的 SOC 就绪等待。
|
||||
|
||||
- 记录加快重复编译的 ccache 用法(`IDF_CCACHE_ENABLE=1` 或 `CONFIG_IDF_BUILD_USE_CCACHE=y`)、把 `export.sh` 写成 `./export.sh` 在子 shell 执行的激活陷阱、每次激活前重设 `IDF_TOOLS_PATH`、工具链安装失败恢复(清理 `~/.espressif/dist`、macOS 证书包、Apple Silicon Rosetta 2)与 Windows 杀毒扫描排除项(经验来自 `esp-mosaico/esp-mosaico-vibe`)。
|
||||
|
||||
- 按功能域整理文档并采用双入口:根目录 `AGENTS.md` 变为薄路由(只保留硬约束与任务路由),详细的 AI 开发工作流下沉到 `docs/development/ai-guide.md`,`agent-guide.md` 并入其中。为 `docs/development/` 增加二级分区(`engineering/`、`ci/`、`release/`),把 `plays/` 应用档案与 `experiences/` 移入带专属 README 的 `docs/reference/` 参考区;删除 `docs/software-design/`(空脚手架);把 `assets/{fonts,images,music}/README` 三个叶子 README 并入 `assets/` README;把 `project-completion` 的六个子文档压平为单文件;并把每个目录统一为单一 README,消除所有 `INDEX` 文件与一处重复经验索引。所有交叉引用与文献链接已更新;未丢弃任何内容。
|
||||
|
||||
- 保留固定的 `cardid`/Recovery 保护分区,以及 CI 对合并镜像结构、
|
||||
|
||||
@@ -29,6 +29,31 @@ changed defaults. Preserve intentional local settings, then run
|
||||
`idf.py set-target esp32c3` when the target or tracked defaults must be
|
||||
regenerated.
|
||||
|
||||
### Speeding up repeated builds
|
||||
|
||||
ccache keeps incremental builds fast. ESP-IDF does not enable it by default;
|
||||
enable it for the current terminal, or make it permanent per project:
|
||||
|
||||
```bash
|
||||
export IDF_CCACHE_ENABLE=1
|
||||
idf.py build
|
||||
```
|
||||
|
||||
```text
|
||||
CONFIG_IDF_BUILD_USE_CCACHE=y
|
||||
```
|
||||
|
||||
The ccache cache lives outside `build/`, so neither `idf.py fullclean` nor a
|
||||
temporary validation build removes it. When the cache must be cleared, remove
|
||||
the ccache directory itself (default `~/.ccache`, or wherever
|
||||
`CCACHE_DIR` points).
|
||||
|
||||
On Windows, slow repeated builds are frequently caused by antivirus or endpoint
|
||||
software scanning build directories in real time; add the ESP-IDF install
|
||||
directory, the tools directory (`%USERPROFILE%\.espressif` or a custom
|
||||
`IDF_TOOLS_PATH`), and the project build directory (`build/`) to the scan
|
||||
exclusions.
|
||||
|
||||
The tracked `dependencies.lock` pins Managed Component resolution. After changing an `idf_component.yml`, regenerate the lock with ESP-IDF 5.5.3, review version changes, and commit it with the manifest. An ordinary build must not leave an unexplained lock-file diff.
|
||||
|
||||
Firmware validation uses a fresh temporary build directory and an isolated `sdkconfig` generated from the tracked defaults. It does not consume or overwrite a developer's root `sdkconfig`, and it copies only the verified merged image to `build/FoloToy-AI-Passport-full.bin`. The gate also enforces the [protected Flash layout](protected-flash-layout.md): protected partition addresses, application size, partition-table MD5, and absence of protected payload data.
|
||||
|
||||
Loaded 3 of 6 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user