From 85e56a6678bb6bb50bbdea5c1bf6893eddee9f90 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Tue, 4 Oct 2022 14:35:54 +0200 Subject: [PATCH] Add support for building for 16MB "TwilightLord" ESP32 - board definition - minimal changes to esp32mdevums (un-comment to use) --- boards/esp32_twilord.json | 38 ++++++++++++++++++++++++++++++++++++++ platformio.ini | 6 ++++-- 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 boards/esp32_twilord.json diff --git a/boards/esp32_twilord.json b/boards/esp32_twilord.json new file mode 100644 index 00000000..5bf0078d --- /dev/null +++ b/boards/esp32_twilord.json @@ -0,0 +1,38 @@ +{ +"build": { + "arduino": { + "ldscript": "esp32_out.ld" + }, + "core": "esp32", + "extra_flags": "-DARDUINO_ESP32_DEV", + "f_cpu": "240000000L", + "f_flash": "40000000L", + "flash_mode": "dio", + "mcu": "esp32", + "variant": "esp32", + "partitions": "partitions_16M.csv" +}, +"connectivity": [ + "wifi", + "bluetooth", + "ethernet", + "can" +], +"debug": { + "openocd_board": "esp-wroom-32.cfg" +}, +"frameworks": [ + "arduino", + "espidf" +], +"name": "TwilightLord-ESP32 16MB", +"upload": { + "flash_size": "16MB", + "maximum_ram_size": 327680, + "maximum_size": 16777216, + "require_upload_port": true, + "speed": 2000000 +}, +"url": "https://en.wikipedia.org/wiki/ESP32", +"vendor": "TwilightLord" +} diff --git a/platformio.ini b/platformio.ini index 49a79534..5c31b60a 100644 --- a/platformio.ini +++ b/platformio.ini @@ -470,7 +470,8 @@ board_build.f_flash = 80000000L board_build.flash_mode = dio [env:esp32mdevums] -board = esp32dev +board = esp32dev ;; standard ESP32 with 4MB Flash +;board = esp32_twilord ;; "TwilightLord" ESP32 with 16MB Flash platform = ${esp32.platform} upload_speed = 460800 ; or 921600 platform_packages = ${esp32.platform_packages} @@ -481,6 +482,7 @@ build_flags = ${common.build_flags_esp32} ;-D WLED_DISABLE_BROWNOUT_DET ; enable if you get "brownout detected" errors at startup -D ABL_MILLIAMPS_DEFAULT=1500 ; 850 not enough for 1024 leds -D WLED_MAX_USERMODS=8 ; default only 4-6 + -D ARDUINO_USB_CDC_ON_BOOT=0 ; needed for arduino-esp32 >=2.0.4 -D WLED_USE_MY_CONFIG ; include custom my_config.h -D USERMOD_AUDIOREACTIVE -D UM_AUDIOREACTIVE_USE_NEW_FFT ; use latest (upstream) FFTLib, instead of older library midified by blazoncek. Slightly faster, more accurate, needs 2KB RAM extra @@ -500,7 +502,7 @@ lib_deps = ${esp32.lib_deps} https://github.com/kosme/arduinoFFT#develop @ 1.9.2 ; used for USERMOD_AUDIOREACTIVE ; monitor_filters = esp32_exception_decoder ; used to show crash details board_build.partitions = ${esp32.default_partitions} -; board_build.partitions = tools/WLED_ESP32_16MB.csv +; board_build.partitions = tools/WLED_ESP32_16MB.csv ; for esp32_twilord with 16MB flash ; board_build.partitions = tools/WLED_ESP32-wrover_4MB.csv board_build.f_flash = 80000000L ; use full 80MHz speed for flash (default = 40Mhz) board_build.flash_mode = dio ; (dio = dual i/o; more compatible than qio = quad i/o)