Kinchin Fong b45a262027 | ||
---|---|---|
include | ||
src | ||
tools | ||
.gitignore | ||
README.md | ||
partitions_12M_SPIFFS.csv | ||
platformio.ini |
README.md
开发说明
开发环境
- Windows
- PlatformIO + VSCode
- Python3.8 及以上版本
文件介绍
src
中的源文件与 include
中的头文件一一对应。
- main.cpp: 入口函数
- VFileSystem: 文件系统接口
- DataRecorder: 数据读写接口
- ConfigManager: 配置项接口
- InterSerial: 与 STM32 通讯的串口功能
- UpperSerial: 与上位机通讯的串口功能
固件烧录流程
- 在 PlatformIO 中打开项目并等待依赖库加载完成
- 进入
tools
目录,并用 Python 运行init_fs.py
- 设备上电,按 boot 和 reset 进入 boot 模式
- 点击侧边栏的 PlatformIO 工具,在
PROJECT TASKS
选项卡下,点击esp32-s2-sensor-recorder
->Platform
->Upload Filesystem Image
等待文件系统上传完成 - 编译并上传代码固件
- 手动 reset
注意
- 文件系统和固件烧录后会报一个错,
WARNING: ESP32-S2 chip was placed into download mode using GPIO0.
因为 USB 烧录无法自动 reset。直接忽略即可。 - 与上位机通讯的串口,请在上位机打开 DTR 和 RTS 流控