【问题描述:】
我使用的是 ESP32-S3-N16R8 ,果云科技开发板,标称 Flash 为 16MB,PSRAM 为 8MB,开发环境是 PlatformIO,使用 Arduino 框架。
在 platformio.ini 中我配置如下:
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
; [env:esp32s3]
; platform = espressif32
; board = esp32-s3-devkitc-1
; framework = arduino
; monitor_speed = 115200
; board_build.flash_size = 16MB
; board_build.partitions = default_16MB.csv
; board_build.arduino.memory_type = qio_opi
; build_flags =
; -DBOARD_HAS_PSRAM
[env:esp32s3]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
monitor_speed = 115200
board_build.flash_mode = qio
board_build.f_flash = 80000000L
board_build.flash_size = 16MB
;default.csv,default_8MB.csv,huge_app.csv可以用
board_build.partitions = default_8MB.csv
; board_build.partitions = huge_app.csv
board_build.arduino.memory_type = qio_opi
build_flags =
-DBOARD_HAS_PSRAM
分区表 default_8MB.csv 内容:
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x5000
otadata, data, ota, 0xe000, 0x2000
app0, app, ota_0, 0x10000, 0x330000
app1, app, ota_1, 0x340000, 0x330000
spiffs, data, spiffs, 0x670000, 0x180000
coredump, data, coredump,0x7F0000, 0x10000
这份表总共使用 8MB Flash,能正常运行。
【问题】
我试图将 spiffs 和 coredump 的大小后移(仅仅后移1000),或使用 PlatformIO 提供的 default_16MB.csv (使用更后面的 Flash 区域),程序却会无限重启,产生 rst:0x3 的 bootloop 环境。
即使我在 ini 中显示指定:
board_build.flash_size = 16MB
仍旧无法使用超过 0x800000 (8MB) 以后的分区地址。
ESP.getFlashChipSize() 返回的确定是 16MB
【想询问:】
- 是否 ESP32-S3 的 bootloader 或某些 IDF 限制了 Flash 可用范围?
- 我是否需要重编译 bootloader 才能使用完整 16MB 分区?
- 有没有人遇到过类似问题?如何解决?
【补充信息:】
- PlatformIO + Arduino framework
- Board: esp32-s3-n16r8 果云科技
- Chip: ESP32-S3-N16R8
欢迎任何思路或解决方案,感谢!