platformio.ini 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. ; PlatformIO Project Configuration File
  2. ;
  3. ; Build options: build flags, source filter
  4. ; Upload options: custom upload port, speed and extra flags
  5. ; Library options: dependencies, extra library storages
  6. ; Advanced options: extra scripting
  7. ;
  8. ; Please visit documentation for the other options and examples
  9. ; https://docs.platformio.org/page/projectconf.html
  10. [env:esp32s3-n16r8]
  11. platform = espressif32
  12. board = esp32-s3-devkitc-1 ; 选通用 S3 DevKitC
  13. framework= arduino
  14. ; --- Flash & PSRAM 接口配置 ---
  15. board_build.flash_mode = qio ; Flash 用 QIO
  16. board_build.arduino.memory_type = qio_opi ; Flash QIO + PSRAM Octal
  17. board_build.psram_type = opi ; PSRAM 用 Octal mode
  18. ; --- 大小定义 ---
  19. board_upload.flash_size = 16MB
  20. board_upload.maximum_size = 16777216 ; 一定要和 16MB 对齐
  21. board_build.partitions = default_16MB.csv ; 用 16MB 分区表
  22. ; --- 启用 PSRAM 宏 ---
  23. board_build.extra_flags = -DBOARD_HAS_PSRAM -DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=1
  24. ; --- 启用蓝牙功能 ---
  25. build_flags =
  26. -DCONFIG_BT_NIMBLE_ENABLED=1
  27. -DCONFIG_BT_ENABLED=1
  28. lib_deps =
  29. h2zero/NimBLE-Arduino @ ^1.4.1
  30. ; --- 串口监视器配置 ---
  31. monitor_speed = 115200 ; 设置串口监视器波特率
  32. monitor_filters = esp32_exception_decoder ; 启用 ESP32 异常解码器