记录一下esp32S3使用PlatformIO开发的常用配置
指定板子型号,开发框架
[env:esp32-s3-devkitc-1] platform = espressif32 board = esp32-s3-devkitc-1 framework = arduino
设置8M flash
board_build.arduino.partitions = default_8MB.csv board_upload.flash_size = 8MB board_build.flash_mode = dio
开启PSRAM,并设置C++20
build_unflags = -std=gnu++11 board_build.arduino.memory_type = qio_opi build_flags = -DBOARD_HAS_PSRAM -std=gnu++2a -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE -DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=1
其中,
board_build.arduino.memory_type
根据PARAM大小设置,如果使用2MB大小,则设置为qio_qspi
;如果大小为8MB,则设置为qio_opi
。开启串口监视器解码esp32异常栈 ,显示时间 ,显示debug信息等
monitor_filters = esp32_exception_decoder, time, debug
完整版:
[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
board_build.arduino.partitions = default_8MB.csv
board_upload.flash_size = 8MB
board_build.flash_mode = dio
build_unflags = -std=gnu++11
board_build.arduino.memory_type = qio_opi
build_flags =
-DBOARD_HAS_PSRAM
-std=gnu++2a
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
# 串口监视器 解码esp32异常栈 ,显示时间 ,显示debug信息
monitor_filters = esp32_exception_decoder, time, debug