[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino

;在搜索库依赖关系时使用 "深度+" 模式
lib_ldf_mode = deep+
board_build.partitions = default_16MB.csv
;8MB PSRAM的运行模式qio用于配置FLASH模式,后面的opi用于配置PSRAM的模式
board_build.arduino.memory_type = qio_opi
;用于指示编译器当前的目标设备是否具有 PSRAM
build_flags = -DBOARD_HAS_PSRAM
;			  -mfix-esp32-psram-cache-issue
; Flash大小
board_upload.flash_size = 16MB
board_build.filesystem = littlefs
lib_deps =
	arduino-libraries/ArduinoHttpClient @ ^0.6.1
	esphome/ESP32-audioI2S@^2.0.7
	agdl/Base64@^1.0.2
	bblanchon/ArduinoJson @ ^7.3.0
	gilmaimon/ArduinoWebsockets @ ^0.5.4

注:上述代码我添加时platformIO提示编码错误,将中文注释删除后正常运行

测试代码

#include <Arduino.h>
 
 
 
void setup() {
 
 
  Serial0.begin(115200);
 
  Serial0.printf("Deafult free size: %d\n", heap_caps_get_free_size(MALLOC_CAP_DEFAULT));
  Serial0.printf("PSRAM free size: %d\n", heap_caps_get_free_size(MALLOC_CAP_SPIRAM));
  
}
 
 
 
void loop() {
 
  vTaskDelay(100);
  Serial0.printf("Deafult free size: %d\n", heap_caps_get_free_size(MALLOC_CAP_DEFAULT));
  Serial0.printf("PSRAM free size: %d\n", heap_caps_get_free_size(MALLOC_CAP_SPIRAM));
 
}