AlexSJC
AlexSJC
发布于 2026-11-06 / 1 阅读
0
0

ESP32-S3 踩坑笔记

前言

Arduino 是一套开源电子原型平台,拥有简单易用的开发框架与丰富开源库,而 ESP32‑S3 是乐鑫推出的高性能物联网主控芯片,支持在 Arduino 环境下开发,搭载双核 240MHz 处理器,集成 2.4G Wi‑Fi、蓝牙 5.0、USB 接口与 AI 向量加速指令,外设资源充足,非常适合用来制作物联网、人机交互和边缘 AI 类项目。

添加开发版管理器地址:https://espressif.github.io/arduino-esp32/package_esp32_index_cn.json

配置项

USB CDC On Boot - On

TimeLib

参考:https://forum.arduino.cc/t/arduino-uno-time-library-not-working/1051297/3

现在引入的头文件是 TimeLib.h,而不是旧版的 Time.h,原因是 Windows 这类操作系统无法区分该库的 Time.h 和 C 标准库中的 time.h。

TFT_eSPI

参考:https://zhuanlan.zhihu.com/p/2010303075731141148

bootloader.bin

开源项目文件夹里有 bootloader.bin,但和实际镜像不匹配。

Sketch uses 1611096 bytes (51%) of program storage space. Maximum is 3145728 bytes.
Global variables use 56600 bytes (17%) of dynamic memory, leaving 271080 bytes for local variables. Maximum is 327680 bytes.
esptool v5.3.1
Serial port COM12:
Connecting...
Connected to ESP32-S3 on COM12:
Chip type:          ESP32-S3 (QFN56) (revision v0.2)
Features:           Wi-Fi, BT 5 (LE), Dual Core + LP Core, 240MHz, Embedded PSRAM 8MB (AP_3v3)
Crystal frequency:  40MHz
USB mode:           USB-Serial/JTAG
MAC:                **:**:**:**:**:**

Uploading stub flasher...
Running stub flasher...

A fatal error occurred: 'C:\Users\AlexSheng\AppData\Local\arduino\sketches\35275430120BF8872B785DE30FD5D7D5/SmallDesktopDisplay.ino.bootloader.bin' is not an an ESP32-S3 image. Use the force argument to flash anyway.
Stub flasher running.
Changing baud rate to 921600...
Changed.

Warning: Unexpected chip ID in image. Expected 9 but value was 5. Is this image for a different chip model?

Hard resetting via RTS pin...
Failed uploading: uploading error: exit status 2

固件太大

Sketch uses 1616084 bytes (123%) of program storage space. Maximum is 1310720 bytes.
Global variables use 56416 bytes (17%) of dynamic memory, leaving 271264 bytes for local variables. Maximum is 327680 bytes.
Sketch too big; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing it.
text section exceeds available space in board

Compilation error: text section exceeds available space in board

更改 Flash Size 和 Partition Scheme。


评论