This repository has been archived on 2024-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Kinchin Fong b45a262027 add UpperSerial 2023-09-10 14:55:29 +08:00
include add UpperSerial 2023-09-10 14:55:29 +08:00
src add UpperSerial 2023-09-10 14:55:29 +08:00
tools Serial Communication Framework 2023-09-09 22:34:57 +08:00
.gitignore DataRecorder Module 2023-09-08 20:49:54 +08:00
README.md add UpperSerial 2023-09-10 14:55:29 +08:00
partitions_12M_SPIFFS.csv init with spiffs 2023-09-07 20:01:46 +08:00
platformio.ini Serial Communication Framework 2023-09-09 22:34:57 +08:00

README.md

开发说明

开发环境

  1. Windows
  2. PlatformIO + VSCode
  3. Python3.8 及以上版本

文件介绍

src 中的源文件与 include 中的头文件一一对应。

  • main.cpp: 入口函数
  • VFileSystem: 文件系统接口
  • DataRecorder: 数据读写接口
  • ConfigManager: 配置项接口
  • InterSerial: 与 STM32 通讯的串口功能
  • UpperSerial: 与上位机通讯的串口功能

固件烧录流程

  1. 在 PlatformIO 中打开项目并等待依赖库加载完成
  2. 进入 tools 目录,并用 Python 运行 init_fs.py
  3. 设备上电,按 boot 和 reset 进入 boot 模式
  4. 点击侧边栏的 PlatformIO 工具,在 PROJECT TASKS 选项卡下,点击 esp32-s2-sensor-recorder -> Platform -> Upload Filesystem Image 等待文件系统上传完成
  5. 编译并上传代码固件
  6. 手动 reset

注意

  1. 文件系统和固件烧录后会报一个错, WARNING: ESP32-S2 chip was placed into download mode using GPIO0. 因为 USB 烧录无法自动 reset。直接忽略即可。
  2. 与上位机通讯的串口,请在上位机打开 DTR 和 RTS 流控