From 2e5c932aeb930ccb94f980b159c8f68f242b4cd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Proch=C3=A1zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Fri, 19 Jan 2024 16:21:19 +0100 Subject: [PATCH 01/34] SPI - Allow detaching of some SPI pins without stopping SPI (#9117) * feature(spi): Allow detach of some SPI pins * fix(spi): Remove unnecessary check Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> * feat(spi): Rename CS pin to SS to match Arduino standard * fix(spi): Remove unnecessary checks * remove lock from spiAttackMISO --------- Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Co-authored-by: Me No Dev Co-authored-by: me-no-dev --- cores/esp32/esp32-hal-periman.c | 2 +- cores/esp32/esp32-hal-periman.h | 2 +- cores/esp32/esp32-hal-spi.c | 159 ++++++++++++++++++++------------ cores/esp32/esp32-hal-spi.h | 32 +++---- libraries/SPI/src/SPI.cpp | 16 ++-- 5 files changed, 124 insertions(+), 87 deletions(-) diff --git a/cores/esp32/esp32-hal-periman.c b/cores/esp32/esp32-hal-periman.c index 5c9c3ceccbd..dd3a2f32a21 100644 --- a/cores/esp32/esp32-hal-periman.c +++ b/cores/esp32/esp32-hal-periman.c @@ -78,7 +78,7 @@ const char* perimanGetTypeName(peripheral_bus_type_t type) { case ESP32_BUS_TYPE_SPI_MASTER_SCK: return "SPI_MASTER_SCK"; case ESP32_BUS_TYPE_SPI_MASTER_MISO: return "SPI_MASTER_MISO"; case ESP32_BUS_TYPE_SPI_MASTER_MOSI: return "SPI_MASTER_MOSI"; - case ESP32_BUS_TYPE_SPI_MASTER_CS: return "SPI_MASTER_CS"; + case ESP32_BUS_TYPE_SPI_MASTER_SS: return "SPI_MASTER_SS"; #endif #if SOC_SDMMC_HOST_SUPPORTED case ESP32_BUS_TYPE_SDMMC_CLK: return "SDMMC_CLK"; diff --git a/cores/esp32/esp32-hal-periman.h b/cores/esp32/esp32-hal-periman.h index 42833b4bab1..aa3de699502 100644 --- a/cores/esp32/esp32-hal-periman.h +++ b/cores/esp32/esp32-hal-periman.h @@ -77,7 +77,7 @@ typedef enum { ESP32_BUS_TYPE_SPI_MASTER_SCK, // IO is used as SPI master SCK pin ESP32_BUS_TYPE_SPI_MASTER_MISO, // IO is used as SPI master MISO pin ESP32_BUS_TYPE_SPI_MASTER_MOSI, // IO is used as SPI master MOSI pin - ESP32_BUS_TYPE_SPI_MASTER_CS, // IO is used as SPI master CS pin + ESP32_BUS_TYPE_SPI_MASTER_SS, // IO is used as SPI master SS pin #endif #if SOC_SDMMC_HOST_SUPPORTED ESP32_BUS_TYPE_SDMMC_CLK, // IO is used as SDMMC CLK pin diff --git a/cores/esp32/esp32-hal-spi.c b/cores/esp32/esp32-hal-spi.c index 4388d0d60c9..26cb5c873ee 100644 --- a/cores/esp32/esp32-hal-spi.c +++ b/cores/esp32/esp32-hal-spi.c @@ -177,36 +177,65 @@ static spi_t _spi_bus_array[] = { static bool spiDetachBus(void * bus){ uint8_t spi_num = (int)bus - 1; spi_t * spi = &_spi_bus_array[spi_num]; - if(spi->dev->clock.val != 0){ - log_d("Stopping SPI BUS"); + + if(spi->dev->clock.val == 0){ + log_d("SPI bus already stopped"); + return true; + } + else if(spi->sck == -1 || (spi->miso == -1 && spi->mosi == -1)){ + log_d("Stopping SPI bus"); spiStopBus(spi); + + spiDetachSCK(spi); + spiDetachMISO(spi); + spiDetachMOSI(spi); + spiDetachSS(spi); + spi = NULL; + return true; } + return true; +} + +static bool spiDetachBus_SCK(void * bus){ + uint8_t spi_num = (int)bus - 1; + spi_t * spi = &_spi_bus_array[spi_num]; if(spi->sck != -1){ - log_d("SPI detach SCK pin %d",spi->sck); - spiDetachSCK(spi,spi->sck); + spiDetachSCK(spi); + spiDetachBus(bus); } + return true; +} + +static bool spiDetachBus_MISO(void * bus){ + uint8_t spi_num = (int)bus - 1; + spi_t * spi = &_spi_bus_array[spi_num]; if(spi->miso != -1){ - log_d("SPI detach MISO pin %d",spi->miso); - spiDetachMISO(spi,spi->miso); + spiDetachMISO(spi); + spiDetachBus(bus); } + return true; +} + +static bool spiDetachBus_MOSI(void * bus){ + uint8_t spi_num = (int)bus - 1; + spi_t * spi = &_spi_bus_array[spi_num]; if(spi->mosi != -1){ - log_d("SPI detach MOSI pin %d",spi->mosi); - spiDetachMOSI(spi,spi->mosi); + spiDetachMOSI(spi); + spiDetachBus(bus); } + return true; +} + +static bool spiDetachBus_SS(void * bus){ + uint8_t spi_num = (int)bus - 1; + spi_t * spi = &_spi_bus_array[spi_num]; if(spi->ss != -1){ - log_d("SPI detach SS pin %d",spi->ss); - spiDetachSS(spi,spi->ss); + spiDetachSS(spi); + spiDetachBus(bus); } - //set SPI to NULL, as all pins are already detached - if(spi->sck == -1 && spi->miso == -1 && spi->mosi == -1 && spi->ss == -1){ - log_d("Set spi handle to NULL"); - spi = NULL; - return true; - } - return false; + return true; } - bool spiAttachSCK(spi_t * spi, int8_t sck) { if(!spi || sck < 0) { @@ -220,7 +249,7 @@ bool spiAttachSCK(spi_t * spi, int8_t sck) pinMatrixOutAttach(sck, SPI_CLK_IDX(spi->num), false, false); spi->sck = sck; if(!perimanSetPinBus(sck, ESP32_BUS_TYPE_SPI_MASTER_SCK, (void *)(spi->num+1), spi->num, -1)){ - spiDetachBus((void *)(spi->num+1)); + spiDetachBus_SCK((void *)(spi->num+1)); log_e("Failed to set pin bus to SPI for pin %d", sck); return false; } @@ -236,13 +265,11 @@ bool spiAttachMISO(spi_t * spi, int8_t miso) if(bus != NULL && !perimanClearPinBus(miso)){ return false; } - SPI_MUTEX_LOCK(); pinMode(miso, INPUT); pinMatrixInAttach(miso, SPI_MISO_IDX(spi->num), false); spi->miso = miso; - SPI_MUTEX_UNLOCK(); if(!perimanSetPinBus(miso, ESP32_BUS_TYPE_SPI_MASTER_MISO, (void *)(spi->num+1), spi->num, -1)){ - spiDetachBus((void *)(spi->num+1)); + spiDetachBus_MISO((void *)(spi->num+1)); log_e("Failed to set pin bus to SPI for pin %d", miso); return false; } @@ -262,102 +289,114 @@ bool spiAttachMOSI(spi_t * spi, int8_t mosi) pinMatrixOutAttach(mosi, SPI_MOSI_IDX(spi->num), false, false); spi->mosi = mosi; if(!perimanSetPinBus(mosi, ESP32_BUS_TYPE_SPI_MASTER_MOSI, (void *)(spi->num+1), spi->num, -1)){ - spiDetachBus((void *)(spi->num+1)); + spiDetachBus_MOSI((void *)(spi->num+1)); log_e("Failed to set pin bus to SPI for pin %d", mosi); return false; } return true; } -bool spiDetachSCK(spi_t * spi, int8_t sck) +bool spiDetachSCK(spi_t * spi) { - if(!spi || sck < 0) { + if(!spi) { return false; } - pinMatrixOutDetach(sck, false, false); - spi->sck = -1; - perimanClearPinBus(sck); + int8_t sck = spi->sck; + if(sck != -1) { + pinMatrixOutDetach(sck, false, false); + spi->sck = -1; + perimanClearPinBus(sck); + } return true; } -bool spiDetachMISO(spi_t * spi, int8_t miso) +bool spiDetachMISO(spi_t * spi) { - if(!spi || miso < 0) { + if(!spi) { return false; } - pinMatrixInDetach(SPI_MISO_IDX(spi->num), false, false); - spi->miso = -1; - perimanClearPinBus(miso); + int8_t miso = spi->miso; + if(miso != -1) { + pinMatrixInDetach(SPI_MISO_IDX(spi->num), false, false); + spi->miso = -1; + perimanClearPinBus(miso); + } return true; } -bool spiDetachMOSI(spi_t * spi, int8_t mosi) +bool spiDetachMOSI(spi_t * spi) { - if(!spi || mosi < 0) { + if(!spi) { return false; } - pinMatrixOutDetach(mosi, false, false); - spi->mosi = -1; - perimanClearPinBus(mosi); + int8_t mosi = spi->mosi; + if(mosi != -1) { + pinMatrixOutDetach(mosi, false, false); + spi->mosi = -1; + perimanClearPinBus(mosi); + } return true; } -bool spiAttachSS(spi_t * spi, uint8_t cs_num, int8_t ss) +bool spiAttachSS(spi_t * spi, uint8_t ss_num, int8_t ss) { - if(!spi || ss < 0 || cs_num > 2) { + if(!spi || ss < 0 || ss_num > 2) { return false; } - void * bus = perimanGetPinBus(ss, ESP32_BUS_TYPE_SPI_MASTER_CS); + void * bus = perimanGetPinBus(ss, ESP32_BUS_TYPE_SPI_MASTER_SS); if(bus != NULL && !perimanClearPinBus(ss)){ return false; } pinMode(ss, OUTPUT); - pinMatrixOutAttach(ss, SPI_SS_IDX(spi->num, cs_num), false, false); - spiEnableSSPins(spi, (1 << cs_num)); + pinMatrixOutAttach(ss, SPI_SS_IDX(spi->num, ss_num), false, false); + spiEnableSSPins(spi, (1 << ss_num)); spi->ss = ss; - if(!perimanSetPinBus(ss, ESP32_BUS_TYPE_SPI_MASTER_CS, (void *)(spi->num+1), spi->num, -1)){ - spiDetachBus((void *)(spi->num+1)); + if(!perimanSetPinBus(ss, ESP32_BUS_TYPE_SPI_MASTER_SS, (void *)(spi->num+1), spi->num, -1)){ + spiDetachBus_SS((void *)(spi->num+1)); log_e("Failed to set pin bus to SPI for pin %d", ss); return false; } return true; } -bool spiDetachSS(spi_t * spi, int8_t ss) +bool spiDetachSS(spi_t * spi) { - if(!spi || ss < 0) { + if(!spi) { return false; } - pinMatrixOutDetach(ss, false, false); - spi->ss = -1; - perimanClearPinBus(ss); + int8_t ss = spi->ss; + if(ss != -1) { + pinMatrixOutDetach(ss, false, false); + spi->ss = -1; + perimanClearPinBus(ss); + } return true; } -void spiEnableSSPins(spi_t * spi, uint8_t cs_mask) +void spiEnableSSPins(spi_t * spi, uint8_t ss_mask) { if(!spi) { return; } SPI_MUTEX_LOCK(); #if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 - spi->dev->misc.val &= ~(cs_mask & SPI_CS_MASK_ALL); + spi->dev->misc.val &= ~(ss_mask & SPI_SS_MASK_ALL); #else - spi->dev->pin.val &= ~(cs_mask & SPI_CS_MASK_ALL); + spi->dev->pin.val &= ~(ss_mask & SPI_SS_MASK_ALL); #endif SPI_MUTEX_UNLOCK(); } -void spiDisableSSPins(spi_t * spi, uint8_t cs_mask) +void spiDisableSSPins(spi_t * spi, uint8_t ss_mask) { if(!spi) { return; } SPI_MUTEX_LOCK(); #if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 - spi->dev->misc.val |= (cs_mask & SPI_CS_MASK_ALL); + spi->dev->misc.val |= (ss_mask & SPI_SS_MASK_ALL); #else - spi->dev->pin.val |= (cs_mask & SPI_CS_MASK_ALL); + spi->dev->pin.val |= (ss_mask & SPI_SS_MASK_ALL); #endif SPI_MUTEX_UNLOCK(); } @@ -578,10 +617,10 @@ spi_t * spiStartBus(uint8_t spi_num, uint32_t clockDiv, uint8_t dataMode, uint8_ return NULL; } - perimanSetBusDeinit(ESP32_BUS_TYPE_SPI_MASTER_SCK, spiDetachBus); - perimanSetBusDeinit(ESP32_BUS_TYPE_SPI_MASTER_MISO, spiDetachBus); - perimanSetBusDeinit(ESP32_BUS_TYPE_SPI_MASTER_MOSI, spiDetachBus); - perimanSetBusDeinit(ESP32_BUS_TYPE_SPI_MASTER_CS, spiDetachBus); + perimanSetBusDeinit(ESP32_BUS_TYPE_SPI_MASTER_SCK, spiDetachBus_SCK); + perimanSetBusDeinit(ESP32_BUS_TYPE_SPI_MASTER_MISO, spiDetachBus_MISO); + perimanSetBusDeinit(ESP32_BUS_TYPE_SPI_MASTER_MOSI, spiDetachBus_MOSI); + perimanSetBusDeinit(ESP32_BUS_TYPE_SPI_MASTER_SS, spiDetachBus_SS); spi_t * spi = &_spi_bus_array[spi_num]; diff --git a/cores/esp32/esp32-hal-spi.h b/cores/esp32/esp32-hal-spi.h index 63ab88bcd33..2c0a6329dc9 100644 --- a/cores/esp32/esp32-hal-spi.h +++ b/cores/esp32/esp32-hal-spi.h @@ -54,10 +54,10 @@ extern "C" { #define SPI_MODE2 2 #define SPI_MODE3 3 -#define SPI_CS0 0 -#define SPI_CS1 1 -#define SPI_CS2 2 -#define SPI_CS_MASK_ALL 0x7 +#define SPI_SS0 0 +#define SPI_SS1 1 +#define SPI_SS2 2 +#define SPI_SS_MASK_ALL 0x7 #define SPI_LSBFIRST 0 #define SPI_MSBFIRST 1 @@ -72,25 +72,25 @@ void spiStopBus(spi_t * spi); bool spiAttachSCK(spi_t * spi, int8_t sck); bool spiAttachMISO(spi_t * spi, int8_t miso); bool spiAttachMOSI(spi_t * spi, int8_t mosi); -bool spiDetachSCK(spi_t * spi, int8_t sck); -bool spiDetachMISO(spi_t * spi, int8_t miso); -bool spiDetachMOSI(spi_t * spi, int8_t mosi); +bool spiDetachSCK(spi_t * spi); +bool spiDetachMISO(spi_t * spi); +bool spiDetachMOSI(spi_t * spi); -//Attach/Detach SS pin to SPI_CSx signal -bool spiAttachSS(spi_t * spi, uint8_t cs_num, int8_t ss); -bool spiDetachSS(spi_t * spi, int8_t ss); +//Attach/Detach SS pin to SPI_SSx signal +bool spiAttachSS(spi_t * spi, uint8_t ss_num, int8_t ss); +bool spiDetachSS(spi_t * spi); -//Enable/Disable SPI_CSx pins -void spiEnableSSPins(spi_t * spi, uint8_t cs_mask); -void spiDisableSSPins(spi_t * spi, uint8_t cs_mask); +//Enable/Disable SPI_SSx pins +void spiEnableSSPins(spi_t * spi, uint8_t ss_mask); +void spiDisableSSPins(spi_t * spi, uint8_t ss_mask); -//Enable/Disable hardware control of SPI_CSx pins +//Enable/Disable hardware control of SPI_SSx pins void spiSSEnable(spi_t * spi); void spiSSDisable(spi_t * spi); -//Activate enabled SPI_CSx pins +//Activate enabled SPI_SSx pins void spiSSSet(spi_t * spi); -//Deactivate enabled SPI_CSx pins +//Deactivate enabled SPI_SSx pins void spiSSClear(spi_t * spi); void spiWaitReady(spi_t * spi); diff --git a/libraries/SPI/src/SPI.cpp b/libraries/SPI/src/SPI.cpp index 251cc48c4fe..17142b38c60 100644 --- a/libraries/SPI/src/SPI.cpp +++ b/libraries/SPI/src/SPI.cpp @@ -124,15 +124,13 @@ void SPIClass::end() if(!_spi) { return; } - spiDetachSCK(_spi, _sck); - if(_miso >= 0){ - spiDetachMISO(_spi, _miso); - } - if(_mosi >= 0){ - spiDetachMOSI(_spi, _mosi); - } + spiDetachSCK(_spi); + spiDetachMISO(_spi); + spiDetachMOSI(_spi); setHwCs(false); - spiStopBus(_spi); + if(spiGetClockDiv(_spi) != 0) { + spiStopBus(_spi); + } _spi = NULL; } @@ -146,7 +144,7 @@ void SPIClass::setHwCs(bool use) spiSSEnable(_spi); } else if(!use && _use_hw_ss) { spiSSDisable(_spi); - spiDetachSS(_spi, _ss); + spiDetachSS(_spi); } _use_hw_ss = use; } From 9aae6f5ec2350eb41aee90863a2cef3ddbef88a2 Mon Sep 17 00:00:00 2001 From: Stefan Oberhumer Date: Fri, 19 Jan 2024 16:21:50 +0100 Subject: [PATCH 02/34] change(MD5Builder): Const-correctness. (#9104) * change(HashBuilder): Const-correctness Propagate 'const' of buffer variable from underlying functions. * Remove char* methods --------- Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> --- cores/esp32/HashBuilder.h | 12 ++---------- cores/esp32/MD5Builder.cpp | 2 +- cores/esp32/MD5Builder.h | 2 +- cores/esp32/SHA1Builder.cpp | 2 +- cores/esp32/SHA1Builder.h | 2 +- 5 files changed, 6 insertions(+), 14 deletions(-) diff --git a/cores/esp32/HashBuilder.h b/cores/esp32/HashBuilder.h index ce6f1f1af42..86013bd65a2 100644 --- a/cores/esp32/HashBuilder.h +++ b/cores/esp32/HashBuilder.h @@ -26,14 +26,10 @@ class HashBuilder : public HEXBuilder virtual ~HashBuilder() {} virtual void begin() = 0; - virtual void add(uint8_t* data, size_t len) = 0; + virtual void add(const uint8_t* data, size_t len) = 0; virtual void add(const char* data) { - add((uint8_t*)data, strlen(data)); - } - virtual void add(char* data) - { - add((const char*)data); + add((const uint8_t*)data, strlen(data)); } virtual void add(String data) { @@ -41,10 +37,6 @@ class HashBuilder : public HEXBuilder } virtual void addHexString(const char* data) = 0; - virtual void addHexString(char* data) - { - addHexString((const char*)data); - } virtual void addHexString(String data) { addHexString(data.c_str()); diff --git a/cores/esp32/MD5Builder.cpp b/cores/esp32/MD5Builder.cpp index 2198d06a27e..f27b2dc7846 100644 --- a/cores/esp32/MD5Builder.cpp +++ b/cores/esp32/MD5Builder.cpp @@ -27,7 +27,7 @@ void MD5Builder::begin(void) esp_rom_md5_init(&_ctx); } -void MD5Builder::add(uint8_t * data, size_t len) +void MD5Builder::add(const uint8_t * data, size_t len) { esp_rom_md5_update(&_ctx, data, len); } diff --git a/cores/esp32/MD5Builder.h b/cores/esp32/MD5Builder.h index 25dd8c49ec9..70f23cebb05 100644 --- a/cores/esp32/MD5Builder.h +++ b/cores/esp32/MD5Builder.h @@ -38,7 +38,7 @@ class MD5Builder : public HashBuilder void begin(void) override; using HashBuilder::add; - void add(uint8_t * data, size_t len) override; + void add(const uint8_t * data, size_t len) override; using HashBuilder::addHexString; void addHexString(const char * data) override; diff --git a/cores/esp32/SHA1Builder.cpp b/cores/esp32/SHA1Builder.cpp index 34f93271321..0f67d1086fd 100644 --- a/cores/esp32/SHA1Builder.cpp +++ b/cores/esp32/SHA1Builder.cpp @@ -230,7 +230,7 @@ void SHA1Builder::begin(void) memset(hash, 0x00, sizeof(hash)); } -void SHA1Builder::add(uint8_t* data, size_t len) +void SHA1Builder::add(const uint8_t* data, size_t len) { size_t fill; uint32_t left; diff --git a/cores/esp32/SHA1Builder.h b/cores/esp32/SHA1Builder.h index 4a0dfe0c100..2ab876f6411 100644 --- a/cores/esp32/SHA1Builder.h +++ b/cores/esp32/SHA1Builder.h @@ -36,7 +36,7 @@ class SHA1Builder : public HashBuilder void begin() override; using HashBuilder::add; - void add(uint8_t* data, size_t len) override; + void add(const uint8_t* data, size_t len) override; using HashBuilder::addHexString; void addHexString(const char* data) override; From a1c86ae936c06fd1d7b193986152464cdd4db2ad Mon Sep 17 00:00:00 2001 From: Sean Kwok <45260108+Gitshaoxiang@users.noreply.github.com> Date: Fri, 19 Jan 2024 23:22:11 +0800 Subject: [PATCH 03/34] update m5stack boards define (#9086) * update m5stack boards define * update pins define * add M5Dial Board * build.board modify uppercase --- boards.txt | 5439 +++++++++++++---- ...m5stack_partitions_16MB_factory_4_apps.csv | 0 ...m5stack_partitions_16MB_factory_6_apps.csv | 0 variants/m5stack_atom/pins_arduino.h | 4 +- variants/m5stack_atoms3/pins_arduino.h | 9 +- variants/m5stack_capsule/pins_arduino.h | 51 + variants/m5stack_cardputer/pins_arduino.h | 53 + .../pins_arduino.h | 0 variants/m5stack_cores3/pins_arduino.h | 10 +- variants/m5stack_dial/pins_arduino.h | 53 + variants/m5stack_fire/pins_arduino.h | 3 - variants/m5stack_paper/pins_arduino.h | 48 + variants/m5stack_poe_cam/pins_arduino.h | 48 + variants/m5stack_stamp_c3/pins_arduino.h | 24 + variants/m5stack_stamp_pico/pins_arduino.h | 12 +- variants/m5stack_stamp_s3/pins_arduino.h | 12 +- .../pins_arduino.h | 3 - variants/m5stack_stickc_plus/pins_arduino.h | 33 + variants/m5stack_stickc_plus2/pins_arduino.h | 33 + variants/m5stack_timer_cam/pins_arduino.h | 1 - variants/m5stack_tough/pins_arduino.h | 52 + variants/m5stack_unit_cam/pins_arduino.h | 50 + variants/m5stack_unit_cams3/pins_arduino.h | 52 + 23 files changed, 4641 insertions(+), 1349 deletions(-) rename variants/m5stack_cores3/partitions_16MB_factory_4_apps.csv => tools/partitions/m5stack_partitions_16MB_factory_4_apps.csv (100%) rename variants/m5stack_cores3/partitions_16MB_factory_6_apps.csv => tools/partitions/m5stack_partitions_16MB_factory_6_apps.csv (100%) create mode 100644 variants/m5stack_capsule/pins_arduino.h create mode 100644 variants/m5stack_cardputer/pins_arduino.h rename variants/{m5stack_core_esp32 => m5stack_core}/pins_arduino.h (100%) create mode 100644 variants/m5stack_dial/pins_arduino.h create mode 100644 variants/m5stack_paper/pins_arduino.h create mode 100644 variants/m5stack_poe_cam/pins_arduino.h create mode 100644 variants/m5stack_stamp_c3/pins_arduino.h rename variants/{m5stick_c => m5stack_stickc}/pins_arduino.h (92%) create mode 100644 variants/m5stack_stickc_plus/pins_arduino.h create mode 100644 variants/m5stack_stickc_plus2/pins_arduino.h create mode 100644 variants/m5stack_tough/pins_arduino.h create mode 100644 variants/m5stack_unit_cam/pins_arduino.h create mode 100644 variants/m5stack_unit_cams3/pins_arduino.h diff --git a/boards.txt b/boards.txt index 7d99cc6ce34..9830c45d443 100644 --- a/boards.txt +++ b/boards.txt @@ -15638,1365 +15638,4156 @@ espino32.menu.EraseFlash.all.upload.erase_cmd=-e ############################################################## -m5stack-core-esp32.name=M5Stack-Core-ESP32 - -m5stack-core-esp32.bootloader.tool=esptool_py -m5stack-core-esp32.bootloader.tool.default=esptool_py - -m5stack-core-esp32.upload.tool=esptool_py -m5stack-core-esp32.upload.tool.default=esptool_py -m5stack-core-esp32.upload.tool.network=esp_ota - -m5stack-core-esp32.upload.maximum_size=1310720 -m5stack-core-esp32.upload.maximum_data_size=327680 -m5stack-core-esp32.upload.flags= -m5stack-core-esp32.upload.extra_flags= - -m5stack-core-esp32.serial.disableDTR=true -m5stack-core-esp32.serial.disableRTS=true - -m5stack-core-esp32.build.tarch=xtensa -m5stack-core-esp32.build.bootloader_addr=0x1000 -m5stack-core-esp32.build.target=esp32 -m5stack-core-esp32.build.mcu=esp32 -m5stack-core-esp32.build.core=esp32 -m5stack-core-esp32.build.variant=m5stack_core_esp32 -m5stack-core-esp32.build.board=M5Stack_Core_ESP32 - -m5stack-core-esp32.build.f_cpu=240000000L -m5stack-core-esp32.build.flash_size=4MB -m5stack-core-esp32.build.flash_mode=dio -m5stack-core-esp32.build.boot=dio -m5stack-core-esp32.build.partitions=default -m5stack-core-esp32.build.defines= - -m5stack-core-esp32.menu.FlashMode.qio=QIO -m5stack-core-esp32.menu.FlashMode.qio.build.flash_mode=dio -m5stack-core-esp32.menu.FlashMode.qio.build.boot=qio -m5stack-core-esp32.menu.FlashMode.dio=DIO -m5stack-core-esp32.menu.FlashMode.dio.build.flash_mode=dio -m5stack-core-esp32.menu.FlashMode.dio.build.boot=dio - -m5stack-core-esp32.menu.FlashFreq.80=80MHz -m5stack-core-esp32.menu.FlashFreq.80.build.flash_freq=80m -m5stack-core-esp32.menu.FlashFreq.40=40MHz -m5stack-core-esp32.menu.FlashFreq.40.build.flash_freq=40m - -m5stack-core-esp32.menu.PartitionScheme.default=Default -m5stack-core-esp32.menu.PartitionScheme.default.build.partitions=default -m5stack-core-esp32.menu.PartitionScheme.no_ota=No OTA (Large APP) -m5stack-core-esp32.menu.PartitionScheme.no_ota.build.partitions=no_ota -m5stack-core-esp32.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 -m5stack-core-esp32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA) -m5stack-core-esp32.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs -m5stack-core-esp32.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 - -m5stack-core-esp32.menu.UploadSpeed.921600=921600 -m5stack-core-esp32.menu.UploadSpeed.921600.upload.speed=921600 -m5stack-core-esp32.menu.UploadSpeed.115200=115200 -m5stack-core-esp32.menu.UploadSpeed.115200.upload.speed=115200 -m5stack-core-esp32.menu.UploadSpeed.256000.windows=256000 -m5stack-core-esp32.menu.UploadSpeed.256000.upload.speed=256000 -m5stack-core-esp32.menu.UploadSpeed.230400.windows.upload.speed=256000 -m5stack-core-esp32.menu.UploadSpeed.230400=230400 -m5stack-core-esp32.menu.UploadSpeed.230400.upload.speed=230400 -m5stack-core-esp32.menu.UploadSpeed.460800.linux=460800 -m5stack-core-esp32.menu.UploadSpeed.460800.macosx=460800 -m5stack-core-esp32.menu.UploadSpeed.460800.upload.speed=460800 -m5stack-core-esp32.menu.UploadSpeed.512000.windows=512000 -m5stack-core-esp32.menu.UploadSpeed.512000.upload.speed=512000 - -m5stack-core-esp32.menu.DebugLevel.none=None -m5stack-core-esp32.menu.DebugLevel.none.build.code_debug=0 -m5stack-core-esp32.menu.DebugLevel.error=Error -m5stack-core-esp32.menu.DebugLevel.error.build.code_debug=1 -m5stack-core-esp32.menu.DebugLevel.warn=Warn -m5stack-core-esp32.menu.DebugLevel.warn.build.code_debug=2 -m5stack-core-esp32.menu.DebugLevel.info=Info -m5stack-core-esp32.menu.DebugLevel.info.build.code_debug=3 -m5stack-core-esp32.menu.DebugLevel.debug=Debug -m5stack-core-esp32.menu.DebugLevel.debug.build.code_debug=4 -m5stack-core-esp32.menu.DebugLevel.verbose=Verbose -m5stack-core-esp32.menu.DebugLevel.verbose.build.code_debug=5 - -m5stack-core-esp32.menu.EraseFlash.none=Disabled -m5stack-core-esp32.menu.EraseFlash.none.upload.erase_cmd= -m5stack-core-esp32.menu.EraseFlash.all=Enabled -m5stack-core-esp32.menu.EraseFlash.all.upload.erase_cmd=-e +m5stack_core.name=M5Core + +m5stack_core.bootloader.tool=esptool_py +m5stack_core.bootloader.tool.default=esptool_py + +m5stack_core.upload.tool=esptool_py +m5stack_core.upload.tool.default=esptool_py +m5stack_core.upload.tool.network=esp_ota + +m5stack_core.upload.maximum_size=1310720 +m5stack_core.upload.maximum_data_size=327680 +m5stack_core.upload.flags= +m5stack_core.upload.extra_flags= + +m5stack_core.serial.disableDTR=true +m5stack_core.serial.disableRTS=true + +m5stack_core.build.tarch=xtensa +m5stack_core.build.bootloader_addr=0x1000 +m5stack_core.build.target=esp32 +m5stack_core.build.mcu=esp32 +m5stack_core.build.core=esp32 +m5stack_core.build.variant=m5stack_core +m5stack_core.build.board=M5STACK_CORE + +m5stack_core.build.f_cpu=240000000L +m5stack_core.build.flash_size=4MB +m5stack_core.build.flash_freq=80m +m5stack_core.build.flash_mode=dio +m5stack_core.build.boot=dio +m5stack_core.build.partitions=default +m5stack_core.build.defines= +m5stack_core.build.loop_core= +m5stack_core.build.event_core= + +m5stack_core.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +m5stack_core.menu.PartitionScheme.default.build.partitions=default +m5stack_core.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_core.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_core.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_core.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_core.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_core.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_core.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_core.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_core.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_core.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_core.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_core.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_core.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_core.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_core.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_core.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_core.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_core.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_core.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_core.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_core.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_core.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_core.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_core.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_core.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_core.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_core.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_core.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_core.menu.PartitionScheme.rainmaker=RainMaker +m5stack_core.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_core.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_core.menu.PartitionScheme.custom=Custom +m5stack_core.menu.PartitionScheme.custom.build.partitions= +m5stack_core.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_core.menu.CPUFreq.240=240MHz (WiFi/BT) +m5stack_core.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_core.menu.CPUFreq.160=160MHz (WiFi/BT) +m5stack_core.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_core.menu.CPUFreq.80=80MHz (WiFi/BT) +m5stack_core.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_core.menu.CPUFreq.40=40MHz (40MHz XTAL) +m5stack_core.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_core.menu.CPUFreq.26=26MHz (26MHz XTAL) +m5stack_core.menu.CPUFreq.26.build.f_cpu=26000000L +m5stack_core.menu.CPUFreq.20=20MHz (40MHz XTAL) +m5stack_core.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_core.menu.CPUFreq.13=13MHz (26MHz XTAL) +m5stack_core.menu.CPUFreq.13.build.f_cpu=13000000L +m5stack_core.menu.CPUFreq.10=10MHz (40MHz XTAL) +m5stack_core.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_core.menu.FlashMode.qio=QIO +m5stack_core.menu.FlashMode.qio.build.flash_mode=dio +m5stack_core.menu.FlashMode.qio.build.boot=qio +m5stack_core.menu.FlashMode.dio=DIO +m5stack_core.menu.FlashMode.dio.build.flash_mode=dio +m5stack_core.menu.FlashMode.dio.build.boot=dio +m5stack_core.menu.FlashMode.qout=QOUT +m5stack_core.menu.FlashMode.qout.build.flash_mode=dout +m5stack_core.menu.FlashMode.qout.build.boot=qout +m5stack_core.menu.FlashMode.dout=DOUT +m5stack_core.menu.FlashMode.dout.build.flash_mode=dout +m5stack_core.menu.FlashMode.dout.build.boot=dout + +m5stack_core.menu.FlashFreq.80=80MHz +m5stack_core.menu.FlashFreq.80.build.flash_freq=80m +m5stack_core.menu.FlashFreq.40=40MHz +m5stack_core.menu.FlashFreq.40.build.flash_freq=40m + +m5stack_core.menu.FlashSize.4M=4MB (32Mb) +m5stack_core.menu.FlashSize.4M.build.flash_size=4MB +m5stack_core.menu.FlashSize.16M=16MB (128Mb) +m5stack_core.menu.FlashSize.16M.build.flash_size=16MB + +m5stack_core.menu.UploadSpeed.1500000=1500000 +m5stack_core.menu.UploadSpeed.1500000.upload.speed=1500000 +m5stack_core.menu.UploadSpeed.921600=921600 +m5stack_core.menu.UploadSpeed.921600.upload.speed=921600 +m5stack_core.menu.UploadSpeed.115200=115200 +m5stack_core.menu.UploadSpeed.115200.upload.speed=115200 +m5stack_core.menu.UploadSpeed.256000.windows=256000 +m5stack_core.menu.UploadSpeed.256000.upload.speed=256000 +m5stack_core.menu.UploadSpeed.230400.windows.upload.speed=256000 +m5stack_core.menu.UploadSpeed.230400=230400 +m5stack_core.menu.UploadSpeed.230400.upload.speed=230400 +m5stack_core.menu.UploadSpeed.460800.linux=460800 +m5stack_core.menu.UploadSpeed.460800.macosx=460800 +m5stack_core.menu.UploadSpeed.460800.upload.speed=460800 +m5stack_core.menu.UploadSpeed.512000.windows=512000 +m5stack_core.menu.UploadSpeed.512000.upload.speed=512000 + +m5stack_core.menu.LoopCore.1=Core 1 +m5stack_core.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_core.menu.LoopCore.0=Core 0 +m5stack_core.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_core.menu.EventsCore.1=Core 1 +m5stack_core.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_core.menu.EventsCore.0=Core 0 +m5stack_core.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_core.menu.DebugLevel.none=None +m5stack_core.menu.DebugLevel.none.build.code_debug=0 +m5stack_core.menu.DebugLevel.error=Error +m5stack_core.menu.DebugLevel.error.build.code_debug=1 +m5stack_core.menu.DebugLevel.warn=Warn +m5stack_core.menu.DebugLevel.warn.build.code_debug=2 +m5stack_core.menu.DebugLevel.info=Info +m5stack_core.menu.DebugLevel.info.build.code_debug=3 +m5stack_core.menu.DebugLevel.debug=Debug +m5stack_core.menu.DebugLevel.debug.build.code_debug=4 +m5stack_core.menu.DebugLevel.verbose=Verbose +m5stack_core.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_core.menu.EraseFlash.none=Disabled +m5stack_core.menu.EraseFlash.none.upload.erase_cmd= +m5stack_core.menu.EraseFlash.all=Enabled +m5stack_core.menu.EraseFlash.all.upload.erase_cmd=-e ############################################################## -m5stack-fire.name=M5Stack-FIRE - -m5stack-fire.bootloader.tool=esptool_py -m5stack-fire.bootloader.tool.default=esptool_py - -m5stack-fire.upload.tool=esptool_py -m5stack-fire.upload.tool.default=esptool_py -m5stack-fire.upload.tool.network=esp_ota - -m5stack-fire.upload.maximum_size=6553600 -m5stack-fire.upload.maximum_data_size=4521984 -m5stack-fire.upload.flags= -m5stack-fire.upload.extra_flags= - -m5stack-fire.serial.disableDTR=true -m5stack-fire.serial.disableRTS=true - -m5stack-fire.build.tarch=xtensa -m5stack-fire.build.bootloader_addr=0x1000 -m5stack-fire.build.target=esp32 -m5stack-fire.build.mcu=esp32 -m5stack-fire.build.core=esp32 -m5stack-fire.build.variant=m5stack_fire -m5stack-fire.build.board=M5STACK_FIRE - -m5stack-fire.build.f_cpu=240000000L -m5stack-fire.build.flash_size=16MB -m5stack-fire.build.flash_freq=80m -m5stack-fire.build.flash_mode=dio -m5stack-fire.build.boot=dio -m5stack-fire.build.partitions=default_16MB -m5stack-fire.build.defines= - -m5stack-fire.menu.PSRAM.enabled=Enabled -m5stack-fire.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -m5stack-fire.menu.PSRAM.enabled.build.extra_libs= -m5stack-fire.menu.PSRAM.disabled=Disabled -m5stack-fire.menu.PSRAM.disabled.build.defines= -m5stack-fire.menu.PSRAM.disabled.build.extra_libs= - -m5stack-fire.menu.PartitionScheme.default=Default (2 x 6.5 MB app, 3.6 MB SPIFFS) -m5stack-fire.menu.PartitionScheme.default.build.partitions=default_16MB -m5stack-fire.menu.PartitionScheme.default.upload.maximum_size=6553600 -m5stack-fire.menu.PartitionScheme.large_spiffs=Large SPIFFS (7 MB) -m5stack-fire.menu.PartitionScheme.large_spiffs.build.partitions=large_spiffs_16MB -m5stack-fire.menu.PartitionScheme.large_spiffs.upload.maximum_size=4685824 - -m5stack-fire.menu.UploadSpeed.921600=921600 -m5stack-fire.menu.UploadSpeed.921600.upload.speed=921600 -m5stack-fire.menu.UploadSpeed.115200=115200 -m5stack-fire.menu.UploadSpeed.115200.upload.speed=115200 -m5stack-fire.menu.UploadSpeed.256000.windows=256000 -m5stack-fire.menu.UploadSpeed.256000.upload.speed=256000 -m5stack-fire.menu.UploadSpeed.230400.windows.upload.speed=256000 -m5stack-fire.menu.UploadSpeed.230400=230400 -m5stack-fire.menu.UploadSpeed.230400.upload.speed=230400 -m5stack-fire.menu.UploadSpeed.460800.linux=460800 -m5stack-fire.menu.UploadSpeed.460800.macosx=460800 -m5stack-fire.menu.UploadSpeed.460800.upload.speed=460800 -m5stack-fire.menu.UploadSpeed.512000.windows=512000 -m5stack-fire.menu.UploadSpeed.512000.upload.speed=512000 - -m5stack-fire.menu.DebugLevel.none=None -m5stack-fire.menu.DebugLevel.none.build.code_debug=0 -m5stack-fire.menu.DebugLevel.error=Error -m5stack-fire.menu.DebugLevel.error.build.code_debug=1 -m5stack-fire.menu.DebugLevel.warn=Warn -m5stack-fire.menu.DebugLevel.warn.build.code_debug=2 -m5stack-fire.menu.DebugLevel.info=Info -m5stack-fire.menu.DebugLevel.info.build.code_debug=3 -m5stack-fire.menu.DebugLevel.debug=Debug -m5stack-fire.menu.DebugLevel.debug.build.code_debug=4 -m5stack-fire.menu.DebugLevel.verbose=Verbose -m5stack-fire.menu.DebugLevel.verbose.build.code_debug=5 - -m5stack-fire.menu.EraseFlash.none=Disabled -m5stack-fire.menu.EraseFlash.none.upload.erase_cmd= -m5stack-fire.menu.EraseFlash.all=Enabled -m5stack-fire.menu.EraseFlash.all.upload.erase_cmd=-e +m5stack_fire.name=M5Fire + +m5stack_fire.bootloader.tool=esptool_py +m5stack_fire.bootloader.tool.default=esptool_py + +m5stack_fire.upload.tool=esptool_py +m5stack_fire.upload.tool.default=esptool_py +m5stack_fire.upload.tool.network=esp_ota + +m5stack_fire.upload.maximum_size=6553600 +m5stack_fire.upload.maximum_data_size=4521984 +m5stack_fire.upload.flags= +m5stack_fire.upload.extra_flags= + +m5stack_fire.serial.disableDTR=true +m5stack_fire.serial.disableRTS=true + +m5stack_fire.build.tarch=xtensa +m5stack_fire.build.bootloader_addr=0x1000 +m5stack_fire.build.target=esp32 +m5stack_fire.build.mcu=esp32 +m5stack_fire.build.core=esp32 +m5stack_fire.build.variant=m5stack_fire +m5stack_fire.build.board=M5STACK_FIRE + +m5stack_fire.build.f_cpu=240000000L +m5stack_fire.build.flash_size=16MB +m5stack_fire.build.flash_freq=80m +m5stack_fire.build.flash_mode=dio +m5stack_fire.build.boot=dio +m5stack_fire.build.partitions=default +m5stack_fire.build.defines= +m5stack_fire.build.loop_core= +m5stack_fire.build.event_core= + +m5stack_fire.menu.PSRAM.enabled=Enabled +m5stack_fire.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw +m5stack_fire.menu.PSRAM.enabled.build.extra_libs= +m5stack_fire.menu.PSRAM.disabled=Disabled +m5stack_fire.menu.PSRAM.disabled.build.defines= +m5stack_fire.menu.PSRAM.disabled.build.extra_libs= + +m5stack_fire.menu.PartitionScheme.default=Default (2 x 6.5 MB app, 3.6 MB SPIFFS) +m5stack_fire.menu.PartitionScheme.default.build.partitions=default_16MB +m5stack_fire.menu.PartitionScheme.default.upload.maximum_size=6553600 +m5stack_fire.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_fire.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_fire.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_fire.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_fire.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_fire.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_fire.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_fire.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_fire.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_fire.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_fire.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_fire.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_fire.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_fire.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_fire.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_fire.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_fire.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_fire.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_fire.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_fire.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_fire.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_fire.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_fire.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_fire.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_fire.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_fire.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_fire.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_fire.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_fire.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9.9MB FATFS) +m5stack_fire.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +m5stack_fire.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 +m5stack_fire.menu.PartitionScheme.rainmaker=RainMaker +m5stack_fire.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_fire.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_fire.menu.PartitionScheme.custom=Custom +m5stack_fire.menu.PartitionScheme.custom.build.partitions= +m5stack_fire.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_fire.menu.CPUFreq.240=240MHz (WiFi/BT) +m5stack_fire.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_fire.menu.CPUFreq.160=160MHz (WiFi/BT) +m5stack_fire.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_fire.menu.CPUFreq.80=80MHz (WiFi/BT) +m5stack_fire.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_fire.menu.CPUFreq.40=40MHz (40MHz XTAL) +m5stack_fire.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_fire.menu.CPUFreq.26=26MHz (26MHz XTAL) +m5stack_fire.menu.CPUFreq.26.build.f_cpu=26000000L +m5stack_fire.menu.CPUFreq.20=20MHz (40MHz XTAL) +m5stack_fire.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_fire.menu.CPUFreq.13=13MHz (26MHz XTAL) +m5stack_fire.menu.CPUFreq.13.build.f_cpu=13000000L +m5stack_fire.menu.CPUFreq.10=10MHz (40MHz XTAL) +m5stack_fire.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_fire.menu.FlashMode.qio=QIO +m5stack_fire.menu.FlashMode.qio.build.flash_mode=dio +m5stack_fire.menu.FlashMode.qio.build.boot=qio +m5stack_fire.menu.FlashMode.dio=DIO +m5stack_fire.menu.FlashMode.dio.build.flash_mode=dio +m5stack_fire.menu.FlashMode.dio.build.boot=dio +m5stack_fire.menu.FlashMode.qout=QOUT +m5stack_fire.menu.FlashMode.qout.build.flash_mode=dout +m5stack_fire.menu.FlashMode.qout.build.boot=qout +m5stack_fire.menu.FlashMode.dout=DOUT +m5stack_fire.menu.FlashMode.dout.build.flash_mode=dout +m5stack_fire.menu.FlashMode.dout.build.boot=dout + +m5stack_fire.menu.FlashFreq.80=80MHz +m5stack_fire.menu.FlashFreq.80.build.flash_freq=80m +m5stack_fire.menu.FlashFreq.40=40MHz +m5stack_fire.menu.FlashFreq.40.build.flash_freq=40m + +m5stack_fire.menu.FlashSize.16M=16MB (128Mb) +m5stack_fire.menu.FlashSize.16M.build.flash_size=16MB + +m5stack_fire.menu.UploadSpeed.1500000=1500000 +m5stack_fire.menu.UploadSpeed.1500000.upload.speed=1500000 +m5stack_fire.menu.UploadSpeed.921600=921600 +m5stack_fire.menu.UploadSpeed.921600.upload.speed=921600 +m5stack_fire.menu.UploadSpeed.115200=115200 +m5stack_fire.menu.UploadSpeed.115200.upload.speed=115200 +m5stack_fire.menu.UploadSpeed.256000.windows=256000 +m5stack_fire.menu.UploadSpeed.256000.upload.speed=256000 +m5stack_fire.menu.UploadSpeed.230400.windows.upload.speed=256000 +m5stack_fire.menu.UploadSpeed.230400=230400 +m5stack_fire.menu.UploadSpeed.230400.upload.speed=230400 +m5stack_fire.menu.UploadSpeed.460800.linux=460800 +m5stack_fire.menu.UploadSpeed.460800.macosx=460800 +m5stack_fire.menu.UploadSpeed.460800.upload.speed=460800 +m5stack_fire.menu.UploadSpeed.512000.windows=512000 +m5stack_fire.menu.UploadSpeed.512000.upload.speed=512000 + +m5stack_fire.menu.LoopCore.1=Core 1 +m5stack_fire.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_fire.menu.LoopCore.0=Core 0 +m5stack_fire.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_fire.menu.EventsCore.1=Core 1 +m5stack_fire.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_fire.menu.EventsCore.0=Core 0 +m5stack_fire.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_fire.menu.DebugLevel.none=None +m5stack_fire.menu.DebugLevel.none.build.code_debug=0 +m5stack_fire.menu.DebugLevel.error=Error +m5stack_fire.menu.DebugLevel.error.build.code_debug=1 +m5stack_fire.menu.DebugLevel.warn=Warn +m5stack_fire.menu.DebugLevel.warn.build.code_debug=2 +m5stack_fire.menu.DebugLevel.info=Info +m5stack_fire.menu.DebugLevel.info.build.code_debug=3 +m5stack_fire.menu.DebugLevel.debug=Debug +m5stack_fire.menu.DebugLevel.debug.build.code_debug=4 +m5stack_fire.menu.DebugLevel.verbose=Verbose +m5stack_fire.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_fire.menu.EraseFlash.none=Disabled +m5stack_fire.menu.EraseFlash.none.upload.erase_cmd= +m5stack_fire.menu.EraseFlash.all=Enabled +m5stack_fire.menu.EraseFlash.all.upload.erase_cmd=-e ############################################################## -m5stack-station.name=M5Stack-Station - -m5stack-station.bootloader.tool=esptool_py -m5stack-station.bootloader.tool.default=esptool_py - -m5stack-station.upload.tool=esptool_py -m5stack-station.upload.tool.default=esptool_py -m5stack-station.upload.tool.network=esp_ota - -m5stack-station.upload.maximum_size=6553600 -m5stack-station.upload.maximum_data_size=4521984 -m5stack-station.upload.flags= -m5stack-station.upload.extra_flags= - -m5stack-station.serial.disableDTR=true -m5stack-station.serial.disableRTS=true - -m5stack-station.build.tarch=xtensa -m5stack-station.build.bootloader_addr=0x1000 -m5stack-station.build.target=esp32 -m5stack-station.build.mcu=esp32 -m5stack-station.build.core=esp32 -m5stack-station.build.variant=m5stack_station -m5stack-station.build.board=M5Stack_Station - -m5stack-station.build.f_cpu=240000000L -m5stack-station.build.flash_size=16MB -m5stack-station.build.flash_freq=80m -m5stack-station.build.flash_mode=dio -m5stack-station.build.boot=dio -m5stack-station.build.partitions=default_16MB -m5stack-station.build.defines= - -m5stack-station.menu.PartitionScheme.default=Default -m5stack-station.menu.PartitionScheme.default.build.partitions=default_16MB -m5stack-station.menu.PartitionScheme.no_ota=No OTA (Large APP) -m5stack-station.menu.PartitionScheme.no_ota.build.partitions=no_ota -m5stack-station.menu.PartitionScheme.no_ota.upload.maximum_size=6553600 -m5stack-station.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA) -m5stack-station.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs -m5stack-station.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 - -m5stack-station.menu.CPUFreq.240=240MHz (WiFi/BT) -m5stack-station.menu.CPUFreq.240.build.f_cpu=240000000L -m5stack-station.menu.CPUFreq.160=160MHz (WiFi/BT) -m5stack-station.menu.CPUFreq.160.build.f_cpu=160000000L -m5stack-station.menu.CPUFreq.80=80MHz (WiFi/BT) -m5stack-station.menu.CPUFreq.80.build.f_cpu=80000000L -m5stack-station.menu.CPUFreq.40=40MHz (40MHz XTAL) -m5stack-station.menu.CPUFreq.40.build.f_cpu=40000000L -m5stack-station.menu.CPUFreq.26=26MHz (26MHz XTAL) -m5stack-station.menu.CPUFreq.26.build.f_cpu=26000000L -m5stack-station.menu.CPUFreq.20=20MHz (40MHz XTAL) -m5stack-station.menu.CPUFreq.20.build.f_cpu=20000000L -m5stack-station.menu.CPUFreq.13=13MHz (26MHz XTAL) -m5stack-station.menu.CPUFreq.13.build.f_cpu=13000000L -m5stack-station.menu.CPUFreq.10=10MHz (40MHz XTAL) -m5stack-station.menu.CPUFreq.10.build.f_cpu=10000000L - -m5stack-station.menu.UploadSpeed.1500000=1500000 -m5stack-station.menu.UploadSpeed.1500000.upload.speed=1500000 -m5stack-station.menu.UploadSpeed.750000=750000 -m5stack-station.menu.UploadSpeed.750000.upload.speed=750000 -m5stack-station.menu.UploadSpeed.500000=500000 -m5stack-station.menu.UploadSpeed.500000.upload.speed=500000 -m5stack-station.menu.UploadSpeed.250000=250000 -m5stack-station.menu.UploadSpeed.250000.upload.speed=250000 -m5stack-station.menu.UploadSpeed.115200=115200 -m5stack-station.menu.UploadSpeed.115200.upload.speed=115200 - -m5stack-station.menu.DebugLevel.none=None -m5stack-station.menu.DebugLevel.none.build.code_debug=0 -m5stack-station.menu.DebugLevel.error=Error -m5stack-station.menu.DebugLevel.error.build.code_debug=1 -m5stack-station.menu.DebugLevel.warn=Warn -m5stack-station.menu.DebugLevel.warn.build.code_debug=2 -m5stack-station.menu.DebugLevel.info=Info -m5stack-station.menu.DebugLevel.info.build.code_debug=3 -m5stack-station.menu.DebugLevel.debug=Debug -m5stack-station.menu.DebugLevel.debug.build.code_debug=4 -m5stack-station.menu.DebugLevel.verbose=Verbose -m5stack-station.menu.DebugLevel.verbose.build.code_debug=5 - -m5stack-station.menu.EraseFlash.none=Disabled -m5stack-station.menu.EraseFlash.none.upload.erase_cmd= -m5stack-station.menu.EraseFlash.all=Enabled -m5stack-station.menu.EraseFlash.all.upload.erase_cmd=-e +m5stack_core2.name=M5Core2 + +m5stack_core2.bootloader.tool=esptool_py +m5stack_core2.bootloader.tool.default=esptool_py + +m5stack_core2.upload.tool=esptool_py +m5stack_core2.upload.tool.default=esptool_py +m5stack_core2.upload.tool.network=esp_ota + +m5stack_core2.upload.maximum_size=6553600 +m5stack_core2.upload.maximum_data_size=4521984 +m5stack_core2.upload.flags= +m5stack_core2.upload.extra_flags= + +m5stack_core2.serial.disableDTR=true +m5stack_core2.serial.disableRTS=true + +m5stack_core2.build.tarch=xtensa +m5stack_core2.build.bootloader_addr=0x1000 +m5stack_core2.build.target=esp32 +m5stack_core2.build.mcu=esp32 +m5stack_core2.build.core=esp32 +m5stack_core2.build.variant=m5stack_core2 +m5stack_core2.build.board=M5STACK_CORE2 + +m5stack_core2.build.f_cpu=240000000L +m5stack_core2.build.flash_size=16MB +m5stack_core2.build.flash_freq=80m +m5stack_core2.build.flash_mode=dio +m5stack_core2.build.boot=dio +m5stack_core2.build.partitions=default +m5stack_core2.build.defines= +m5stack_core2.build.loop_core= +m5stack_core2.build.event_core= + +m5stack_core2.menu.PSRAM.enabled=Enabled +m5stack_core2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw +m5stack_core2.menu.PSRAM.enabled.build.extra_libs= +m5stack_core2.menu.PSRAM.disabled=Disabled +m5stack_core2.menu.PSRAM.disabled.build.defines= +m5stack_core2.menu.PSRAM.disabled.build.extra_libs= + +m5stack_core2.menu.PartitionScheme.default=Default (2 x 6.5 MB app, 3.6 MB SPIFFS) +m5stack_core2.menu.PartitionScheme.default.build.partitions=default_16MB +m5stack_core2.menu.PartitionScheme.default.upload.maximum_size=6553600 +m5stack_core2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_core2.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_core2.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_core2.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_core2.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_core2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_core2.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_core2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_core2.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_core2.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_core2.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_core2.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_core2.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_core2.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_core2.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_core2.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_core2.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_core2.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_core2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_core2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_core2.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_core2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_core2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_core2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_core2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_core2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_core2.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_core2.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_core2.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9.9MB FATFS) +m5stack_core2.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +m5stack_core2.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 +m5stack_core2.menu.PartitionScheme.rainmaker=RainMaker +m5stack_core2.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_core2.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_core2.menu.PartitionScheme.custom=Custom +m5stack_core2.menu.PartitionScheme.custom.build.partitions= +m5stack_core2.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_core2.menu.CPUFreq.240=240MHz (WiFi/BT) +m5stack_core2.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_core2.menu.CPUFreq.160=160MHz (WiFi/BT) +m5stack_core2.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_core2.menu.CPUFreq.80=80MHz (WiFi/BT) +m5stack_core2.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_core2.menu.CPUFreq.40=40MHz (40MHz XTAL) +m5stack_core2.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_core2.menu.CPUFreq.26=26MHz (26MHz XTAL) +m5stack_core2.menu.CPUFreq.26.build.f_cpu=26000000L +m5stack_core2.menu.CPUFreq.20=20MHz (40MHz XTAL) +m5stack_core2.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_core2.menu.CPUFreq.13=13MHz (26MHz XTAL) +m5stack_core2.menu.CPUFreq.13.build.f_cpu=13000000L +m5stack_core2.menu.CPUFreq.10=10MHz (40MHz XTAL) +m5stack_core2.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_core2.menu.FlashMode.qio=QIO +m5stack_core2.menu.FlashMode.qio.build.flash_mode=dio +m5stack_core2.menu.FlashMode.qio.build.boot=qio +m5stack_core2.menu.FlashMode.dio=DIO +m5stack_core2.menu.FlashMode.dio.build.flash_mode=dio +m5stack_core2.menu.FlashMode.dio.build.boot=dio +m5stack_core2.menu.FlashMode.qout=QOUT +m5stack_core2.menu.FlashMode.qout.build.flash_mode=dout +m5stack_core2.menu.FlashMode.qout.build.boot=qout +m5stack_core2.menu.FlashMode.dout=DOUT +m5stack_core2.menu.FlashMode.dout.build.flash_mode=dout +m5stack_core2.menu.FlashMode.dout.build.boot=dout + +m5stack_core2.menu.FlashFreq.80=80MHz +m5stack_core2.menu.FlashFreq.80.build.flash_freq=80m +m5stack_core2.menu.FlashFreq.40=40MHz +m5stack_core2.menu.FlashFreq.40.build.flash_freq=40m + +m5stack_core2.menu.FlashSize.16M=16MB (128Mb) +m5stack_core2.menu.FlashSize.16M.build.flash_size=16MB + +m5stack_core2.menu.UploadSpeed.1500000=1500000 +m5stack_core2.menu.UploadSpeed.1500000.upload.speed=1500000 +m5stack_core2.menu.UploadSpeed.921600=921600 +m5stack_core2.menu.UploadSpeed.921600.upload.speed=921600 +m5stack_core2.menu.UploadSpeed.115200=115200 +m5stack_core2.menu.UploadSpeed.115200.upload.speed=115200 +m5stack_core2.menu.UploadSpeed.256000.windows=256000 +m5stack_core2.menu.UploadSpeed.256000.upload.speed=256000 +m5stack_core2.menu.UploadSpeed.230400.windows.upload.speed=256000 +m5stack_core2.menu.UploadSpeed.230400=230400 +m5stack_core2.menu.UploadSpeed.230400.upload.speed=230400 +m5stack_core2.menu.UploadSpeed.460800.linux=460800 +m5stack_core2.menu.UploadSpeed.460800.macosx=460800 +m5stack_core2.menu.UploadSpeed.460800.upload.speed=460800 +m5stack_core2.menu.UploadSpeed.512000.windows=512000 +m5stack_core2.menu.UploadSpeed.512000.upload.speed=512000 + +m5stack_core2.menu.LoopCore.1=Core 1 +m5stack_core2.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_core2.menu.LoopCore.0=Core 0 +m5stack_core2.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_core2.menu.EventsCore.1=Core 1 +m5stack_core2.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_core2.menu.EventsCore.0=Core 0 +m5stack_core2.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_core2.menu.DebugLevel.none=None +m5stack_core2.menu.DebugLevel.none.build.code_debug=0 +m5stack_core2.menu.DebugLevel.error=Error +m5stack_core2.menu.DebugLevel.error.build.code_debug=1 +m5stack_core2.menu.DebugLevel.warn=Warn +m5stack_core2.menu.DebugLevel.warn.build.code_debug=2 +m5stack_core2.menu.DebugLevel.info=Info +m5stack_core2.menu.DebugLevel.info.build.code_debug=3 +m5stack_core2.menu.DebugLevel.debug=Debug +m5stack_core2.menu.DebugLevel.debug.build.code_debug=4 +m5stack_core2.menu.DebugLevel.verbose=Verbose +m5stack_core2.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_core2.menu.EraseFlash.none=Disabled +m5stack_core2.menu.EraseFlash.none.upload.erase_cmd= +m5stack_core2.menu.EraseFlash.all=Enabled +m5stack_core2.menu.EraseFlash.all.upload.erase_cmd=-e ############################################################## -m5stick-c.name=M5Stick-C - -m5stick-c.bootloader.tool=esptool_py -m5stick-c.bootloader.tool.default=esptool_py - -m5stick-c.upload.tool=esptool_py -m5stick-c.upload.tool.default=esptool_py -m5stick-c.upload.tool.network=esp_ota - -m5stick-c.upload.maximum_size=1310720 -m5stick-c.upload.maximum_data_size=327680 -m5stick-c.upload.flags= -m5stick-c.upload.extra_flags= - -m5stick-c.serial.disableDTR=true -m5stick-c.serial.disableRTS=true - -m5stick-c.build.tarch=xtensa -m5stick-c.build.bootloader_addr=0x1000 -m5stick-c.build.target=esp32 -m5stick-c.build.mcu=esp32 -m5stick-c.build.core=esp32 -m5stick-c.build.variant=m5stick_c -m5stick-c.build.board=M5Stick_C - -m5stick-c.build.f_cpu=240000000L -m5stick-c.build.flash_size=4MB -m5stick-c.build.flash_freq=80m -m5stick-c.build.flash_mode=dio -m5stick-c.build.boot=dio -m5stick-c.build.partitions=default -m5stick-c.build.defines= - -m5stick-c.menu.PartitionScheme.default=Default -m5stick-c.menu.PartitionScheme.default.build.partitions=default -m5stick-c.menu.PartitionScheme.no_ota=No OTA (Large APP) -m5stick-c.menu.PartitionScheme.no_ota.build.partitions=no_ota -m5stick-c.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 -m5stick-c.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA) -m5stick-c.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs -m5stick-c.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 - -m5stick-c.menu.UploadSpeed.1500000=1500000 -m5stick-c.menu.UploadSpeed.1500000.upload.speed=1500000 -m5stick-c.menu.UploadSpeed.750000=750000 -m5stick-c.menu.UploadSpeed.750000.upload.speed=750000 -m5stick-c.menu.UploadSpeed.500000=500000 -m5stick-c.menu.UploadSpeed.500000.upload.speed=500000 -m5stick-c.menu.UploadSpeed.250000=250000 -m5stick-c.menu.UploadSpeed.250000.upload.speed=250000 -m5stick-c.menu.UploadSpeed.115200=115200 -m5stick-c.menu.UploadSpeed.115200.upload.speed=115200 - -m5stick-c.menu.DebugLevel.none=None -m5stick-c.menu.DebugLevel.none.build.code_debug=0 -m5stick-c.menu.DebugLevel.error=Error -m5stick-c.menu.DebugLevel.error.build.code_debug=1 -m5stick-c.menu.DebugLevel.warn=Warn -m5stick-c.menu.DebugLevel.warn.build.code_debug=2 -m5stick-c.menu.DebugLevel.info=Info -m5stick-c.menu.DebugLevel.info.build.code_debug=3 -m5stick-c.menu.DebugLevel.debug=Debug -m5stick-c.menu.DebugLevel.debug.build.code_debug=4 -m5stick-c.menu.DebugLevel.verbose=Verbose -m5stick-c.menu.DebugLevel.verbose.build.code_debug=5 - -m5stick-c.menu.EraseFlash.none=Disabled -m5stick-c.menu.EraseFlash.none.upload.erase_cmd= -m5stick-c.menu.EraseFlash.all=Enabled -m5stick-c.menu.EraseFlash.all.upload.erase_cmd=-e +m5stack_tough.name=M5Tough + +m5stack_tough.bootloader.tool=esptool_py +m5stack_tough.bootloader.tool.default=esptool_py + +m5stack_tough.upload.tool=esptool_py +m5stack_tough.upload.tool.default=esptool_py +m5stack_tough.upload.tool.network=esp_ota + +m5stack_tough.upload.maximum_size=6553600 +m5stack_tough.upload.maximum_data_size=4521984 +m5stack_tough.upload.flags= +m5stack_tough.upload.extra_flags= + +m5stack_tough.serial.disableDTR=true +m5stack_tough.serial.disableRTS=true + +m5stack_tough.build.tarch=xtensa +m5stack_tough.build.bootloader_addr=0x1000 +m5stack_tough.build.target=esp32 +m5stack_tough.build.mcu=esp32 +m5stack_tough.build.core=esp32 +m5stack_tough.build.variant=m5stack_tough +m5stack_tough.build.board=M5STACK_TOUGH + +m5stack_tough.build.f_cpu=240000000L +m5stack_tough.build.flash_size=16MB +m5stack_tough.build.flash_freq=80m +m5stack_tough.build.flash_mode=dio +m5stack_tough.build.boot=dio +m5stack_tough.build.partitions=default +m5stack_tough.build.defines= +m5stack_tough.build.loop_core= +m5stack_tough.build.event_core= + +m5stack_tough.menu.PSRAM.enabled=Enabled +m5stack_tough.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw +m5stack_tough.menu.PSRAM.enabled.build.extra_libs= +m5stack_tough.menu.PSRAM.disabled=Disabled +m5stack_tough.menu.PSRAM.disabled.build.defines= +m5stack_tough.menu.PSRAM.disabled.build.extra_libs= + +m5stack_tough.menu.PartitionScheme.default=Default (2 x 6.5 MB app, 3.6 MB SPIFFS) +m5stack_tough.menu.PartitionScheme.default.build.partitions=default_16MB +m5stack_tough.menu.PartitionScheme.default.upload.maximum_size=6553600 +m5stack_tough.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_tough.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_tough.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_tough.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_tough.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_tough.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_tough.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_tough.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_tough.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_tough.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_tough.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_tough.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_tough.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_tough.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_tough.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_tough.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_tough.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_tough.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_tough.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_tough.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_tough.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_tough.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_tough.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_tough.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_tough.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_tough.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_tough.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_tough.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_tough.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9.9MB FATFS) +m5stack_tough.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +m5stack_tough.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 +m5stack_tough.menu.PartitionScheme.rainmaker=RainMaker +m5stack_tough.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_tough.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_tough.menu.PartitionScheme.custom=Custom +m5stack_tough.menu.PartitionScheme.custom.build.partitions= +m5stack_tough.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_tough.menu.CPUFreq.240=240MHz (WiFi/BT) +m5stack_tough.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_tough.menu.CPUFreq.160=160MHz (WiFi/BT) +m5stack_tough.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_tough.menu.CPUFreq.80=80MHz (WiFi/BT) +m5stack_tough.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_tough.menu.CPUFreq.40=40MHz (40MHz XTAL) +m5stack_tough.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_tough.menu.CPUFreq.26=26MHz (26MHz XTAL) +m5stack_tough.menu.CPUFreq.26.build.f_cpu=26000000L +m5stack_tough.menu.CPUFreq.20=20MHz (40MHz XTAL) +m5stack_tough.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_tough.menu.CPUFreq.13=13MHz (26MHz XTAL) +m5stack_tough.menu.CPUFreq.13.build.f_cpu=13000000L +m5stack_tough.menu.CPUFreq.10=10MHz (40MHz XTAL) +m5stack_tough.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_tough.menu.FlashMode.qio=QIO +m5stack_tough.menu.FlashMode.qio.build.flash_mode=dio +m5stack_tough.menu.FlashMode.qio.build.boot=qio +m5stack_tough.menu.FlashMode.dio=DIO +m5stack_tough.menu.FlashMode.dio.build.flash_mode=dio +m5stack_tough.menu.FlashMode.dio.build.boot=dio +m5stack_tough.menu.FlashMode.qout=QOUT +m5stack_tough.menu.FlashMode.qout.build.flash_mode=dout +m5stack_tough.menu.FlashMode.qout.build.boot=qout +m5stack_tough.menu.FlashMode.dout=DOUT +m5stack_tough.menu.FlashMode.dout.build.flash_mode=dout +m5stack_tough.menu.FlashMode.dout.build.boot=dout + +m5stack_tough.menu.FlashFreq.80=80MHz +m5stack_tough.menu.FlashFreq.80.build.flash_freq=80m +m5stack_tough.menu.FlashFreq.40=40MHz +m5stack_tough.menu.FlashFreq.40.build.flash_freq=40m + +m5stack_tough.menu.FlashSize.16M=16MB (128Mb) +m5stack_tough.menu.FlashSize.16M.build.flash_size=16MB + +m5stack_tough.menu.UploadSpeed.1500000=1500000 +m5stack_tough.menu.UploadSpeed.1500000.upload.speed=1500000 +m5stack_tough.menu.UploadSpeed.921600=921600 +m5stack_tough.menu.UploadSpeed.921600.upload.speed=921600 +m5stack_tough.menu.UploadSpeed.115200=115200 +m5stack_tough.menu.UploadSpeed.115200.upload.speed=115200 +m5stack_tough.menu.UploadSpeed.256000.windows=256000 +m5stack_tough.menu.UploadSpeed.256000.upload.speed=256000 +m5stack_tough.menu.UploadSpeed.230400.windows.upload.speed=256000 +m5stack_tough.menu.UploadSpeed.230400=230400 +m5stack_tough.menu.UploadSpeed.230400.upload.speed=230400 +m5stack_tough.menu.UploadSpeed.460800.linux=460800 +m5stack_tough.menu.UploadSpeed.460800.macosx=460800 +m5stack_tough.menu.UploadSpeed.460800.upload.speed=460800 +m5stack_tough.menu.UploadSpeed.512000.windows=512000 +m5stack_tough.menu.UploadSpeed.512000.upload.speed=512000 + +m5stack_tough.menu.LoopCore.1=Core 1 +m5stack_tough.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_tough.menu.LoopCore.0=Core 0 +m5stack_tough.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_tough.menu.EventsCore.1=Core 1 +m5stack_tough.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_tough.menu.EventsCore.0=Core 0 +m5stack_tough.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_tough.menu.DebugLevel.none=None +m5stack_tough.menu.DebugLevel.none.build.code_debug=0 +m5stack_tough.menu.DebugLevel.error=Error +m5stack_tough.menu.DebugLevel.error.build.code_debug=1 +m5stack_tough.menu.DebugLevel.warn=Warn +m5stack_tough.menu.DebugLevel.warn.build.code_debug=2 +m5stack_tough.menu.DebugLevel.info=Info +m5stack_tough.menu.DebugLevel.info.build.code_debug=3 +m5stack_tough.menu.DebugLevel.debug=Debug +m5stack_tough.menu.DebugLevel.debug.build.code_debug=4 +m5stack_tough.menu.DebugLevel.verbose=Verbose +m5stack_tough.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_tough.menu.EraseFlash.none=Disabled +m5stack_tough.menu.EraseFlash.none.upload.erase_cmd= +m5stack_tough.menu.EraseFlash.all=Enabled +m5stack_tough.menu.EraseFlash.all.upload.erase_cmd=-e ############################################################## -m5stack-atom.name=M5Stack-ATOM - -m5stack-atom.bootloader.tool=esptool_py -m5stack-atom.bootloader.tool.default=esptool_py - -m5stack-atom.upload.tool=esptool_py -m5stack-atom.upload.tool.default=esptool_py -m5stack-atom.upload.tool.network=esp_ota - -m5stack-atom.upload.maximum_size=1310720 -m5stack-atom.upload.maximum_data_size=327680 -m5stack-atom.upload.flags= -m5stack-atom.upload.extra_flags= - -m5stack-atom.serial.disableDTR=true -m5stack-atom.serial.disableRTS=true - -m5stack-atom.build.tarch=xtensa -m5stack-atom.build.bootloader_addr=0x1000 -m5stack-atom.build.target=esp32 -m5stack-atom.build.mcu=esp32 -m5stack-atom.build.core=esp32 -m5stack-atom.build.variant=m5stack_atom -m5stack-atom.build.board=M5Stack_ATOM - -m5stack-atom.build.f_cpu=240000000L -m5stack-atom.build.flash_size=4MB -m5stack-atom.build.flash_freq=80m -m5stack-atom.build.flash_mode=dio -m5stack-atom.build.boot=dio -m5stack-atom.build.partitions=default -m5stack-atom.build.defines= - -m5stack-atom.menu.LoopCore.1=Core 1 -m5stack-atom.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 -m5stack-atom.menu.LoopCore.0=Core 0 -m5stack-atom.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 - -m5stack-atom.menu.EventsCore.1=Core 1 -m5stack-atom.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 -m5stack-atom.menu.EventsCore.0=Core 0 -m5stack-atom.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 - -m5stack-atom.menu.PartitionScheme.default=Default -m5stack-atom.menu.PartitionScheme.default.build.partitions=default -m5stack-atom.menu.PartitionScheme.no_ota=No OTA (Large APP) -m5stack-atom.menu.PartitionScheme.no_ota.build.partitions=no_ota -m5stack-atom.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 -m5stack-atom.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA) -m5stack-atom.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs -m5stack-atom.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 - -m5stack-atom.menu.UploadSpeed.1500000=1500000 -m5stack-atom.menu.UploadSpeed.1500000.upload.speed=1500000 -m5stack-atom.menu.UploadSpeed.750000=750000 -m5stack-atom.menu.UploadSpeed.750000.upload.speed=750000 -m5stack-atom.menu.UploadSpeed.500000=500000 -m5stack-atom.menu.UploadSpeed.500000.upload.speed=500000 -m5stack-atom.menu.UploadSpeed.250000=250000 -m5stack-atom.menu.UploadSpeed.250000.upload.speed=250000 -m5stack-atom.menu.UploadSpeed.115200=115200 -m5stack-atom.menu.UploadSpeed.115200.upload.speed=115200 - -m5stack-atom.menu.DebugLevel.none=None -m5stack-atom.menu.DebugLevel.none.build.code_debug=0 -m5stack-atom.menu.DebugLevel.error=Error -m5stack-atom.menu.DebugLevel.error.build.code_debug=1 -m5stack-atom.menu.DebugLevel.warn=Warn -m5stack-atom.menu.DebugLevel.warn.build.code_debug=2 -m5stack-atom.menu.DebugLevel.info=Info -m5stack-atom.menu.DebugLevel.info.build.code_debug=3 -m5stack-atom.menu.DebugLevel.debug=Debug -m5stack-atom.menu.DebugLevel.debug.build.code_debug=4 -m5stack-atom.menu.DebugLevel.verbose=Verbose -m5stack-atom.menu.DebugLevel.verbose.build.code_debug=5 - -m5stack-atom.menu.EraseFlash.none=Disabled -m5stack-atom.menu.EraseFlash.none.upload.erase_cmd= -m5stack-atom.menu.EraseFlash.all=Enabled -m5stack-atom.menu.EraseFlash.all.upload.erase_cmd=-e +m5stack_station.name=M5Station + +m5stack_station.bootloader.tool=esptool_py +m5stack_station.bootloader.tool.default=esptool_py + +m5stack_station.upload.tool=esptool_py +m5stack_station.upload.tool.default=esptool_py +m5stack_station.upload.tool.network=esp_ota + +m5stack_station.upload.maximum_size=6553600 +m5stack_station.upload.maximum_data_size=4521984 +m5stack_station.upload.flags= +m5stack_station.upload.extra_flags= + +m5stack_station.serial.disableDTR=true +m5stack_station.serial.disableRTS=true + +m5stack_station.build.tarch=xtensa +m5stack_station.build.bootloader_addr=0x1000 +m5stack_station.build.target=esp32 +m5stack_station.build.mcu=esp32 +m5stack_station.build.core=esp32 +m5stack_station.build.variant=m5stack_station +m5stack_station.build.board=M5STACK_STATION + +m5stack_station.build.f_cpu=240000000L +m5stack_station.build.flash_size=16MB +m5stack_station.build.flash_freq=80m +m5stack_station.build.flash_mode=dio +m5stack_station.build.boot=dio +m5stack_station.build.partitions=default +m5stack_station.build.defines= +m5stack_station.build.loop_core= +m5stack_station.build.event_core= + +m5stack_station.menu.PartitionScheme.default=Default (2 x 6.5 MB app, 3.6 MB SPIFFS) +m5stack_station.menu.PartitionScheme.default.build.partitions=default_16MB +m5stack_station.menu.PartitionScheme.default.upload.maximum_size=6553600 +m5stack_station.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_station.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_station.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_station.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_station.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_station.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_station.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_station.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_station.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_station.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_station.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_station.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_station.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_station.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_station.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_station.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_station.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_station.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_station.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_station.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_station.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_station.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_station.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_station.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_station.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_station.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_station.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_station.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_station.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9.9MB FATFS) +m5stack_station.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +m5stack_station.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 +m5stack_station.menu.PartitionScheme.rainmaker=RainMaker +m5stack_station.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_station.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_station.menu.PartitionScheme.custom=Custom +m5stack_station.menu.PartitionScheme.custom.build.partitions= +m5stack_station.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_station.menu.CPUFreq.240=240MHz (WiFi/BT) +m5stack_station.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_station.menu.CPUFreq.160=160MHz (WiFi/BT) +m5stack_station.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_station.menu.CPUFreq.80=80MHz (WiFi/BT) +m5stack_station.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_station.menu.CPUFreq.40=40MHz (40MHz XTAL) +m5stack_station.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_station.menu.CPUFreq.26=26MHz (26MHz XTAL) +m5stack_station.menu.CPUFreq.26.build.f_cpu=26000000L +m5stack_station.menu.CPUFreq.20=20MHz (40MHz XTAL) +m5stack_station.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_station.menu.CPUFreq.13=13MHz (26MHz XTAL) +m5stack_station.menu.CPUFreq.13.build.f_cpu=13000000L +m5stack_station.menu.CPUFreq.10=10MHz (40MHz XTAL) +m5stack_station.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_station.menu.FlashMode.qio=QIO +m5stack_station.menu.FlashMode.qio.build.flash_mode=dio +m5stack_station.menu.FlashMode.qio.build.boot=qio +m5stack_station.menu.FlashMode.dio=DIO +m5stack_station.menu.FlashMode.dio.build.flash_mode=dio +m5stack_station.menu.FlashMode.dio.build.boot=dio +m5stack_station.menu.FlashMode.qout=QOUT +m5stack_station.menu.FlashMode.qout.build.flash_mode=dout +m5stack_station.menu.FlashMode.qout.build.boot=qout +m5stack_station.menu.FlashMode.dout=DOUT +m5stack_station.menu.FlashMode.dout.build.flash_mode=dout +m5stack_station.menu.FlashMode.dout.build.boot=dout + +m5stack_station.menu.FlashFreq.80=80MHz +m5stack_station.menu.FlashFreq.80.build.flash_freq=80m +m5stack_station.menu.FlashFreq.40=40MHz +m5stack_station.menu.FlashFreq.40.build.flash_freq=40m + +m5stack_station.menu.FlashSize.16M=16MB (128Mb) +m5stack_station.menu.FlashSize.16M.build.flash_size=16MB + +m5stack_station.menu.UploadSpeed.1500000=1500000 +m5stack_station.menu.UploadSpeed.1500000.upload.speed=1500000 +m5stack_station.menu.UploadSpeed.921600=921600 +m5stack_station.menu.UploadSpeed.921600.upload.speed=921600 +m5stack_station.menu.UploadSpeed.115200=115200 +m5stack_station.menu.UploadSpeed.115200.upload.speed=115200 +m5stack_station.menu.UploadSpeed.256000.windows=256000 +m5stack_station.menu.UploadSpeed.256000.upload.speed=256000 +m5stack_station.menu.UploadSpeed.230400.windows.upload.speed=256000 +m5stack_station.menu.UploadSpeed.230400=230400 +m5stack_station.menu.UploadSpeed.230400.upload.speed=230400 +m5stack_station.menu.UploadSpeed.460800.linux=460800 +m5stack_station.menu.UploadSpeed.460800.macosx=460800 +m5stack_station.menu.UploadSpeed.460800.upload.speed=460800 +m5stack_station.menu.UploadSpeed.512000.windows=512000 +m5stack_station.menu.UploadSpeed.512000.upload.speed=512000 + +m5stack_station.menu.LoopCore.1=Core 1 +m5stack_station.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_station.menu.LoopCore.0=Core 0 +m5stack_station.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_station.menu.EventsCore.1=Core 1 +m5stack_station.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_station.menu.EventsCore.0=Core 0 +m5stack_station.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_station.menu.DebugLevel.none=None +m5stack_station.menu.DebugLevel.none.build.code_debug=0 +m5stack_station.menu.DebugLevel.error=Error +m5stack_station.menu.DebugLevel.error.build.code_debug=1 +m5stack_station.menu.DebugLevel.warn=Warn +m5stack_station.menu.DebugLevel.warn.build.code_debug=2 +m5stack_station.menu.DebugLevel.info=Info +m5stack_station.menu.DebugLevel.info.build.code_debug=3 +m5stack_station.menu.DebugLevel.debug=Debug +m5stack_station.menu.DebugLevel.debug.build.code_debug=4 +m5stack_station.menu.DebugLevel.verbose=Verbose +m5stack_station.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_station.menu.EraseFlash.none=Disabled +m5stack_station.menu.EraseFlash.none.upload.erase_cmd= +m5stack_station.menu.EraseFlash.all=Enabled +m5stack_station.menu.EraseFlash.all.upload.erase_cmd=-e ############################################################## -m5stack-atoms3.name=M5Stack-ATOMS3 -m5stack-atoms3.vid.0=0x303a -m5stack-atoms3.pid.0=0x1001 - -m5stack-atoms3.bootloader.tool=esptool_py -m5stack-atoms3.bootloader.tool.default=esptool_py - -m5stack-atoms3.upload.tool=esptool_py -m5stack-atoms3.upload.tool.default=esptool_py -m5stack-atoms3.upload.tool.network=esp_ota - -m5stack-atoms3.upload.maximum_size=1310720 -m5stack-atoms3.upload.maximum_data_size=327680 -m5stack-atoms3.upload.flags= -m5stack-atoms3.upload.extra_flags= -m5stack-atoms3.upload.use_1200bps_touch=false -m5stack-atoms3.upload.wait_for_upload_port=false - -m5stack-atoms3.serial.disableDTR=false -m5stack-atoms3.serial.disableRTS=false - -m5stack-atoms3.build.tarch=xtensa -m5stack-atoms3.build.bootloader_addr=0x0 -m5stack-atoms3.build.target=esp32s3 -m5stack-atoms3.build.mcu=esp32s3 -m5stack-atoms3.build.core=esp32 -m5stack-atoms3.build.variant=m5stack_atoms3 -m5stack-atoms3.build.board=M5Stack_ATOMS3 - -m5stack-atoms3.build.usb_mode=1 -m5stack-atoms3.build.cdc_on_boot=0 -m5stack-atoms3.build.msc_on_boot=0 -m5stack-atoms3.build.dfu_on_boot=0 -m5stack-atoms3.build.f_cpu=240000000L -m5stack-atoms3.build.flash_size=4MB -m5stack-atoms3.build.flash_freq=80m -m5stack-atoms3.build.flash_mode=dio -m5stack-atoms3.build.boot=qio -m5stack-atoms3.build.boot_freq=80m -m5stack-atoms3.build.partitions=default -m5stack-atoms3.build.defines= -m5stack-atoms3.build.loop_core= -m5stack-atoms3.build.event_core= -m5stack-atoms3.build.psram_type=qspi -m5stack-atoms3.build.memory_type={build.boot}_{build.psram_type} +m5stack_stickc.name=M5StickC + +m5stack_stickc.bootloader.tool=esptool_py +m5stack_stickc.bootloader.tool.default=esptool_py + +m5stack_stickc.upload.tool=esptool_py +m5stack_stickc.upload.tool.default=esptool_py +m5stack_stickc.upload.tool.network=esp_ota + +m5stack_stickc.upload.maximum_size=1310720 +m5stack_stickc.upload.maximum_data_size=327680 +m5stack_stickc.upload.flags= +m5stack_stickc.upload.extra_flags= + +m5stack_stickc.serial.disableDTR=true +m5stack_stickc.serial.disableRTS=true + +m5stack_stickc.build.tarch=xtensa +m5stack_stickc.build.bootloader_addr=0x1000 +m5stack_stickc.build.target=esp32 +m5stack_stickc.build.mcu=esp32 +m5stack_stickc.build.core=esp32 +m5stack_stickc.build.variant=m5stack_stickc +m5stack_stickc.build.board=M5STACK_STICKC + +m5stack_stickc.build.f_cpu=240000000L +m5stack_stickc.build.flash_size=4MB +m5stack_stickc.build.flash_freq=80m +m5stack_stickc.build.flash_mode=dio +m5stack_stickc.build.boot=dio +m5stack_stickc.build.partitions=huge_app +m5stack_stickc.build.defines= +m5stack_stickc.build.loop_core= +m5stack_stickc.build.event_core= + +m5stack_stickc.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_stickc.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_stickc.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_stickc.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +m5stack_stickc.menu.PartitionScheme.default.build.partitions=default +m5stack_stickc.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_stickc.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_stickc.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_stickc.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_stickc.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_stickc.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_stickc.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_stickc.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_stickc.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_stickc.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_stickc.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_stickc.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_stickc.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_stickc.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_stickc.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_stickc.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_stickc.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_stickc.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_stickc.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_stickc.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_stickc.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_stickc.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_stickc.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_stickc.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_stickc.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_stickc.menu.PartitionScheme.rainmaker=RainMaker +m5stack_stickc.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_stickc.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_stickc.menu.PartitionScheme.custom=Custom +m5stack_stickc.menu.PartitionScheme.custom.build.partitions= +m5stack_stickc.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_stickc.menu.CPUFreq.240=240MHz (WiFi/BT) +m5stack_stickc.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_stickc.menu.CPUFreq.160=160MHz (WiFi/BT) +m5stack_stickc.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_stickc.menu.CPUFreq.80=80MHz (WiFi/BT) +m5stack_stickc.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_stickc.menu.CPUFreq.40=40MHz (40MHz XTAL) +m5stack_stickc.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_stickc.menu.CPUFreq.26=26MHz (26MHz XTAL) +m5stack_stickc.menu.CPUFreq.26.build.f_cpu=26000000L +m5stack_stickc.menu.CPUFreq.20=20MHz (40MHz XTAL) +m5stack_stickc.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_stickc.menu.CPUFreq.13=13MHz (26MHz XTAL) +m5stack_stickc.menu.CPUFreq.13.build.f_cpu=13000000L +m5stack_stickc.menu.CPUFreq.10=10MHz (40MHz XTAL) +m5stack_stickc.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_stickc.menu.FlashMode.qio=QIO +m5stack_stickc.menu.FlashMode.qio.build.flash_mode=dio +m5stack_stickc.menu.FlashMode.qio.build.boot=qio +m5stack_stickc.menu.FlashMode.dio=DIO +m5stack_stickc.menu.FlashMode.dio.build.flash_mode=dio +m5stack_stickc.menu.FlashMode.dio.build.boot=dio +m5stack_stickc.menu.FlashMode.qout=QOUT +m5stack_stickc.menu.FlashMode.qout.build.flash_mode=dout +m5stack_stickc.menu.FlashMode.qout.build.boot=qout +m5stack_stickc.menu.FlashMode.dout=DOUT +m5stack_stickc.menu.FlashMode.dout.build.flash_mode=dout +m5stack_stickc.menu.FlashMode.dout.build.boot=dout + +m5stack_stickc.menu.FlashFreq.80=80MHz +m5stack_stickc.menu.FlashFreq.80.build.flash_freq=80m +m5stack_stickc.menu.FlashFreq.40=40MHz +m5stack_stickc.menu.FlashFreq.40.build.flash_freq=40m + +m5stack_stickc.menu.FlashSize.4M=4MB (32Mb) +m5stack_stickc.menu.FlashSize.4M.build.flash_size=4MB + +m5stack_stickc.menu.UploadSpeed.1500000=1500000 +m5stack_stickc.menu.UploadSpeed.1500000.upload.speed=1500000 +m5stack_stickc.menu.UploadSpeed.750000=750000 +m5stack_stickc.menu.UploadSpeed.750000.upload.speed=750000 +m5stack_stickc.menu.UploadSpeed.500000=500000 +m5stack_stickc.menu.UploadSpeed.500000.upload.speed=500000 +m5stack_stickc.menu.UploadSpeed.250000=250000 +m5stack_stickc.menu.UploadSpeed.250000.upload.speed=250000 +m5stack_stickc.menu.UploadSpeed.115200=115200 +m5stack_stickc.menu.UploadSpeed.115200.upload.speed=115200 + +m5stack_stickc.menu.LoopCore.1=Core 1 +m5stack_stickc.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_stickc.menu.LoopCore.0=Core 0 +m5stack_stickc.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_stickc.menu.EventsCore.1=Core 1 +m5stack_stickc.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_stickc.menu.EventsCore.0=Core 0 +m5stack_stickc.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_stickc.menu.DebugLevel.none=None +m5stack_stickc.menu.DebugLevel.none.build.code_debug=0 +m5stack_stickc.menu.DebugLevel.error=Error +m5stack_stickc.menu.DebugLevel.error.build.code_debug=1 +m5stack_stickc.menu.DebugLevel.warn=Warn +m5stack_stickc.menu.DebugLevel.warn.build.code_debug=2 +m5stack_stickc.menu.DebugLevel.info=Info +m5stack_stickc.menu.DebugLevel.info.build.code_debug=3 +m5stack_stickc.menu.DebugLevel.debug=Debug +m5stack_stickc.menu.DebugLevel.debug.build.code_debug=4 +m5stack_stickc.menu.DebugLevel.verbose=Verbose +m5stack_stickc.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_stickc.menu.EraseFlash.none=Disabled +m5stack_stickc.menu.EraseFlash.none.upload.erase_cmd= +m5stack_stickc.menu.EraseFlash.all=Enabled +m5stack_stickc.menu.EraseFlash.all.upload.erase_cmd=-e + +############################################################## + +m5stack_stickc_plus.name=M5StickCPlus + +m5stack_stickc_plus.bootloader.tool=esptool_py +m5stack_stickc_plus.bootloader.tool.default=esptool_py + +m5stack_stickc_plus.upload.tool=esptool_py +m5stack_stickc_plus.upload.tool.default=esptool_py +m5stack_stickc_plus.upload.tool.network=esp_ota + +m5stack_stickc_plus.upload.maximum_size=1310720 +m5stack_stickc_plus.upload.maximum_data_size=327680 +m5stack_stickc_plus.upload.flags= +m5stack_stickc_plus.upload.extra_flags= + +m5stack_stickc_plus.serial.disableDTR=true +m5stack_stickc_plus.serial.disableRTS=true + +m5stack_stickc_plus.build.tarch=xtensa +m5stack_stickc_plus.build.bootloader_addr=0x1000 +m5stack_stickc_plus.build.target=esp32 +m5stack_stickc_plus.build.mcu=esp32 +m5stack_stickc_plus.build.core=esp32 +m5stack_stickc_plus.build.variant=m5stack_stickc_plus +m5stack_stickc_plus.build.board=M5STACK_STICKC_PLUS + +m5stack_stickc_plus.build.f_cpu=240000000L +m5stack_stickc_plus.build.flash_size=4MB +m5stack_stickc_plus.build.flash_freq=80m +m5stack_stickc_plus.build.flash_mode=dio +m5stack_stickc_plus.build.boot=dio +m5stack_stickc_plus.build.partitions=huge_app +m5stack_stickc_plus.build.defines= +m5stack_stickc_plus.build.loop_core= +m5stack_stickc_plus.build.event_core= + +m5stack_stickc_plus.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_stickc_plus.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_stickc_plus.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_stickc_plus.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +m5stack_stickc_plus.menu.PartitionScheme.default.build.partitions=default +m5stack_stickc_plus.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_stickc_plus.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_stickc_plus.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_stickc_plus.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_stickc_plus.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_stickc_plus.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_stickc_plus.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_stickc_plus.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_stickc_plus.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_stickc_plus.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_stickc_plus.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_stickc_plus.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_stickc_plus.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_stickc_plus.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_stickc_plus.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_stickc_plus.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_stickc_plus.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_stickc_plus.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_stickc_plus.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_stickc_plus.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_stickc_plus.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_stickc_plus.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_stickc_plus.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_stickc_plus.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_stickc_plus.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_stickc_plus.menu.PartitionScheme.rainmaker=RainMaker +m5stack_stickc_plus.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_stickc_plus.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_stickc_plus.menu.PartitionScheme.custom=Custom +m5stack_stickc_plus.menu.PartitionScheme.custom.build.partitions= +m5stack_stickc_plus.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_stickc_plus.menu.CPUFreq.240=240MHz (WiFi/BT) +m5stack_stickc_plus.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_stickc_plus.menu.CPUFreq.160=160MHz (WiFi/BT) +m5stack_stickc_plus.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_stickc_plus.menu.CPUFreq.80=80MHz (WiFi/BT) +m5stack_stickc_plus.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_stickc_plus.menu.CPUFreq.40=40MHz (40MHz XTAL) +m5stack_stickc_plus.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_stickc_plus.menu.CPUFreq.26=26MHz (26MHz XTAL) +m5stack_stickc_plus.menu.CPUFreq.26.build.f_cpu=26000000L +m5stack_stickc_plus.menu.CPUFreq.20=20MHz (40MHz XTAL) +m5stack_stickc_plus.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_stickc_plus.menu.CPUFreq.13=13MHz (26MHz XTAL) +m5stack_stickc_plus.menu.CPUFreq.13.build.f_cpu=13000000L +m5stack_stickc_plus.menu.CPUFreq.10=10MHz (40MHz XTAL) +m5stack_stickc_plus.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_stickc_plus.menu.FlashMode.qio=QIO +m5stack_stickc_plus.menu.FlashMode.qio.build.flash_mode=dio +m5stack_stickc_plus.menu.FlashMode.qio.build.boot=qio +m5stack_stickc_plus.menu.FlashMode.dio=DIO +m5stack_stickc_plus.menu.FlashMode.dio.build.flash_mode=dio +m5stack_stickc_plus.menu.FlashMode.dio.build.boot=dio +m5stack_stickc_plus.menu.FlashMode.qout=QOUT +m5stack_stickc_plus.menu.FlashMode.qout.build.flash_mode=dout +m5stack_stickc_plus.menu.FlashMode.qout.build.boot=qout +m5stack_stickc_plus.menu.FlashMode.dout=DOUT +m5stack_stickc_plus.menu.FlashMode.dout.build.flash_mode=dout +m5stack_stickc_plus.menu.FlashMode.dout.build.boot=dout + +m5stack_stickc_plus.menu.FlashFreq.80=80MHz +m5stack_stickc_plus.menu.FlashFreq.80.build.flash_freq=80m +m5stack_stickc_plus.menu.FlashFreq.40=40MHz +m5stack_stickc_plus.menu.FlashFreq.40.build.flash_freq=40m + +m5stack_stickc_plus.menu.FlashSize.4M=4MB (32Mb) +m5stack_stickc_plus.menu.FlashSize.4M.build.flash_size=4MB + +m5stack_stickc_plus.menu.UploadSpeed.1500000=1500000 +m5stack_stickc_plus.menu.UploadSpeed.1500000.upload.speed=1500000 +m5stack_stickc_plus.menu.UploadSpeed.750000=750000 +m5stack_stickc_plus.menu.UploadSpeed.750000.upload.speed=750000 +m5stack_stickc_plus.menu.UploadSpeed.500000=500000 +m5stack_stickc_plus.menu.UploadSpeed.500000.upload.speed=500000 +m5stack_stickc_plus.menu.UploadSpeed.250000=250000 +m5stack_stickc_plus.menu.UploadSpeed.250000.upload.speed=250000 +m5stack_stickc_plus.menu.UploadSpeed.115200=115200 +m5stack_stickc_plus.menu.UploadSpeed.115200.upload.speed=115200 + +m5stack_stickc_plus.menu.LoopCore.1=Core 1 +m5stack_stickc_plus.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_stickc_plus.menu.LoopCore.0=Core 0 +m5stack_stickc_plus.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_stickc_plus.menu.EventsCore.1=Core 1 +m5stack_stickc_plus.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_stickc_plus.menu.EventsCore.0=Core 0 +m5stack_stickc_plus.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_stickc_plus.menu.DebugLevel.none=None +m5stack_stickc_plus.menu.DebugLevel.none.build.code_debug=0 +m5stack_stickc_plus.menu.DebugLevel.error=Error +m5stack_stickc_plus.menu.DebugLevel.error.build.code_debug=1 +m5stack_stickc_plus.menu.DebugLevel.warn=Warn +m5stack_stickc_plus.menu.DebugLevel.warn.build.code_debug=2 +m5stack_stickc_plus.menu.DebugLevel.info=Info +m5stack_stickc_plus.menu.DebugLevel.info.build.code_debug=3 +m5stack_stickc_plus.menu.DebugLevel.debug=Debug +m5stack_stickc_plus.menu.DebugLevel.debug.build.code_debug=4 +m5stack_stickc_plus.menu.DebugLevel.verbose=Verbose +m5stack_stickc_plus.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_stickc_plus.menu.EraseFlash.none=Disabled +m5stack_stickc_plus.menu.EraseFlash.none.upload.erase_cmd= +m5stack_stickc_plus.menu.EraseFlash.all=Enabled +m5stack_stickc_plus.menu.EraseFlash.all.upload.erase_cmd=-e + + + +############################################################## + +m5stack_stickc_plus2.name=M5StickCPlus2 + +m5stack_stickc_plus2.bootloader.tool=esptool_py +m5stack_stickc_plus2.bootloader.tool.default=esptool_py + +m5stack_stickc_plus2.upload.tool=esptool_py +m5stack_stickc_plus2.upload.tool.default=esptool_py +m5stack_stickc_plus2.upload.tool.network=esp_ota + +m5stack_stickc_plus2.upload.maximum_size=3342336 +m5stack_stickc_plus2.upload.maximum_data_size=327680 +m5stack_stickc_plus2.upload.flags= +m5stack_stickc_plus2.upload.extra_flags= + +m5stack_stickc_plus2.serial.disableDTR=true +m5stack_stickc_plus2.serial.disableRTS=true + +m5stack_stickc_plus2.build.tarch=xtensa +m5stack_stickc_plus2.build.bootloader_addr=0x1000 +m5stack_stickc_plus2.build.target=esp32 +m5stack_stickc_plus2.build.mcu=esp32 +m5stack_stickc_plus2.build.core=esp32 +m5stack_stickc_plus2.build.variant=m5stack_stickc_plus2 +m5stack_stickc_plus2.build.board=M5STACK_STICKC_PLUS2 + +m5stack_stickc_plus2.build.f_cpu=240000000L +m5stack_stickc_plus2.build.flash_size=8MB +m5stack_stickc_plus2.build.flash_freq=80m +m5stack_stickc_plus2.build.flash_mode=dio +m5stack_stickc_plus2.build.boot=dio +m5stack_stickc_plus2.build.partitions=default_8MB +m5stack_stickc_plus2.build.defines= +m5stack_stickc_plus2.build.loop_core= +m5stack_stickc_plus2.build.event_core= + +m5stack_stickc_plus2.menu.PSRAM.enabled=Enabled +m5stack_stickc_plus2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw +m5stack_stickc_plus2.menu.PSRAM.enabled.build.extra_libs= +m5stack_stickc_plus2.menu.PSRAM.disabled=Disabled +m5stack_stickc_plus2.menu.PSRAM.disabled.build.defines= +m5stack_stickc_plus2.menu.PSRAM.disabled.build.extra_libs= + +m5stack_stickc_plus2.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_stickc_plus2.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_stickc_plus2.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_stickc_plus2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_stickc_plus2.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_stickc_plus2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_stickc_plus2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +m5stack_stickc_plus2.menu.PartitionScheme.default.build.partitions=default +m5stack_stickc_plus2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_stickc_plus2.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_stickc_plus2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_stickc_plus2.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_stickc_plus2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_stickc_plus2.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_stickc_plus2.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_stickc_plus2.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_stickc_plus2.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_stickc_plus2.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_stickc_plus2.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_stickc_plus2.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_stickc_plus2.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_stickc_plus2.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_stickc_plus2.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_stickc_plus2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_stickc_plus2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_stickc_plus2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_stickc_plus2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_stickc_plus2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_stickc_plus2.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_stickc_plus2.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_stickc_plus2.menu.PartitionScheme.rainmaker=RainMaker +m5stack_stickc_plus2.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_stickc_plus2.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_stickc_plus2.menu.PartitionScheme.custom=Custom +m5stack_stickc_plus2.menu.PartitionScheme.custom.build.partitions= +m5stack_stickc_plus2.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_stickc_plus2.menu.CPUFreq.240=240MHz (WiFi/BT) +m5stack_stickc_plus2.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_stickc_plus2.menu.CPUFreq.160=160MHz (WiFi/BT) +m5stack_stickc_plus2.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_stickc_plus2.menu.CPUFreq.80=80MHz (WiFi/BT) +m5stack_stickc_plus2.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_stickc_plus2.menu.CPUFreq.40=40MHz (40MHz XTAL) +m5stack_stickc_plus2.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_stickc_plus2.menu.CPUFreq.26=26MHz (26MHz XTAL) +m5stack_stickc_plus2.menu.CPUFreq.26.build.f_cpu=26000000L +m5stack_stickc_plus2.menu.CPUFreq.20=20MHz (40MHz XTAL) +m5stack_stickc_plus2.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_stickc_plus2.menu.CPUFreq.13=13MHz (26MHz XTAL) +m5stack_stickc_plus2.menu.CPUFreq.13.build.f_cpu=13000000L +m5stack_stickc_plus2.menu.CPUFreq.10=10MHz (40MHz XTAL) +m5stack_stickc_plus2.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_stickc_plus2.menu.FlashMode.qio=QIO +m5stack_stickc_plus2.menu.FlashMode.qio.build.flash_mode=dio +m5stack_stickc_plus2.menu.FlashMode.qio.build.boot=qio +m5stack_stickc_plus2.menu.FlashMode.dio=DIO +m5stack_stickc_plus2.menu.FlashMode.dio.build.flash_mode=dio +m5stack_stickc_plus2.menu.FlashMode.dio.build.boot=dio +m5stack_stickc_plus2.menu.FlashMode.qout=QOUT +m5stack_stickc_plus2.menu.FlashMode.qout.build.flash_mode=dout +m5stack_stickc_plus2.menu.FlashMode.qout.build.boot=qout +m5stack_stickc_plus2.menu.FlashMode.dout=DOUT +m5stack_stickc_plus2.menu.FlashMode.dout.build.flash_mode=dout +m5stack_stickc_plus2.menu.FlashMode.dout.build.boot=dout + +m5stack_stickc_plus2.menu.FlashFreq.80=80MHz +m5stack_stickc_plus2.menu.FlashFreq.80.build.flash_freq=80m +m5stack_stickc_plus2.menu.FlashFreq.40=40MHz +m5stack_stickc_plus2.menu.FlashFreq.40.build.flash_freq=40m + +m5stack_stickc_plus2.menu.FlashSize.8M=8MB (64Mb) +m5stack_stickc_plus2.menu.FlashSize.8M.build.flash_size=8MB + +m5stack_stickc_plus2.menu.UploadSpeed.1500000=1500000 +m5stack_stickc_plus2.menu.UploadSpeed.1500000.upload.speed=1500000 +m5stack_stickc_plus2.menu.UploadSpeed.750000=750000 +m5stack_stickc_plus2.menu.UploadSpeed.750000.upload.speed=750000 +m5stack_stickc_plus2.menu.UploadSpeed.500000=500000 +m5stack_stickc_plus2.menu.UploadSpeed.500000.upload.speed=500000 +m5stack_stickc_plus2.menu.UploadSpeed.250000=250000 +m5stack_stickc_plus2.menu.UploadSpeed.250000.upload.speed=250000 +m5stack_stickc_plus2.menu.UploadSpeed.115200=115200 +m5stack_stickc_plus2.menu.UploadSpeed.115200.upload.speed=115200 + +m5stack_stickc_plus2.menu.LoopCore.1=Core 1 +m5stack_stickc_plus2.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_stickc_plus2.menu.LoopCore.0=Core 0 +m5stack_stickc_plus2.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_stickc_plus2.menu.EventsCore.1=Core 1 +m5stack_stickc_plus2.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_stickc_plus2.menu.EventsCore.0=Core 0 +m5stack_stickc_plus2.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_stickc_plus2.menu.DebugLevel.none=None +m5stack_stickc_plus2.menu.DebugLevel.none.build.code_debug=0 +m5stack_stickc_plus2.menu.DebugLevel.error=Error +m5stack_stickc_plus2.menu.DebugLevel.error.build.code_debug=1 +m5stack_stickc_plus2.menu.DebugLevel.warn=Warn +m5stack_stickc_plus2.menu.DebugLevel.warn.build.code_debug=2 +m5stack_stickc_plus2.menu.DebugLevel.info=Info +m5stack_stickc_plus2.menu.DebugLevel.info.build.code_debug=3 +m5stack_stickc_plus2.menu.DebugLevel.debug=Debug +m5stack_stickc_plus2.menu.DebugLevel.debug.build.code_debug=4 +m5stack_stickc_plus2.menu.DebugLevel.verbose=Verbose +m5stack_stickc_plus2.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_stickc_plus2.menu.EraseFlash.none=Disabled +m5stack_stickc_plus2.menu.EraseFlash.none.upload.erase_cmd= +m5stack_stickc_plus2.menu.EraseFlash.all=Enabled +m5stack_stickc_plus2.menu.EraseFlash.all.upload.erase_cmd=-e + + +############################################################## + +m5stack_atom.name=M5Atom + +m5stack_atom.bootloader.tool=esptool_py +m5stack_atom.bootloader.tool.default=esptool_py + +m5stack_atom.upload.tool=esptool_py +m5stack_atom.upload.tool.default=esptool_py +m5stack_atom.upload.tool.network=esp_ota + +m5stack_atom.upload.maximum_size=1310720 +m5stack_atom.upload.maximum_data_size=327680 +m5stack_atom.upload.flags= +m5stack_atom.upload.extra_flags= + +m5stack_atom.serial.disableDTR=true +m5stack_atom.serial.disableRTS=true + +m5stack_atom.build.tarch=xtensa +m5stack_atom.build.bootloader_addr=0x1000 +m5stack_atom.build.target=esp32 +m5stack_atom.build.mcu=esp32 +m5stack_atom.build.core=esp32 +m5stack_atom.build.variant=m5stack_atom +m5stack_atom.build.board=M5STACK_ATOM + +m5stack_atom.build.f_cpu=240000000L +m5stack_atom.build.flash_size=4MB +m5stack_atom.build.flash_freq=80m +m5stack_atom.build.flash_mode=dio +m5stack_atom.build.boot=dio +m5stack_atom.build.partitions=huge_app +m5stack_atom.build.defines= +m5stack_atom.build.loop_core= +m5stack_atom.build.event_core= + +m5stack_atom.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_atom.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_atom.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_atom.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +m5stack_atom.menu.PartitionScheme.default.build.partitions=default +m5stack_atom.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_atom.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_atom.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_atom.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_atom.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_atom.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_atom.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_atom.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_atom.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_atom.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_atom.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_atom.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_atom.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_atom.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_atom.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_atom.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_atom.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_atom.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_atom.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_atom.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_atom.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_atom.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_atom.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_atom.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_atom.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_atom.menu.PartitionScheme.rainmaker=RainMaker +m5stack_atom.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_atom.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_atom.menu.PartitionScheme.custom=Custom +m5stack_atom.menu.PartitionScheme.custom.build.partitions= +m5stack_atom.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_atom.menu.CPUFreq.240=240MHz (WiFi/BT) +m5stack_atom.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_atom.menu.CPUFreq.160=160MHz (WiFi/BT) +m5stack_atom.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_atom.menu.CPUFreq.80=80MHz (WiFi/BT) +m5stack_atom.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_atom.menu.CPUFreq.40=40MHz (40MHz XTAL) +m5stack_atom.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_atom.menu.CPUFreq.26=26MHz (26MHz XTAL) +m5stack_atom.menu.CPUFreq.26.build.f_cpu=26000000L +m5stack_atom.menu.CPUFreq.20=20MHz (40MHz XTAL) +m5stack_atom.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_atom.menu.CPUFreq.13=13MHz (26MHz XTAL) +m5stack_atom.menu.CPUFreq.13.build.f_cpu=13000000L +m5stack_atom.menu.CPUFreq.10=10MHz (40MHz XTAL) +m5stack_atom.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_atom.menu.FlashMode.qio=QIO +m5stack_atom.menu.FlashMode.qio.build.flash_mode=dio +m5stack_atom.menu.FlashMode.qio.build.boot=qio +m5stack_atom.menu.FlashMode.dio=DIO +m5stack_atom.menu.FlashMode.dio.build.flash_mode=dio +m5stack_atom.menu.FlashMode.dio.build.boot=dio +m5stack_atom.menu.FlashMode.qout=QOUT +m5stack_atom.menu.FlashMode.qout.build.flash_mode=dout +m5stack_atom.menu.FlashMode.qout.build.boot=qout +m5stack_atom.menu.FlashMode.dout=DOUT +m5stack_atom.menu.FlashMode.dout.build.flash_mode=dout +m5stack_atom.menu.FlashMode.dout.build.boot=dout + +m5stack_atom.menu.FlashFreq.80=80MHz +m5stack_atom.menu.FlashFreq.80.build.flash_freq=80m +m5stack_atom.menu.FlashFreq.40=40MHz +m5stack_atom.menu.FlashFreq.40.build.flash_freq=40m + +m5stack_atom.menu.FlashSize.4M=4MB (32Mb) +m5stack_atom.menu.FlashSize.4M.build.flash_size=4MB + +m5stack_atom.menu.UploadSpeed.1500000=1500000 +m5stack_atom.menu.UploadSpeed.1500000.upload.speed=1500000 +m5stack_atom.menu.UploadSpeed.750000=750000 +m5stack_atom.menu.UploadSpeed.750000.upload.speed=750000 +m5stack_atom.menu.UploadSpeed.500000=500000 +m5stack_atom.menu.UploadSpeed.500000.upload.speed=500000 +m5stack_atom.menu.UploadSpeed.250000=250000 +m5stack_atom.menu.UploadSpeed.250000.upload.speed=250000 +m5stack_atom.menu.UploadSpeed.115200=115200 +m5stack_atom.menu.UploadSpeed.115200.upload.speed=115200 + +m5stack_atom.menu.LoopCore.1=Core 1 +m5stack_atom.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_atom.menu.LoopCore.0=Core 0 +m5stack_atom.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_atom.menu.EventsCore.1=Core 1 +m5stack_atom.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_atom.menu.EventsCore.0=Core 0 +m5stack_atom.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_atom.menu.DebugLevel.none=None +m5stack_atom.menu.DebugLevel.none.build.code_debug=0 +m5stack_atom.menu.DebugLevel.error=Error +m5stack_atom.menu.DebugLevel.error.build.code_debug=1 +m5stack_atom.menu.DebugLevel.warn=Warn +m5stack_atom.menu.DebugLevel.warn.build.code_debug=2 +m5stack_atom.menu.DebugLevel.info=Info +m5stack_atom.menu.DebugLevel.info.build.code_debug=3 +m5stack_atom.menu.DebugLevel.debug=Debug +m5stack_atom.menu.DebugLevel.debug.build.code_debug=4 +m5stack_atom.menu.DebugLevel.verbose=Verbose +m5stack_atom.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_atom.menu.EraseFlash.none=Disabled +m5stack_atom.menu.EraseFlash.none.upload.erase_cmd= +m5stack_atom.menu.EraseFlash.all=Enabled +m5stack_atom.menu.EraseFlash.all.upload.erase_cmd=-e + +############################################################## + +m5stack_atoms3.name=M5AtomS3 +m5stack_atoms3.vid.0=0x303a +m5stack_atoms3.pid.0=0x1001 +m5stack_atoms3.bootloader.tool=esptool_py +m5stack_atoms3.bootloader.tool.default=esptool_py + +m5stack_atoms3.upload.tool=esptool_py +m5stack_atoms3.upload.tool.default=esptool_py +m5stack_atoms3.upload.tool.network=esp_ota + +m5stack_atoms3.upload.maximum_size=1310720 +m5stack_atoms3.upload.maximum_data_size=327680 +m5stack_atoms3.upload.flags= +m5stack_atoms3.upload.extra_flags= +m5stack_atoms3.upload.use_1200bps_touch=false +m5stack_atoms3.upload.wait_for_upload_port=false + +m5stack_atoms3.serial.disableDTR=false +m5stack_atoms3.serial.disableRTS=false + +m5stack_atoms3.build.tarch=xtensa +m5stack_atoms3.build.bootloader_addr=0x0 +m5stack_atoms3.build.target=esp32s3 +m5stack_atoms3.build.mcu=esp32s3 +m5stack_atoms3.build.core=esp32 +m5stack_atoms3.build.variant=m5stack_atoms3 +m5stack_atoms3.build.board=M5STACK_ATOMS3 + +m5stack_atoms3.build.usb_mode=1 +m5stack_atoms3.build.cdc_on_boot=1 +m5stack_atoms3.build.msc_on_boot=0 +m5stack_atoms3.build.dfu_on_boot=0 +m5stack_atoms3.build.f_cpu=240000000L +m5stack_atoms3.build.flash_size=8MB +m5stack_atoms3.build.flash_freq=80m +m5stack_atoms3.build.flash_mode=dio +m5stack_atoms3.build.boot=qio +m5stack_atoms3.build.boot_freq=80m +m5stack_atoms3.build.partitions=default +m5stack_atoms3.build.defines= +m5stack_atoms3.build.loop_core= +m5stack_atoms3.build.event_core= +m5stack_atoms3.build.psram_type=qspi +m5stack_atoms3.build.memory_type={build.boot}_{build.psram_type} ## IDE 2.0 Seems to not update the value -m5stack-atoms3.menu.JTAGAdapter.default=Disabled -m5stack-atoms3.menu.JTAGAdapter.default.build.copy_jtag_files=0 -m5stack-atoms3.menu.JTAGAdapter.builtin=Integrated USB JTAG -m5stack-atoms3.menu.JTAGAdapter.builtin.build.openocdscript=esp32s3-builtin.cfg -m5stack-atoms3.menu.JTAGAdapter.builtin.build.copy_jtag_files=1 -m5stack-atoms3.menu.JTAGAdapter.external=FTDI Adapter -m5stack-atoms3.menu.JTAGAdapter.external.build.openocdscript=esp32s3-ftdi.cfg -m5stack-atoms3.menu.JTAGAdapter.external.build.copy_jtag_files=1 -m5stack-atoms3.menu.JTAGAdapter.bridge=ESP USB Bridge -m5stack-atoms3.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg -m5stack-atoms3.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 - -m5stack-atoms3.menu.PSRAM.disabled=Disabled -m5stack-atoms3.menu.PSRAM.disabled.build.defines= -m5stack-atoms3.menu.PSRAM.disabled.build.psram_type=qspi -m5stack-atoms3.menu.PSRAM.enabled=QSPI PSRAM -m5stack-atoms3.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -m5stack-atoms3.menu.PSRAM.enabled.build.psram_type=qspi -m5stack-atoms3.menu.PSRAM.opi=OPI PSRAM -m5stack-atoms3.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM -m5stack-atoms3.menu.PSRAM.opi.build.psram_type=opi - -m5stack-atoms3.menu.FlashMode.qio=QIO 80MHz -m5stack-atoms3.menu.FlashMode.qio.build.flash_mode=dio -m5stack-atoms3.menu.FlashMode.qio.build.boot=qio -m5stack-atoms3.menu.FlashMode.qio.build.boot_freq=80m -m5stack-atoms3.menu.FlashMode.qio.build.flash_freq=80m -m5stack-atoms3.menu.FlashMode.qio120=QIO 120MHz -m5stack-atoms3.menu.FlashMode.qio120.build.flash_mode=dio -m5stack-atoms3.menu.FlashMode.qio120.build.boot=qio -m5stack-atoms3.menu.FlashMode.qio120.build.boot_freq=120m -m5stack-atoms3.menu.FlashMode.qio120.build.flash_freq=80m -m5stack-atoms3.menu.FlashMode.dio=DIO 80MHz -m5stack-atoms3.menu.FlashMode.dio.build.flash_mode=dio -m5stack-atoms3.menu.FlashMode.dio.build.boot=dio -m5stack-atoms3.menu.FlashMode.dio.build.boot_freq=80m -m5stack-atoms3.menu.FlashMode.dio.build.flash_freq=80m -m5stack-atoms3.menu.FlashMode.opi=OPI 80MHz -m5stack-atoms3.menu.FlashMode.opi.build.flash_mode=dout -m5stack-atoms3.menu.FlashMode.opi.build.boot=opi -m5stack-atoms3.menu.FlashMode.opi.build.boot_freq=80m -m5stack-atoms3.menu.FlashMode.opi.build.flash_freq=80m - -m5stack-atoms3.menu.FlashSize.4M=4MB (32Mb) -m5stack-atoms3.menu.FlashSize.4M.build.flash_size=4MB -m5stack-atoms3.menu.FlashSize.8M=8MB (64Mb) -m5stack-atoms3.menu.FlashSize.8M.build.flash_size=8MB -m5stack-atoms3.menu.FlashSize.8M.build.partitions=default_8MB -m5stack-atoms3.menu.FlashSize.16M=16MB (128Mb) -m5stack-atoms3.menu.FlashSize.16M.build.flash_size=16MB -#m5stack-atoms3.menu.FlashSize.32M=32MB (256Mb) -#m5stack-atoms3.menu.FlashSize.32M.build.flash_size=32MB - -m5stack-atoms3.menu.LoopCore.1=Core 1 -m5stack-atoms3.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 -m5stack-atoms3.menu.LoopCore.0=Core 0 -m5stack-atoms3.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 - -m5stack-atoms3.menu.EventsCore.1=Core 1 -m5stack-atoms3.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 -m5stack-atoms3.menu.EventsCore.0=Core 0 -m5stack-atoms3.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 - -m5stack-atoms3.menu.USBMode.hwcdc=Hardware CDC and JTAG -m5stack-atoms3.menu.USBMode.hwcdc.build.usb_mode=1 -m5stack-atoms3.menu.USBMode.default=USB-OTG (TinyUSB) -m5stack-atoms3.menu.USBMode.default.build.usb_mode=0 - -m5stack-atoms3.menu.CDCOnBoot.default=Disabled -m5stack-atoms3.menu.CDCOnBoot.default.build.cdc_on_boot=0 -m5stack-atoms3.menu.CDCOnBoot.cdc=Enabled -m5stack-atoms3.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 - -m5stack-atoms3.menu.MSCOnBoot.default=Disabled -m5stack-atoms3.menu.MSCOnBoot.default.build.msc_on_boot=0 -m5stack-atoms3.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode) -m5stack-atoms3.menu.MSCOnBoot.msc.build.msc_on_boot=1 - -m5stack-atoms3.menu.DFUOnBoot.default=Disabled -m5stack-atoms3.menu.DFUOnBoot.default.build.dfu_on_boot=0 -m5stack-atoms3.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode) -m5stack-atoms3.menu.DFUOnBoot.dfu.build.dfu_on_boot=1 - -m5stack-atoms3.menu.UploadMode.default=UART0 / Hardware CDC -m5stack-atoms3.menu.UploadMode.default.upload.use_1200bps_touch=false -m5stack-atoms3.menu.UploadMode.default.upload.wait_for_upload_port=false -m5stack-atoms3.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB) -m5stack-atoms3.menu.UploadMode.cdc.upload.use_1200bps_touch=true -m5stack-atoms3.menu.UploadMode.cdc.upload.wait_for_upload_port=true - -m5stack-atoms3.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) -m5stack-atoms3.menu.PartitionScheme.default.build.partitions=default -m5stack-atoms3.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) -m5stack-atoms3.menu.PartitionScheme.defaultffat.build.partitions=default_ffat -m5stack-atoms3.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) -m5stack-atoms3.menu.PartitionScheme.default_8MB.build.partitions=default_8MB -m5stack-atoms3.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 - -m5stack-atoms3.menu.CPUFreq.240=240MHz (WiFi) -m5stack-atoms3.menu.CPUFreq.240.build.f_cpu=240000000L -m5stack-atoms3.menu.CPUFreq.160=160MHz (WiFi) -m5stack-atoms3.menu.CPUFreq.160.build.f_cpu=160000000L -m5stack-atoms3.menu.CPUFreq.80=80MHz (WiFi) -m5stack-atoms3.menu.CPUFreq.80.build.f_cpu=80000000L -m5stack-atoms3.menu.CPUFreq.40=40MHz -m5stack-atoms3.menu.CPUFreq.40.build.f_cpu=40000000L -m5stack-atoms3.menu.CPUFreq.20=20MHz -m5stack-atoms3.menu.CPUFreq.20.build.f_cpu=20000000L -m5stack-atoms3.menu.CPUFreq.10=10MHz -m5stack-atoms3.menu.CPUFreq.10.build.f_cpu=10000000L - -m5stack-atoms3.menu.UploadSpeed.921600=921600 -m5stack-atoms3.menu.UploadSpeed.921600.upload.speed=921600 -m5stack-atoms3.menu.UploadSpeed.115200=115200 -m5stack-atoms3.menu.UploadSpeed.115200.upload.speed=115200 -m5stack-atoms3.menu.UploadSpeed.256000.windows=256000 -m5stack-atoms3.menu.UploadSpeed.256000.upload.speed=256000 -m5stack-atoms3.menu.UploadSpeed.230400.windows.upload.speed=256000 -m5stack-atoms3.menu.UploadSpeed.230400=230400 -m5stack-atoms3.menu.UploadSpeed.230400.upload.speed=230400 -m5stack-atoms3.menu.UploadSpeed.460800.linux=460800 -m5stack-atoms3.menu.UploadSpeed.460800.macosx=460800 -m5stack-atoms3.menu.UploadSpeed.460800.upload.speed=460800 -m5stack-atoms3.menu.UploadSpeed.512000.windows=512000 -m5stack-atoms3.menu.UploadSpeed.512000.upload.speed=512000 - -m5stack-atoms3.menu.DebugLevel.none=None -m5stack-atoms3.menu.DebugLevel.none.build.code_debug=0 -m5stack-atoms3.menu.DebugLevel.error=Error -m5stack-atoms3.menu.DebugLevel.error.build.code_debug=1 -m5stack-atoms3.menu.DebugLevel.warn=Warn -m5stack-atoms3.menu.DebugLevel.warn.build.code_debug=2 -m5stack-atoms3.menu.DebugLevel.info=Info -m5stack-atoms3.menu.DebugLevel.info.build.code_debug=3 -m5stack-atoms3.menu.DebugLevel.debug=Debug -m5stack-atoms3.menu.DebugLevel.debug.build.code_debug=4 -m5stack-atoms3.menu.DebugLevel.verbose=Verbose -m5stack-atoms3.menu.DebugLevel.verbose.build.code_debug=5 - -m5stack-atoms3.menu.EraseFlash.none=Disabled -m5stack-atoms3.menu.EraseFlash.none.upload.erase_cmd= -m5stack-atoms3.menu.EraseFlash.all=Enabled -m5stack-atoms3.menu.EraseFlash.all.upload.erase_cmd=-e +m5stack_atoms3.menu.JTAGAdapter.default=Disabled +m5stack_atoms3.menu.JTAGAdapter.default.build.copy_jtag_files=0 +m5stack_atoms3.menu.JTAGAdapter.builtin=Integrated USB JTAG +m5stack_atoms3.menu.JTAGAdapter.builtin.build.openocdscript=esp32s3-builtin.cfg +m5stack_atoms3.menu.JTAGAdapter.builtin.build.copy_jtag_files=1 +m5stack_atoms3.menu.JTAGAdapter.external=FTDI Adapter +m5stack_atoms3.menu.JTAGAdapter.external.build.openocdscript=esp32s3-ftdi.cfg +m5stack_atoms3.menu.JTAGAdapter.external.build.copy_jtag_files=1 +m5stack_atoms3.menu.JTAGAdapter.bridge=ESP USB Bridge +m5stack_atoms3.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg +m5stack_atoms3.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 + +m5stack_atoms3.menu.PSRAM.disabled=Disabled +m5stack_atoms3.menu.PSRAM.disabled.build.defines= +m5stack_atoms3.menu.PSRAM.disabled.build.psram_type=qspi +m5stack_atoms3.menu.PSRAM.enabled=QSPI PSRAM +m5stack_atoms3.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM +m5stack_atoms3.menu.PSRAM.enabled.build.psram_type=qspi +m5stack_atoms3.menu.PSRAM.opi=OPI PSRAM +m5stack_atoms3.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM +m5stack_atoms3.menu.PSRAM.opi.build.psram_type=opi + +m5stack_atoms3.menu.FlashMode.qio=QIO 80MHz +m5stack_atoms3.menu.FlashMode.qio.build.flash_mode=dio +m5stack_atoms3.menu.FlashMode.qio.build.boot=qio +m5stack_atoms3.menu.FlashMode.qio.build.boot_freq=80m +m5stack_atoms3.menu.FlashMode.qio.build.flash_freq=80m +m5stack_atoms3.menu.FlashMode.qio120=QIO 120MHz +m5stack_atoms3.menu.FlashMode.qio120.build.flash_mode=dio +m5stack_atoms3.menu.FlashMode.qio120.build.boot=qio +m5stack_atoms3.menu.FlashMode.qio120.build.boot_freq=120m +m5stack_atoms3.menu.FlashMode.qio120.build.flash_freq=80m +m5stack_atoms3.menu.FlashMode.dio=DIO 80MHz +m5stack_atoms3.menu.FlashMode.dio.build.flash_mode=dio +m5stack_atoms3.menu.FlashMode.dio.build.boot=dio +m5stack_atoms3.menu.FlashMode.dio.build.boot_freq=80m +m5stack_atoms3.menu.FlashMode.dio.build.flash_freq=80m +m5stack_atoms3.menu.FlashMode.opi=OPI 80MHz +m5stack_atoms3.menu.FlashMode.opi.build.flash_mode=dout +m5stack_atoms3.menu.FlashMode.opi.build.boot=opi +m5stack_atoms3.menu.FlashMode.opi.build.boot_freq=80m +m5stack_atoms3.menu.FlashMode.opi.build.flash_freq=80m + + +m5stack_atoms3.menu.FlashSize.8M=8MB (64Mb) +m5stack_atoms3.menu.FlashSize.8M.build.flash_size=8MB +m5stack_atoms3.menu.FlashSize.8M.build.partitions=default_8MB + +m5stack_atoms3.menu.LoopCore.1=Core 1 +m5stack_atoms3.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_atoms3.menu.LoopCore.0=Core 0 +m5stack_atoms3.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_atoms3.menu.EventsCore.1=Core 1 +m5stack_atoms3.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_atoms3.menu.EventsCore.0=Core 0 +m5stack_atoms3.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_atoms3.menu.USBMode.hwcdc=Hardware CDC and JTAG +m5stack_atoms3.menu.USBMode.hwcdc.build.usb_mode=1 +m5stack_atoms3.menu.USBMode.default=USB-OTG (TinyUSB) +m5stack_atoms3.menu.USBMode.default.build.usb_mode=0 + +m5stack_atoms3.menu.CDCOnBoot.cdc=Enabled +m5stack_atoms3.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 +m5stack_atoms3.menu.CDCOnBoot.default=Disabled +m5stack_atoms3.menu.CDCOnBoot.default.build.cdc_on_boot=0 + +m5stack_atoms3.menu.MSCOnBoot.default=Disabled +m5stack_atoms3.menu.MSCOnBoot.default.build.msc_on_boot=0 +m5stack_atoms3.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode) +m5stack_atoms3.menu.MSCOnBoot.msc.build.msc_on_boot=1 + +m5stack_atoms3.menu.DFUOnBoot.default=Disabled +m5stack_atoms3.menu.DFUOnBoot.default.build.dfu_on_boot=0 +m5stack_atoms3.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode) +m5stack_atoms3.menu.DFUOnBoot.dfu.build.dfu_on_boot=1 + +m5stack_atoms3.menu.UploadMode.default=UART0 / Hardware CDC +m5stack_atoms3.menu.UploadMode.default.upload.use_1200bps_touch=false +m5stack_atoms3.menu.UploadMode.default.upload.wait_for_upload_port=false +m5stack_atoms3.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB) +m5stack_atoms3.menu.UploadMode.cdc.upload.use_1200bps_touch=true +m5stack_atoms3.menu.UploadMode.cdc.upload.wait_for_upload_port=true + +m5stack_atoms3.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +m5stack_atoms3.menu.PartitionScheme.default.build.partitions=default +m5stack_atoms3.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_atoms3.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_atoms3.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_atoms3.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_atoms3.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_atoms3.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_atoms3.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_atoms3.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_atoms3.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_atoms3.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_atoms3.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_atoms3.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_atoms3.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_atoms3.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_atoms3.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_atoms3.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_atoms3.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_atoms3.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_atoms3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_atoms3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_atoms3.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_atoms3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_atoms3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_atoms3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_atoms3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_atoms3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_atoms3.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_atoms3.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_atoms3.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9.9MB FATFS) +m5stack_atoms3.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +m5stack_atoms3.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 +m5stack_atoms3.menu.PartitionScheme.rainmaker=RainMaker +m5stack_atoms3.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_atoms3.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_atoms3.menu.PartitionScheme.app5M_fat24M_32MB=32M Flash (4.8MB APP/22MB FATFS) +m5stack_atoms3.menu.PartitionScheme.app5M_fat24M_32MB.build.partitions=large_fat_32MB +m5stack_atoms3.menu.PartitionScheme.app5M_fat24M_32MB.upload.maximum_size=4718592 +m5stack_atoms3.menu.PartitionScheme.app5M_little24M_32MB=32M Flash (4.8MB APP/22MB LittleFS) +m5stack_atoms3.menu.PartitionScheme.app5M_little24M_32MB.build.partitions=large_littlefs_32MB +m5stack_atoms3.menu.PartitionScheme.app5M_little24M_32MB.upload.maximum_size=4718592 +m5stack_atoms3.menu.PartitionScheme.esp_sr_16=ESP SR 16M (3MB APP/7MB SPIFFS/2.9MB MODEL) +m5stack_atoms3.menu.PartitionScheme.esp_sr_16.upload.maximum_size=3145728 +m5stack_atoms3.menu.PartitionScheme.esp_sr_16.upload.extra_flags=0xD10000 {build.path}/srmodels.bin +m5stack_atoms3.menu.PartitionScheme.esp_sr_16.build.partitions=esp_sr_16 +m5stack_atoms3.menu.PartitionScheme.custom=Custom +m5stack_atoms3.menu.PartitionScheme.custom.build.partitions= +m5stack_atoms3.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_atoms3.menu.CPUFreq.240=240MHz (WiFi) +m5stack_atoms3.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_atoms3.menu.CPUFreq.160=160MHz (WiFi) +m5stack_atoms3.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_atoms3.menu.CPUFreq.80=80MHz (WiFi) +m5stack_atoms3.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_atoms3.menu.CPUFreq.40=40MHz +m5stack_atoms3.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_atoms3.menu.CPUFreq.20=20MHz +m5stack_atoms3.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_atoms3.menu.CPUFreq.10=10MHz +m5stack_atoms3.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_atoms3.menu.UploadSpeed.921600=921600 +m5stack_atoms3.menu.UploadSpeed.921600.upload.speed=921600 +m5stack_atoms3.menu.UploadSpeed.115200=115200 +m5stack_atoms3.menu.UploadSpeed.115200.upload.speed=115200 +m5stack_atoms3.menu.UploadSpeed.256000.windows=256000 +m5stack_atoms3.menu.UploadSpeed.256000.upload.speed=256000 +m5stack_atoms3.menu.UploadSpeed.230400.windows.upload.speed=256000 +m5stack_atoms3.menu.UploadSpeed.230400=230400 +m5stack_atoms3.menu.UploadSpeed.230400.upload.speed=230400 +m5stack_atoms3.menu.UploadSpeed.460800.linux=460800 +m5stack_atoms3.menu.UploadSpeed.460800.macosx=460800 +m5stack_atoms3.menu.UploadSpeed.460800.upload.speed=460800 +m5stack_atoms3.menu.UploadSpeed.512000.windows=512000 +m5stack_atoms3.menu.UploadSpeed.512000.upload.speed=512000 + +m5stack_atoms3.menu.DebugLevel.none=None +m5stack_atoms3.menu.DebugLevel.none.build.code_debug=0 +m5stack_atoms3.menu.DebugLevel.error=Error +m5stack_atoms3.menu.DebugLevel.error.build.code_debug=1 +m5stack_atoms3.menu.DebugLevel.warn=Warn +m5stack_atoms3.menu.DebugLevel.warn.build.code_debug=2 +m5stack_atoms3.menu.DebugLevel.info=Info +m5stack_atoms3.menu.DebugLevel.info.build.code_debug=3 +m5stack_atoms3.menu.DebugLevel.debug=Debug +m5stack_atoms3.menu.DebugLevel.debug.build.code_debug=4 +m5stack_atoms3.menu.DebugLevel.verbose=Verbose +m5stack_atoms3.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_atoms3.menu.EraseFlash.none=Disabled +m5stack_atoms3.menu.EraseFlash.none.upload.erase_cmd= +m5stack_atoms3.menu.EraseFlash.all=Enabled +m5stack_atoms3.menu.EraseFlash.all.upload.erase_cmd=-e ############################################################## -m5stack-core2.name=M5Stack-Core2 - -m5stack-core2.bootloader.tool=esptool_py -m5stack-core2.bootloader.tool.default=esptool_py - -m5stack-core2.upload.tool=esptool_py -m5stack-core2.upload.tool.default=esptool_py -m5stack-core2.upload.tool.network=esp_ota - -m5stack-core2.upload.maximum_size=6553600 -m5stack-core2.upload.maximum_data_size=4521984 -m5stack-core2.upload.wait_for_upload_port=true -m5stack-core2.upload.flags= -m5stack-core2.upload.extra_flags= - -m5stack-core2.serial.disableDTR=true -m5stack-core2.serial.disableRTS=true - -m5stack-core2.build.tarch=xtensa -m5stack-core2.build.bootloader_addr=0x1000 -m5stack-core2.build.target=esp32 -m5stack-core2.build.mcu=esp32 -m5stack-core2.build.core=esp32 -m5stack-core2.build.variant=m5stack_core2 -m5stack-core2.build.board=M5STACK_Core2 - -m5stack-core2.build.f_cpu=240000000L -m5stack-core2.build.flash_size=16MB -m5stack-core2.build.flash_freq=80m -m5stack-core2.build.flash_mode=dio -m5stack-core2.build.boot=qio -m5stack-core2.build.partitions=default_16MB -m5stack-core2.build.defines= - -m5stack-core2.menu.PSRAM.enabled=Enabled -m5stack-core2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -m5stack-core2.menu.PSRAM.enabled.build.extra_libs= -m5stack-core2.menu.PSRAM.disabled=Disabled -m5stack-core2.menu.PSRAM.disabled.build.defines= -m5stack-core2.menu.PSRAM.disabled.build.extra_libs= - -m5stack-core2.menu.PartitionScheme.default=Default (2 x 6.5 MB app, 3.6 MB SPIFFS) -m5stack-core2.menu.PartitionScheme.default.build.partitions=default_16MB -m5stack-core2.menu.PartitionScheme.default.upload.maximum_size=6553600 -m5stack-core2.menu.PartitionScheme.large_spiffs=Large SPIFFS (7 MB) -m5stack-core2.menu.PartitionScheme.large_spiffs.build.partitions=large_spiffs_16MB -m5stack-core2.menu.PartitionScheme.large_spiffs.upload.maximum_size=4685824 - -m5stack-core2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) -m5stack-core2.menu.PartitionScheme.minimal.build.partitions=minimal -m5stack-core2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) -m5stack-core2.menu.PartitionScheme.no_ota.build.partitions=no_ota -m5stack-core2.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 -m5stack-core2.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) -m5stack-core2.menu.PartitionScheme.noota_3g.build.partitions=noota_3g -m5stack-core2.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 -m5stack-core2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) -m5stack-core2.menu.PartitionScheme.huge_app.build.partitions=huge_app -m5stack-core2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack-core2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) -m5stack-core2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs -m5stack-core2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 - -m5stack-core2.menu.CPUFreq.240=240MHz (WiFi/BT) -m5stack-core2.menu.CPUFreq.240.build.f_cpu=240000000L -m5stack-core2.menu.CPUFreq.160=160MHz (WiFi/BT) -m5stack-core2.menu.CPUFreq.160.build.f_cpu=160000000L -m5stack-core2.menu.CPUFreq.80=80MHz (WiFi/BT) -m5stack-core2.menu.CPUFreq.80.build.f_cpu=80000000L -m5stack-core2.menu.CPUFreq.40=40MHz (40MHz XTAL) -m5stack-core2.menu.CPUFreq.40.build.f_cpu=40000000L -m5stack-core2.menu.CPUFreq.26=26MHz (26MHz XTAL) -m5stack-core2.menu.CPUFreq.26.build.f_cpu=26000000L -m5stack-core2.menu.CPUFreq.20=20MHz (40MHz XTAL) -m5stack-core2.menu.CPUFreq.20.build.f_cpu=20000000L -m5stack-core2.menu.CPUFreq.13=13MHz (26MHz XTAL) -m5stack-core2.menu.CPUFreq.13.build.f_cpu=13000000L -m5stack-core2.menu.CPUFreq.10=10MHz (40MHz XTAL) -m5stack-core2.menu.CPUFreq.10.build.f_cpu=10000000L - -m5stack-core2.menu.UploadSpeed.921600=921600 -m5stack-core2.menu.UploadSpeed.921600.upload.speed=921600 -m5stack-core2.menu.UploadSpeed.115200=115200 -m5stack-core2.menu.UploadSpeed.115200.upload.speed=115200 -m5stack-core2.menu.UploadSpeed.256000.windows=256000 -m5stack-core2.menu.UploadSpeed.256000.upload.speed=256000 -m5stack-core2.menu.UploadSpeed.230400.windows.upload.speed=256000 -m5stack-core2.menu.UploadSpeed.230400=230400 -m5stack-core2.menu.UploadSpeed.230400.upload.speed=230400 -m5stack-core2.menu.UploadSpeed.460800.linux=460800 -m5stack-core2.menu.UploadSpeed.460800.macosx=460800 -m5stack-core2.menu.UploadSpeed.460800.upload.speed=460800 -m5stack-core2.menu.UploadSpeed.512000.windows=512000 -m5stack-core2.menu.UploadSpeed.512000.upload.speed=512000 -m5stack-core2.menu.UploadSpeed.1500000=1500000 -m5stack-core2.menu.UploadSpeed.1500000.upload.speed=1500000 - -m5stack-core2.menu.DebugLevel.none=None -m5stack-core2.menu.DebugLevel.none.build.code_debug=0 -m5stack-core2.menu.DebugLevel.error=Error -m5stack-core2.menu.DebugLevel.error.build.code_debug=1 -m5stack-core2.menu.DebugLevel.warn=Warn -m5stack-core2.menu.DebugLevel.warn.build.code_debug=2 -m5stack-core2.menu.DebugLevel.info=Info -m5stack-core2.menu.DebugLevel.info.build.code_debug=3 -m5stack-core2.menu.DebugLevel.debug=Debug -m5stack-core2.menu.DebugLevel.debug.build.code_debug=4 -m5stack-core2.menu.DebugLevel.verbose=Verbose -m5stack-core2.menu.DebugLevel.verbose.build.code_debug=5 - -m5stack-core2.menu.EraseFlash.none=Disabled -m5stack-core2.menu.EraseFlash.none.upload.erase_cmd= -m5stack-core2.menu.EraseFlash.all=Enabled -m5stack-core2.menu.EraseFlash.all.upload.erase_cmd=-e +m5stack_cores3.name=M5CoreS3 +m5stack_cores3.vid.0=0x303a +m5stack_cores3.pid.0=0x1001 +m5stack_cores3.bootloader.tool=esptool_py +m5stack_cores3.bootloader.tool.default=esptool_py + +m5stack_cores3.upload.tool=esptool_py +m5stack_cores3.upload.tool.default=esptool_py +m5stack_cores3.upload.tool.network=esp_ota + +m5stack_cores3.upload.maximum_size=1310720 +m5stack_cores3.upload.maximum_data_size=327680 +m5stack_cores3.upload.flags= +m5stack_cores3.upload.extra_flags= +m5stack_cores3.upload.use_1200bps_touch=false +m5stack_cores3.upload.wait_for_upload_port=false + +m5stack_cores3.serial.disableDTR=false +m5stack_cores3.serial.disableRTS=false + +m5stack_cores3.build.tarch=xtensa +m5stack_cores3.build.bootloader_addr=0x0 +m5stack_cores3.build.target=esp32s3 +m5stack_cores3.build.mcu=esp32s3 +m5stack_cores3.build.core=esp32 +m5stack_cores3.build.variant=m5stack_cores3 +m5stack_cores3.build.board=M5STACK_CORES3 + +m5stack_cores3.build.usb_mode=1 +m5stack_cores3.build.cdc_on_boot=1 +m5stack_cores3.build.msc_on_boot=0 +m5stack_cores3.build.dfu_on_boot=0 +m5stack_cores3.build.f_cpu=240000000L +m5stack_cores3.build.flash_size=16MB +m5stack_cores3.build.flash_freq=80m +m5stack_cores3.build.flash_mode=dio +m5stack_cores3.build.boot=qio +m5stack_cores3.build.boot_freq=80m +m5stack_cores3.build.partitions=default +m5stack_cores3.build.defines= +m5stack_cores3.build.loop_core= +m5stack_cores3.build.event_core= +m5stack_cores3.build.psram_type=qspi +m5stack_cores3.build.memory_type={build.boot}_{build.psram_type} + +## IDE 2.0 Seems to not update the value +m5stack_cores3.menu.JTAGAdapter.default=Disabled +m5stack_cores3.menu.JTAGAdapter.default.build.copy_jtag_files=0 +m5stack_cores3.menu.JTAGAdapter.builtin=Integrated USB JTAG +m5stack_cores3.menu.JTAGAdapter.builtin.build.openocdscript=esp32s3-builtin.cfg +m5stack_cores3.menu.JTAGAdapter.builtin.build.copy_jtag_files=1 +m5stack_cores3.menu.JTAGAdapter.external=FTDI Adapter +m5stack_cores3.menu.JTAGAdapter.external.build.openocdscript=esp32s3-ftdi.cfg +m5stack_cores3.menu.JTAGAdapter.external.build.copy_jtag_files=1 +m5stack_cores3.menu.JTAGAdapter.bridge=ESP USB Bridge +m5stack_cores3.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg +m5stack_cores3.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 + +m5stack_cores3.menu.PSRAM.enabled=QSPI PSRAM +m5stack_cores3.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM +m5stack_cores3.menu.PSRAM.enabled.build.psram_type=qspi +m5stack_cores3.menu.PSRAM.disabled=Disabled +m5stack_cores3.menu.PSRAM.disabled.build.defines= +m5stack_cores3.menu.PSRAM.disabled.build.psram_type=qspi +m5stack_cores3.menu.PSRAM.opi=OPI PSRAM +m5stack_cores3.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM +m5stack_cores3.menu.PSRAM.opi.build.psram_type=opi + +m5stack_cores3.menu.FlashMode.qio=QIO 80MHz +m5stack_cores3.menu.FlashMode.qio.build.flash_mode=dio +m5stack_cores3.menu.FlashMode.qio.build.boot=qio +m5stack_cores3.menu.FlashMode.qio.build.boot_freq=80m +m5stack_cores3.menu.FlashMode.qio.build.flash_freq=80m +m5stack_cores3.menu.FlashMode.qio120=QIO 120MHz +m5stack_cores3.menu.FlashMode.qio120.build.flash_mode=dio +m5stack_cores3.menu.FlashMode.qio120.build.boot=qio +m5stack_cores3.menu.FlashMode.qio120.build.boot_freq=120m +m5stack_cores3.menu.FlashMode.qio120.build.flash_freq=80m +m5stack_cores3.menu.FlashMode.dio=DIO 80MHz +m5stack_cores3.menu.FlashMode.dio.build.flash_mode=dio +m5stack_cores3.menu.FlashMode.dio.build.boot=dio +m5stack_cores3.menu.FlashMode.dio.build.boot_freq=80m +m5stack_cores3.menu.FlashMode.dio.build.flash_freq=80m +m5stack_cores3.menu.FlashMode.opi=OPI 80MHz +m5stack_cores3.menu.FlashMode.opi.build.flash_mode=dout +m5stack_cores3.menu.FlashMode.opi.build.boot=opi +m5stack_cores3.menu.FlashMode.opi.build.boot_freq=80m +m5stack_cores3.menu.FlashMode.opi.build.flash_freq=80m + +m5stack_cores3.menu.FlashSize.16M=16MB (128Mb) +m5stack_cores3.menu.FlashSize.16M.build.flash_size=16MB +m5stack_cores3.menu.FlashSize.32M=32MB (256Mb) +m5stack_cores3.menu.FlashSize.32M.build.flash_size=32MB +m5stack_cores3.menu.FlashSize.32M.build.partitions=app5M_fat24M_32MB + +m5stack_cores3.menu.LoopCore.1=Core 1 +m5stack_cores3.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_cores3.menu.LoopCore.0=Core 0 +m5stack_cores3.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_cores3.menu.EventsCore.1=Core 1 +m5stack_cores3.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_cores3.menu.EventsCore.0=Core 0 +m5stack_cores3.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_cores3.menu.USBMode.hwcdc=Hardware CDC and JTAG +m5stack_cores3.menu.USBMode.hwcdc.build.usb_mode=1 +m5stack_cores3.menu.USBMode.default=USB-OTG (TinyUSB) +m5stack_cores3.menu.USBMode.default.build.usb_mode=0 + +m5stack_cores3.menu.CDCOnBoot.cdc=Enabled +m5stack_cores3.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 +m5stack_cores3.menu.CDCOnBoot.default=Disabled +m5stack_cores3.menu.CDCOnBoot.default.build.cdc_on_boot=0 + +m5stack_cores3.menu.MSCOnBoot.default=Disabled +m5stack_cores3.menu.MSCOnBoot.default.build.msc_on_boot=0 +m5stack_cores3.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode) +m5stack_cores3.menu.MSCOnBoot.msc.build.msc_on_boot=1 + +m5stack_cores3.menu.DFUOnBoot.default=Disabled +m5stack_cores3.menu.DFUOnBoot.default.build.dfu_on_boot=0 +m5stack_cores3.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode) +m5stack_cores3.menu.DFUOnBoot.dfu.build.dfu_on_boot=1 + +m5stack_cores3.menu.UploadMode.default=UART0 / Hardware CDC +m5stack_cores3.menu.UploadMode.default.upload.use_1200bps_touch=false +m5stack_cores3.menu.UploadMode.default.upload.wait_for_upload_port=false +m5stack_cores3.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB) +m5stack_cores3.menu.UploadMode.cdc.upload.use_1200bps_touch=true +m5stack_cores3.menu.UploadMode.cdc.upload.wait_for_upload_port=true + +m5stack_cores3.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9.9MB FATFS) +m5stack_cores3.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +m5stack_cores3.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 +m5stack_cores3.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +m5stack_cores3.menu.PartitionScheme.default.build.partitions=default +m5stack_cores3.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_cores3.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_cores3.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_cores3.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_cores3.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_cores3.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_cores3.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_cores3.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_cores3.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_cores3.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_cores3.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_cores3.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_cores3.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_cores3.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_cores3.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_cores3.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_cores3.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_cores3.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_cores3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_cores3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_cores3.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_cores3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_cores3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_cores3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_cores3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_cores3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_cores3.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_cores3.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_cores3.menu.PartitionScheme.rainmaker=RainMaker +m5stack_cores3.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_cores3.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_cores3.menu.PartitionScheme.app5M_fat24M_32MB=32M Flash (4.8MB APP/22MB FATFS) +m5stack_cores3.menu.PartitionScheme.app5M_fat24M_32MB.build.partitions=large_fat_32MB +m5stack_cores3.menu.PartitionScheme.app5M_fat24M_32MB.upload.maximum_size=4718592 +m5stack_cores3.menu.PartitionScheme.app5M_little24M_32MB=32M Flash (4.8MB APP/22MB LittleFS) +m5stack_cores3.menu.PartitionScheme.app5M_little24M_32MB.build.partitions=large_littlefs_32MB +m5stack_cores3.menu.PartitionScheme.app5M_little24M_32MB.upload.maximum_size=4718592 +m5stack_cores3.menu.PartitionScheme.esp_sr_16=ESP SR 16M (3MB APP/7MB SPIFFS/2.9MB MODEL) +m5stack_cores3.menu.PartitionScheme.esp_sr_16.upload.maximum_size=3145728 +m5stack_cores3.menu.PartitionScheme.esp_sr_16.upload.extra_flags=0xD10000 {build.path}/srmodels.bin +m5stack_cores3.menu.PartitionScheme.esp_sr_16.build.partitions=esp_sr_16 +m5stack_cores3.menu.PartitionScheme.custom=Custom +m5stack_cores3.menu.PartitionScheme.custom.build.partitions= +m5stack_cores3.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_cores3.menu.PartitionScheme.factory_4apps=16MB+Factory (4x 3MB APP/2MB SPIFFS) +m5stack_cores3.menu.PartitionScheme.factory_4apps.build.custom_partitions=m5stack_partitions_16MB_factory_4_apps +m5stack_cores3.menu.PartitionScheme.factory_4apps.upload.maximum_size=3145728 +m5stack_cores3.menu.PartitionScheme.factory_6apps=16MB+Factory (6x 2MB APP/2MB SPIFFS) +m5stack_cores3.menu.PartitionScheme.factory_6apps.build.custom_partitions=m5stack_partitions_16MB_factory_6_apps +m5stack_cores3.menu.PartitionScheme.factory_6apps.upload.maximum_size=2097152 + +m5stack_cores3.menu.CPUFreq.240=240MHz (WiFi) +m5stack_cores3.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_cores3.menu.CPUFreq.160=160MHz (WiFi) +m5stack_cores3.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_cores3.menu.CPUFreq.80=80MHz (WiFi) +m5stack_cores3.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_cores3.menu.CPUFreq.40=40MHz +m5stack_cores3.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_cores3.menu.CPUFreq.20=20MHz +m5stack_cores3.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_cores3.menu.CPUFreq.10=10MHz +m5stack_cores3.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_cores3.menu.UploadSpeed.921600=921600 +m5stack_cores3.menu.UploadSpeed.921600.upload.speed=921600 +m5stack_cores3.menu.UploadSpeed.115200=115200 +m5stack_cores3.menu.UploadSpeed.115200.upload.speed=115200 +m5stack_cores3.menu.UploadSpeed.256000.windows=256000 +m5stack_cores3.menu.UploadSpeed.256000.upload.speed=256000 +m5stack_cores3.menu.UploadSpeed.230400.windows.upload.speed=256000 +m5stack_cores3.menu.UploadSpeed.230400=230400 +m5stack_cores3.menu.UploadSpeed.230400.upload.speed=230400 +m5stack_cores3.menu.UploadSpeed.460800.linux=460800 +m5stack_cores3.menu.UploadSpeed.460800.macosx=460800 +m5stack_cores3.menu.UploadSpeed.460800.upload.speed=460800 +m5stack_cores3.menu.UploadSpeed.512000.windows=512000 +m5stack_cores3.menu.UploadSpeed.512000.upload.speed=512000 + +m5stack_cores3.menu.DebugLevel.none=None +m5stack_cores3.menu.DebugLevel.none.build.code_debug=0 +m5stack_cores3.menu.DebugLevel.error=Error +m5stack_cores3.menu.DebugLevel.error.build.code_debug=1 +m5stack_cores3.menu.DebugLevel.warn=Warn +m5stack_cores3.menu.DebugLevel.warn.build.code_debug=2 +m5stack_cores3.menu.DebugLevel.info=Info +m5stack_cores3.menu.DebugLevel.info.build.code_debug=3 +m5stack_cores3.menu.DebugLevel.debug=Debug +m5stack_cores3.menu.DebugLevel.debug.build.code_debug=4 +m5stack_cores3.menu.DebugLevel.verbose=Verbose +m5stack_cores3.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_cores3.menu.EraseFlash.none=Disabled +m5stack_cores3.menu.EraseFlash.none.upload.erase_cmd= +m5stack_cores3.menu.EraseFlash.all=Enabled +m5stack_cores3.menu.EraseFlash.all.upload.erase_cmd=-e + +############################################################## + +m5stack_timer_cam.name=M5TimerCAM + +m5stack_timer_cam.bootloader.tool=esptool_py +m5stack_timer_cam.bootloader.tool.default=esptool_py + +m5stack_timer_cam.upload.tool=esptool_py +m5stack_timer_cam.upload.tool.default=esptool_py +m5stack_timer_cam.upload.tool.network=esp_ota + +m5stack_timer_cam.upload.maximum_size=1310720 +m5stack_timer_cam.upload.maximum_data_size=327680 + +m5stack_timer_cam.upload.flags= +m5stack_timer_cam.upload.extra_flags= + +m5stack_timer_cam.serial.disableDTR=true +m5stack_timer_cam.serial.disableRTS=true + +m5stack_timer_cam.build.tarch=xtensa +m5stack_timer_cam.build.bootloader_addr=0x1000 +m5stack_timer_cam.build.target=esp32 +m5stack_timer_cam.build.mcu=esp32 +m5stack_timer_cam.build.core=esp32 +m5stack_timer_cam.build.variant=m5stack_timer_cam +m5stack_timer_cam.build.board=M5STACK_TIMER_CAM + +m5stack_timer_cam.build.f_cpu=240000000L +m5stack_timer_cam.build.flash_size=4MB +m5stack_timer_cam.build.flash_freq=80m +m5stack_timer_cam.build.flash_mode=dio +m5stack_timer_cam.build.boot=dio +m5stack_timer_cam.build.partitions=default +m5stack_timer_cam.build.defines= +m5stack_timer_cam.build.loop_core= +m5stack_timer_cam.build.event_core= + +m5stack_timer_cam.menu.PSRAM.enabled=Enabled +m5stack_timer_cam.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw +m5stack_timer_cam.menu.PSRAM.enabled.build.extra_libs= +m5stack_timer_cam.menu.PSRAM.disabled=Disabled +m5stack_timer_cam.menu.PSRAM.disabled.build.defines= +m5stack_timer_cam.menu.PSRAM.disabled.build.extra_libs= + +m5stack_timer_cam.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +m5stack_timer_cam.menu.PartitionScheme.default.build.partitions=default +m5stack_timer_cam.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_timer_cam.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_timer_cam.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_timer_cam.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_timer_cam.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_timer_cam.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_timer_cam.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_timer_cam.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_timer_cam.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_timer_cam.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_timer_cam.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_timer_cam.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_timer_cam.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_timer_cam.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_timer_cam.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_timer_cam.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_timer_cam.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_timer_cam.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_timer_cam.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_timer_cam.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_timer_cam.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_timer_cam.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_timer_cam.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_timer_cam.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_timer_cam.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 + +m5stack_timer_cam.menu.CPUFreq.240=240MHz (WiFi/BT) +m5stack_timer_cam.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_timer_cam.menu.CPUFreq.160=160MHz (WiFi/BT) +m5stack_timer_cam.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_timer_cam.menu.CPUFreq.80=80MHz (WiFi/BT) +m5stack_timer_cam.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_timer_cam.menu.CPUFreq.40=40MHz (40MHz XTAL) +m5stack_timer_cam.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_timer_cam.menu.CPUFreq.26=26MHz (26MHz XTAL) +m5stack_timer_cam.menu.CPUFreq.26.build.f_cpu=26000000L +m5stack_timer_cam.menu.CPUFreq.20=20MHz (40MHz XTAL) +m5stack_timer_cam.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_timer_cam.menu.CPUFreq.13=13MHz (26MHz XTAL) +m5stack_timer_cam.menu.CPUFreq.13.build.f_cpu=13000000L +m5stack_timer_cam.menu.CPUFreq.10=10MHz (40MHz XTAL) +m5stack_timer_cam.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_timer_cam.menu.FlashMode.qio=QIO +m5stack_timer_cam.menu.FlashMode.qio.build.flash_mode=dio +m5stack_timer_cam.menu.FlashMode.qio.build.boot=qio +m5stack_timer_cam.menu.FlashMode.dio=DIO +m5stack_timer_cam.menu.FlashMode.dio.build.flash_mode=dio +m5stack_timer_cam.menu.FlashMode.dio.build.boot=dio +m5stack_timer_cam.menu.FlashMode.qout=QOUT +m5stack_timer_cam.menu.FlashMode.qout.build.flash_mode=dout +m5stack_timer_cam.menu.FlashMode.qout.build.boot=qout +m5stack_timer_cam.menu.FlashMode.dout=DOUT +m5stack_timer_cam.menu.FlashMode.dout.build.flash_mode=dout +m5stack_timer_cam.menu.FlashMode.dout.build.boot=dout + +m5stack_timer_cam.menu.FlashFreq.80=80MHz +m5stack_timer_cam.menu.FlashFreq.80.build.flash_freq=80m +m5stack_timer_cam.menu.FlashFreq.40=40MHz +m5stack_timer_cam.menu.FlashFreq.40.build.flash_freq=40m + +m5stack_timer_cam.menu.FlashSize.4M=4MB (32Mb) +m5stack_timer_cam.menu.FlashSize.4M.build.flash_size=4MB + +m5stack_timer_cam.menu.UploadSpeed.1500000=1500000 +m5stack_timer_cam.menu.UploadSpeed.1500000.upload.speed=1500000 +m5stack_timer_cam.menu.UploadSpeed.750000=750000 +m5stack_timer_cam.menu.UploadSpeed.750000.upload.speed=750000 +m5stack_timer_cam.menu.UploadSpeed.500000=500000 +m5stack_timer_cam.menu.UploadSpeed.500000.upload.speed=500000 +m5stack_timer_cam.menu.UploadSpeed.250000=250000 +m5stack_timer_cam.menu.UploadSpeed.250000.upload.speed=250000 +m5stack_timer_cam.menu.UploadSpeed.115200=115200 +m5stack_timer_cam.menu.UploadSpeed.115200.upload.speed=115200 + +m5stack_timer_cam.menu.LoopCore.1=Core 1 +m5stack_timer_cam.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_timer_cam.menu.LoopCore.0=Core 0 +m5stack_timer_cam.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_timer_cam.menu.EventsCore.1=Core 1 +m5stack_timer_cam.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_timer_cam.menu.EventsCore.0=Core 0 +m5stack_timer_cam.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_timer_cam.menu.DebugLevel.none=None +m5stack_timer_cam.menu.DebugLevel.none.build.code_debug=0 +m5stack_timer_cam.menu.DebugLevel.error=Error +m5stack_timer_cam.menu.DebugLevel.error.build.code_debug=1 +m5stack_timer_cam.menu.DebugLevel.warn=Warn +m5stack_timer_cam.menu.DebugLevel.warn.build.code_debug=2 +m5stack_timer_cam.menu.DebugLevel.info=Info +m5stack_timer_cam.menu.DebugLevel.info.build.code_debug=3 +m5stack_timer_cam.menu.DebugLevel.debug=Debug +m5stack_timer_cam.menu.DebugLevel.debug.build.code_debug=4 +m5stack_timer_cam.menu.DebugLevel.verbose=Verbose +m5stack_timer_cam.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_timer_cam.menu.EraseFlash.none=Disabled +m5stack_timer_cam.menu.EraseFlash.none.upload.erase_cmd= +m5stack_timer_cam.menu.EraseFlash.all=Enabled +m5stack_timer_cam.menu.EraseFlash.all.upload.erase_cmd=-e + + +############################################################## + + +m5stack_unit_cam.name=M5UnitCAM + +m5stack_unit_cam.bootloader.tool=esptool_py +m5stack_unit_cam.bootloader.tool.default=esptool_py + +m5stack_unit_cam.upload.tool=esptool_py +m5stack_unit_cam.upload.tool.default=esptool_py +m5stack_unit_cam.upload.tool.network=esp_ota + +m5stack_unit_cam.upload.maximum_size=1310720 +m5stack_unit_cam.upload.maximum_data_size=327680 + +m5stack_unit_cam.upload.flags= +m5stack_unit_cam.upload.extra_flags= + +m5stack_unit_cam.serial.disableDTR=true +m5stack_unit_cam.serial.disableRTS=true + +m5stack_unit_cam.build.tarch=xtensa +m5stack_unit_cam.build.bootloader_addr=0x1000 +m5stack_unit_cam.build.target=esp32 +m5stack_unit_cam.build.mcu=esp32 +m5stack_unit_cam.build.core=esp32 +m5stack_unit_cam.build.variant=m5stack_unit_cam +m5stack_unit_cam.build.board=M5STACK_UNIT_CAM + +m5stack_unit_cam.build.f_cpu=240000000L +m5stack_unit_cam.build.flash_size=4MB +m5stack_unit_cam.build.flash_freq=80m +m5stack_unit_cam.build.flash_mode=dio +m5stack_unit_cam.build.boot=dio +m5stack_unit_cam.build.partitions=default +m5stack_unit_cam.build.defines= +m5stack_unit_cam.build.loop_core= +m5stack_unit_cam.build.event_core= + +m5stack_unit_cam.menu.PSRAM.enabled=Enabled +m5stack_unit_cam.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw +m5stack_unit_cam.menu.PSRAM.enabled.build.extra_libs= +m5stack_unit_cam.menu.PSRAM.disabled=Disabled +m5stack_unit_cam.menu.PSRAM.disabled.build.defines= +m5stack_unit_cam.menu.PSRAM.disabled.build.extra_libs= + +m5stack_unit_cam.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +m5stack_unit_cam.menu.PartitionScheme.default.build.partitions=default +m5stack_unit_cam.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_unit_cam.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_unit_cam.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_unit_cam.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_unit_cam.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_unit_cam.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_unit_cam.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_unit_cam.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_unit_cam.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_unit_cam.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_unit_cam.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_unit_cam.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_unit_cam.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_unit_cam.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_unit_cam.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_unit_cam.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_unit_cam.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_unit_cam.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_unit_cam.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_unit_cam.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_unit_cam.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_unit_cam.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_unit_cam.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_unit_cam.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_unit_cam.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 + +m5stack_unit_cam.menu.CPUFreq.240=240MHz (WiFi/BT) +m5stack_unit_cam.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_unit_cam.menu.CPUFreq.160=160MHz (WiFi/BT) +m5stack_unit_cam.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_unit_cam.menu.CPUFreq.80=80MHz (WiFi/BT) +m5stack_unit_cam.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_unit_cam.menu.CPUFreq.40=40MHz (40MHz XTAL) +m5stack_unit_cam.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_unit_cam.menu.CPUFreq.26=26MHz (26MHz XTAL) +m5stack_unit_cam.menu.CPUFreq.26.build.f_cpu=26000000L +m5stack_unit_cam.menu.CPUFreq.20=20MHz (40MHz XTAL) +m5stack_unit_cam.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_unit_cam.menu.CPUFreq.13=13MHz (26MHz XTAL) +m5stack_unit_cam.menu.CPUFreq.13.build.f_cpu=13000000L +m5stack_unit_cam.menu.CPUFreq.10=10MHz (40MHz XTAL) +m5stack_unit_cam.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_unit_cam.menu.FlashMode.qio=QIO +m5stack_unit_cam.menu.FlashMode.qio.build.flash_mode=dio +m5stack_unit_cam.menu.FlashMode.qio.build.boot=qio +m5stack_unit_cam.menu.FlashMode.dio=DIO +m5stack_unit_cam.menu.FlashMode.dio.build.flash_mode=dio +m5stack_unit_cam.menu.FlashMode.dio.build.boot=dio +m5stack_unit_cam.menu.FlashMode.qout=QOUT +m5stack_unit_cam.menu.FlashMode.qout.build.flash_mode=dout +m5stack_unit_cam.menu.FlashMode.qout.build.boot=qout +m5stack_unit_cam.menu.FlashMode.dout=DOUT +m5stack_unit_cam.menu.FlashMode.dout.build.flash_mode=dout +m5stack_unit_cam.menu.FlashMode.dout.build.boot=dout + +m5stack_unit_cam.menu.FlashFreq.80=80MHz +m5stack_unit_cam.menu.FlashFreq.80.build.flash_freq=80m +m5stack_unit_cam.menu.FlashFreq.40=40MHz +m5stack_unit_cam.menu.FlashFreq.40.build.flash_freq=40m + +m5stack_unit_cam.menu.FlashSize.4M=4MB (32Mb) +m5stack_unit_cam.menu.FlashSize.4M.build.flash_size=4MB + +m5stack_unit_cam.menu.UploadSpeed.1500000=1500000 +m5stack_unit_cam.menu.UploadSpeed.1500000.upload.speed=1500000 +m5stack_unit_cam.menu.UploadSpeed.750000=750000 +m5stack_unit_cam.menu.UploadSpeed.750000.upload.speed=750000 +m5stack_unit_cam.menu.UploadSpeed.500000=500000 +m5stack_unit_cam.menu.UploadSpeed.500000.upload.speed=500000 +m5stack_unit_cam.menu.UploadSpeed.250000=250000 +m5stack_unit_cam.menu.UploadSpeed.250000.upload.speed=250000 +m5stack_unit_cam.menu.UploadSpeed.115200=115200 +m5stack_unit_cam.menu.UploadSpeed.115200.upload.speed=115200 + +m5stack_unit_cam.menu.LoopCore.1=Core 1 +m5stack_unit_cam.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_unit_cam.menu.LoopCore.0=Core 0 +m5stack_unit_cam.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_unit_cam.menu.EventsCore.1=Core 1 +m5stack_unit_cam.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_unit_cam.menu.EventsCore.0=Core 0 +m5stack_unit_cam.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_unit_cam.menu.DebugLevel.none=None +m5stack_unit_cam.menu.DebugLevel.none.build.code_debug=0 +m5stack_unit_cam.menu.DebugLevel.error=Error +m5stack_unit_cam.menu.DebugLevel.error.build.code_debug=1 +m5stack_unit_cam.menu.DebugLevel.warn=Warn +m5stack_unit_cam.menu.DebugLevel.warn.build.code_debug=2 +m5stack_unit_cam.menu.DebugLevel.info=Info +m5stack_unit_cam.menu.DebugLevel.info.build.code_debug=3 +m5stack_unit_cam.menu.DebugLevel.debug=Debug +m5stack_unit_cam.menu.DebugLevel.debug.build.code_debug=4 +m5stack_unit_cam.menu.DebugLevel.verbose=Verbose +m5stack_unit_cam.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_unit_cam.menu.EraseFlash.none=Disabled +m5stack_unit_cam.menu.EraseFlash.none.upload.erase_cmd= +m5stack_unit_cam.menu.EraseFlash.all=Enabled +m5stack_unit_cam.menu.EraseFlash.all.upload.erase_cmd=-e + +############################################################## + +m5stack_unit_cams3.name=M5UnitCAMS3 +m5stack_unit_cams3.vid.0=0x303a +m5stack_unit_cams3.pid.0=0x1001 +m5stack_unit_cams3.bootloader.tool=esptool_py +m5stack_unit_cams3.bootloader.tool.default=esptool_py + +m5stack_unit_cams3.upload.tool=esptool_py +m5stack_unit_cams3.upload.tool.default=esptool_py +m5stack_unit_cams3.upload.tool.network=esp_ota + +m5stack_unit_cams3.upload.maximum_size=1310720 +m5stack_unit_cams3.upload.maximum_data_size=327680 +m5stack_unit_cams3.upload.flags= +m5stack_unit_cams3.upload.extra_flags= +m5stack_unit_cams3.upload.use_1200bps_touch=false +m5stack_unit_cams3.upload.wait_for_upload_port=false + +m5stack_unit_cams3.serial.disableDTR=false +m5stack_unit_cams3.serial.disableRTS=false + +m5stack_unit_cams3.build.tarch=xtensa +m5stack_unit_cams3.build.bootloader_addr=0x0 +m5stack_unit_cams3.build.target=esp32s3 +m5stack_unit_cams3.build.mcu=esp32s3 +m5stack_unit_cams3.build.core=esp32 +m5stack_unit_cams3.build.variant=m5stack_unit_cams3 +m5stack_unit_cams3.build.board=M5STACK_UNIT_CAMS3 + +m5stack_unit_cams3.build.usb_mode=1 +m5stack_unit_cams3.build.cdc_on_boot=1 +m5stack_unit_cams3.build.msc_on_boot=0 +m5stack_unit_cams3.build.dfu_on_boot=0 +m5stack_unit_cams3.build.f_cpu=240000000L +m5stack_unit_cams3.build.flash_size=16MB +m5stack_unit_cams3.build.flash_freq=80m +m5stack_unit_cams3.build.flash_mode=dio +m5stack_unit_cams3.build.boot=qio +m5stack_unit_cams3.build.boot_freq=80m +m5stack_unit_cams3.build.partitions=default +m5stack_unit_cams3.build.defines= +m5stack_unit_cams3.build.loop_core= +m5stack_unit_cams3.build.event_core= +m5stack_unit_cams3.build.psram_type=qspi +m5stack_unit_cams3.build.memory_type={build.boot}_{build.psram_type} + +## IDE 2.0 Seems to not update the value +m5stack_unit_cams3.menu.JTAGAdapter.default=Disabled +m5stack_unit_cams3.menu.JTAGAdapter.default.build.copy_jtag_files=0 +m5stack_unit_cams3.menu.JTAGAdapter.builtin=Integrated USB JTAG +m5stack_unit_cams3.menu.JTAGAdapter.builtin.build.openocdscript=esp32s3-builtin.cfg +m5stack_unit_cams3.menu.JTAGAdapter.builtin.build.copy_jtag_files=1 +m5stack_unit_cams3.menu.JTAGAdapter.external=FTDI Adapter +m5stack_unit_cams3.menu.JTAGAdapter.external.build.openocdscript=esp32s3-ftdi.cfg +m5stack_unit_cams3.menu.JTAGAdapter.external.build.copy_jtag_files=1 +m5stack_unit_cams3.menu.JTAGAdapter.bridge=ESP USB Bridge +m5stack_unit_cams3.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg +m5stack_unit_cams3.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 + +m5stack_unit_cams3.menu.PSRAM.enabled=QSPI PSRAM +m5stack_unit_cams3.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM +m5stack_unit_cams3.menu.PSRAM.enabled.build.psram_type=qspi +m5stack_unit_cams3.menu.PSRAM.disabled=Disabled +m5stack_unit_cams3.menu.PSRAM.disabled.build.defines= +m5stack_unit_cams3.menu.PSRAM.disabled.build.psram_type=qspi +m5stack_unit_cams3.menu.PSRAM.opi=OPI PSRAM +m5stack_unit_cams3.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM +m5stack_unit_cams3.menu.PSRAM.opi.build.psram_type=opi + +m5stack_unit_cams3.menu.FlashMode.qio=QIO 80MHz +m5stack_unit_cams3.menu.FlashMode.qio.build.flash_mode=dio +m5stack_unit_cams3.menu.FlashMode.qio.build.boot=qio +m5stack_unit_cams3.menu.FlashMode.qio.build.boot_freq=80m +m5stack_unit_cams3.menu.FlashMode.qio.build.flash_freq=80m +m5stack_unit_cams3.menu.FlashMode.qio120=QIO 120MHz +m5stack_unit_cams3.menu.FlashMode.qio120.build.flash_mode=dio +m5stack_unit_cams3.menu.FlashMode.qio120.build.boot=qio +m5stack_unit_cams3.menu.FlashMode.qio120.build.boot_freq=120m +m5stack_unit_cams3.menu.FlashMode.qio120.build.flash_freq=80m +m5stack_unit_cams3.menu.FlashMode.dio=DIO 80MHz +m5stack_unit_cams3.menu.FlashMode.dio.build.flash_mode=dio +m5stack_unit_cams3.menu.FlashMode.dio.build.boot=dio +m5stack_unit_cams3.menu.FlashMode.dio.build.boot_freq=80m +m5stack_unit_cams3.menu.FlashMode.dio.build.flash_freq=80m +m5stack_unit_cams3.menu.FlashMode.opi=OPI 80MHz +m5stack_unit_cams3.menu.FlashMode.opi.build.flash_mode=dout +m5stack_unit_cams3.menu.FlashMode.opi.build.boot=opi +m5stack_unit_cams3.menu.FlashMode.opi.build.boot_freq=80m +m5stack_unit_cams3.menu.FlashMode.opi.build.flash_freq=80m + +m5stack_unit_cams3.menu.FlashSize.16M=16MB (128Mb) +m5stack_unit_cams3.menu.FlashSize.16M.build.flash_size=16MB +m5stack_unit_cams3.menu.FlashSize.32M=32MB (256Mb) +m5stack_unit_cams3.menu.FlashSize.32M.build.flash_size=32MB +m5stack_unit_cams3.menu.FlashSize.32M.build.partitions=app5M_fat24M_32MB + +m5stack_unit_cams3.menu.LoopCore.1=Core 1 +m5stack_unit_cams3.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_unit_cams3.menu.LoopCore.0=Core 0 +m5stack_unit_cams3.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_unit_cams3.menu.EventsCore.1=Core 1 +m5stack_unit_cams3.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_unit_cams3.menu.EventsCore.0=Core 0 +m5stack_unit_cams3.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_unit_cams3.menu.USBMode.hwcdc=Hardware CDC and JTAG +m5stack_unit_cams3.menu.USBMode.hwcdc.build.usb_mode=1 +m5stack_unit_cams3.menu.USBMode.default=USB-OTG (TinyUSB) +m5stack_unit_cams3.menu.USBMode.default.build.usb_mode=0 + +m5stack_unit_cams3.menu.CDCOnBoot.cdc=Enabled +m5stack_unit_cams3.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 +m5stack_unit_cams3.menu.CDCOnBoot.default=Disabled +m5stack_unit_cams3.menu.CDCOnBoot.default.build.cdc_on_boot=0 + +m5stack_unit_cams3.menu.MSCOnBoot.default=Disabled +m5stack_unit_cams3.menu.MSCOnBoot.default.build.msc_on_boot=0 +m5stack_unit_cams3.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode) +m5stack_unit_cams3.menu.MSCOnBoot.msc.build.msc_on_boot=1 + +m5stack_unit_cams3.menu.DFUOnBoot.default=Disabled +m5stack_unit_cams3.menu.DFUOnBoot.default.build.dfu_on_boot=0 +m5stack_unit_cams3.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode) +m5stack_unit_cams3.menu.DFUOnBoot.dfu.build.dfu_on_boot=1 + +m5stack_unit_cams3.menu.UploadMode.default=UART0 / Hardware CDC +m5stack_unit_cams3.menu.UploadMode.default.upload.use_1200bps_touch=false +m5stack_unit_cams3.menu.UploadMode.default.upload.wait_for_upload_port=false +m5stack_unit_cams3.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB) +m5stack_unit_cams3.menu.UploadMode.cdc.upload.use_1200bps_touch=true +m5stack_unit_cams3.menu.UploadMode.cdc.upload.wait_for_upload_port=true + +m5stack_unit_cams3.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9.9MB FATFS) +m5stack_unit_cams3.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +m5stack_unit_cams3.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 +m5stack_unit_cams3.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +m5stack_unit_cams3.menu.PartitionScheme.default.build.partitions=default +m5stack_unit_cams3.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_unit_cams3.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_unit_cams3.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_unit_cams3.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_unit_cams3.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_unit_cams3.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_unit_cams3.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_unit_cams3.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_unit_cams3.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_unit_cams3.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_unit_cams3.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_unit_cams3.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_unit_cams3.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_unit_cams3.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_unit_cams3.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_unit_cams3.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_unit_cams3.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_unit_cams3.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_unit_cams3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_unit_cams3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_unit_cams3.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_unit_cams3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_unit_cams3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_unit_cams3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_unit_cams3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_unit_cams3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_unit_cams3.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_unit_cams3.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_unit_cams3.menu.PartitionScheme.rainmaker=RainMaker +m5stack_unit_cams3.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_unit_cams3.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_unit_cams3.menu.PartitionScheme.app5M_fat24M_32MB=32M Flash (4.8MB APP/22MB FATFS) +m5stack_unit_cams3.menu.PartitionScheme.app5M_fat24M_32MB.build.partitions=large_fat_32MB +m5stack_unit_cams3.menu.PartitionScheme.app5M_fat24M_32MB.upload.maximum_size=4718592 +m5stack_unit_cams3.menu.PartitionScheme.app5M_little24M_32MB=32M Flash (4.8MB APP/22MB LittleFS) +m5stack_unit_cams3.menu.PartitionScheme.app5M_little24M_32MB.build.partitions=large_littlefs_32MB +m5stack_unit_cams3.menu.PartitionScheme.app5M_little24M_32MB.upload.maximum_size=4718592 +m5stack_unit_cams3.menu.PartitionScheme.esp_sr_16=ESP SR 16M (3MB APP/7MB SPIFFS/2.9MB MODEL) +m5stack_unit_cams3.menu.PartitionScheme.esp_sr_16.upload.maximum_size=3145728 +m5stack_unit_cams3.menu.PartitionScheme.esp_sr_16.upload.extra_flags=0xD10000 {build.path}/srmodels.bin +m5stack_unit_cams3.menu.PartitionScheme.esp_sr_16.build.partitions=esp_sr_16 +m5stack_unit_cams3.menu.PartitionScheme.custom=Custom +m5stack_unit_cams3.menu.PartitionScheme.custom.build.partitions= +m5stack_unit_cams3.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_unit_cams3.menu.CPUFreq.240=240MHz (WiFi) +m5stack_unit_cams3.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_unit_cams3.menu.CPUFreq.160=160MHz (WiFi) +m5stack_unit_cams3.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_unit_cams3.menu.CPUFreq.80=80MHz (WiFi) +m5stack_unit_cams3.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_unit_cams3.menu.CPUFreq.40=40MHz +m5stack_unit_cams3.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_unit_cams3.menu.CPUFreq.20=20MHz +m5stack_unit_cams3.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_unit_cams3.menu.CPUFreq.10=10MHz +m5stack_unit_cams3.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_unit_cams3.menu.UploadSpeed.921600=921600 +m5stack_unit_cams3.menu.UploadSpeed.921600.upload.speed=921600 +m5stack_unit_cams3.menu.UploadSpeed.115200=115200 +m5stack_unit_cams3.menu.UploadSpeed.115200.upload.speed=115200 +m5stack_unit_cams3.menu.UploadSpeed.256000.windows=256000 +m5stack_unit_cams3.menu.UploadSpeed.256000.upload.speed=256000 +m5stack_unit_cams3.menu.UploadSpeed.230400.windows.upload.speed=256000 +m5stack_unit_cams3.menu.UploadSpeed.230400=230400 +m5stack_unit_cams3.menu.UploadSpeed.230400.upload.speed=230400 +m5stack_unit_cams3.menu.UploadSpeed.460800.linux=460800 +m5stack_unit_cams3.menu.UploadSpeed.460800.macosx=460800 +m5stack_unit_cams3.menu.UploadSpeed.460800.upload.speed=460800 +m5stack_unit_cams3.menu.UploadSpeed.512000.windows=512000 +m5stack_unit_cams3.menu.UploadSpeed.512000.upload.speed=512000 + +m5stack_unit_cams3.menu.DebugLevel.none=None +m5stack_unit_cams3.menu.DebugLevel.none.build.code_debug=0 +m5stack_unit_cams3.menu.DebugLevel.error=Error +m5stack_unit_cams3.menu.DebugLevel.error.build.code_debug=1 +m5stack_unit_cams3.menu.DebugLevel.warn=Warn +m5stack_unit_cams3.menu.DebugLevel.warn.build.code_debug=2 +m5stack_unit_cams3.menu.DebugLevel.info=Info +m5stack_unit_cams3.menu.DebugLevel.info.build.code_debug=3 +m5stack_unit_cams3.menu.DebugLevel.debug=Debug +m5stack_unit_cams3.menu.DebugLevel.debug.build.code_debug=4 +m5stack_unit_cams3.menu.DebugLevel.verbose=Verbose +m5stack_unit_cams3.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_unit_cams3.menu.EraseFlash.none=Disabled +m5stack_unit_cams3.menu.EraseFlash.none.upload.erase_cmd= +m5stack_unit_cams3.menu.EraseFlash.all=Enabled +m5stack_unit_cams3.menu.EraseFlash.all.upload.erase_cmd=-e + ############################################################## -m5stack-cores3.name=M5Stack-CoreS3 -m5stack-cores3.vid.0=0x303a -m5stack-cores3.pid.0=0x1001 - -m5stack-cores3.bootloader.tool=esptool_py -m5stack-cores3.bootloader.tool.default=esptool_py - -m5stack-cores3.upload.tool=esptool_py -m5stack-cores3.upload.tool.default=esptool_py -m5stack-cores3.upload.tool.network=esp_ota - -m5stack-cores3.upload.maximum_size=1310720 -m5stack-cores3.upload.maximum_data_size=327680 -m5stack-cores3.upload.speed=921600 -m5stack-cores3.upload.flags= -m5stack-cores3.upload.extra_flags= -m5stack-cores3.upload.use_1200bps_touch=false -m5stack-cores3.upload.wait_for_upload_port=false - -m5stack-cores3.serial.disableDTR=false -m5stack-cores3.serial.disableRTS=false - -m5stack-cores3.build.tarch=xtensa -m5stack-cores3.build.bootloader_addr=0x0 -m5stack-cores3.build.target=esp32s3 -m5stack-cores3.build.mcu=esp32s3 -m5stack-cores3.build.core=esp32 -m5stack-cores3.build.variant=m5stack_cores3 -m5stack-cores3.build.board=M5STACK_CORES3 - -m5stack-cores3.build.usb_mode=1 -m5stack-cores3.build.cdc_on_boot=1 -m5stack-cores3.build.msc_on_boot=0 -m5stack-cores3.build.dfu_on_boot=0 -m5stack-cores3.build.f_cpu=240000000L -m5stack-cores3.build.flash_size=16MB -m5stack-cores3.build.flash_freq=80m -m5stack-cores3.build.flash_mode=dio -m5stack-cores3.build.boot=qio -m5stack-cores3.build.partitions=default_16MB -m5stack-cores3.build.defines=-DBOARD_HAS_PSRAM -m5stack-cores3.build.psram_type=qspi -m5stack-cores3.build.memory_type=qio_qspi -m5stack-cores3.build.loop_core=-DARDUINO_RUNNING_CORE=1 -m5stack-cores3.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 - -m5stack-cores3.menu.JTAGAdapter.default=Disabled -m5stack-cores3.menu.JTAGAdapter.default.build.copy_jtag_files=0 -m5stack-cores3.menu.JTAGAdapter.builtin=Integrated USB JTAG -m5stack-cores3.menu.JTAGAdapter.builtin.build.openocdscript=esp32s3-builtin.cfg -m5stack-cores3.menu.JTAGAdapter.builtin.build.copy_jtag_files=1 -m5stack-cores3.menu.JTAGAdapter.external=FTDI Adapter -m5stack-cores3.menu.JTAGAdapter.external.build.openocdscript=esp32s3-ftdi.cfg -m5stack-cores3.menu.JTAGAdapter.external.build.copy_jtag_files=1 -m5stack-cores3.menu.JTAGAdapter.bridge=ESP USB Bridge -m5stack-cores3.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg -m5stack-cores3.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 - -m5stack-cores3.menu.FlashSize.16M=16MB (128Mb) -m5stack-cores3.menu.FlashSize.16M.build.flash_size=16MB -m5stack-cores3.menu.FlashSize.16M.build.partitions=default_16MB -m5stack-cores3.menu.FlashSize.4M=4MB (32Mb) -m5stack-cores3.menu.FlashSize.4M.build.flash_size=4MB -m5stack-cores3.menu.FlashSize.8M=8MB (64Mb) -m5stack-cores3.menu.FlashSize.8M.build.flash_size=8MB -m5stack-cores3.menu.FlashSize.8M.build.partitions=default_8MB - -m5stack-cores3.menu.LoopCore.1=Core 1 -m5stack-cores3.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 -m5stack-cores3.menu.LoopCore.0=Core 0 -m5stack-cores3.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 - -m5stack-cores3.menu.EventsCore.1=Core 1 -m5stack-cores3.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 -m5stack-cores3.menu.EventsCore.0=Core 0 -m5stack-cores3.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 - -m5stack-cores3.menu.USBMode.hwcdc=Hardware CDC and JTAG -m5stack-cores3.menu.USBMode.hwcdc.build.usb_mode=1 -m5stack-cores3.menu.USBMode.hwcdc.upload.use_1200bps_touch=false -m5stack-cores3.menu.USBMode.hwcdc.upload.wait_for_upload_port=false -m5stack-cores3.menu.USBMode.default=USB-OTG -m5stack-cores3.menu.USBMode.default.build.usb_mode=0 -m5stack-cores3.menu.USBMode.default.upload.use_1200bps_touch=true -m5stack-cores3.menu.USBMode.default.upload.wait_for_upload_port=true - -m5stack-cores3.menu.CDCOnBoot.cdc=Enabled -m5stack-cores3.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 -m5stack-cores3.menu.CDCOnBoot.default=Disabled -m5stack-cores3.menu.CDCOnBoot.default.build.cdc_on_boot=0 - -m5stack-cores3.menu.MSCOnBoot.default=Disabled -m5stack-cores3.menu.MSCOnBoot.default.build.msc_on_boot=0 -m5stack-cores3.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode) -m5stack-cores3.menu.MSCOnBoot.msc.build.msc_on_boot=1 - -m5stack-cores3.menu.DFUOnBoot.default=Disabled -m5stack-cores3.menu.DFUOnBoot.default.build.dfu_on_boot=0 -m5stack-cores3.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode) -m5stack-cores3.menu.DFUOnBoot.dfu.build.dfu_on_boot=1 - -m5stack-cores3.menu.UploadMode.default=UART0 / Hardware CDC -m5stack-cores3.menu.UploadMode.default.upload.use_1200bps_touch=false -m5stack-cores3.menu.UploadMode.default.upload.wait_for_upload_port=false -m5stack-cores3.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB) -m5stack-cores3.menu.UploadMode.cdc.upload.use_1200bps_touch=true -m5stack-cores3.menu.UploadMode.cdc.upload.wait_for_upload_port=true - -m5stack-cores3.menu.PartitionScheme.default_16MB=Default 16MB with spiffs (2x 6.5 MB APP/3.6MB SPIFFS) -m5stack-cores3.menu.PartitionScheme.default_16MB.build.partitions=default_16MB -m5stack-cores3.menu.PartitionScheme.default_16MB.upload.maximum_size=6553600 -m5stack-cores3.menu.PartitionScheme.default=4MB with spiffs (2x 1.2MB APP/1.5MB SPIFFS) -m5stack-cores3.menu.PartitionScheme.default.build.partitions=default -m5stack-cores3.menu.PartitionScheme.defaultffat=4MB with ffat (2x 1.2MB APP/1.5MB FATFS) -m5stack-cores3.menu.PartitionScheme.defaultffat.build.partitions=default_ffat -m5stack-cores3.menu.PartitionScheme.default_8MB=8M with spiffs (2x 3MB APP/1.5MB SPIFFS) -m5stack-cores3.menu.PartitionScheme.default_8MB.build.partitions=default_8MB -m5stack-cores3.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 -m5stack-cores3.menu.PartitionScheme.large_spiffs=16MB with Large SPIFFS (2x 4MB APP/7MB SPIFFS) -m5stack-cores3.menu.PartitionScheme.large_spiffs.build.partitions=large_spiffs_16MB -m5stack-cores3.menu.PartitionScheme.large_spiffs.upload.maximum_size=4685824 -m5stack-cores3.menu.PartitionScheme.factory_4apps=16MB+Factory (4x 3MB APP/2MB SPIFFS) -m5stack-cores3.menu.PartitionScheme.factory_4apps.build.custom_partitions=partitions_16MB_factory_4_apps -# m5stack-cores3.menu.PartitionScheme.factory_4apps.upload.extra_flags=0xc10000 "{runtime.platform.path}/variants/{build.variant}/firmware.bin" -m5stack-cores3.menu.PartitionScheme.factory_4apps.upload.maximum_size=3145728 -m5stack-cores3.menu.PartitionScheme.factory_6apps=16MB+Factory (6x 2MB APP/2MB SPIFFS) -m5stack-cores3.menu.PartitionScheme.factory_6apps.build.custom_partitions=partitions_16MB_factory_6_apps -# m5stack-cores3.menu.PartitionScheme.factory_6apps.upload.extra_flags=0xc10000 "{runtime.platform.path}/variants/{build.variant}/firmware.bin" -m5stack-cores3.menu.PartitionScheme.factory_6apps.upload.maximum_size=2097152 - -m5stack-cores3.menu.CPUFreq.240=240MHz (WiFi) -m5stack-cores3.menu.CPUFreq.240.build.f_cpu=240000000L -m5stack-cores3.menu.CPUFreq.160=160MHz (WiFi) -m5stack-cores3.menu.CPUFreq.160.build.f_cpu=160000000L -m5stack-cores3.menu.CPUFreq.80=80MHz (WiFi) -m5stack-cores3.menu.CPUFreq.80.build.f_cpu=80000000L -m5stack-cores3.menu.CPUFreq.40=40MHz -m5stack-cores3.menu.CPUFreq.40.build.f_cpu=40000000L -m5stack-cores3.menu.CPUFreq.20=20MHz -m5stack-cores3.menu.CPUFreq.20.build.f_cpu=20000000L -m5stack-cores3.menu.CPUFreq.10=10MHz -m5stack-cores3.menu.CPUFreq.10.build.f_cpu=10000000L - -m5stack-cores3.menu.UploadSpeed.921600=921600 -m5stack-cores3.menu.UploadSpeed.921600.upload.speed=921600 -m5stack-cores3.menu.UploadSpeed.115200=115200 -m5stack-cores3.menu.UploadSpeed.115200.upload.speed=115200 -m5stack-cores3.menu.UploadSpeed.256000.windows=256000 -m5stack-cores3.menu.UploadSpeed.256000.upload.speed=256000 -m5stack-cores3.menu.UploadSpeed.230400.windows.upload.speed=256000 -m5stack-cores3.menu.UploadSpeed.230400=230400 -m5stack-cores3.menu.UploadSpeed.230400.upload.speed=230400 -m5stack-cores3.menu.UploadSpeed.460800.linux=460800 -m5stack-cores3.menu.UploadSpeed.460800.macosx=460800 -m5stack-cores3.menu.UploadSpeed.460800.upload.speed=460800 -m5stack-cores3.menu.UploadSpeed.512000.windows=512000 -m5stack-cores3.menu.UploadSpeed.512000.upload.speed=512000 -m5stack-cores3.menu.UploadSpeed.1500000=1500000 -m5stack-cores3.menu.UploadSpeed.1500000.upload.speed=1500000 - -m5stack-cores3.menu.DebugLevel.none=None -m5stack-cores3.menu.DebugLevel.none.build.code_debug=0 -m5stack-cores3.menu.DebugLevel.error=Error -m5stack-cores3.menu.DebugLevel.error.build.code_debug=1 -m5stack-cores3.menu.DebugLevel.warn=Warn -m5stack-cores3.menu.DebugLevel.warn.build.code_debug=2 -m5stack-cores3.menu.DebugLevel.info=Info -m5stack-cores3.menu.DebugLevel.info.build.code_debug=3 -m5stack-cores3.menu.DebugLevel.debug=Debug -m5stack-cores3.menu.DebugLevel.debug.build.code_debug=4 -m5stack-cores3.menu.DebugLevel.verbose=Verbose -m5stack-cores3.menu.DebugLevel.verbose.build.code_debug=5 - -m5stack-cores3.menu.EraseFlash.none=Disabled -m5stack-cores3.menu.EraseFlash.none.upload.erase_cmd= -m5stack-cores3.menu.EraseFlash.all=Enabled -m5stack-cores3.menu.EraseFlash.all.upload.erase_cmd=-e +m5stack_poe_cam.name=M5PoECAM + +m5stack_poe_cam.bootloader.tool=esptool_py +m5stack_poe_cam.bootloader.tool.default=esptool_py + +m5stack_poe_cam.upload.tool=esptool_py +m5stack_poe_cam.upload.tool.default=esptool_py +m5stack_poe_cam.upload.tool.network=esp_ota + +m5stack_poe_cam.upload.maximum_size=1310720 +m5stack_poe_cam.upload.maximum_data_size=327680 + +m5stack_poe_cam.upload.flags= +m5stack_poe_cam.upload.extra_flags= + +m5stack_poe_cam.serial.disableDTR=true +m5stack_poe_cam.serial.disableRTS=true + +m5stack_poe_cam.build.tarch=xtensa +m5stack_poe_cam.build.bootloader_addr=0x1000 +m5stack_poe_cam.build.target=esp32 +m5stack_poe_cam.build.mcu=esp32 +m5stack_poe_cam.build.core=esp32 +m5stack_poe_cam.build.variant=m5stack_poe_cam +m5stack_poe_cam.build.board=M5STACK_POE_CAM + +m5stack_poe_cam.build.f_cpu=240000000L +m5stack_poe_cam.build.flash_size=4MB +m5stack_poe_cam.build.flash_freq=80m +m5stack_poe_cam.build.flash_mode=dio +m5stack_poe_cam.build.boot=dio +m5stack_poe_cam.build.partitions=default +m5stack_poe_cam.build.defines= +m5stack_poe_cam.build.loop_core= +m5stack_poe_cam.build.event_core= + +m5stack_poe_cam.menu.PSRAM.enabled=Enabled +m5stack_poe_cam.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw +m5stack_poe_cam.menu.PSRAM.enabled.build.extra_libs= +m5stack_poe_cam.menu.PSRAM.disabled=Disabled +m5stack_poe_cam.menu.PSRAM.disabled.build.defines= +m5stack_poe_cam.menu.PSRAM.disabled.build.extra_libs= + +m5stack_poe_cam.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +m5stack_poe_cam.menu.PartitionScheme.default.build.partitions=default +m5stack_poe_cam.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_poe_cam.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_poe_cam.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_poe_cam.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_poe_cam.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_poe_cam.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_poe_cam.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_poe_cam.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_poe_cam.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_poe_cam.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_poe_cam.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_poe_cam.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_poe_cam.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_poe_cam.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_poe_cam.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_poe_cam.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_poe_cam.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_poe_cam.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_poe_cam.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_poe_cam.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_poe_cam.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_poe_cam.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_poe_cam.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_poe_cam.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_poe_cam.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 + +m5stack_poe_cam.menu.CPUFreq.240=240MHz (WiFi/BT) +m5stack_poe_cam.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_poe_cam.menu.CPUFreq.160=160MHz (WiFi/BT) +m5stack_poe_cam.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_poe_cam.menu.CPUFreq.80=80MHz (WiFi/BT) +m5stack_poe_cam.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_poe_cam.menu.CPUFreq.40=40MHz (40MHz XTAL) +m5stack_poe_cam.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_poe_cam.menu.CPUFreq.26=26MHz (26MHz XTAL) +m5stack_poe_cam.menu.CPUFreq.26.build.f_cpu=26000000L +m5stack_poe_cam.menu.CPUFreq.20=20MHz (40MHz XTAL) +m5stack_poe_cam.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_poe_cam.menu.CPUFreq.13=13MHz (26MHz XTAL) +m5stack_poe_cam.menu.CPUFreq.13.build.f_cpu=13000000L +m5stack_poe_cam.menu.CPUFreq.10=10MHz (40MHz XTAL) +m5stack_poe_cam.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_poe_cam.menu.FlashMode.qio=QIO +m5stack_poe_cam.menu.FlashMode.qio.build.flash_mode=dio +m5stack_poe_cam.menu.FlashMode.qio.build.boot=qio +m5stack_poe_cam.menu.FlashMode.dio=DIO +m5stack_poe_cam.menu.FlashMode.dio.build.flash_mode=dio +m5stack_poe_cam.menu.FlashMode.dio.build.boot=dio +m5stack_poe_cam.menu.FlashMode.qout=QOUT +m5stack_poe_cam.menu.FlashMode.qout.build.flash_mode=dout +m5stack_poe_cam.menu.FlashMode.qout.build.boot=qout +m5stack_poe_cam.menu.FlashMode.dout=DOUT +m5stack_poe_cam.menu.FlashMode.dout.build.flash_mode=dout +m5stack_poe_cam.menu.FlashMode.dout.build.boot=dout + +m5stack_poe_cam.menu.FlashFreq.80=80MHz +m5stack_poe_cam.menu.FlashFreq.80.build.flash_freq=80m +m5stack_poe_cam.menu.FlashFreq.40=40MHz +m5stack_poe_cam.menu.FlashFreq.40.build.flash_freq=40m + +m5stack_poe_cam.menu.FlashSize.4M=4MB (32Mb) +m5stack_poe_cam.menu.FlashSize.4M.build.flash_size=4MB + +m5stack_poe_cam.menu.UploadSpeed.1500000=1500000 +m5stack_poe_cam.menu.UploadSpeed.1500000.upload.speed=1500000 +m5stack_poe_cam.menu.UploadSpeed.750000=750000 +m5stack_poe_cam.menu.UploadSpeed.750000.upload.speed=750000 +m5stack_poe_cam.menu.UploadSpeed.500000=500000 +m5stack_poe_cam.menu.UploadSpeed.500000.upload.speed=500000 +m5stack_poe_cam.menu.UploadSpeed.250000=250000 +m5stack_poe_cam.menu.UploadSpeed.250000.upload.speed=250000 +m5stack_poe_cam.menu.UploadSpeed.115200=115200 +m5stack_poe_cam.menu.UploadSpeed.115200.upload.speed=115200 + +m5stack_poe_cam.menu.LoopCore.1=Core 1 +m5stack_poe_cam.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_poe_cam.menu.LoopCore.0=Core 0 +m5stack_poe_cam.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_poe_cam.menu.EventsCore.1=Core 1 +m5stack_poe_cam.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_poe_cam.menu.EventsCore.0=Core 0 +m5stack_poe_cam.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_poe_cam.menu.DebugLevel.none=None +m5stack_poe_cam.menu.DebugLevel.none.build.code_debug=0 +m5stack_poe_cam.menu.DebugLevel.error=Error +m5stack_poe_cam.menu.DebugLevel.error.build.code_debug=1 +m5stack_poe_cam.menu.DebugLevel.warn=Warn +m5stack_poe_cam.menu.DebugLevel.warn.build.code_debug=2 +m5stack_poe_cam.menu.DebugLevel.info=Info +m5stack_poe_cam.menu.DebugLevel.info.build.code_debug=3 +m5stack_poe_cam.menu.DebugLevel.debug=Debug +m5stack_poe_cam.menu.DebugLevel.debug.build.code_debug=4 +m5stack_poe_cam.menu.DebugLevel.verbose=Verbose +m5stack_poe_cam.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_poe_cam.menu.EraseFlash.none=Disabled +m5stack_poe_cam.menu.EraseFlash.none.upload.erase_cmd= +m5stack_poe_cam.menu.EraseFlash.all=Enabled +m5stack_poe_cam.menu.EraseFlash.all.upload.erase_cmd=-e + ############################################################## -m5stack-timer-cam.name=M5Stack-Timer-CAM - -m5stack-timer-cam.bootloader.tool=esptool_py -m5stack-timer-cam.bootloader.tool.default=esptool_py - -m5stack-timer-cam.upload.tool=esptool_py -m5stack-timer-cam.upload.tool.default=esptool_py -m5stack-timer-cam.upload.tool.network=esp_ota - -m5stack-timer-cam.upload.maximum_size=1310720 -m5stack-timer-cam.upload.maximum_data_size=327680 -m5stack-timer-cam.upload.wait_for_upload_port=true -m5stack-timer-cam.upload.flags= -m5stack-timer-cam.upload.extra_flags= - -m5stack-timer-cam.serial.disableDTR=true -m5stack-timer-cam.serial.disableRTS=true - -m5stack-timer-cam.build.tarch=xtensa -m5stack-timer-cam.build.bootloader_addr=0x1000 -m5stack-timer-cam.build.target=esp32 -m5stack-timer-cam.build.mcu=esp32 -m5stack-timer-cam.build.core=esp32 -m5stack-timer-cam.build.variant=m5stack_timer_cam -m5stack-timer-cam.build.board=M5Stack-Timer-CAM - -m5stack-timer-cam.build.f_cpu=240000000L -m5stack-timer-cam.build.flash_size=4MB -m5stack-timer-cam.build.flash_freq=80m -m5stack-timer-cam.build.flash_mode=dio -m5stack-timer-cam.build.boot=dio -m5stack-timer-cam.build.partitions=default -m5stack-timer-cam.build.defines= - -m5stack-timer-cam.menu.PSRAM.enabled=Enabled -m5stack-timer-cam.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -m5stack-timer-cam.menu.PSRAM.enabled.build.extra_libs= -m5stack-timer-cam.menu.PSRAM.disabled=Disabled -m5stack-timer-cam.menu.PSRAM.disabled.build.defines= -m5stack-timer-cam.menu.PSRAM.disabled.build.extra_libs= - -m5stack-timer-cam.menu.PartitionScheme.default=Default(3MB No OTA/1MB SPIFFS) -m5stack-timer-cam.menu.PartitionScheme.default.build.partitions=huge_app -m5stack-timer-cam.menu.PartitionScheme.default.upload.maximum_size=3145728 - -m5stack-timer-cam.menu.PartitionScheme.no_ota=No OTA (Large APP) -m5stack-timer-cam.menu.PartitionScheme.no_ota.build.partitions=no_ota -m5stack-timer-cam.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 - -m5stack-timer-cam.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA) -m5stack-timer-cam.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs -m5stack-timer-cam.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 - -m5stack-timer-cam.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) -m5stack-timer-cam.menu.PartitionScheme.no_ota.build.partitions=no_ota -m5stack-timer-cam.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 - -m5stack-timer-cam.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) -m5stack-timer-cam.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs -m5stack-timer-cam.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 - -m5stack-timer-cam.menu.CPUFreq.240=240MHz (WiFi/BT) -m5stack-timer-cam.menu.CPUFreq.240.build.f_cpu=240000000L -m5stack-timer-cam.menu.CPUFreq.160=160MHz (WiFi/BT) -m5stack-timer-cam.menu.CPUFreq.160.build.f_cpu=160000000L -m5stack-timer-cam.menu.CPUFreq.80=80MHz (WiFi/BT) -m5stack-timer-cam.menu.CPUFreq.80.build.f_cpu=80000000L -m5stack-timer-cam.menu.CPUFreq.40=40MHz (40MHz XTAL) -m5stack-timer-cam.menu.CPUFreq.40.build.f_cpu=40000000L -m5stack-timer-cam.menu.CPUFreq.26=26MHz (26MHz XTAL) -m5stack-timer-cam.menu.CPUFreq.26.build.f_cpu=26000000L -m5stack-timer-cam.menu.CPUFreq.20=20MHz (40MHz XTAL) -m5stack-timer-cam.menu.CPUFreq.20.build.f_cpu=20000000L -m5stack-timer-cam.menu.CPUFreq.13=13MHz (26MHz XTAL) -m5stack-timer-cam.menu.CPUFreq.13.build.f_cpu=13000000L -m5stack-timer-cam.menu.CPUFreq.10=10MHz (40MHz XTAL) -m5stack-timer-cam.menu.CPUFreq.10.build.f_cpu=10000000L - -m5stack-timer-cam.menu.UploadSpeed.1500000=1500000 -m5stack-timer-cam.menu.UploadSpeed.1500000.upload.speed=1500000 -m5stack-timer-cam.menu.UploadSpeed.750000=750000 -m5stack-timer-cam.menu.UploadSpeed.750000.upload.speed=750000 -m5stack-timer-cam.menu.UploadSpeed.500000=500000 -m5stack-timer-cam.menu.UploadSpeed.500000.upload.speed=500000 -m5stack-timer-cam.menu.UploadSpeed.250000=250000 -m5stack-timer-cam.menu.UploadSpeed.250000.upload.speed=250000 -m5stack-timer-cam.menu.UploadSpeed.115200=115200 -m5stack-timer-cam.menu.UploadSpeed.115200.upload.speed=115200 - -m5stack-timer-cam.menu.DebugLevel.none=None -m5stack-timer-cam.menu.DebugLevel.none.build.code_debug=0 -m5stack-timer-cam.menu.DebugLevel.error=Error -m5stack-timer-cam.menu.DebugLevel.error.build.code_debug=1 -m5stack-timer-cam.menu.DebugLevel.warn=Warn -m5stack-timer-cam.menu.DebugLevel.warn.build.code_debug=2 -m5stack-timer-cam.menu.DebugLevel.info=Info -m5stack-timer-cam.menu.DebugLevel.info.build.code_debug=3 -m5stack-timer-cam.menu.DebugLevel.debug=Debug -m5stack-timer-cam.menu.DebugLevel.debug.build.code_debug=4 -m5stack-timer-cam.menu.DebugLevel.verbose=Verbose -m5stack-timer-cam.menu.DebugLevel.verbose.build.code_debug=5 - -m5stack-timer-cam.menu.EraseFlash.none=Disabled -m5stack-timer-cam.menu.EraseFlash.none.upload.erase_cmd= -m5stack-timer-cam.menu.EraseFlash.all=Enabled -m5stack-timer-cam.menu.EraseFlash.all.upload.erase_cmd=-e +m5stack_paper.name=M5Paper + +m5stack_paper.bootloader.tool=esptool_py +m5stack_paper.bootloader.tool.default=esptool_py + +m5stack_paper.upload.tool=esptool_py +m5stack_paper.upload.tool.default=esptool_py +m5stack_paper.upload.tool.network=esp_ota + +m5stack_paper.upload.maximum_size=6553600 +m5stack_paper.upload.maximum_data_size=4521984 +m5stack_paper.upload.flags= +m5stack_paper.upload.extra_flags= + +m5stack_paper.serial.disableDTR=true +m5stack_paper.serial.disableRTS=true + +m5stack_paper.build.tarch=xtensa +m5stack_paper.build.bootloader_addr=0x1000 +m5stack_paper.build.target=esp32 +m5stack_paper.build.mcu=esp32 +m5stack_paper.build.core=esp32 +m5stack_paper.build.variant=m5stack_paper +m5stack_paper.build.board=M5STACK_PAPER + +m5stack_paper.build.f_cpu=240000000L +m5stack_paper.build.flash_size=16MB +m5stack_paper.build.flash_freq=80m +m5stack_paper.build.flash_mode=dio +m5stack_paper.build.boot=dio +m5stack_paper.build.partitions=default +m5stack_paper.build.defines= +m5stack_paper.build.loop_core= +m5stack_paper.build.event_core= + +m5stack_paper.menu.PSRAM.enabled=Enabled +m5stack_paper.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw +m5stack_paper.menu.PSRAM.enabled.build.extra_libs= +m5stack_paper.menu.PSRAM.disabled=Disabled +m5stack_paper.menu.PSRAM.disabled.build.defines= +m5stack_paper.menu.PSRAM.disabled.build.extra_libs= + +m5stack_paper.menu.PartitionScheme.default=Default (2 x 6.5 MB app, 3.6 MB SPIFFS) +m5stack_paper.menu.PartitionScheme.default.build.partitions=default_16MB +m5stack_paper.menu.PartitionScheme.default.upload.maximum_size=6553600 +m5stack_paper.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_paper.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_paper.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_paper.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_paper.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_paper.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_paper.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_paper.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_paper.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_paper.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_paper.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_paper.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_paper.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_paper.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_paper.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_paper.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_paper.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_paper.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_paper.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_paper.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_paper.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_paper.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_paper.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_paper.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_paper.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_paper.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_paper.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_paper.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_paper.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9.9MB FATFS) +m5stack_paper.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +m5stack_paper.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 +m5stack_paper.menu.PartitionScheme.rainmaker=RainMaker +m5stack_paper.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_paper.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_paper.menu.PartitionScheme.custom=Custom +m5stack_paper.menu.PartitionScheme.custom.build.partitions= +m5stack_paper.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_paper.menu.CPUFreq.240=240MHz (WiFi/BT) +m5stack_paper.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_paper.menu.CPUFreq.160=160MHz (WiFi/BT) +m5stack_paper.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_paper.menu.CPUFreq.80=80MHz (WiFi/BT) +m5stack_paper.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_paper.menu.CPUFreq.40=40MHz (40MHz XTAL) +m5stack_paper.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_paper.menu.CPUFreq.26=26MHz (26MHz XTAL) +m5stack_paper.menu.CPUFreq.26.build.f_cpu=26000000L +m5stack_paper.menu.CPUFreq.20=20MHz (40MHz XTAL) +m5stack_paper.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_paper.menu.CPUFreq.13=13MHz (26MHz XTAL) +m5stack_paper.menu.CPUFreq.13.build.f_cpu=13000000L +m5stack_paper.menu.CPUFreq.10=10MHz (40MHz XTAL) +m5stack_paper.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_paper.menu.FlashMode.qio=QIO +m5stack_paper.menu.FlashMode.qio.build.flash_mode=dio +m5stack_paper.menu.FlashMode.qio.build.boot=qio +m5stack_paper.menu.FlashMode.dio=DIO +m5stack_paper.menu.FlashMode.dio.build.flash_mode=dio +m5stack_paper.menu.FlashMode.dio.build.boot=dio +m5stack_paper.menu.FlashMode.qout=QOUT +m5stack_paper.menu.FlashMode.qout.build.flash_mode=dout +m5stack_paper.menu.FlashMode.qout.build.boot=qout +m5stack_paper.menu.FlashMode.dout=DOUT +m5stack_paper.menu.FlashMode.dout.build.flash_mode=dout +m5stack_paper.menu.FlashMode.dout.build.boot=dout + +m5stack_paper.menu.FlashFreq.80=80MHz +m5stack_paper.menu.FlashFreq.80.build.flash_freq=80m +m5stack_paper.menu.FlashFreq.40=40MHz +m5stack_paper.menu.FlashFreq.40.build.flash_freq=40m + +m5stack_paper.menu.FlashSize.16M=16MB (128Mb) +m5stack_paper.menu.FlashSize.16M.build.flash_size=16MB + +m5stack_paper.menu.UploadSpeed.1500000=1500000 +m5stack_paper.menu.UploadSpeed.1500000.upload.speed=1500000 +m5stack_paper.menu.UploadSpeed.921600=921600 +m5stack_paper.menu.UploadSpeed.921600.upload.speed=921600 +m5stack_paper.menu.UploadSpeed.115200=115200 +m5stack_paper.menu.UploadSpeed.115200.upload.speed=115200 +m5stack_paper.menu.UploadSpeed.256000.windows=256000 +m5stack_paper.menu.UploadSpeed.256000.upload.speed=256000 +m5stack_paper.menu.UploadSpeed.230400.windows.upload.speed=256000 +m5stack_paper.menu.UploadSpeed.230400=230400 +m5stack_paper.menu.UploadSpeed.230400.upload.speed=230400 +m5stack_paper.menu.UploadSpeed.460800.linux=460800 +m5stack_paper.menu.UploadSpeed.460800.macosx=460800 +m5stack_paper.menu.UploadSpeed.460800.upload.speed=460800 +m5stack_paper.menu.UploadSpeed.512000.windows=512000 +m5stack_paper.menu.UploadSpeed.512000.upload.speed=512000 + +m5stack_paper.menu.LoopCore.1=Core 1 +m5stack_paper.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_paper.menu.LoopCore.0=Core 0 +m5stack_paper.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_paper.menu.EventsCore.1=Core 1 +m5stack_paper.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_paper.menu.EventsCore.0=Core 0 +m5stack_paper.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_paper.menu.DebugLevel.none=None +m5stack_paper.menu.DebugLevel.none.build.code_debug=0 +m5stack_paper.menu.DebugLevel.error=Error +m5stack_paper.menu.DebugLevel.error.build.code_debug=1 +m5stack_paper.menu.DebugLevel.warn=Warn +m5stack_paper.menu.DebugLevel.warn.build.code_debug=2 +m5stack_paper.menu.DebugLevel.info=Info +m5stack_paper.menu.DebugLevel.info.build.code_debug=3 +m5stack_paper.menu.DebugLevel.debug=Debug +m5stack_paper.menu.DebugLevel.debug.build.code_debug=4 +m5stack_paper.menu.DebugLevel.verbose=Verbose +m5stack_paper.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_paper.menu.EraseFlash.none=Disabled +m5stack_paper.menu.EraseFlash.none.upload.erase_cmd= +m5stack_paper.menu.EraseFlash.all=Enabled +m5stack_paper.menu.EraseFlash.all.upload.erase_cmd=-e + ############################################################## -m5stack-coreink.name=M5Stack-CoreInk - -m5stack-coreink.bootloader.tool=esptool_py -m5stack-coreink.bootloader.tool.default=esptool_py - -m5stack-coreink.upload.tool=esptool_py -m5stack-coreink.upload.tool.default=esptool_py -m5stack-coreink.upload.tool.network=esp_ota - -m5stack-coreink.upload.maximum_size=1310720 -m5stack-coreink.upload.maximum_data_size=327680 -m5stack-coreink.upload.wait_for_upload_port=true -m5stack-coreink.upload.flags= -m5stack-coreink.upload.extra_flags= - -m5stack-coreink.serial.disableDTR=true -m5stack-coreink.serial.disableRTS=true - -m5stack-coreink.build.tarch=xtensa -m5stack-coreink.build.bootloader_addr=0x1000 -m5stack-coreink.build.target=esp32 -m5stack-coreink.build.mcu=esp32 -m5stack-coreink.build.core=esp32 -m5stack-coreink.build.variant=m5stack_coreink -m5stack-coreink.build.board=M5Stack_CoreInk - -m5stack-coreink.build.f_cpu=240000000L -m5stack-coreink.build.flash_size=4MB -m5stack-coreink.build.flash_freq=80m -m5stack-coreink.build.flash_mode=dio -m5stack-coreink.build.boot=dio -m5stack-coreink.build.partitions=default -m5stack-coreink.build.defines= - -m5stack-coreink.menu.PartitionScheme.default=Default -m5stack-coreink.menu.PartitionScheme.default.build.partitions=default -m5stack-coreink.menu.PartitionScheme.no_ota=No OTA (Large APP) -m5stack-coreink.menu.PartitionScheme.no_ota.build.partitions=no_ota -m5stack-coreink.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 -m5stack-coreink.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA) -m5stack-coreink.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs -m5stack-coreink.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 - -m5stack-coreink.menu.UploadSpeed.921600=921600 -m5stack-coreink.menu.UploadSpeed.921600.upload.speed=921600 -m5stack-coreink.menu.UploadSpeed.115200=115200 -m5stack-coreink.menu.UploadSpeed.115200.upload.speed=115200 -m5stack-coreink.menu.UploadSpeed.256000.windows=256000 -m5stack-coreink.menu.UploadSpeed.256000.upload.speed=256000 -m5stack-coreink.menu.UploadSpeed.230400.windows.upload.speed=256000 -m5stack-coreink.menu.UploadSpeed.230400=230400 -m5stack-coreink.menu.UploadSpeed.230400.upload.speed=230400 -m5stack-coreink.menu.UploadSpeed.460800.linux=460800 -m5stack-coreink.menu.UploadSpeed.460800.macosx=460800 -m5stack-coreink.menu.UploadSpeed.460800.upload.speed=460800 -m5stack-coreink.menu.UploadSpeed.512000.windows=512000 -m5stack-coreink.menu.UploadSpeed.512000.upload.speed=512000 -m5stack-coreink.menu.UploadSpeed.1500000=1500000 -m5stack-coreink.menu.UploadSpeed.1500000.upload.speed=1500000 - -m5stack-coreink.menu.DebugLevel.none=None -m5stack-coreink.menu.DebugLevel.none.build.code_debug=0 -m5stack-coreink.menu.DebugLevel.error=Error -m5stack-coreink.menu.DebugLevel.error.build.code_debug=1 -m5stack-coreink.menu.DebugLevel.warn=Warn -m5stack-coreink.menu.DebugLevel.warn.build.code_debug=2 -m5stack-coreink.menu.DebugLevel.info=Info -m5stack-coreink.menu.DebugLevel.info.build.code_debug=3 -m5stack-coreink.menu.DebugLevel.debug=Debug -m5stack-coreink.menu.DebugLevel.debug.build.code_debug=4 -m5stack-coreink.menu.DebugLevel.verbose=Verbose -m5stack-coreink.menu.DebugLevel.verbose.build.code_debug=5 - -m5stack-coreink.menu.EraseFlash.none=Disabled -m5stack-coreink.menu.EraseFlash.none.upload.erase_cmd= -m5stack-coreink.menu.EraseFlash.all=Enabled -m5stack-coreink.menu.EraseFlash.all.upload.erase_cmd=-e +m5stack_coreink.name=M5CoreInk + +m5stack_coreink.bootloader.tool=esptool_py +m5stack_coreink.bootloader.tool.default=esptool_py + +m5stack_coreink.upload.tool=esptool_py +m5stack_coreink.upload.tool.default=esptool_py +m5stack_coreink.upload.tool.network=esp_ota + +m5stack_coreink.upload.maximum_size=1310720 +m5stack_coreink.upload.maximum_data_size=327680 +m5stack_coreink.upload.flags= +m5stack_coreink.upload.extra_flags= + +m5stack_coreink.serial.disableDTR=true +m5stack_coreink.serial.disableRTS=true + +m5stack_coreink.build.tarch=xtensa +m5stack_coreink.build.bootloader_addr=0x1000 +m5stack_coreink.build.target=esp32 +m5stack_coreink.build.mcu=esp32 +m5stack_coreink.build.core=esp32 +m5stack_coreink.build.variant=m5stack_coreink +m5stack_coreink.build.board=M5STACK_COREINK + +m5stack_coreink.build.f_cpu=240000000L +m5stack_coreink.build.flash_size=4MB +m5stack_coreink.build.flash_freq=80m +m5stack_coreink.build.flash_mode=dio +m5stack_coreink.build.boot=dio +m5stack_coreink.build.partitions=default +m5stack_coreink.build.defines= +m5stack_coreink.build.loop_core= +m5stack_coreink.build.event_core= + +m5stack_coreink.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +m5stack_coreink.menu.PartitionScheme.default.build.partitions=default +m5stack_coreink.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_coreink.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_coreink.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_coreink.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_coreink.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_coreink.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_coreink.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_coreink.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_coreink.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_coreink.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_coreink.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_coreink.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_coreink.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_coreink.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_coreink.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_coreink.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_coreink.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_coreink.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_coreink.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_coreink.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_coreink.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_coreink.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_coreink.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_coreink.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_coreink.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_coreink.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_coreink.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_coreink.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_coreink.menu.PartitionScheme.rainmaker=RainMaker +m5stack_coreink.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_coreink.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_coreink.menu.PartitionScheme.custom=Custom +m5stack_coreink.menu.PartitionScheme.custom.build.partitions= +m5stack_coreink.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_coreink.menu.CPUFreq.240=240MHz (WiFi/BT) +m5stack_coreink.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_coreink.menu.CPUFreq.160=160MHz (WiFi/BT) +m5stack_coreink.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_coreink.menu.CPUFreq.80=80MHz (WiFi/BT) +m5stack_coreink.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_coreink.menu.CPUFreq.40=40MHz (40MHz XTAL) +m5stack_coreink.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_coreink.menu.CPUFreq.26=26MHz (26MHz XTAL) +m5stack_coreink.menu.CPUFreq.26.build.f_cpu=26000000L +m5stack_coreink.menu.CPUFreq.20=20MHz (40MHz XTAL) +m5stack_coreink.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_coreink.menu.CPUFreq.13=13MHz (26MHz XTAL) +m5stack_coreink.menu.CPUFreq.13.build.f_cpu=13000000L +m5stack_coreink.menu.CPUFreq.10=10MHz (40MHz XTAL) +m5stack_coreink.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_coreink.menu.FlashMode.qio=QIO +m5stack_coreink.menu.FlashMode.qio.build.flash_mode=dio +m5stack_coreink.menu.FlashMode.qio.build.boot=qio +m5stack_coreink.menu.FlashMode.dio=DIO +m5stack_coreink.menu.FlashMode.dio.build.flash_mode=dio +m5stack_coreink.menu.FlashMode.dio.build.boot=dio +m5stack_coreink.menu.FlashMode.qout=QOUT +m5stack_coreink.menu.FlashMode.qout.build.flash_mode=dout +m5stack_coreink.menu.FlashMode.qout.build.boot=qout +m5stack_coreink.menu.FlashMode.dout=DOUT +m5stack_coreink.menu.FlashMode.dout.build.flash_mode=dout +m5stack_coreink.menu.FlashMode.dout.build.boot=dout + +m5stack_coreink.menu.FlashFreq.80=80MHz +m5stack_coreink.menu.FlashFreq.80.build.flash_freq=80m +m5stack_coreink.menu.FlashFreq.40=40MHz +m5stack_coreink.menu.FlashFreq.40.build.flash_freq=40m + +m5stack_coreink.menu.FlashSize.4M=4MB (32Mb) +m5stack_coreink.menu.FlashSize.4M.build.flash_size=4MB + +m5stack_coreink.menu.UploadSpeed.1500000=1500000 +m5stack_coreink.menu.UploadSpeed.1500000.upload.speed=1500000 +m5stack_coreink.menu.UploadSpeed.750000=750000 +m5stack_coreink.menu.UploadSpeed.750000.upload.speed=750000 +m5stack_coreink.menu.UploadSpeed.500000=500000 +m5stack_coreink.menu.UploadSpeed.500000.upload.speed=500000 +m5stack_coreink.menu.UploadSpeed.250000=250000 +m5stack_coreink.menu.UploadSpeed.250000.upload.speed=250000 +m5stack_coreink.menu.UploadSpeed.115200=115200 +m5stack_coreink.menu.UploadSpeed.115200.upload.speed=115200 + +m5stack_coreink.menu.LoopCore.1=Core 1 +m5stack_coreink.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_coreink.menu.LoopCore.0=Core 0 +m5stack_coreink.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_coreink.menu.EventsCore.1=Core 1 +m5stack_coreink.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_coreink.menu.EventsCore.0=Core 0 +m5stack_coreink.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_coreink.menu.DebugLevel.none=None +m5stack_coreink.menu.DebugLevel.none.build.code_debug=0 +m5stack_coreink.menu.DebugLevel.error=Error +m5stack_coreink.menu.DebugLevel.error.build.code_debug=1 +m5stack_coreink.menu.DebugLevel.warn=Warn +m5stack_coreink.menu.DebugLevel.warn.build.code_debug=2 +m5stack_coreink.menu.DebugLevel.info=Info +m5stack_coreink.menu.DebugLevel.info.build.code_debug=3 +m5stack_coreink.menu.DebugLevel.debug=Debug +m5stack_coreink.menu.DebugLevel.debug.build.code_debug=4 +m5stack_coreink.menu.DebugLevel.verbose=Verbose +m5stack_coreink.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_coreink.menu.EraseFlash.none=Disabled +m5stack_coreink.menu.EraseFlash.none.upload.erase_cmd= +m5stack_coreink.menu.EraseFlash.all=Enabled +m5stack_coreink.menu.EraseFlash.all.upload.erase_cmd=-e + + +############################################################### + +m5stack_stamp_pico.name=M5StampPico + +m5stack_stamp_pico.bootloader.tool=esptool_py +m5stack_stamp_pico.bootloader.tool.default=esptool_py + +m5stack_stamp_pico.upload.tool=esptool_py +m5stack_stamp_pico.upload.tool.default=esptool_py +m5stack_stamp_pico.upload.tool.network=esp_ota + +m5stack_stamp_pico.upload.maximum_size=1310720 +m5stack_stamp_pico.upload.maximum_data_size=327680 +m5stack_stamp_pico.upload.flags= +m5stack_stamp_pico.upload.extra_flags= + +m5stack_stamp_pico.serial.disableDTR=true +m5stack_stamp_pico.serial.disableRTS=true + +m5stack_stamp_pico.build.tarch=xtensa +m5stack_stamp_pico.build.bootloader_addr=0x1000 +m5stack_stamp_pico.build.target=esp32 +m5stack_stamp_pico.build.mcu=esp32 +m5stack_stamp_pico.build.core=esp32 +m5stack_stamp_pico.build.variant=m5stack_stamp_pico +m5stack_stamp_pico.build.board=M5STACK_STAMP_PICO + +m5stack_stamp_pico.build.f_cpu=240000000L +m5stack_stamp_pico.build.flash_size=4MB +m5stack_stamp_pico.build.flash_freq=80m +m5stack_stamp_pico.build.flash_mode=dio +m5stack_stamp_pico.build.boot=dio +m5stack_stamp_pico.build.partitions=default +m5stack_stamp_pico.build.defines= +m5stack_stamp_pico.build.loop_core= +m5stack_stamp_pico.build.event_core= + +m5stack_stamp_pico.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +m5stack_stamp_pico.menu.PartitionScheme.default.build.partitions=default +m5stack_stamp_pico.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_stamp_pico.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_stamp_pico.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_stamp_pico.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_stamp_pico.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_stamp_pico.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_stamp_pico.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_stamp_pico.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_stamp_pico.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_stamp_pico.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_stamp_pico.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_stamp_pico.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_stamp_pico.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_stamp_pico.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_stamp_pico.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_stamp_pico.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_stamp_pico.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_stamp_pico.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_stamp_pico.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_stamp_pico.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_stamp_pico.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_stamp_pico.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_stamp_pico.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_stamp_pico.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_stamp_pico.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_stamp_pico.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_stamp_pico.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_stamp_pico.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_stamp_pico.menu.PartitionScheme.rainmaker=RainMaker +m5stack_stamp_pico.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_stamp_pico.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_stamp_pico.menu.PartitionScheme.custom=Custom +m5stack_stamp_pico.menu.PartitionScheme.custom.build.partitions= +m5stack_stamp_pico.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_stamp_pico.menu.CPUFreq.240=240MHz (WiFi/BT) +m5stack_stamp_pico.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_stamp_pico.menu.CPUFreq.160=160MHz (WiFi/BT) +m5stack_stamp_pico.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_stamp_pico.menu.CPUFreq.80=80MHz (WiFi/BT) +m5stack_stamp_pico.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_stamp_pico.menu.CPUFreq.40=40MHz (40MHz XTAL) +m5stack_stamp_pico.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_stamp_pico.menu.CPUFreq.26=26MHz (26MHz XTAL) +m5stack_stamp_pico.menu.CPUFreq.26.build.f_cpu=26000000L +m5stack_stamp_pico.menu.CPUFreq.20=20MHz (40MHz XTAL) +m5stack_stamp_pico.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_stamp_pico.menu.CPUFreq.13=13MHz (26MHz XTAL) +m5stack_stamp_pico.menu.CPUFreq.13.build.f_cpu=13000000L +m5stack_stamp_pico.menu.CPUFreq.10=10MHz (40MHz XTAL) +m5stack_stamp_pico.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_stamp_pico.menu.FlashMode.qio=QIO +m5stack_stamp_pico.menu.FlashMode.qio.build.flash_mode=dio +m5stack_stamp_pico.menu.FlashMode.qio.build.boot=qio +m5stack_stamp_pico.menu.FlashMode.dio=DIO +m5stack_stamp_pico.menu.FlashMode.dio.build.flash_mode=dio +m5stack_stamp_pico.menu.FlashMode.dio.build.boot=dio +m5stack_stamp_pico.menu.FlashMode.qout=QOUT +m5stack_stamp_pico.menu.FlashMode.qout.build.flash_mode=dout +m5stack_stamp_pico.menu.FlashMode.qout.build.boot=qout +m5stack_stamp_pico.menu.FlashMode.dout=DOUT +m5stack_stamp_pico.menu.FlashMode.dout.build.flash_mode=dout +m5stack_stamp_pico.menu.FlashMode.dout.build.boot=dout + +m5stack_stamp_pico.menu.FlashFreq.80=80MHz +m5stack_stamp_pico.menu.FlashFreq.80.build.flash_freq=80m +m5stack_stamp_pico.menu.FlashFreq.40=40MHz +m5stack_stamp_pico.menu.FlashFreq.40.build.flash_freq=40m + +m5stack_stamp_pico.menu.FlashSize.4M=4MB (32Mb) +m5stack_stamp_pico.menu.FlashSize.4M.build.flash_size=4MB + +m5stack_stamp_pico.menu.UploadSpeed.1500000=1500000 +m5stack_stamp_pico.menu.UploadSpeed.1500000.upload.speed=1500000 +m5stack_stamp_pico.menu.UploadSpeed.750000=750000 +m5stack_stamp_pico.menu.UploadSpeed.750000.upload.speed=750000 +m5stack_stamp_pico.menu.UploadSpeed.500000=500000 +m5stack_stamp_pico.menu.UploadSpeed.500000.upload.speed=500000 +m5stack_stamp_pico.menu.UploadSpeed.250000=250000 +m5stack_stamp_pico.menu.UploadSpeed.250000.upload.speed=250000 +m5stack_stamp_pico.menu.UploadSpeed.115200=115200 +m5stack_stamp_pico.menu.UploadSpeed.115200.upload.speed=115200 + +m5stack_stamp_pico.menu.LoopCore.1=Core 1 +m5stack_stamp_pico.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_stamp_pico.menu.LoopCore.0=Core 0 +m5stack_stamp_pico.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_stamp_pico.menu.EventsCore.1=Core 1 +m5stack_stamp_pico.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_stamp_pico.menu.EventsCore.0=Core 0 +m5stack_stamp_pico.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_stamp_pico.menu.DebugLevel.none=None +m5stack_stamp_pico.menu.DebugLevel.none.build.code_debug=0 +m5stack_stamp_pico.menu.DebugLevel.error=Error +m5stack_stamp_pico.menu.DebugLevel.error.build.code_debug=1 +m5stack_stamp_pico.menu.DebugLevel.warn=Warn +m5stack_stamp_pico.menu.DebugLevel.warn.build.code_debug=2 +m5stack_stamp_pico.menu.DebugLevel.info=Info +m5stack_stamp_pico.menu.DebugLevel.info.build.code_debug=3 +m5stack_stamp_pico.menu.DebugLevel.debug=Debug +m5stack_stamp_pico.menu.DebugLevel.debug.build.code_debug=4 +m5stack_stamp_pico.menu.DebugLevel.verbose=Verbose +m5stack_stamp_pico.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_stamp_pico.menu.EraseFlash.none=Disabled +m5stack_stamp_pico.menu.EraseFlash.none.upload.erase_cmd= +m5stack_stamp_pico.menu.EraseFlash.all=Enabled +m5stack_stamp_pico.menu.EraseFlash.all.upload.erase_cmd=-e + ############################################################## -stamp-s3.name=STAMP-S3 -stamp-s3.vid.0=0x303a -stamp-s3.pid.0=0x1001 - -stamp-s3.bootloader.tool=esptool_py -stamp-s3.bootloader.tool.default=esptool_py - -stamp-s3.upload.tool=esptool_py -stamp-s3.upload.tool.default=esptool_py -stamp-s3.upload.tool.network=esp_ota - -stamp-s3.upload.maximum_size=1310720 -stamp-s3.upload.maximum_data_size=327680 -stamp-s3.upload.flags= -stamp-s3.upload.extra_flags= -stamp-s3.upload.use_1200bps_touch=false -stamp-s3.upload.wait_for_upload_port=false - -stamp-s3.serial.disableDTR=false -stamp-s3.serial.disableRTS=false - -stamp-s3.build.tarch=xtensa -stamp-s3.build.bootloader_addr=0x0 -stamp-s3.build.target=esp32s3 -stamp-s3.build.mcu=esp32s3 -stamp-s3.build.core=esp32 -stamp-s3.build.variant=m5stack_stamp_s3 -stamp-s3.build.board=STAMP_S3 - -stamp-s3.build.usb_mode=1 -stamp-s3.build.cdc_on_boot=0 -stamp-s3.build.msc_on_boot=0 -stamp-s3.build.dfu_on_boot=0 -stamp-s3.build.f_cpu=240000000L -stamp-s3.build.flash_size=4MB -stamp-s3.build.flash_freq=80m -stamp-s3.build.flash_mode=dio -stamp-s3.build.boot=qio -stamp-s3.build.boot_freq=80m -stamp-s3.build.partitions=default -stamp-s3.build.defines= -stamp-s3.build.loop_core= -stamp-s3.build.event_core= -stamp-s3.build.psram_type=qspi -stamp-s3.build.memory_type={build.boot}_{build.psram_type} - -stamp-s3.menu.JTAGAdapter.default=Disabled -stamp-s3.menu.JTAGAdapter.default.build.copy_jtag_files=0 -stamp-s3.menu.JTAGAdapter.builtin=Integrated USB JTAG -stamp-s3.menu.JTAGAdapter.builtin.build.openocdscript=esp32s3-builtin.cfg -stamp-s3.menu.JTAGAdapter.builtin.build.copy_jtag_files=1 -stamp-s3.menu.JTAGAdapter.external=FTDI Adapter -stamp-s3.menu.JTAGAdapter.external.build.openocdscript=esp32s3-ftdi.cfg -stamp-s3.menu.JTAGAdapter.external.build.copy_jtag_files=1 -stamp-s3.menu.JTAGAdapter.bridge=ESP USB Bridge -stamp-s3.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg -stamp-s3.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 - -stamp-s3.menu.PSRAM.disabled=Disabled -stamp-s3.menu.PSRAM.disabled.build.defines= -stamp-s3.menu.PSRAM.disabled.build.psram_type=qspi -stamp-s3.menu.PSRAM.enabled=QSPI PSRAM -stamp-s3.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -stamp-s3.menu.PSRAM.enabled.build.psram_type=qspi -stamp-s3.menu.PSRAM.opi=OPI PSRAM -stamp-s3.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM -stamp-s3.menu.PSRAM.opi.build.psram_type=opi - -stamp-s3.menu.FlashMode.qio=QIO 80MHz -stamp-s3.menu.FlashMode.qio.build.flash_mode=dio -stamp-s3.menu.FlashMode.qio.build.boot=qio -stamp-s3.menu.FlashMode.qio.build.boot_freq=80m -stamp-s3.menu.FlashMode.qio.build.flash_freq=80m -stamp-s3.menu.FlashMode.qio120=QIO 120MHz -stamp-s3.menu.FlashMode.qio120.build.flash_mode=dio -stamp-s3.menu.FlashMode.qio120.build.boot=qio -stamp-s3.menu.FlashMode.qio120.build.boot_freq=120m -stamp-s3.menu.FlashMode.qio120.build.flash_freq=80m -stamp-s3.menu.FlashMode.dio=DIO 80MHz -stamp-s3.menu.FlashMode.dio.build.flash_mode=dio -stamp-s3.menu.FlashMode.dio.build.boot=dio -stamp-s3.menu.FlashMode.dio.build.boot_freq=80m -stamp-s3.menu.FlashMode.dio.build.flash_freq=80m -stamp-s3.menu.FlashMode.opi=OPI 80MHz -stamp-s3.menu.FlashMode.opi.build.flash_mode=dout -stamp-s3.menu.FlashMode.opi.build.boot=opi -stamp-s3.menu.FlashMode.opi.build.boot_freq=80m -stamp-s3.menu.FlashMode.opi.build.flash_freq=80m - -stamp-s3.menu.FlashSize.4M=4MB (32Mb) -stamp-s3.menu.FlashSize.4M.build.flash_size=4MB -stamp-s3.menu.FlashSize.8M=8MB (64Mb) -stamp-s3.menu.FlashSize.8M.build.flash_size=8MB -stamp-s3.menu.FlashSize.8M.build.partitions=default_8MB -stamp-s3.menu.FlashSize.16M=16MB (128Mb) -stamp-s3.menu.FlashSize.16M.build.flash_size=16MB -#stamp-s3.menu.FlashSize.32M=32MB (256Mb) -#stamp-s3.menu.FlashSize.32M.build.flash_size=32MB - -stamp-s3.menu.LoopCore.1=Core 1 -stamp-s3.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 -stamp-s3.menu.LoopCore.0=Core 0 -stamp-s3.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 - -stamp-s3.menu.EventsCore.1=Core 1 -stamp-s3.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 -stamp-s3.menu.EventsCore.0=Core 0 -stamp-s3.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 - -stamp-s3.menu.USBMode.hwcdc=Hardware CDC and JTAG -stamp-s3.menu.USBMode.hwcdc.build.usb_mode=1 -stamp-s3.menu.USBMode.default=USB-OTG (TinyUSB) -stamp-s3.menu.USBMode.default.build.usb_mode=0 - -stamp-s3.menu.CDCOnBoot.default=Disabled -stamp-s3.menu.CDCOnBoot.default.build.cdc_on_boot=0 -stamp-s3.menu.CDCOnBoot.cdc=Enabled -stamp-s3.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 - -stamp-s3.menu.MSCOnBoot.default=Disabled -stamp-s3.menu.MSCOnBoot.default.build.msc_on_boot=0 -stamp-s3.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode) -stamp-s3.menu.MSCOnBoot.msc.build.msc_on_boot=1 - -stamp-s3.menu.DFUOnBoot.default=Disabled -stamp-s3.menu.DFUOnBoot.default.build.dfu_on_boot=0 -stamp-s3.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode) -stamp-s3.menu.DFUOnBoot.dfu.build.dfu_on_boot=1 - -stamp-s3.menu.UploadMode.default=UART0 / Hardware CDC -stamp-s3.menu.UploadMode.default.upload.use_1200bps_touch=false -stamp-s3.menu.UploadMode.default.upload.wait_for_upload_port=false -stamp-s3.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB) -stamp-s3.menu.UploadMode.cdc.upload.use_1200bps_touch=true -stamp-s3.menu.UploadMode.cdc.upload.wait_for_upload_port=true - -stamp-s3.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) -stamp-s3.menu.PartitionScheme.default.build.partitions=default -stamp-s3.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) -stamp-s3.menu.PartitionScheme.defaultffat.build.partitions=default_ffat -stamp-s3.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) -stamp-s3.menu.PartitionScheme.default_8MB.build.partitions=default_8MB -stamp-s3.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 - -stamp-s3.menu.CPUFreq.240=240MHz (WiFi) -stamp-s3.menu.CPUFreq.240.build.f_cpu=240000000L -stamp-s3.menu.CPUFreq.160=160MHz (WiFi) -stamp-s3.menu.CPUFreq.160.build.f_cpu=160000000L -stamp-s3.menu.CPUFreq.80=80MHz (WiFi) -stamp-s3.menu.CPUFreq.80.build.f_cpu=80000000L -stamp-s3.menu.CPUFreq.40=40MHz -stamp-s3.menu.CPUFreq.40.build.f_cpu=40000000L -stamp-s3.menu.CPUFreq.20=20MHz -stamp-s3.menu.CPUFreq.20.build.f_cpu=20000000L -stamp-s3.menu.CPUFreq.10=10MHz -stamp-s3.menu.CPUFreq.10.build.f_cpu=10000000L - -stamp-s3.menu.UploadSpeed.921600=921600 -stamp-s3.menu.UploadSpeed.921600.upload.speed=921600 -stamp-s3.menu.UploadSpeed.115200=115200 -stamp-s3.menu.UploadSpeed.115200.upload.speed=115200 -stamp-s3.menu.UploadSpeed.256000.windows=256000 -stamp-s3.menu.UploadSpeed.256000.upload.speed=256000 -stamp-s3.menu.UploadSpeed.230400.windows.upload.speed=256000 -stamp-s3.menu.UploadSpeed.230400=230400 -stamp-s3.menu.UploadSpeed.230400.upload.speed=230400 -stamp-s3.menu.UploadSpeed.460800.linux=460800 -stamp-s3.menu.UploadSpeed.460800.macosx=460800 -stamp-s3.menu.UploadSpeed.460800.upload.speed=460800 -stamp-s3.menu.UploadSpeed.512000.windows=512000 -stamp-s3.menu.UploadSpeed.512000.upload.speed=512000 - -stamp-s3.menu.DebugLevel.none=None -stamp-s3.menu.DebugLevel.none.build.code_debug=0 -stamp-s3.menu.DebugLevel.error=Error -stamp-s3.menu.DebugLevel.error.build.code_debug=1 -stamp-s3.menu.DebugLevel.warn=Warn -stamp-s3.menu.DebugLevel.warn.build.code_debug=2 -stamp-s3.menu.DebugLevel.info=Info -stamp-s3.menu.DebugLevel.info.build.code_debug=3 -stamp-s3.menu.DebugLevel.debug=Debug -stamp-s3.menu.DebugLevel.debug.build.code_debug=4 -stamp-s3.menu.DebugLevel.verbose=Verbose -stamp-s3.menu.DebugLevel.verbose.build.code_debug=5 - -stamp-s3.menu.EraseFlash.none=Disabled -stamp-s3.menu.EraseFlash.none.upload.erase_cmd= -stamp-s3.menu.EraseFlash.all=Enabled -stamp-s3.menu.EraseFlash.all.upload.erase_cmd=-e +m5stack_stamp_c3.name=M5StampC3 +m5stack_stamp_c3.vid.0=0x303a +m5stack_stamp_c3.pid.0=0x1001 + +m5stack_stamp_c3.bootloader.tool=esptool_py +m5stack_stamp_c3.bootloader.tool.default=esptool_py + +m5stack_stamp_c3.upload.tool=esptool_py +m5stack_stamp_c3.upload.tool.default=esptool_py +m5stack_stamp_c3.upload.tool.network=esp_ota + +m5stack_stamp_c3.upload.maximum_size=1310720 +m5stack_stamp_c3.upload.maximum_data_size=327680 +m5stack_stamp_c3.upload.wait_for_upload_port=false +m5stack_stamp_c3.upload.flags= +m5stack_stamp_c3.upload.extra_flags= + +m5stack_stamp_c3.serial.disableDTR=false +m5stack_stamp_c3.serial.disableRTS=false + +m5stack_stamp_c3.build.tarch=riscv32 +m5stack_stamp_c3.build.target=esp +m5stack_stamp_c3.build.mcu=esp32c3 +m5stack_stamp_c3.build.core=esp32 +m5stack_stamp_c3.build.variant=m5stack_stamp_c3 +m5stack_stamp_c3.build.board=M5STACK_STAMP_C3 +m5stack_stamp_c3.build.bootloader_addr=0x0 + +m5stack_stamp_c3.build.cdc_on_boot=1 +m5stack_stamp_c3.build.f_cpu=160000000L +m5stack_stamp_c3.build.flash_size=4MB +m5stack_stamp_c3.build.flash_freq=80m +m5stack_stamp_c3.build.flash_mode=qio +m5stack_stamp_c3.build.boot=qio +m5stack_stamp_c3.build.partitions=default +m5stack_stamp_c3.build.defines= + +## IDE 2.0 Seems to not update the value +m5stack_stamp_c3.menu.JTAGAdapter.default=Disabled +m5stack_stamp_c3.menu.JTAGAdapter.default.build.copy_jtag_files=0 +m5stack_stamp_c3.menu.JTAGAdapter.builtin=Integrated USB JTAG +m5stack_stamp_c3.menu.JTAGAdapter.builtin.build.openocdscript=esp32c3-builtin.cfg +m5stack_stamp_c3.menu.JTAGAdapter.builtin.build.copy_jtag_files=1 +m5stack_stamp_c3.menu.JTAGAdapter.external=FTDI Adapter +m5stack_stamp_c3.menu.JTAGAdapter.external.build.openocdscript=esp32c3-ftdi.cfg +m5stack_stamp_c3.menu.JTAGAdapter.external.build.copy_jtag_files=1 +m5stack_stamp_c3.menu.JTAGAdapter.bridge=ESP USB Bridge +m5stack_stamp_c3.menu.JTAGAdapter.bridge.build.openocdscript=esp32c3-bridge.cfg +m5stack_stamp_c3.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 + +m5stack_stamp_c3.menu.CDCOnBoot.cdc=Enabled +m5stack_stamp_c3.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 +m5stack_stamp_c3.menu.CDCOnBoot.default=Disabled +m5stack_stamp_c3.menu.CDCOnBoot.default.build.cdc_on_boot=0 + +m5stack_stamp_c3.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +m5stack_stamp_c3.menu.PartitionScheme.default.build.partitions=default +m5stack_stamp_c3.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_stamp_c3.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_stamp_c3.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_stamp_c3.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_stamp_c3.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_stamp_c3.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_stamp_c3.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_stamp_c3.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_stamp_c3.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_stamp_c3.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_stamp_c3.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_stamp_c3.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_stamp_c3.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_stamp_c3.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_stamp_c3.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_stamp_c3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_stamp_c3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_stamp_c3.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_stamp_c3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_stamp_c3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_stamp_c3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_stamp_c3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 + + +m5stack_stamp_c3.menu.CPUFreq.160=160MHz (WiFi) +m5stack_stamp_c3.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_stamp_c3.menu.CPUFreq.80=80MHz (WiFi) +m5stack_stamp_c3.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_stamp_c3.menu.CPUFreq.40=40MHz +m5stack_stamp_c3.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_stamp_c3.menu.CPUFreq.20=20MHz +m5stack_stamp_c3.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_stamp_c3.menu.CPUFreq.10=10MHz +m5stack_stamp_c3.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_stamp_c3.menu.FlashMode.qio=QIO +m5stack_stamp_c3.menu.FlashMode.qio.build.flash_mode=dio +m5stack_stamp_c3.menu.FlashMode.qio.build.boot=qio +m5stack_stamp_c3.menu.FlashMode.dio=DIO +m5stack_stamp_c3.menu.FlashMode.dio.build.flash_mode=dio +m5stack_stamp_c3.menu.FlashMode.dio.build.boot=dio +m5stack_stamp_c3.menu.FlashMode.qout=QOUT +m5stack_stamp_c3.menu.FlashMode.qout.build.flash_mode=dout +m5stack_stamp_c3.menu.FlashMode.qout.build.boot=qout +m5stack_stamp_c3.menu.FlashMode.dout=DOUT +m5stack_stamp_c3.menu.FlashMode.dout.build.flash_mode=dout +m5stack_stamp_c3.menu.FlashMode.dout.build.boot=dout + +m5stack_stamp_c3.menu.FlashFreq.80=80MHz +m5stack_stamp_c3.menu.FlashFreq.80.build.flash_freq=80m +m5stack_stamp_c3.menu.FlashFreq.40=40MHz +m5stack_stamp_c3.menu.FlashFreq.40.build.flash_freq=40m + +m5stack_stamp_c3.menu.FlashSize.4M=4MB (32Mb) +m5stack_stamp_c3.menu.FlashSize.4M.build.flash_size=4MB + +m5stack_stamp_c3.menu.UploadSpeed.921600=921600 +m5stack_stamp_c3.menu.UploadSpeed.921600.upload.speed=921600 +m5stack_stamp_c3.menu.UploadSpeed.115200=115200 +m5stack_stamp_c3.menu.UploadSpeed.115200.upload.speed=115200 +m5stack_stamp_c3.menu.UploadSpeed.256000.windows=256000 +m5stack_stamp_c3.menu.UploadSpeed.256000.upload.speed=256000 +m5stack_stamp_c3.menu.UploadSpeed.230400.windows.upload.speed=256000 +m5stack_stamp_c3.menu.UploadSpeed.230400=230400 +m5stack_stamp_c3.menu.UploadSpeed.230400.upload.speed=230400 +m5stack_stamp_c3.menu.UploadSpeed.460800.linux=460800 +m5stack_stamp_c3.menu.UploadSpeed.460800.macosx=460800 +m5stack_stamp_c3.menu.UploadSpeed.460800.upload.speed=460800 +m5stack_stamp_c3.menu.UploadSpeed.512000.windows=512000 +m5stack_stamp_c3.menu.UploadSpeed.512000.upload.speed=512000 + +m5stack_stamp_c3.menu.DebugLevel.none=None +m5stack_stamp_c3.menu.DebugLevel.none.build.code_debug=0 +m5stack_stamp_c3.menu.DebugLevel.error=Error +m5stack_stamp_c3.menu.DebugLevel.error.build.code_debug=1 +m5stack_stamp_c3.menu.DebugLevel.warn=Warn +m5stack_stamp_c3.menu.DebugLevel.warn.build.code_debug=2 +m5stack_stamp_c3.menu.DebugLevel.info=Info +m5stack_stamp_c3.menu.DebugLevel.info.build.code_debug=3 +m5stack_stamp_c3.menu.DebugLevel.debug=Debug +m5stack_stamp_c3.menu.DebugLevel.debug.build.code_debug=4 +m5stack_stamp_c3.menu.DebugLevel.verbose=Verbose +m5stack_stamp_c3.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_stamp_c3.menu.EraseFlash.none=Disabled +m5stack_stamp_c3.menu.EraseFlash.none.upload.erase_cmd= +m5stack_stamp_c3.menu.EraseFlash.all=Enabled +m5stack_stamp_c3.menu.EraseFlash.all.upload.erase_cmd=-e ############################################################### -m5stamp-pico.name=M5Stamp-Pico - -m5stamp-pico.bootloader.tool=esptool_py -m5stamp-pico.bootloader.tool.default=esptool_py - -m5stamp-pico.upload.tool=esptool_py -m5stamp-pico.upload.tool.default=esptool_py -m5stamp-pico.upload.tool.network=esp_ota - -m5stamp-pico.upload.maximum_size=1310720 -m5stamp-pico.upload.maximum_data_size=327680 -m5stamp-pico.upload.wait_for_upload_port=true -m5stamp-pico.upload.flags= -m5stamp-pico.upload.extra_flags= - -m5stamp-pico.serial.disableDTR=true -m5stamp-pico.serial.disableRTS=true - -m5stamp-pico.build.tarch=xtensa -m5stamp-pico.build.bootloader_addr=0x1000 -m5stamp-pico.build.target=esp32 -m5stamp-pico.build.mcu=esp32 -m5stamp-pico.build.core=esp32 -m5stamp-pico.build.variant=m5stack_stamp_pico -m5stamp-pico.build.board=M5Stamp_Pico - -m5stamp-pico.build.f_cpu=240000000L -m5stamp-pico.build.flash_size=4MB -m5stamp-pico.build.flash_freq=80m -m5stamp-pico.build.flash_mode=dio -m5stamp-pico.build.boot=dio -m5stamp-pico.build.partitions=default -m5stamp-pico.build.defines= - -m5stamp-pico.menu.PartitionScheme.default=Default -m5stamp-pico.menu.PartitionScheme.default.build.partitions=default -m5stamp-pico.menu.PartitionScheme.no_ota=No OTA (Large APP) -m5stamp-pico.menu.PartitionScheme.no_ota.build.partitions=no_ota -m5stamp-pico.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 -m5stamp-pico.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA) -m5stamp-pico.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs -m5stamp-pico.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 - - -m5stamp-pico.menu.UploadSpeed.1500000=1500000 -m5stamp-pico.menu.UploadSpeed.1500000.upload.speed=1500000 -m5stamp-pico.menu.UploadSpeed.750000=750000 -m5stamp-pico.menu.UploadSpeed.750000.upload.speed=750000 -m5stamp-pico.menu.UploadSpeed.500000=500000 -m5stamp-pico.menu.UploadSpeed.500000.upload.speed=500000 -m5stamp-pico.menu.UploadSpeed.250000=250000 -m5stamp-pico.menu.UploadSpeed.250000.upload.speed=250000 -m5stamp-pico.menu.UploadSpeed.115200=115200 -m5stamp-pico.menu.UploadSpeed.115200.upload.speed=115200 - -m5stamp-pico.menu.DebugLevel.none=None -m5stamp-pico.menu.DebugLevel.none.build.code_debug=0 -m5stamp-pico.menu.DebugLevel.error=Error -m5stamp-pico.menu.DebugLevel.error.build.code_debug=1 -m5stamp-pico.menu.DebugLevel.warn=Warn -m5stamp-pico.menu.DebugLevel.warn.build.code_debug=2 -m5stamp-pico.menu.DebugLevel.info=Info -m5stamp-pico.menu.DebugLevel.info.build.code_debug=3 -m5stamp-pico.menu.DebugLevel.debug=Debug -m5stamp-pico.menu.DebugLevel.debug.build.code_debug=4 -m5stamp-pico.menu.DebugLevel.verbose=Verbose -m5stamp-pico.menu.DebugLevel.verbose.build.code_debug=5 - -m5stamp-pico.menu.EraseFlash.none=Disabled -m5stamp-pico.menu.EraseFlash.none.upload.erase_cmd= -m5stamp-pico.menu.EraseFlash.all=Enabled -m5stamp-pico.menu.EraseFlash.all.upload.erase_cmd=-e +m5stack_stamp_s3.name=M5StampS3 +m5stack_stamp_s3.vid.0=0x303a +m5stack_stamp_s3.pid.0=0x1001 +m5stack_stamp_s3.bootloader.tool=esptool_py +m5stack_stamp_s3.bootloader.tool.default=esptool_py + +m5stack_stamp_s3.upload.tool=esptool_py +m5stack_stamp_s3.upload.tool.default=esptool_py +m5stack_stamp_s3.upload.tool.network=esp_ota + +m5stack_stamp_s3.upload.maximum_size=1310720 +m5stack_stamp_s3.upload.maximum_data_size=327680 +m5stack_stamp_s3.upload.flags= +m5stack_stamp_s3.upload.extra_flags= +m5stack_stamp_s3.upload.use_1200bps_touch=false +m5stack_stamp_s3.upload.wait_for_upload_port=false + +m5stack_stamp_s3.serial.disableDTR=false +m5stack_stamp_s3.serial.disableRTS=false + +m5stack_stamp_s3.build.tarch=xtensa +m5stack_stamp_s3.build.bootloader_addr=0x0 +m5stack_stamp_s3.build.target=esp32s3 +m5stack_stamp_s3.build.mcu=esp32s3 +m5stack_stamp_s3.build.core=esp32 +m5stack_stamp_s3.build.variant=m5stack_stamp_s3 +m5stack_stamp_s3.build.board=M5STACK_STAMP_S3 + +m5stack_stamp_s3.build.usb_mode=1 +m5stack_stamp_s3.build.cdc_on_boot=1 +m5stack_stamp_s3.build.msc_on_boot=0 +m5stack_stamp_s3.build.dfu_on_boot=0 +m5stack_stamp_s3.build.f_cpu=240000000L +m5stack_stamp_s3.build.flash_size=8MB +m5stack_stamp_s3.build.flash_freq=80m +m5stack_stamp_s3.build.flash_mode=dio +m5stack_stamp_s3.build.boot=qio +m5stack_stamp_s3.build.boot_freq=80m +m5stack_stamp_s3.build.partitions=default +m5stack_stamp_s3.build.defines= +m5stack_stamp_s3.build.loop_core= +m5stack_stamp_s3.build.event_core= +m5stack_stamp_s3.build.psram_type=qspi +m5stack_stamp_s3.build.memory_type={build.boot}_{build.psram_type} + +## IDE 2.0 Seems to not update the value +m5stack_stamp_s3.menu.JTAGAdapter.default=Disabled +m5stack_stamp_s3.menu.JTAGAdapter.default.build.copy_jtag_files=0 +m5stack_stamp_s3.menu.JTAGAdapter.builtin=Integrated USB JTAG +m5stack_stamp_s3.menu.JTAGAdapter.builtin.build.openocdscript=esp32s3-builtin.cfg +m5stack_stamp_s3.menu.JTAGAdapter.builtin.build.copy_jtag_files=1 +m5stack_stamp_s3.menu.JTAGAdapter.external=FTDI Adapter +m5stack_stamp_s3.menu.JTAGAdapter.external.build.openocdscript=esp32s3-ftdi.cfg +m5stack_stamp_s3.menu.JTAGAdapter.external.build.copy_jtag_files=1 +m5stack_stamp_s3.menu.JTAGAdapter.bridge=ESP USB Bridge +m5stack_stamp_s3.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg +m5stack_stamp_s3.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 + +m5stack_stamp_s3.menu.PSRAM.disabled=Disabled +m5stack_stamp_s3.menu.PSRAM.disabled.build.defines= +m5stack_stamp_s3.menu.PSRAM.disabled.build.psram_type=qspi +m5stack_stamp_s3.menu.PSRAM.enabled=QSPI PSRAM +m5stack_stamp_s3.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM +m5stack_stamp_s3.menu.PSRAM.enabled.build.psram_type=qspi +m5stack_stamp_s3.menu.PSRAM.opi=OPI PSRAM +m5stack_stamp_s3.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM +m5stack_stamp_s3.menu.PSRAM.opi.build.psram_type=opi + +m5stack_stamp_s3.menu.FlashMode.qio=QIO 80MHz +m5stack_stamp_s3.menu.FlashMode.qio.build.flash_mode=dio +m5stack_stamp_s3.menu.FlashMode.qio.build.boot=qio +m5stack_stamp_s3.menu.FlashMode.qio.build.boot_freq=80m +m5stack_stamp_s3.menu.FlashMode.qio.build.flash_freq=80m +m5stack_stamp_s3.menu.FlashMode.qio120=QIO 120MHz +m5stack_stamp_s3.menu.FlashMode.qio120.build.flash_mode=dio +m5stack_stamp_s3.menu.FlashMode.qio120.build.boot=qio +m5stack_stamp_s3.menu.FlashMode.qio120.build.boot_freq=120m +m5stack_stamp_s3.menu.FlashMode.qio120.build.flash_freq=80m +m5stack_stamp_s3.menu.FlashMode.dio=DIO 80MHz +m5stack_stamp_s3.menu.FlashMode.dio.build.flash_mode=dio +m5stack_stamp_s3.menu.FlashMode.dio.build.boot=dio +m5stack_stamp_s3.menu.FlashMode.dio.build.boot_freq=80m +m5stack_stamp_s3.menu.FlashMode.dio.build.flash_freq=80m +m5stack_stamp_s3.menu.FlashMode.opi=OPI 80MHz +m5stack_stamp_s3.menu.FlashMode.opi.build.flash_mode=dout +m5stack_stamp_s3.menu.FlashMode.opi.build.boot=opi +m5stack_stamp_s3.menu.FlashMode.opi.build.boot_freq=80m +m5stack_stamp_s3.menu.FlashMode.opi.build.flash_freq=80m + +m5stack_stamp_s3.menu.FlashSize.4M=4MB (32Mb) +m5stack_stamp_s3.menu.FlashSize.4M.build.flash_size=4MB +m5stack_stamp_s3.menu.FlashSize.8M=8MB (64Mb) +m5stack_stamp_s3.menu.FlashSize.8M.build.flash_size=8MB +m5stack_stamp_s3.menu.FlashSize.8M.build.partitions=default_8MB +m5stack_stamp_s3.menu.FlashSize.16M=16MB (128Mb) +m5stack_stamp_s3.menu.FlashSize.16M.build.flash_size=16MB +m5stack_stamp_s3.menu.FlashSize.32M=32MB (256Mb) +m5stack_stamp_s3.menu.FlashSize.32M.build.flash_size=32MB +m5stack_stamp_s3.menu.FlashSize.32M.build.partitions=app5M_fat24M_32MB + +m5stack_stamp_s3.menu.LoopCore.1=Core 1 +m5stack_stamp_s3.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_stamp_s3.menu.LoopCore.0=Core 0 +m5stack_stamp_s3.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_stamp_s3.menu.EventsCore.1=Core 1 +m5stack_stamp_s3.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_stamp_s3.menu.EventsCore.0=Core 0 +m5stack_stamp_s3.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_stamp_s3.menu.USBMode.hwcdc=Hardware CDC and JTAG +m5stack_stamp_s3.menu.USBMode.hwcdc.build.usb_mode=1 +m5stack_stamp_s3.menu.USBMode.default=USB-OTG (TinyUSB) +m5stack_stamp_s3.menu.USBMode.default.build.usb_mode=0 + +m5stack_stamp_s3.menu.CDCOnBoot.cdc=Enabled +m5stack_stamp_s3.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 +m5stack_stamp_s3.menu.CDCOnBoot.default=Disabled +m5stack_stamp_s3.menu.CDCOnBoot.default.build.cdc_on_boot=0 + +m5stack_stamp_s3.menu.MSCOnBoot.default=Disabled +m5stack_stamp_s3.menu.MSCOnBoot.default.build.msc_on_boot=0 +m5stack_stamp_s3.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode) +m5stack_stamp_s3.menu.MSCOnBoot.msc.build.msc_on_boot=1 + +m5stack_stamp_s3.menu.DFUOnBoot.default=Disabled +m5stack_stamp_s3.menu.DFUOnBoot.default.build.dfu_on_boot=0 +m5stack_stamp_s3.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode) +m5stack_stamp_s3.menu.DFUOnBoot.dfu.build.dfu_on_boot=1 + +m5stack_stamp_s3.menu.UploadMode.default=UART0 / Hardware CDC +m5stack_stamp_s3.menu.UploadMode.default.upload.use_1200bps_touch=false +m5stack_stamp_s3.menu.UploadMode.default.upload.wait_for_upload_port=false +m5stack_stamp_s3.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB) +m5stack_stamp_s3.menu.UploadMode.cdc.upload.use_1200bps_touch=true +m5stack_stamp_s3.menu.UploadMode.cdc.upload.wait_for_upload_port=true + +m5stack_stamp_s3.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +m5stack_stamp_s3.menu.PartitionScheme.default.build.partitions=default +m5stack_stamp_s3.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_stamp_s3.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_stamp_s3.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_stamp_s3.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_stamp_s3.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_stamp_s3.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_stamp_s3.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_stamp_s3.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_stamp_s3.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_stamp_s3.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_stamp_s3.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_stamp_s3.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_stamp_s3.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_stamp_s3.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_stamp_s3.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_stamp_s3.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_stamp_s3.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_stamp_s3.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_stamp_s3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_stamp_s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_stamp_s3.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_stamp_s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_stamp_s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_stamp_s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_stamp_s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_stamp_s3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_stamp_s3.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_stamp_s3.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_stamp_s3.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9.9MB FATFS) +m5stack_stamp_s3.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +m5stack_stamp_s3.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 +m5stack_stamp_s3.menu.PartitionScheme.rainmaker=RainMaker +m5stack_stamp_s3.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_stamp_s3.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_stamp_s3.menu.PartitionScheme.app5M_fat24M_32MB=32M Flash (4.8MB APP/22MB FATFS) +m5stack_stamp_s3.menu.PartitionScheme.app5M_fat24M_32MB.build.partitions=large_fat_32MB +m5stack_stamp_s3.menu.PartitionScheme.app5M_fat24M_32MB.upload.maximum_size=4718592 +m5stack_stamp_s3.menu.PartitionScheme.app5M_little24M_32MB=32M Flash (4.8MB APP/22MB LittleFS) +m5stack_stamp_s3.menu.PartitionScheme.app5M_little24M_32MB.build.partitions=large_littlefs_32MB +m5stack_stamp_s3.menu.PartitionScheme.app5M_little24M_32MB.upload.maximum_size=4718592 +m5stack_stamp_s3.menu.PartitionScheme.esp_sr_16=ESP SR 16M (3MB APP/7MB SPIFFS/2.9MB MODEL) +m5stack_stamp_s3.menu.PartitionScheme.esp_sr_16.upload.maximum_size=3145728 +m5stack_stamp_s3.menu.PartitionScheme.esp_sr_16.upload.extra_flags=0xD10000 {build.path}/srmodels.bin +m5stack_stamp_s3.menu.PartitionScheme.esp_sr_16.build.partitions=esp_sr_16 +m5stack_stamp_s3.menu.PartitionScheme.custom=Custom +m5stack_stamp_s3.menu.PartitionScheme.custom.build.partitions= +m5stack_stamp_s3.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_stamp_s3.menu.CPUFreq.240=240MHz (WiFi) +m5stack_stamp_s3.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_stamp_s3.menu.CPUFreq.160=160MHz (WiFi) +m5stack_stamp_s3.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_stamp_s3.menu.CPUFreq.80=80MHz (WiFi) +m5stack_stamp_s3.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_stamp_s3.menu.CPUFreq.40=40MHz +m5stack_stamp_s3.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_stamp_s3.menu.CPUFreq.20=20MHz +m5stack_stamp_s3.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_stamp_s3.menu.CPUFreq.10=10MHz +m5stack_stamp_s3.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_stamp_s3.menu.UploadSpeed.921600=921600 +m5stack_stamp_s3.menu.UploadSpeed.921600.upload.speed=921600 +m5stack_stamp_s3.menu.UploadSpeed.115200=115200 +m5stack_stamp_s3.menu.UploadSpeed.115200.upload.speed=115200 +m5stack_stamp_s3.menu.UploadSpeed.256000.windows=256000 +m5stack_stamp_s3.menu.UploadSpeed.256000.upload.speed=256000 +m5stack_stamp_s3.menu.UploadSpeed.230400.windows.upload.speed=256000 +m5stack_stamp_s3.menu.UploadSpeed.230400=230400 +m5stack_stamp_s3.menu.UploadSpeed.230400.upload.speed=230400 +m5stack_stamp_s3.menu.UploadSpeed.460800.linux=460800 +m5stack_stamp_s3.menu.UploadSpeed.460800.macosx=460800 +m5stack_stamp_s3.menu.UploadSpeed.460800.upload.speed=460800 +m5stack_stamp_s3.menu.UploadSpeed.512000.windows=512000 +m5stack_stamp_s3.menu.UploadSpeed.512000.upload.speed=512000 + +m5stack_stamp_s3.menu.DebugLevel.none=None +m5stack_stamp_s3.menu.DebugLevel.none.build.code_debug=0 +m5stack_stamp_s3.menu.DebugLevel.error=Error +m5stack_stamp_s3.menu.DebugLevel.error.build.code_debug=1 +m5stack_stamp_s3.menu.DebugLevel.warn=Warn +m5stack_stamp_s3.menu.DebugLevel.warn.build.code_debug=2 +m5stack_stamp_s3.menu.DebugLevel.info=Info +m5stack_stamp_s3.menu.DebugLevel.info.build.code_debug=3 +m5stack_stamp_s3.menu.DebugLevel.debug=Debug +m5stack_stamp_s3.menu.DebugLevel.debug.build.code_debug=4 +m5stack_stamp_s3.menu.DebugLevel.verbose=Verbose +m5stack_stamp_s3.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_stamp_s3.menu.EraseFlash.none=Disabled +m5stack_stamp_s3.menu.EraseFlash.none.upload.erase_cmd= +m5stack_stamp_s3.menu.EraseFlash.all=Enabled +m5stack_stamp_s3.menu.EraseFlash.all.upload.erase_cmd=-e + + +############################################################## + +m5stack_capsule.name=M5Capsule +m5stack_capsule.vid.0=0x303a +m5stack_capsule.pid.0=0x1001 +m5stack_capsule.bootloader.tool=esptool_py +m5stack_capsule.bootloader.tool.default=esptool_py + +m5stack_capsule.upload.tool=esptool_py +m5stack_capsule.upload.tool.default=esptool_py +m5stack_capsule.upload.tool.network=esp_ota + +m5stack_capsule.upload.maximum_size=1310720 +m5stack_capsule.upload.maximum_data_size=327680 +m5stack_capsule.upload.flags= +m5stack_capsule.upload.extra_flags= +m5stack_capsule.upload.use_1200bps_touch=false +m5stack_capsule.upload.wait_for_upload_port=false + +m5stack_capsule.serial.disableDTR=false +m5stack_capsule.serial.disableRTS=false + +m5stack_capsule.build.tarch=xtensa +m5stack_capsule.build.bootloader_addr=0x0 +m5stack_capsule.build.target=esp32s3 +m5stack_capsule.build.mcu=esp32s3 +m5stack_capsule.build.core=esp32 +m5stack_capsule.build.variant=m5stack_capsule +m5stack_capsule.build.board=M5STACK_CAPSULE + +m5stack_capsule.build.usb_mode=1 +m5stack_capsule.build.cdc_on_boot=1 +m5stack_capsule.build.msc_on_boot=0 +m5stack_capsule.build.dfu_on_boot=0 +m5stack_capsule.build.f_cpu=240000000L +m5stack_capsule.build.flash_size=8MB +m5stack_capsule.build.flash_freq=80m +m5stack_capsule.build.flash_mode=dio +m5stack_capsule.build.boot=qio +m5stack_capsule.build.boot_freq=80m +m5stack_capsule.build.partitions=default +m5stack_capsule.build.defines= +m5stack_capsule.build.loop_core= +m5stack_capsule.build.event_core= +m5stack_capsule.build.psram_type=qspi +m5stack_capsule.build.memory_type={build.boot}_{build.psram_type} + +## IDE 2.0 Seems to not update the value +m5stack_capsule.menu.JTAGAdapter.default=Disabled +m5stack_capsule.menu.JTAGAdapter.default.build.copy_jtag_files=0 +m5stack_capsule.menu.JTAGAdapter.builtin=Integrated USB JTAG +m5stack_capsule.menu.JTAGAdapter.builtin.build.openocdscript=esp32s3-builtin.cfg +m5stack_capsule.menu.JTAGAdapter.builtin.build.copy_jtag_files=1 +m5stack_capsule.menu.JTAGAdapter.external=FTDI Adapter +m5stack_capsule.menu.JTAGAdapter.external.build.openocdscript=esp32s3-ftdi.cfg +m5stack_capsule.menu.JTAGAdapter.external.build.copy_jtag_files=1 +m5stack_capsule.menu.JTAGAdapter.bridge=ESP USB Bridge +m5stack_capsule.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg +m5stack_capsule.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 + +m5stack_capsule.menu.PSRAM.disabled=Disabled +m5stack_capsule.menu.PSRAM.disabled.build.defines= +m5stack_capsule.menu.PSRAM.disabled.build.psram_type=qspi +m5stack_capsule.menu.PSRAM.enabled=QSPI PSRAM +m5stack_capsule.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM +m5stack_capsule.menu.PSRAM.enabled.build.psram_type=qspi +m5stack_capsule.menu.PSRAM.opi=OPI PSRAM +m5stack_capsule.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM +m5stack_capsule.menu.PSRAM.opi.build.psram_type=opi + +m5stack_capsule.menu.FlashMode.qio=QIO 80MHz +m5stack_capsule.menu.FlashMode.qio.build.flash_mode=dio +m5stack_capsule.menu.FlashMode.qio.build.boot=qio +m5stack_capsule.menu.FlashMode.qio.build.boot_freq=80m +m5stack_capsule.menu.FlashMode.qio.build.flash_freq=80m +m5stack_capsule.menu.FlashMode.qio120=QIO 120MHz +m5stack_capsule.menu.FlashMode.qio120.build.flash_mode=dio +m5stack_capsule.menu.FlashMode.qio120.build.boot=qio +m5stack_capsule.menu.FlashMode.qio120.build.boot_freq=120m +m5stack_capsule.menu.FlashMode.qio120.build.flash_freq=80m +m5stack_capsule.menu.FlashMode.dio=DIO 80MHz +m5stack_capsule.menu.FlashMode.dio.build.flash_mode=dio +m5stack_capsule.menu.FlashMode.dio.build.boot=dio +m5stack_capsule.menu.FlashMode.dio.build.boot_freq=80m +m5stack_capsule.menu.FlashMode.dio.build.flash_freq=80m +m5stack_capsule.menu.FlashMode.opi=OPI 80MHz +m5stack_capsule.menu.FlashMode.opi.build.flash_mode=dout +m5stack_capsule.menu.FlashMode.opi.build.boot=opi +m5stack_capsule.menu.FlashMode.opi.build.boot_freq=80m +m5stack_capsule.menu.FlashMode.opi.build.flash_freq=80m + +m5stack_capsule.menu.FlashSize.4M=4MB (32Mb) +m5stack_capsule.menu.FlashSize.4M.build.flash_size=4MB +m5stack_capsule.menu.FlashSize.8M=8MB (64Mb) +m5stack_capsule.menu.FlashSize.8M.build.flash_size=8MB +m5stack_capsule.menu.FlashSize.8M.build.partitions=default_8MB +m5stack_capsule.menu.FlashSize.16M=16MB (128Mb) +m5stack_capsule.menu.FlashSize.16M.build.flash_size=16MB +m5stack_capsule.menu.FlashSize.32M=32MB (256Mb) +m5stack_capsule.menu.FlashSize.32M.build.flash_size=32MB +m5stack_capsule.menu.FlashSize.32M.build.partitions=app5M_fat24M_32MB + +m5stack_capsule.menu.LoopCore.1=Core 1 +m5stack_capsule.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_capsule.menu.LoopCore.0=Core 0 +m5stack_capsule.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_capsule.menu.EventsCore.1=Core 1 +m5stack_capsule.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_capsule.menu.EventsCore.0=Core 0 +m5stack_capsule.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_capsule.menu.USBMode.hwcdc=Hardware CDC and JTAG +m5stack_capsule.menu.USBMode.hwcdc.build.usb_mode=1 +m5stack_capsule.menu.USBMode.default=USB-OTG (TinyUSB) +m5stack_capsule.menu.USBMode.default.build.usb_mode=0 + +m5stack_capsule.menu.CDCOnBoot.cdc=Enabled +m5stack_capsule.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 +m5stack_capsule.menu.CDCOnBoot.default=Disabled +m5stack_capsule.menu.CDCOnBoot.default.build.cdc_on_boot=0 + +m5stack_capsule.menu.MSCOnBoot.default=Disabled +m5stack_capsule.menu.MSCOnBoot.default.build.msc_on_boot=0 +m5stack_capsule.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode) +m5stack_capsule.menu.MSCOnBoot.msc.build.msc_on_boot=1 + +m5stack_capsule.menu.DFUOnBoot.default=Disabled +m5stack_capsule.menu.DFUOnBoot.default.build.dfu_on_boot=0 +m5stack_capsule.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode) +m5stack_capsule.menu.DFUOnBoot.dfu.build.dfu_on_boot=1 + +m5stack_capsule.menu.UploadMode.default=UART0 / Hardware CDC +m5stack_capsule.menu.UploadMode.default.upload.use_1200bps_touch=false +m5stack_capsule.menu.UploadMode.default.upload.wait_for_upload_port=false +m5stack_capsule.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB) +m5stack_capsule.menu.UploadMode.cdc.upload.use_1200bps_touch=true +m5stack_capsule.menu.UploadMode.cdc.upload.wait_for_upload_port=true + +m5stack_capsule.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +m5stack_capsule.menu.PartitionScheme.default.build.partitions=default +m5stack_capsule.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_capsule.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_capsule.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_capsule.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_capsule.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_capsule.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_capsule.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_capsule.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_capsule.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_capsule.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_capsule.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_capsule.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_capsule.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_capsule.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_capsule.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_capsule.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_capsule.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_capsule.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_capsule.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_capsule.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_capsule.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_capsule.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_capsule.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_capsule.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_capsule.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_capsule.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_capsule.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_capsule.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_capsule.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9.9MB FATFS) +m5stack_capsule.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +m5stack_capsule.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 +m5stack_capsule.menu.PartitionScheme.rainmaker=RainMaker +m5stack_capsule.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_capsule.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_capsule.menu.PartitionScheme.app5M_fat24M_32MB=32M Flash (4.8MB APP/22MB FATFS) +m5stack_capsule.menu.PartitionScheme.app5M_fat24M_32MB.build.partitions=large_fat_32MB +m5stack_capsule.menu.PartitionScheme.app5M_fat24M_32MB.upload.maximum_size=4718592 +m5stack_capsule.menu.PartitionScheme.app5M_little24M_32MB=32M Flash (4.8MB APP/22MB LittleFS) +m5stack_capsule.menu.PartitionScheme.app5M_little24M_32MB.build.partitions=large_littlefs_32MB +m5stack_capsule.menu.PartitionScheme.app5M_little24M_32MB.upload.maximum_size=4718592 +m5stack_capsule.menu.PartitionScheme.esp_sr_16=ESP SR 16M (3MB APP/7MB SPIFFS/2.9MB MODEL) +m5stack_capsule.menu.PartitionScheme.esp_sr_16.upload.maximum_size=3145728 +m5stack_capsule.menu.PartitionScheme.esp_sr_16.upload.extra_flags=0xD10000 {build.path}/srmodels.bin +m5stack_capsule.menu.PartitionScheme.esp_sr_16.build.partitions=esp_sr_16 +m5stack_capsule.menu.PartitionScheme.custom=Custom +m5stack_capsule.menu.PartitionScheme.custom.build.partitions= +m5stack_capsule.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_capsule.menu.CPUFreq.240=240MHz (WiFi) +m5stack_capsule.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_capsule.menu.CPUFreq.160=160MHz (WiFi) +m5stack_capsule.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_capsule.menu.CPUFreq.80=80MHz (WiFi) +m5stack_capsule.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_capsule.menu.CPUFreq.40=40MHz +m5stack_capsule.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_capsule.menu.CPUFreq.20=20MHz +m5stack_capsule.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_capsule.menu.CPUFreq.10=10MHz +m5stack_capsule.menu.CPUFreq.10.build.f_cpu=10000000L + + +m5stack_capsule.menu.UploadSpeed.1500000=1500000 +m5stack_capsule.menu.UploadSpeed.1500000.upload.speed=1500000 +m5stack_capsule.menu.UploadSpeed.921600=921600 +m5stack_capsule.menu.UploadSpeed.921600.upload.speed=921600 +m5stack_capsule.menu.UploadSpeed.115200=115200 +m5stack_capsule.menu.UploadSpeed.115200.upload.speed=115200 +m5stack_capsule.menu.UploadSpeed.256000.windows=256000 +m5stack_capsule.menu.UploadSpeed.256000.upload.speed=256000 +m5stack_capsule.menu.UploadSpeed.230400.windows.upload.speed=256000 +m5stack_capsule.menu.UploadSpeed.230400=230400 +m5stack_capsule.menu.UploadSpeed.230400.upload.speed=230400 +m5stack_capsule.menu.UploadSpeed.460800.linux=460800 +m5stack_capsule.menu.UploadSpeed.460800.macosx=460800 +m5stack_capsule.menu.UploadSpeed.460800.upload.speed=460800 +m5stack_capsule.menu.UploadSpeed.512000.windows=512000 +m5stack_capsule.menu.UploadSpeed.512000.upload.speed=512000 + +m5stack_capsule.menu.DebugLevel.none=None +m5stack_capsule.menu.DebugLevel.none.build.code_debug=0 +m5stack_capsule.menu.DebugLevel.error=Error +m5stack_capsule.menu.DebugLevel.error.build.code_debug=1 +m5stack_capsule.menu.DebugLevel.warn=Warn +m5stack_capsule.menu.DebugLevel.warn.build.code_debug=2 +m5stack_capsule.menu.DebugLevel.info=Info +m5stack_capsule.menu.DebugLevel.info.build.code_debug=3 +m5stack_capsule.menu.DebugLevel.debug=Debug +m5stack_capsule.menu.DebugLevel.debug.build.code_debug=4 +m5stack_capsule.menu.DebugLevel.verbose=Verbose +m5stack_capsule.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_capsule.menu.EraseFlash.none=Disabled +m5stack_capsule.menu.EraseFlash.none.upload.erase_cmd= +m5stack_capsule.menu.EraseFlash.all=Enabled +m5stack_capsule.menu.EraseFlash.all.upload.erase_cmd=-e + +############################################################## + +m5stack_cardputer.name=M5Cardputer +m5stack_cardputer.vid.0=0x303a +m5stack_cardputer.pid.0=0x1001 +m5stack_cardputer.bootloader.tool=esptool_py +m5stack_cardputer.bootloader.tool.default=esptool_py + +m5stack_cardputer.upload.tool=esptool_py +m5stack_cardputer.upload.tool.default=esptool_py +m5stack_cardputer.upload.tool.network=esp_ota + +m5stack_cardputer.upload.maximum_size=1310720 +m5stack_cardputer.upload.maximum_data_size=327680 +m5stack_cardputer.upload.flags= +m5stack_cardputer.upload.extra_flags= +m5stack_cardputer.upload.use_1200bps_touch=false +m5stack_cardputer.upload.wait_for_upload_port=false + +m5stack_cardputer.serial.disableDTR=false +m5stack_cardputer.serial.disableRTS=false + +m5stack_cardputer.build.tarch=xtensa +m5stack_cardputer.build.bootloader_addr=0x0 +m5stack_cardputer.build.target=esp32s3 +m5stack_cardputer.build.mcu=esp32s3 +m5stack_cardputer.build.core=esp32 +m5stack_cardputer.build.variant=m5stack_cardputer +m5stack_cardputer.build.board=M5STACK_CARDPUTER + +m5stack_cardputer.build.usb_mode=1 +m5stack_cardputer.build.cdc_on_boot=1 +m5stack_cardputer.build.msc_on_boot=0 +m5stack_cardputer.build.dfu_on_boot=0 +m5stack_cardputer.build.f_cpu=240000000L +m5stack_cardputer.build.flash_size=8MB +m5stack_cardputer.build.flash_freq=80m +m5stack_cardputer.build.flash_mode=dio +m5stack_cardputer.build.boot=qio +m5stack_cardputer.build.boot_freq=80m +m5stack_cardputer.build.partitions=default +m5stack_cardputer.build.defines= +m5stack_cardputer.build.loop_core= +m5stack_cardputer.build.event_core= +m5stack_cardputer.build.psram_type=qspi +m5stack_cardputer.build.memory_type={build.boot}_{build.psram_type} + +## IDE 2.0 Seems to not update the value +m5stack_cardputer.menu.JTAGAdapter.default=Disabled +m5stack_cardputer.menu.JTAGAdapter.default.build.copy_jtag_files=0 +m5stack_cardputer.menu.JTAGAdapter.builtin=Integrated USB JTAG +m5stack_cardputer.menu.JTAGAdapter.builtin.build.openocdscript=esp32s3-builtin.cfg +m5stack_cardputer.menu.JTAGAdapter.builtin.build.copy_jtag_files=1 +m5stack_cardputer.menu.JTAGAdapter.external=FTDI Adapter +m5stack_cardputer.menu.JTAGAdapter.external.build.openocdscript=esp32s3-ftdi.cfg +m5stack_cardputer.menu.JTAGAdapter.external.build.copy_jtag_files=1 +m5stack_cardputer.menu.JTAGAdapter.bridge=ESP USB Bridge +m5stack_cardputer.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg +m5stack_cardputer.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 + +m5stack_cardputer.menu.PSRAM.disabled=Disabled +m5stack_cardputer.menu.PSRAM.disabled.build.defines= +m5stack_cardputer.menu.PSRAM.disabled.build.psram_type=qspi +m5stack_cardputer.menu.PSRAM.enabled=QSPI PSRAM +m5stack_cardputer.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM +m5stack_cardputer.menu.PSRAM.enabled.build.psram_type=qspi +m5stack_cardputer.menu.PSRAM.opi=OPI PSRAM +m5stack_cardputer.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM +m5stack_cardputer.menu.PSRAM.opi.build.psram_type=opi + +m5stack_cardputer.menu.FlashMode.qio=QIO 80MHz +m5stack_cardputer.menu.FlashMode.qio.build.flash_mode=dio +m5stack_cardputer.menu.FlashMode.qio.build.boot=qio +m5stack_cardputer.menu.FlashMode.qio.build.boot_freq=80m +m5stack_cardputer.menu.FlashMode.qio.build.flash_freq=80m +m5stack_cardputer.menu.FlashMode.qio120=QIO 120MHz +m5stack_cardputer.menu.FlashMode.qio120.build.flash_mode=dio +m5stack_cardputer.menu.FlashMode.qio120.build.boot=qio +m5stack_cardputer.menu.FlashMode.qio120.build.boot_freq=120m +m5stack_cardputer.menu.FlashMode.qio120.build.flash_freq=80m +m5stack_cardputer.menu.FlashMode.dio=DIO 80MHz +m5stack_cardputer.menu.FlashMode.dio.build.flash_mode=dio +m5stack_cardputer.menu.FlashMode.dio.build.boot=dio +m5stack_cardputer.menu.FlashMode.dio.build.boot_freq=80m +m5stack_cardputer.menu.FlashMode.dio.build.flash_freq=80m +m5stack_cardputer.menu.FlashMode.opi=OPI 80MHz +m5stack_cardputer.menu.FlashMode.opi.build.flash_mode=dout +m5stack_cardputer.menu.FlashMode.opi.build.boot=opi +m5stack_cardputer.menu.FlashMode.opi.build.boot_freq=80m +m5stack_cardputer.menu.FlashMode.opi.build.flash_freq=80m + +m5stack_cardputer.menu.FlashSize.4M=4MB (32Mb) +m5stack_cardputer.menu.FlashSize.4M.build.flash_size=4MB +m5stack_cardputer.menu.FlashSize.8M=8MB (64Mb) +m5stack_cardputer.menu.FlashSize.8M.build.flash_size=8MB +m5stack_cardputer.menu.FlashSize.8M.build.partitions=default_8MB +m5stack_cardputer.menu.FlashSize.16M=16MB (128Mb) +m5stack_cardputer.menu.FlashSize.16M.build.flash_size=16MB +m5stack_cardputer.menu.FlashSize.32M=32MB (256Mb) +m5stack_cardputer.menu.FlashSize.32M.build.flash_size=32MB +m5stack_cardputer.menu.FlashSize.32M.build.partitions=app5M_fat24M_32MB + +m5stack_cardputer.menu.LoopCore.1=Core 1 +m5stack_cardputer.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_cardputer.menu.LoopCore.0=Core 0 +m5stack_cardputer.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_cardputer.menu.EventsCore.1=Core 1 +m5stack_cardputer.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_cardputer.menu.EventsCore.0=Core 0 +m5stack_cardputer.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_cardputer.menu.USBMode.hwcdc=Hardware CDC and JTAG +m5stack_cardputer.menu.USBMode.hwcdc.build.usb_mode=1 +m5stack_cardputer.menu.USBMode.default=USB-OTG (TinyUSB) +m5stack_cardputer.menu.USBMode.default.build.usb_mode=0 + +m5stack_cardputer.menu.CDCOnBoot.cdc=Enabled +m5stack_cardputer.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 +m5stack_cardputer.menu.CDCOnBoot.default=Disabled +m5stack_cardputer.menu.CDCOnBoot.default.build.cdc_on_boot=0 + +m5stack_cardputer.menu.MSCOnBoot.default=Disabled +m5stack_cardputer.menu.MSCOnBoot.default.build.msc_on_boot=0 +m5stack_cardputer.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode) +m5stack_cardputer.menu.MSCOnBoot.msc.build.msc_on_boot=1 + +m5stack_cardputer.menu.DFUOnBoot.default=Disabled +m5stack_cardputer.menu.DFUOnBoot.default.build.dfu_on_boot=0 +m5stack_cardputer.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode) +m5stack_cardputer.menu.DFUOnBoot.dfu.build.dfu_on_boot=1 + +m5stack_cardputer.menu.UploadMode.default=UART0 / Hardware CDC +m5stack_cardputer.menu.UploadMode.default.upload.use_1200bps_touch=false +m5stack_cardputer.menu.UploadMode.default.upload.wait_for_upload_port=false +m5stack_cardputer.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB) +m5stack_cardputer.menu.UploadMode.cdc.upload.use_1200bps_touch=true +m5stack_cardputer.menu.UploadMode.cdc.upload.wait_for_upload_port=true + +m5stack_cardputer.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +m5stack_cardputer.menu.PartitionScheme.default.build.partitions=default +m5stack_cardputer.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_cardputer.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_cardputer.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_cardputer.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_cardputer.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_cardputer.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_cardputer.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_cardputer.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_cardputer.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_cardputer.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_cardputer.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_cardputer.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_cardputer.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_cardputer.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_cardputer.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_cardputer.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_cardputer.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_cardputer.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_cardputer.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_cardputer.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_cardputer.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_cardputer.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_cardputer.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_cardputer.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_cardputer.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_cardputer.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_cardputer.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_cardputer.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_cardputer.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9.9MB FATFS) +m5stack_cardputer.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +m5stack_cardputer.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 +m5stack_cardputer.menu.PartitionScheme.rainmaker=RainMaker +m5stack_cardputer.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_cardputer.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_cardputer.menu.PartitionScheme.app5M_fat24M_32MB=32M Flash (4.8MB APP/22MB FATFS) +m5stack_cardputer.menu.PartitionScheme.app5M_fat24M_32MB.build.partitions=large_fat_32MB +m5stack_cardputer.menu.PartitionScheme.app5M_fat24M_32MB.upload.maximum_size=4718592 +m5stack_cardputer.menu.PartitionScheme.app5M_little24M_32MB=32M Flash (4.8MB APP/22MB LittleFS) +m5stack_cardputer.menu.PartitionScheme.app5M_little24M_32MB.build.partitions=large_littlefs_32MB +m5stack_cardputer.menu.PartitionScheme.app5M_little24M_32MB.upload.maximum_size=4718592 +m5stack_cardputer.menu.PartitionScheme.esp_sr_16=ESP SR 16M (3MB APP/7MB SPIFFS/2.9MB MODEL) +m5stack_cardputer.menu.PartitionScheme.esp_sr_16.upload.maximum_size=3145728 +m5stack_cardputer.menu.PartitionScheme.esp_sr_16.upload.extra_flags=0xD10000 {build.path}/srmodels.bin +m5stack_cardputer.menu.PartitionScheme.esp_sr_16.build.partitions=esp_sr_16 +m5stack_cardputer.menu.PartitionScheme.custom=Custom +m5stack_cardputer.menu.PartitionScheme.custom.build.partitions= +m5stack_cardputer.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_cardputer.menu.CPUFreq.240=240MHz (WiFi) +m5stack_cardputer.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_cardputer.menu.CPUFreq.160=160MHz (WiFi) +m5stack_cardputer.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_cardputer.menu.CPUFreq.80=80MHz (WiFi) +m5stack_cardputer.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_cardputer.menu.CPUFreq.40=40MHz +m5stack_cardputer.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_cardputer.menu.CPUFreq.20=20MHz +m5stack_cardputer.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_cardputer.menu.CPUFreq.10=10MHz +m5stack_cardputer.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_cardputer.menu.UploadSpeed.921600=921600 +m5stack_cardputer.menu.UploadSpeed.921600.upload.speed=921600 +m5stack_cardputer.menu.UploadSpeed.115200=115200 +m5stack_cardputer.menu.UploadSpeed.115200.upload.speed=115200 +m5stack_cardputer.menu.UploadSpeed.256000.windows=256000 +m5stack_cardputer.menu.UploadSpeed.256000.upload.speed=256000 +m5stack_cardputer.menu.UploadSpeed.230400.windows.upload.speed=256000 +m5stack_cardputer.menu.UploadSpeed.230400=230400 +m5stack_cardputer.menu.UploadSpeed.230400.upload.speed=230400 +m5stack_cardputer.menu.UploadSpeed.460800.linux=460800 +m5stack_cardputer.menu.UploadSpeed.460800.macosx=460800 +m5stack_cardputer.menu.UploadSpeed.460800.upload.speed=460800 +m5stack_cardputer.menu.UploadSpeed.512000.windows=512000 +m5stack_cardputer.menu.UploadSpeed.512000.upload.speed=512000 + +m5stack_cardputer.menu.DebugLevel.none=None +m5stack_cardputer.menu.DebugLevel.none.build.code_debug=0 +m5stack_cardputer.menu.DebugLevel.error=Error +m5stack_cardputer.menu.DebugLevel.error.build.code_debug=1 +m5stack_cardputer.menu.DebugLevel.warn=Warn +m5stack_cardputer.menu.DebugLevel.warn.build.code_debug=2 +m5stack_cardputer.menu.DebugLevel.info=Info +m5stack_cardputer.menu.DebugLevel.info.build.code_debug=3 +m5stack_cardputer.menu.DebugLevel.debug=Debug +m5stack_cardputer.menu.DebugLevel.debug.build.code_debug=4 +m5stack_cardputer.menu.DebugLevel.verbose=Verbose +m5stack_cardputer.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_cardputer.menu.EraseFlash.none=Disabled +m5stack_cardputer.menu.EraseFlash.none.upload.erase_cmd= +m5stack_cardputer.menu.EraseFlash.all=Enabled +m5stack_cardputer.menu.EraseFlash.all.upload.erase_cmd=-e + +############################################################## + +m5stack_dial.name=M5Dial +m5stack_dial.vid.0=0x303a +m5stack_dial.pid.0=0x1001 +m5stack_dial.bootloader.tool=esptool_py +m5stack_dial.bootloader.tool.default=esptool_py + +m5stack_dial.upload.tool=esptool_py +m5stack_dial.upload.tool.default=esptool_py +m5stack_dial.upload.tool.network=esp_ota + +m5stack_dial.upload.maximum_size=1310720 +m5stack_dial.upload.maximum_data_size=327680 +m5stack_dial.upload.flags= +m5stack_dial.upload.extra_flags= +m5stack_dial.upload.use_1200bps_touch=false +m5stack_dial.upload.wait_for_upload_port=false + +m5stack_dial.serial.disableDTR=false +m5stack_dial.serial.disableRTS=false + +m5stack_dial.build.tarch=xtensa +m5stack_dial.build.bootloader_addr=0x0 +m5stack_dial.build.target=esp32s3 +m5stack_dial.build.mcu=esp32s3 +m5stack_dial.build.core=esp32 +m5stack_dial.build.variant=m5stack_dial +m5stack_dial.build.board=M5STACK_DIAL + +m5stack_dial.build.usb_mode=1 +m5stack_dial.build.cdc_on_boot=1 +m5stack_dial.build.msc_on_boot=0 +m5stack_dial.build.dfu_on_boot=0 +m5stack_dial.build.f_cpu=240000000L +m5stack_dial.build.flash_size=8MB +m5stack_dial.build.flash_freq=80m +m5stack_dial.build.flash_mode=dio +m5stack_dial.build.boot=qio +m5stack_dial.build.boot_freq=80m +m5stack_dial.build.partitions=default +m5stack_dial.build.defines= +m5stack_dial.build.loop_core= +m5stack_dial.build.event_core= +m5stack_dial.build.psram_type=qspi +m5stack_dial.build.memory_type={build.boot}_{build.psram_type} + +## IDE 2.0 Seems to not update the value +m5stack_dial.menu.JTAGAdapter.default=Disabled +m5stack_dial.menu.JTAGAdapter.default.build.copy_jtag_files=0 +m5stack_dial.menu.JTAGAdapter.builtin=Integrated USB JTAG +m5stack_dial.menu.JTAGAdapter.builtin.build.openocdscript=esp32s3-builtin.cfg +m5stack_dial.menu.JTAGAdapter.builtin.build.copy_jtag_files=1 +m5stack_dial.menu.JTAGAdapter.external=FTDI Adapter +m5stack_dial.menu.JTAGAdapter.external.build.openocdscript=esp32s3-ftdi.cfg +m5stack_dial.menu.JTAGAdapter.external.build.copy_jtag_files=1 +m5stack_dial.menu.JTAGAdapter.bridge=ESP USB Bridge +m5stack_dial.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg +m5stack_dial.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 + +m5stack_dial.menu.PSRAM.disabled=Disabled +m5stack_dial.menu.PSRAM.disabled.build.defines= +m5stack_dial.menu.PSRAM.disabled.build.psram_type=qspi +m5stack_dial.menu.PSRAM.enabled=QSPI PSRAM +m5stack_dial.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM +m5stack_dial.menu.PSRAM.enabled.build.psram_type=qspi +m5stack_dial.menu.PSRAM.opi=OPI PSRAM +m5stack_dial.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM +m5stack_dial.menu.PSRAM.opi.build.psram_type=opi + +m5stack_dial.menu.FlashMode.qio=QIO 80MHz +m5stack_dial.menu.FlashMode.qio.build.flash_mode=dio +m5stack_dial.menu.FlashMode.qio.build.boot=qio +m5stack_dial.menu.FlashMode.qio.build.boot_freq=80m +m5stack_dial.menu.FlashMode.qio.build.flash_freq=80m +m5stack_dial.menu.FlashMode.qio120=QIO 120MHz +m5stack_dial.menu.FlashMode.qio120.build.flash_mode=dio +m5stack_dial.menu.FlashMode.qio120.build.boot=qio +m5stack_dial.menu.FlashMode.qio120.build.boot_freq=120m +m5stack_dial.menu.FlashMode.qio120.build.flash_freq=80m +m5stack_dial.menu.FlashMode.dio=DIO 80MHz +m5stack_dial.menu.FlashMode.dio.build.flash_mode=dio +m5stack_dial.menu.FlashMode.dio.build.boot=dio +m5stack_dial.menu.FlashMode.dio.build.boot_freq=80m +m5stack_dial.menu.FlashMode.dio.build.flash_freq=80m +m5stack_dial.menu.FlashMode.opi=OPI 80MHz +m5stack_dial.menu.FlashMode.opi.build.flash_mode=dout +m5stack_dial.menu.FlashMode.opi.build.boot=opi +m5stack_dial.menu.FlashMode.opi.build.boot_freq=80m +m5stack_dial.menu.FlashMode.opi.build.flash_freq=80m + +m5stack_dial.menu.FlashSize.4M=4MB (32Mb) +m5stack_dial.menu.FlashSize.4M.build.flash_size=4MB +m5stack_dial.menu.FlashSize.8M=8MB (64Mb) +m5stack_dial.menu.FlashSize.8M.build.flash_size=8MB +m5stack_dial.menu.FlashSize.8M.build.partitions=default_8MB +m5stack_dial.menu.FlashSize.16M=16MB (128Mb) +m5stack_dial.menu.FlashSize.16M.build.flash_size=16MB +m5stack_dial.menu.FlashSize.32M=32MB (256Mb) +m5stack_dial.menu.FlashSize.32M.build.flash_size=32MB +m5stack_dial.menu.FlashSize.32M.build.partitions=app5M_fat24M_32MB + +m5stack_dial.menu.LoopCore.1=Core 1 +m5stack_dial.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +m5stack_dial.menu.LoopCore.0=Core 0 +m5stack_dial.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +m5stack_dial.menu.EventsCore.1=Core 1 +m5stack_dial.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +m5stack_dial.menu.EventsCore.0=Core 0 +m5stack_dial.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +m5stack_dial.menu.USBMode.hwcdc=Hardware CDC and JTAG +m5stack_dial.menu.USBMode.hwcdc.build.usb_mode=1 +m5stack_dial.menu.USBMode.default=USB-OTG (TinyUSB) +m5stack_dial.menu.USBMode.default.build.usb_mode=0 + +m5stack_dial.menu.CDCOnBoot.cdc=Enabled +m5stack_dial.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 +m5stack_dial.menu.CDCOnBoot.default=Disabled +m5stack_dial.menu.CDCOnBoot.default.build.cdc_on_boot=0 + +m5stack_dial.menu.MSCOnBoot.default=Disabled +m5stack_dial.menu.MSCOnBoot.default.build.msc_on_boot=0 +m5stack_dial.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode) +m5stack_dial.menu.MSCOnBoot.msc.build.msc_on_boot=1 + +m5stack_dial.menu.DFUOnBoot.default=Disabled +m5stack_dial.menu.DFUOnBoot.default.build.dfu_on_boot=0 +m5stack_dial.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode) +m5stack_dial.menu.DFUOnBoot.dfu.build.dfu_on_boot=1 + +m5stack_dial.menu.UploadMode.default=UART0 / Hardware CDC +m5stack_dial.menu.UploadMode.default.upload.use_1200bps_touch=false +m5stack_dial.menu.UploadMode.default.upload.wait_for_upload_port=false +m5stack_dial.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB) +m5stack_dial.menu.UploadMode.cdc.upload.use_1200bps_touch=true +m5stack_dial.menu.UploadMode.cdc.upload.wait_for_upload_port=true + +m5stack_dial.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +m5stack_dial.menu.PartitionScheme.default.build.partitions=default +m5stack_dial.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +m5stack_dial.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +m5stack_dial.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +m5stack_dial.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +m5stack_dial.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +m5stack_dial.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +m5stack_dial.menu.PartitionScheme.minimal.build.partitions=minimal +m5stack_dial.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +m5stack_dial.menu.PartitionScheme.no_ota.build.partitions=no_ota +m5stack_dial.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +m5stack_dial.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +m5stack_dial.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +m5stack_dial.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +m5stack_dial.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +m5stack_dial.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +m5stack_dial.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +m5stack_dial.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +m5stack_dial.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +m5stack_dial.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +m5stack_dial.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +m5stack_dial.menu.PartitionScheme.huge_app.build.partitions=huge_app +m5stack_dial.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +m5stack_dial.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_dial.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +m5stack_dial.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +m5stack_dial.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +m5stack_dial.menu.PartitionScheme.fatflash.build.partitions=ffat +m5stack_dial.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +m5stack_dial.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9.9MB FATFS) +m5stack_dial.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +m5stack_dial.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 +m5stack_dial.menu.PartitionScheme.rainmaker=RainMaker +m5stack_dial.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +m5stack_dial.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +m5stack_dial.menu.PartitionScheme.app5M_fat24M_32MB=32M Flash (4.8MB APP/22MB FATFS) +m5stack_dial.menu.PartitionScheme.app5M_fat24M_32MB.build.partitions=large_fat_32MB +m5stack_dial.menu.PartitionScheme.app5M_fat24M_32MB.upload.maximum_size=4718592 +m5stack_dial.menu.PartitionScheme.app5M_little24M_32MB=32M Flash (4.8MB APP/22MB LittleFS) +m5stack_dial.menu.PartitionScheme.app5M_little24M_32MB.build.partitions=large_littlefs_32MB +m5stack_dial.menu.PartitionScheme.app5M_little24M_32MB.upload.maximum_size=4718592 +m5stack_dial.menu.PartitionScheme.esp_sr_16=ESP SR 16M (3MB APP/7MB SPIFFS/2.9MB MODEL) +m5stack_dial.menu.PartitionScheme.esp_sr_16.upload.maximum_size=3145728 +m5stack_dial.menu.PartitionScheme.esp_sr_16.upload.extra_flags=0xD10000 {build.path}/srmodels.bin +m5stack_dial.menu.PartitionScheme.esp_sr_16.build.partitions=esp_sr_16 +m5stack_dial.menu.PartitionScheme.custom=Custom +m5stack_dial.menu.PartitionScheme.custom.build.partitions= +m5stack_dial.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +m5stack_dial.menu.CPUFreq.240=240MHz (WiFi) +m5stack_dial.menu.CPUFreq.240.build.f_cpu=240000000L +m5stack_dial.menu.CPUFreq.160=160MHz (WiFi) +m5stack_dial.menu.CPUFreq.160.build.f_cpu=160000000L +m5stack_dial.menu.CPUFreq.80=80MHz (WiFi) +m5stack_dial.menu.CPUFreq.80.build.f_cpu=80000000L +m5stack_dial.menu.CPUFreq.40=40MHz +m5stack_dial.menu.CPUFreq.40.build.f_cpu=40000000L +m5stack_dial.menu.CPUFreq.20=20MHz +m5stack_dial.menu.CPUFreq.20.build.f_cpu=20000000L +m5stack_dial.menu.CPUFreq.10=10MHz +m5stack_dial.menu.CPUFreq.10.build.f_cpu=10000000L + +m5stack_dial.menu.UploadSpeed.921600=921600 +m5stack_dial.menu.UploadSpeed.921600.upload.speed=921600 +m5stack_dial.menu.UploadSpeed.115200=115200 +m5stack_dial.menu.UploadSpeed.115200.upload.speed=115200 +m5stack_dial.menu.UploadSpeed.256000.windows=256000 +m5stack_dial.menu.UploadSpeed.256000.upload.speed=256000 +m5stack_dial.menu.UploadSpeed.230400.windows.upload.speed=256000 +m5stack_dial.menu.UploadSpeed.230400=230400 +m5stack_dial.menu.UploadSpeed.230400.upload.speed=230400 +m5stack_dial.menu.UploadSpeed.460800.linux=460800 +m5stack_dial.menu.UploadSpeed.460800.macosx=460800 +m5stack_dial.menu.UploadSpeed.460800.upload.speed=460800 +m5stack_dial.menu.UploadSpeed.512000.windows=512000 +m5stack_dial.menu.UploadSpeed.512000.upload.speed=512000 + +m5stack_dial.menu.DebugLevel.none=None +m5stack_dial.menu.DebugLevel.none.build.code_debug=0 +m5stack_dial.menu.DebugLevel.error=Error +m5stack_dial.menu.DebugLevel.error.build.code_debug=1 +m5stack_dial.menu.DebugLevel.warn=Warn +m5stack_dial.menu.DebugLevel.warn.build.code_debug=2 +m5stack_dial.menu.DebugLevel.info=Info +m5stack_dial.menu.DebugLevel.info.build.code_debug=3 +m5stack_dial.menu.DebugLevel.debug=Debug +m5stack_dial.menu.DebugLevel.debug.build.code_debug=4 +m5stack_dial.menu.DebugLevel.verbose=Verbose +m5stack_dial.menu.DebugLevel.verbose.build.code_debug=5 + +m5stack_dial.menu.EraseFlash.none=Disabled +m5stack_dial.menu.EraseFlash.none.upload.erase_cmd= +m5stack_dial.menu.EraseFlash.all=Enabled +m5stack_dial.menu.EraseFlash.all.upload.erase_cmd=-e ############################################################## diff --git a/variants/m5stack_cores3/partitions_16MB_factory_4_apps.csv b/tools/partitions/m5stack_partitions_16MB_factory_4_apps.csv similarity index 100% rename from variants/m5stack_cores3/partitions_16MB_factory_4_apps.csv rename to tools/partitions/m5stack_partitions_16MB_factory_4_apps.csv diff --git a/variants/m5stack_cores3/partitions_16MB_factory_6_apps.csv b/tools/partitions/m5stack_partitions_16MB_factory_6_apps.csv similarity index 100% rename from variants/m5stack_cores3/partitions_16MB_factory_6_apps.csv rename to tools/partitions/m5stack_partitions_16MB_factory_6_apps.csv diff --git a/variants/m5stack_atom/pins_arduino.h b/variants/m5stack_atom/pins_arduino.h index 00f3d130743..06a3ec76f64 100644 --- a/variants/m5stack_atom/pins_arduino.h +++ b/variants/m5stack_atom/pins_arduino.h @@ -6,12 +6,10 @@ static const uint8_t TX = 1; static const uint8_t RX = 3; -static const uint8_t TXD2 = 32; -static const uint8_t RXD2 = 26; - static const uint8_t SDA = 26; static const uint8_t SCL = 32; + static const uint8_t G12 = 12; static const uint8_t G19 = 19; static const uint8_t G21 = 21; diff --git a/variants/m5stack_atoms3/pins_arduino.h b/variants/m5stack_atoms3/pins_arduino.h index 4da5a93b978..2fab4d136b1 100644 --- a/variants/m5stack_atoms3/pins_arduino.h +++ b/variants/m5stack_atoms3/pins_arduino.h @@ -7,9 +7,12 @@ #define USB_VID 0x303a #define USB_PID 0x1001 -static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + 35; -#define BUILTIN_LED LED_BUILTIN // backward compatibility -#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN +// Some boards have too low voltage on this pin (board design bug) +// Use different pin with 3V and connect with 48 +// and change this setup for the chosen pin (for example 38) +static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + 48; +#define BUILTIN_LED LED_BUILTIN // backward compatibility +#define LED_BUILTIN LED_BUILTIN #define RGB_BUILTIN LED_BUILTIN #define RGB_BRIGHTNESS 64 diff --git a/variants/m5stack_capsule/pins_arduino.h b/variants/m5stack_capsule/pins_arduino.h new file mode 100644 index 00000000000..2f3473bb368 --- /dev/null +++ b/variants/m5stack_capsule/pins_arduino.h @@ -0,0 +1,51 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include +#include "soc/soc_caps.h" + +#define USB_VID 0x303a +#define USB_PID 0x1001 + +static const uint8_t TX = 43; +static const uint8_t RX = 44; + +static const uint8_t TXD2 = 1; +static const uint8_t RXD2 = 2; + +static const uint8_t SDA = 13; +static const uint8_t SCL = 15; + +static const uint8_t SS = 11; +static const uint8_t MOSI = 12; +static const uint8_t MISO = 39; +static const uint8_t SCK = 14; + +static const uint8_t G0 = 0; +static const uint8_t G1 = 1; +static const uint8_t G2 = 2; +static const uint8_t G3 = 3; +static const uint8_t G4 = 4; +static const uint8_t G5 = 5; +static const uint8_t G6 = 6; +static const uint8_t G7 = 7; +static const uint8_t G8 = 8; +static const uint8_t G9 = 9; +static const uint8_t G10 = 10; +static const uint8_t G11 = 11; +static const uint8_t G12 = 12; +static const uint8_t G13 = 13; +static const uint8_t G14 = 14; +static const uint8_t G15 = 15; +static const uint8_t G39 = 39; +static const uint8_t G40 = 40; +static const uint8_t G41 = 41; +static const uint8_t G42 = 42; +static const uint8_t G43 = 43; +static const uint8_t G44 = 44; +static const uint8_t G46 = 46; + +static const uint8_t ADC1 = 7; +static const uint8_t ADC2 = 8; + +#endif /* Pins_Arduino_h */ diff --git a/variants/m5stack_cardputer/pins_arduino.h b/variants/m5stack_cardputer/pins_arduino.h new file mode 100644 index 00000000000..14a7d56fa06 --- /dev/null +++ b/variants/m5stack_cardputer/pins_arduino.h @@ -0,0 +1,53 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include +#include "soc/soc_caps.h" + +#define USB_VID 0x303a +#define USB_PID 0x1001 + +static const uint8_t TX = 43; +static const uint8_t RX = 44; + +static const uint8_t TXD2 = 1; +static const uint8_t RXD2 = 2; + +static const uint8_t SDA = 13; +static const uint8_t SCL = 15; + +static const uint8_t SS = 12; +static const uint8_t MOSI = 14; +static const uint8_t MISO = 39; +static const uint8_t SCK = 40; + +static const uint8_t G0 = 0; +static const uint8_t G1 = 1; +static const uint8_t G2 = 2; +static const uint8_t G3 = 3; +static const uint8_t G4 = 4; +static const uint8_t G5 = 5; +static const uint8_t G6 = 6; +static const uint8_t G7 = 7; +static const uint8_t G8 = 8; +static const uint8_t G9 = 9; +static const uint8_t G10 = 10; +static const uint8_t G11 = 11; +static const uint8_t G12 = 12; +static const uint8_t G13 = 13; +static const uint8_t G14 = 14; +static const uint8_t G15 = 15; +static const uint8_t G39 = 39; +static const uint8_t G40 = 40; +static const uint8_t G41 = 41; +static const uint8_t G42 = 42; +static const uint8_t G43 = 43; +static const uint8_t G44 = 44; +static const uint8_t G46 = 46; + +static const uint8_t ADC1 = 7; +static const uint8_t ADC2 = 8; + + + +#endif /* Pins_Arduino_h */ diff --git a/variants/m5stack_core_esp32/pins_arduino.h b/variants/m5stack_core/pins_arduino.h similarity index 100% rename from variants/m5stack_core_esp32/pins_arduino.h rename to variants/m5stack_core/pins_arduino.h diff --git a/variants/m5stack_cores3/pins_arduino.h b/variants/m5stack_cores3/pins_arduino.h index fd6e5b886d3..c9bbb02c72f 100644 --- a/variants/m5stack_cores3/pins_arduino.h +++ b/variants/m5stack_cores3/pins_arduino.h @@ -2,11 +2,19 @@ #define Pins_Arduino_h #include +#include "soc/soc_caps.h" #define USB_VID 0x303a #define USB_PID 0x1001 -// CoreS3 has no builtin LED / NeoLED +// Some boards have too low voltage on this pin (board design bug) +// Use different pin with 3V and connect with 48 +// and change this setup for the chosen pin (for example 38) +static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + 48; +#define BUILTIN_LED LED_BUILTIN // backward compatibility +#define LED_BUILTIN LED_BUILTIN +#define RGB_BUILTIN LED_BUILTIN +#define RGB_BRIGHTNESS 64 static const uint8_t TX = 43; static const uint8_t RX = 44; diff --git a/variants/m5stack_dial/pins_arduino.h b/variants/m5stack_dial/pins_arduino.h new file mode 100644 index 00000000000..14a7d56fa06 --- /dev/null +++ b/variants/m5stack_dial/pins_arduino.h @@ -0,0 +1,53 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include +#include "soc/soc_caps.h" + +#define USB_VID 0x303a +#define USB_PID 0x1001 + +static const uint8_t TX = 43; +static const uint8_t RX = 44; + +static const uint8_t TXD2 = 1; +static const uint8_t RXD2 = 2; + +static const uint8_t SDA = 13; +static const uint8_t SCL = 15; + +static const uint8_t SS = 12; +static const uint8_t MOSI = 14; +static const uint8_t MISO = 39; +static const uint8_t SCK = 40; + +static const uint8_t G0 = 0; +static const uint8_t G1 = 1; +static const uint8_t G2 = 2; +static const uint8_t G3 = 3; +static const uint8_t G4 = 4; +static const uint8_t G5 = 5; +static const uint8_t G6 = 6; +static const uint8_t G7 = 7; +static const uint8_t G8 = 8; +static const uint8_t G9 = 9; +static const uint8_t G10 = 10; +static const uint8_t G11 = 11; +static const uint8_t G12 = 12; +static const uint8_t G13 = 13; +static const uint8_t G14 = 14; +static const uint8_t G15 = 15; +static const uint8_t G39 = 39; +static const uint8_t G40 = 40; +static const uint8_t G41 = 41; +static const uint8_t G42 = 42; +static const uint8_t G43 = 43; +static const uint8_t G44 = 44; +static const uint8_t G46 = 46; + +static const uint8_t ADC1 = 7; +static const uint8_t ADC2 = 8; + + + +#endif /* Pins_Arduino_h */ diff --git a/variants/m5stack_fire/pins_arduino.h b/variants/m5stack_fire/pins_arduino.h index 1984ab6bc6e..0cb66c9eb50 100644 --- a/variants/m5stack_fire/pins_arduino.h +++ b/variants/m5stack_fire/pins_arduino.h @@ -6,9 +6,6 @@ static const uint8_t TX = 1; static const uint8_t RX = 3; -static const uint8_t TXD2 = 17; -static const uint8_t RXD2 = 16; - static const uint8_t SDA = 21; static const uint8_t SCL = 22; diff --git a/variants/m5stack_paper/pins_arduino.h b/variants/m5stack_paper/pins_arduino.h new file mode 100644 index 00000000000..68b64386bef --- /dev/null +++ b/variants/m5stack_paper/pins_arduino.h @@ -0,0 +1,48 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +#define TX2 14 +#define RX2 13 + +static const uint8_t TX = 1; +static const uint8_t RX = 3; + +static const uint8_t SDA = 25; +static const uint8_t SCL = 32; + +static const uint8_t SS = 15; +static const uint8_t MOSI = 12; +static const uint8_t MISO = 13; +static const uint8_t SCK = 14; + +static const uint8_t G25 = 25; +static const uint8_t G32 = 32; + +static const uint8_t G26 = 26; +static const uint8_t G33 = 33; + +static const uint8_t G18 = 18; +static const uint8_t G19 = 19; + +static const uint8_t G21 = 21; +static const uint8_t G22 = 22; + +static const uint8_t G36 = 36; +static const uint8_t G2 = 2; +static const uint8_t G4 = 4; +static const uint8_t G5 = 5; +static const uint8_t G23 = 23; + +static const uint8_t G37 = 37; +static const uint8_t G38 = 38; +static const uint8_t G39 = 39; + +static const uint8_t DAC1 = 25; +static const uint8_t DAC2 = 26; + +static const uint8_t ADC1 = 35; +static const uint8_t ADC2 = 36; + +#endif /* Pins_Arduino_h */ diff --git a/variants/m5stack_poe_cam/pins_arduino.h b/variants/m5stack_poe_cam/pins_arduino.h new file mode 100644 index 00000000000..75c8831b923 --- /dev/null +++ b/variants/m5stack_poe_cam/pins_arduino.h @@ -0,0 +1,48 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +static const uint8_t TX = 1; +static const uint8_t RX = 3; + +static const uint8_t SDA = 25; +static const uint8_t SCL = 33; + +// Modified elsewhere +static const uint8_t SS = -1; +static const uint8_t MOSI = -1; +static const uint8_t MISO = -1; +static const uint8_t SCK = -1; + +static const uint8_t G23 = 23; +static const uint8_t G25 = 25; +static const uint8_t G27 = 27; +static const uint8_t G22 = 22; +static const uint8_t G26 = 26; +static const uint8_t G21 = 21; +static const uint8_t G32 = 32; +static const uint8_t G35 = 35; +static const uint8_t G34 = 34; +static const uint8_t G5 = 5; +static const uint8_t G39 = 39; +static const uint8_t G18 = 18; +static const uint8_t G36 = 36; +static const uint8_t G19 = 19; +static const uint8_t G15 = 15; + +static const uint8_t G2 = 2; +static const uint8_t G33 = 33; + +static const uint8_t G13 = 13; +static const uint8_t G4 = 4; + +static const uint8_t G0 = 0; + +static const uint8_t DAC1 = 25; +static const uint8_t DAC2 = 26; + +static const uint8_t ADC1 = 35; +static const uint8_t ADC2 = 36; + +#endif /* Pins_Arduino_h */ diff --git a/variants/m5stack_stamp_c3/pins_arduino.h b/variants/m5stack_stamp_c3/pins_arduino.h new file mode 100644 index 00000000000..66399b0c04b --- /dev/null +++ b/variants/m5stack_stamp_c3/pins_arduino.h @@ -0,0 +1,24 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +static const uint8_t TX = 21; +static const uint8_t RX = 20; + +static const uint8_t SDA = 8; +static const uint8_t SCL = 9; + +static const uint8_t SS = 7; +static const uint8_t MOSI = 6; +static const uint8_t MISO = 5; +static const uint8_t SCK = 4; + +static const uint8_t A0 = 0; +static const uint8_t A1 = 1; +static const uint8_t A2 = 2; +static const uint8_t A3 = 3; +static const uint8_t A4 = 4; +static const uint8_t A5 = 5; + +#endif /* Pins_Arduino_h */ diff --git a/variants/m5stack_stamp_pico/pins_arduino.h b/variants/m5stack_stamp_pico/pins_arduino.h index 705890facea..d052243f92a 100644 --- a/variants/m5stack_stamp_pico/pins_arduino.h +++ b/variants/m5stack_stamp_pico/pins_arduino.h @@ -9,6 +9,11 @@ static const uint8_t RX = 3; static const uint8_t SDA = 21; static const uint8_t SCL = 22; +static const uint8_t SS = 19; +static const uint8_t MOSI = 26; +static const uint8_t MISO = 36; +static const uint8_t SCK = 18; + static const uint8_t G26 = 26; static const uint8_t G36 = 36; static const uint8_t G18 = 18; @@ -23,9 +28,4 @@ static const uint8_t G0 = 0; static const uint8_t G32 = 32; static const uint8_t G33 = 33; -static const uint8_t SS = 19; -static const uint8_t MOSI = 26; -static const uint8_t MISO = 36; -static const uint8_t SCK = 18; - -#endif /* Pins_Arduino_h */ \ No newline at end of file +#endif /* Pins_Arduino_h */ diff --git a/variants/m5stack_stamp_s3/pins_arduino.h b/variants/m5stack_stamp_s3/pins_arduino.h index 999d8c753a5..d2af16ecaf9 100644 --- a/variants/m5stack_stamp_s3/pins_arduino.h +++ b/variants/m5stack_stamp_s3/pins_arduino.h @@ -2,6 +2,7 @@ #define Pins_Arduino_h #include +#include "soc/soc_caps.h" #define USB_VID 0x303a #define USB_PID 0x1001 @@ -12,14 +13,15 @@ static const uint8_t RX = 44; static const uint8_t TXD2 = 1; static const uint8_t RXD2 = 2; -static const uint8_t SS = 7; -static const uint8_t MOSI = 6; -static const uint8_t MISO = 5; -static const uint8_t SCK = 4; - static const uint8_t SDA = 13; static const uint8_t SCL = 15; +// Modified elsewhere +static const uint8_t SS = -1; +static const uint8_t MOSI = -1; +static const uint8_t MISO = -1; +static const uint8_t SCK = -1; + static const uint8_t G0 = 0; static const uint8_t G1 = 1; static const uint8_t G2 = 2; diff --git a/variants/m5stick_c/pins_arduino.h b/variants/m5stack_stickc/pins_arduino.h similarity index 92% rename from variants/m5stick_c/pins_arduino.h rename to variants/m5stack_stickc/pins_arduino.h index 35092416486..6a32c71f697 100644 --- a/variants/m5stick_c/pins_arduino.h +++ b/variants/m5stack_stickc/pins_arduino.h @@ -6,9 +6,6 @@ static const uint8_t TX = 1; static const uint8_t RX = 3; -static const uint8_t TXD2 = 33; -static const uint8_t RXD2 = 32; - static const uint8_t SDA = 32; static const uint8_t SCL = 33; diff --git a/variants/m5stack_stickc_plus/pins_arduino.h b/variants/m5stack_stickc_plus/pins_arduino.h new file mode 100644 index 00000000000..6a32c71f697 --- /dev/null +++ b/variants/m5stack_stickc_plus/pins_arduino.h @@ -0,0 +1,33 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +static const uint8_t TX = 1; +static const uint8_t RX = 3; + +static const uint8_t SDA = 32; +static const uint8_t SCL = 33; + +static const uint8_t SS = 5; +static const uint8_t MOSI = 15; +static const uint8_t MISO = 36; +static const uint8_t SCK = 13; + +static const uint8_t G9 = 9; +static const uint8_t G10 = 10; +static const uint8_t G37 = 37; +static const uint8_t G39 = 39; +static const uint8_t G32 = 32; +static const uint8_t G33 = 33; +static const uint8_t G26 = 26; +static const uint8_t G36 = 36; +static const uint8_t G0 = 0; + +static const uint8_t DAC1 = 25; +static const uint8_t DAC2 = 26; + +static const uint8_t ADC1 = 35; +static const uint8_t ADC2 = 36; + +#endif /* Pins_Arduino_h */ diff --git a/variants/m5stack_stickc_plus2/pins_arduino.h b/variants/m5stack_stickc_plus2/pins_arduino.h new file mode 100644 index 00000000000..6a32c71f697 --- /dev/null +++ b/variants/m5stack_stickc_plus2/pins_arduino.h @@ -0,0 +1,33 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +static const uint8_t TX = 1; +static const uint8_t RX = 3; + +static const uint8_t SDA = 32; +static const uint8_t SCL = 33; + +static const uint8_t SS = 5; +static const uint8_t MOSI = 15; +static const uint8_t MISO = 36; +static const uint8_t SCK = 13; + +static const uint8_t G9 = 9; +static const uint8_t G10 = 10; +static const uint8_t G37 = 37; +static const uint8_t G39 = 39; +static const uint8_t G32 = 32; +static const uint8_t G33 = 33; +static const uint8_t G26 = 26; +static const uint8_t G36 = 36; +static const uint8_t G0 = 0; + +static const uint8_t DAC1 = 25; +static const uint8_t DAC2 = 26; + +static const uint8_t ADC1 = 35; +static const uint8_t ADC2 = 36; + +#endif /* Pins_Arduino_h */ diff --git a/variants/m5stack_timer_cam/pins_arduino.h b/variants/m5stack_timer_cam/pins_arduino.h index f26bac1482c..5a2cc5dcdb4 100644 --- a/variants/m5stack_timer_cam/pins_arduino.h +++ b/variants/m5stack_timer_cam/pins_arduino.h @@ -5,7 +5,6 @@ static const uint8_t LED_BUILTIN = 2; #define BUILTIN_LED LED_BUILTIN // backward compatibility -#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN static const uint8_t TX = 1; static const uint8_t RX = 3; diff --git a/variants/m5stack_tough/pins_arduino.h b/variants/m5stack_tough/pins_arduino.h new file mode 100644 index 00000000000..c5ea5d78eee --- /dev/null +++ b/variants/m5stack_tough/pins_arduino.h @@ -0,0 +1,52 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +#define TX2 14 +#define RX2 13 + +static const uint8_t TX = 1; +static const uint8_t RX = 3; + +static const uint8_t SDA = 32; +static const uint8_t SCL = 33; + +static const uint8_t SS = 5; +static const uint8_t MOSI = 23; +static const uint8_t MISO = 38; +static const uint8_t SCK = 18; + +static const uint8_t G23 = 23; +static const uint8_t G38 = 38; +static const uint8_t G18 = 18; +static const uint8_t G3 = 3; +static const uint8_t G13 = 13; +static const uint8_t G21 = 21; +static const uint8_t G32 = 32; +static const uint8_t G27 = 27; +static const uint8_t G2 = 2; +static const uint8_t G35 = 35; +static const uint8_t G36 = 36; +static const uint8_t G25 = 25; +static const uint8_t G26 = 26; +static const uint8_t G1 = 1; +static const uint8_t G14 = 14; +static const uint8_t G22 = 22; +static const uint8_t G33 = 33; +static const uint8_t G19 = 19; +static const uint8_t G0 = 0; +static const uint8_t G34 = 34; + +static const uint8_t G12 = 12; +static const uint8_t G15 = 15; +static const uint8_t G17 = 17; +static const uint8_t G5 = 5; + +static const uint8_t DAC1 = 25; +static const uint8_t DAC2 = 26; + +static const uint8_t ADC1 = 35; +static const uint8_t ADC2 = 36; + +#endif /* Pins_Arduino_h */ diff --git a/variants/m5stack_unit_cam/pins_arduino.h b/variants/m5stack_unit_cam/pins_arduino.h new file mode 100644 index 00000000000..5697b1303ba --- /dev/null +++ b/variants/m5stack_unit_cam/pins_arduino.h @@ -0,0 +1,50 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +static const uint8_t LED_BUILTIN = 4; +#define BUILTIN_LED LED_BUILTIN // backward compatibility + +static const uint8_t TX = 1; +static const uint8_t RX = 3; + +static const uint8_t SDA = 17; +static const uint8_t SCL = 16; + +static const uint8_t SS = 5; +static const uint8_t MOSI = 23; +static const uint8_t MISO = 19; +static const uint8_t SCK = 18; + +static const uint8_t G23 = 23; +static const uint8_t G25 = 25; +static const uint8_t G27 = 27; +static const uint8_t G22 = 22; +static const uint8_t G26 = 26; +static const uint8_t G21 = 21; +static const uint8_t G32 = 32; +static const uint8_t G35 = 35; +static const uint8_t G34 = 34; +static const uint8_t G5 = 5; +static const uint8_t G39 = 39; +static const uint8_t G18 = 18; +static const uint8_t G36 = 36; +static const uint8_t G19 = 19; +static const uint8_t G15 = 15; + +static const uint8_t G2 = 2; +static const uint8_t G33 = 33; + +static const uint8_t G13 = 13; +static const uint8_t G4 = 4; + +static const uint8_t G0 = 0; + +static const uint8_t DAC1 = 25; +static const uint8_t DAC2 = 26; + +static const uint8_t ADC1 = 35; +static const uint8_t ADC2 = 36; + +#endif /* Pins_Arduino_h */ diff --git a/variants/m5stack_unit_cams3/pins_arduino.h b/variants/m5stack_unit_cams3/pins_arduino.h new file mode 100644 index 00000000000..d2af16ecaf9 --- /dev/null +++ b/variants/m5stack_unit_cams3/pins_arduino.h @@ -0,0 +1,52 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include +#include "soc/soc_caps.h" + +#define USB_VID 0x303a +#define USB_PID 0x1001 + +static const uint8_t TX = 43; +static const uint8_t RX = 44; + +static const uint8_t TXD2 = 1; +static const uint8_t RXD2 = 2; + +static const uint8_t SDA = 13; +static const uint8_t SCL = 15; + +// Modified elsewhere +static const uint8_t SS = -1; +static const uint8_t MOSI = -1; +static const uint8_t MISO = -1; +static const uint8_t SCK = -1; + +static const uint8_t G0 = 0; +static const uint8_t G1 = 1; +static const uint8_t G2 = 2; +static const uint8_t G3 = 3; +static const uint8_t G4 = 4; +static const uint8_t G5 = 5; +static const uint8_t G6 = 6; +static const uint8_t G7 = 7; +static const uint8_t G8 = 8; +static const uint8_t G9 = 9; +static const uint8_t G10 = 10; +static const uint8_t G11 = 11; +static const uint8_t G12 = 12; +static const uint8_t G13 = 13; +static const uint8_t G14 = 14; +static const uint8_t G15 = 15; +static const uint8_t G39 = 39; +static const uint8_t G40 = 40; +static const uint8_t G41 = 41; +static const uint8_t G42 = 42; +static const uint8_t G43 = 43; +static const uint8_t G44 = 44; +static const uint8_t G46 = 46; + +static const uint8_t ADC1 = 7; +static const uint8_t ADC2 = 8; + +#endif /* Pins_Arduino_h */ From f7cf59f7dc485dd66d8152e7997f3a921084f424 Mon Sep 17 00:00:00 2001 From: Vincent Date: Fri, 19 Jan 2024 16:23:01 +0100 Subject: [PATCH 04/34] Removed duplicated getType documentation. (#9141) --- docs/en/api/preferences.rst | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/docs/en/api/preferences.rst b/docs/en/api/preferences.rst index aae81506aa1..83ca6d820e9 100644 --- a/docs/en/api/preferences.rst +++ b/docs/en/api/preferences.rst @@ -198,24 +198,6 @@ Arduino-esp32 Preferences API **Note** * Attempting to check a key without a namespace being open will return false. - - -``getType`` -************* - - Returns the type of a key-value pair from the currently open namespace. - - .. code-block:: arduino - - PreferenceType getType(const char * key) - .. - - **Parameters** - * ``key`` (Required) - - the name of the key to be checked. - - **Returns** - * PreferenceType element contaning the type of the key-value pair or PT_INVALID on error. ``putChar, putUChar`` From dd712db323a7fc2810828753b948f0641892091c Mon Sep 17 00:00:00 2001 From: Sly Gryphon Date: Sat, 20 Jan 2024 01:23:56 +1000 Subject: [PATCH 05/34] fix(ledc): Add missing include for SemaphoreHandle_t (#9133) (#9134) --- cores/esp32/esp32-hal-ledc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cores/esp32/esp32-hal-ledc.h b/cores/esp32/esp32-hal-ledc.h index c81da6dced2..2d2c42e9369 100644 --- a/cores/esp32/esp32-hal-ledc.h +++ b/cores/esp32/esp32-hal-ledc.h @@ -24,6 +24,8 @@ extern "C" { #include #include +#include "freertos/FreeRTOS.h" +#include "freertos/semphr.h" typedef enum { NOTE_C, NOTE_Cs, NOTE_D, NOTE_Eb, NOTE_E, NOTE_F, NOTE_Fs, NOTE_G, NOTE_Gs, NOTE_A, NOTE_Bb, NOTE_B, NOTE_MAX From 114965010529c004ce914fea773095274ea2ce4d Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Fri, 19 Jan 2024 12:25:07 -0300 Subject: [PATCH 06/34] Add I2S examples and documentation (#9030) * feat(i2s): Add I2S examples - ES8388 loopback example using the LyraT board - ESP32-S3-EYE record WAV to SD card example - Simple tone example * docs(i2s): Add I2S API docs --- docs/en/api/i2s.rst | 561 +++++---- .../examples/ES8388_loopback/ES8388.cpp | 918 ++++++++++++++ .../ESP_I2S/examples/ES8388_loopback/ES8388.h | 1093 +++++++++++++++++ .../ES8388_loopback/ES8388_loopback.ino | 86 ++ .../examples/Record_to_WAV/.skip.esp32c3 | 0 .../examples/Record_to_WAV/.skip.esp32c6 | 0 .../examples/Record_to_WAV/.skip.esp32h2 | 0 .../examples/Record_to_WAV/.skip.esp32s2 | 0 .../examples/Record_to_WAV/Record_to_WAV.ino | 90 ++ .../examples/Simple_tone/Simple_tone.ino | 68 + 10 files changed, 2531 insertions(+), 285 deletions(-) create mode 100644 libraries/ESP_I2S/examples/ES8388_loopback/ES8388.cpp create mode 100644 libraries/ESP_I2S/examples/ES8388_loopback/ES8388.h create mode 100644 libraries/ESP_I2S/examples/ES8388_loopback/ES8388_loopback.ino create mode 100644 libraries/ESP_I2S/examples/Record_to_WAV/.skip.esp32c3 create mode 100644 libraries/ESP_I2S/examples/Record_to_WAV/.skip.esp32c6 create mode 100644 libraries/ESP_I2S/examples/Record_to_WAV/.skip.esp32h2 create mode 100644 libraries/ESP_I2S/examples/Record_to_WAV/.skip.esp32s2 create mode 100644 libraries/ESP_I2S/examples/Record_to_WAV/Record_to_WAV.ino create mode 100644 libraries/ESP_I2S/examples/Simple_tone/Simple_tone.ino diff --git a/docs/en/api/i2s.rst b/docs/en/api/i2s.rst index 02539fb3f2b..8040dccbb5c 100644 --- a/docs/en/api/i2s.rst +++ b/docs/en/api/i2s.rst @@ -16,142 +16,142 @@ The I²S bus consists of at least three lines: .. note:: All lines can be attached to almost any pin and this change can occur even during operation. * **Bit clock line** - + * Officially "continuous serial clock (SCK)". Typically written "bit clock (BCLK)". - * In this library function parameter ``sckPin`` or constant ``PIN_I2S_SCK``. + * In this library function parameter ``sck``. * **Word clock line** - + * Officially "word select (WS)". Typically called "left-right clock (LRCLK)" or "frame sync (FS)". * 0 = Left channel, 1 = Right channel - * In this library function parameter ``fsPin`` or constant ``PIN_I2S_FS``. + * In this library function parameter ``ws``. * **Data line** * Officially "serial data (SD)", but can be called SDATA, SDIN, SDOUT, DACDAT, ADCDAT, etc. * Unlike Arduino I2S with single data pin switching between input and output, in ESP core driver use separate data line for input and output. - * For backward compatibility, the shared data pin is ``sdPin`` or constant ``PIN_I2S_SD`` when using simplex mode. - - * When using in duplex mode, there are two data lines: - - * Output data line is called ``outSdPin`` for function parameter, or constant ``PIN_I2S_SD_OUT`` - * Input data line is called ``inSdPin`` for function parameter, or constant ``PIN_I2S_SD_IN`` + * Output data line is called ``dout`` for function parameter. + * Input data line is called ``din`` for function parameter. + +It may also include a **Master clock** line: -I2S Modes ---------- +* **Master clock** -The I2S can be set up in three groups of modes: + * Officially "master clock (MCLK)". + * This is not a part of I2S bus, but is used to synchronize multiple I2S devices. + * In this library function parameter ``mclk``. -* Master (default) or Slave. -* Simplex (default) or Duplex. -* Operation modes (Philips standard, ADC/DAC, PDM) - - * Most of them are dual-channel, some can be single channel +.. note:: Please check the `ESP-IDF documentation `_ for more details on the I2S peripheral for each ESP32 chip. -.. note:: Officially supported operation mode is only ``I2S_PHILIPS_MODE``. Other modes are implemented, but we cannot guarantee flawless execution and behavior. +I2S Configuration +----------------- Master / Slave Mode ******************* -In **Master mode** (default) the device is generating clock signal ``sckPin`` and word select signal on ``fsPin``. +In **Master mode** (default) the device is generating clock signal ``sck`` and word select signal on ``ws``. In **Slave mode** the device listens on attached pins for the clock signal and word select - i.e. unless externally driven the pins will remain LOW. - -How to enter either mode is described in the function section. +This mode is not supported yet. Operation Modes *************** -Setting the operation mode is done with function ``begin`` (see API section) +Setting the operation mode is done with function ``begin`` and is set by function parameter ``mode``. -* ``I2S_PHILIPS_MODE`` - * Currently the only official* ``PIN_I2S_SCK`` -* ``PIN_I2S_FS`` -* ``PIN_I2S_SD`` -* ``PIN_I2S_SD_OUT`` only need to send one channel data but the data will be copied for another channel automatically, then both channels will transmit same data. +* ``I2S_MODE_STD`` + In standard mode, there are always two sound channels, i.e., the left and right channels, which are called "slots". + These slots support 8/16/24/32-bit width sample data. + The communication format for the slots follows the Philips standard. -* ``ADC_DAC_MODE`` - The output will be an analog signal on pins ``25`` (L or R?) and ``26`` (L or R?). - Input will be received on pin ``_inSdPin``. - The data are sampled in 12 bits and stored in a 16 bits, with the 4 most significant bits set to zero. +* ``I2S_MODE_TDM`` + In Time Division Multiplexing mode (TDM), the number of sound channels is variable, and the width of each channel + is fixed. -* ``PDM_STEREO_MODE`` - Pulse-density-modulation is similar to PWM, but instead, the pulses have constant width. The signal is modulated with the number of ones or zeroes in sequence. +* ``I2S_MODE_PDM_TX`` + PDM (Pulse-density Modulation) mode for the TX channel can convert PCM data into PDM format which always + has left and right slots. + PDM TX is only supported on I2S0 and it only supports 16-bit width sample data. + It needs at least a CLK pin for clock signal and a DOUT pin for data signal. -* ``PDM_MONO_MODE`` - Single-channel version of PDM mode described above. +* ``I2S_MODE_PDM_RX`` + PDM (Pulse-density Modulation) mode for RX channel can receive PDM-format data and convert the data + into PCM format. PDM RX is only supported on I2S0, and it only supports 16-bit width sample data. + PDM RX needs at least a CLK pin for clock signal and a DIN pin for data signal. Simplex / Duplex Mode ********************* -The **Simplex** mode is the default after driver initialization. Simplex mode uses the shared data pin ``sdPin`` or constant ``PIN_I2S_SD`` for both output and input, but can only read or write. This is the same behavior as in original Arduino library. +Due to the different clock sources the PDM modes are always in **Simplex** mode, using only one data pin. -The **Duplex** mode uses two separate data pins: +The STD and TDM modes operate in the **Duplex** mode, using two separate data pins: -* Output pin ``outSdPin`` for function parameter, or constant ``PIN_I2S_SD_OUT`` -* Input pin ``inSdPin`` for function parameter, or constant ``PIN_I2S_SD_IN`` +* Output pin ``dout`` for function parameter +* Input pin ``din`` for function parameter In this mode, the driver is able to read and write simultaneously on each line and is suitable for applications like walkie-talkie or phone. -Switching between these modes is performed simply by calling setDuplex() or setSimplex() (see APi section for details and more functions). +Data Bit Width +************** -Arduino-ESP32 I2S API ---------------------- - -The ESP32 I2S library is based on the Arduino I2S Library and implements a few more APIs, described in this `documentation `_. +This is the number of bits in a channel sample. The data bit width is set by function parameter ``bits_cfg``. +The current supported values are: -Initialization and deinitialization -*********************************** +* ``I2S_DATA_BIT_WIDTH_8BIT`` +* ``I2S_DATA_BIT_WIDTH_16BIT`` +* ``I2S_DATA_BIT_WIDTH_24BIT``, requires the MCLK multiplier to be manually set to 384 +* ``I2S_DATA_BIT_WIDTH_32BIT`` -Before initialization, choose which pins you want to use. In DAC mode you can use only pins `25` and `26` for the output. - -begin (Master Mode) -^^^^^^^^^^^^^^^^^^^ - -Before usage choose which pins you want to use. In DAC mode you can use only pins 25 and 26 as output. - -.. code-block:: arduino +Sample Rate +*********** - int begin(int mode, int sampleRate, int bitsPerSample) +The sample rate is set by function parameter ``rate``. It is the number of samples per second in Hz. -Parameters: - -* [in] ``mode`` one of above mentioned operation mode, for example ``I2S_PHILIPS_MODE``. +Slot Mode +********* -* [in] ``sampleRate`` is the sampling rate in Hz. Currently officially supported value is only 16000 - other than this value will print warning, but continue to operate, however the resulting audio quality may suffer and the app may crash. +The slot mode is set by function parameter ``ch``. The current supported values are: -* [in] ``bitsPerSample`` is the number of bits in a channel sample. - -Currently, the supported value is only 16 - other than this value will print a warning, but continues to operate, however, the resulting audio quality may suffer and the application may crash. +* ``I2S_SLOT_MODE_MONO`` + I2S channel slot format mono. Transmit the same data in all slots for TX mode. + Only receive the data in the first slots for RX mode. -For ``ADC_DAC_MODE`` the only possible value will remain 16. +* ``I2S_SLOT_MODE_STEREO`` + I2S channel slot format stereo. Transmit different data in different slots for TX mode. + Receive the data in all slots for RX mode. -This function will return ``true`` on success or ``fail`` in case of failure. +Arduino-ESP32 I2S API +--------------------- -When failed, an error message will be printed if subscribed. +Initialization and deinitialization +*********************************** -begin (Slave Mode) -^^^^^^^^^^^^^^^^^^ +Before initialization, set which pins you want to use. -Performs initialization before use - creates buffers, task handling underlying driver messages, configuring and starting the driver operation. +begin (Master Mode) +^^^^^^^^^^^^^^^^^^^ -This version initializes I2S in SLAVE mode (see previous entry for MASTER mode). +Before usage choose which pins you want to use. .. code-block:: arduino - int begin(int mode, int bitsPerSample) + bool begin(i2s_mode_t mode, uint32_t rate, i2s_data_bit_width_t bits_cfg, i2s_slot_mode_t ch, int8_t slot_mask=-1) Parameters: -* [in] ``mode`` one of above mentioned modes for example ``I2S_PHILIPS_MODE``. +* [in] ``mode`` one of above mentioned operation mode, for example ``I2S_MODE_STD``. -* [in] ``bitsPerSample`` is the umber of bits in a channel sample. Currently, the only supported value is only 16 - other than this value will print warning, but continue to operate, however the resulting audio quality may suffer and the app may crash. +* [in] ``rate`` is the sampling rate in Hz, for example ``16000``. -For ``ADC_DAC_MODE`` the only possible value will remain 16. +* [in] ``bits_cfg`` is the number of bits in a channel sample, for example ``I2S_DATA_BIT_WIDTH_16BIT``. + +* [in] ``ch`` is the slot mode, for example ``I2S_SLOT_MODE_STEREO``. + +* [in] ``slot_mask`` is the slot mask, for example ``0b11``. This parameter is optional and defaults to ``-1`` (not used). This function will return ``true`` on success or ``fail`` in case of failure. -When failed, an error message will be printed if subscribed. +When failed, an error message will be printed if the correct log level is set. end ^^^ @@ -165,402 +165,393 @@ Performs safe deinitialization - free buffers, destroy task, end driver operatio Pin setup ********* -Pins can be changed in two ways- 1st constants, 2nd functions. +The function to set the pins will depend on the operation mode. -.. note:: Shared data pin can be equal to any other data pin, but must not be equal to clock pin nor frame sync pin! Input and Output pins must not be equal, but one of them can be equal to shared data pin! - -.. code-block:: arduino +setPins +^^^^^^^ - sckPin != fsPin != outSdPin != inSdPin +Set the pins for the I2S interface when using the standard or TDM mode. .. code-block:: arduino - sckPin != fsPin != sdPin + void setPins(int8_t bclk, int8_t ws, int8_t dout, int8_t din=-1, int8_t mclk=-1) -By default, the pin numbers are defined in constants in the header file. You can redefine any of those constants before including ``I2S.h``. This way the driver will use these new default values and you will not need to specify pins in your code. The constants and their default values are: +Parameters: -* ``PIN_I2S_SCK`` 14 -* ``PIN_I2S_FS`` 25 -* ``PIN_I2S_SD`` 26 -* ``PIN_I2S_SD_OUT`` 26 -* ``PIN_I2S_SD_IN`` 35 +* [in] ``bclk`` is the bit clock pin. -The second option to change pins is using the following functions. These functions can be called on either on initialized or uninitialized object. +* [in] ``ws`` is the word select pin. -If called on the initialized object (after calling ``begin``) the pins will change during operation. -If called on the uninitialized object (before calling ``begin``, or after calling ``end``) the new pin setup will be used on next initialization. +* [in] ``dout`` is the data output pin. Can be set to ``-1`` if not used. -setSckPin -^^^^^^^^^ +* [in] ``din`` is the data input pin. This parameter is optional and defaults to ``-1`` (not used). -Set and apply clock pin. +* [in] ``mclk`` is the master clock pin. This parameter is optional and defaults to ``-1`` (not used). -.. code-block:: arduino +setPinsPdmTx +^^^^^^^^^^^^ - int setSckPin(int sckPin) +Set the pins for the I2S interface when using the PDM TX mode. -This function will return ``true`` on success or ``fail`` in case of failure. +.. code-block:: arduino -setFsPin -^^^^^^^^ + void setPinsPdmTx(int8_t clk, int8_t dout0, int8_t dout1=-1) -Set and apply frame sync pin. +Parameters: -.. code-block:: arduino +* [in] ``clk`` is the clock pin. - int setFsPin(int fsPin) +* [in] ``dout0`` is the data output pin 0. -This function will return ``true`` on success or ``fail`` in case of failure. +* [in] ``dout1`` is the data output pin 1. This parameter is optional and defaults to ``-1`` (not used). -setDataPin -^^^^^^^^^^ +setPinsPdmRx +^^^^^^^^^^^^ -Set and apply shared data pin used in simplex mode. +Set the pins for the I2S interface when using the PDM RX mode. .. code-block:: arduino - int setDataPin(int sdPin) + void setPinsPdmRx(int8_t clk, int8_t din0, int8_t din1=-1, int8_t din2=-1, int8_t din3=-1) -This function will return ``true`` on success or ``fail`` in case of failure. +Parameters: -setDataInPin -^^^^^^^^^^^^ +* [in] ``clk`` is the clock pin. -Set and apply data input pin. +* [in] ``din0`` is the data input pin 0. -.. code-block:: arduino +* [in] ``din1`` is the data input pin 1. This parameter is optional and defaults to ``-1`` (not used). - int setDataInPin(int inSdPin) +* [in] ``din2`` is the data input pin 2. This parameter is optional and defaults to ``-1`` (not used). -This function will return ``true`` on success or ``fail`` in case of failure. +* [in] ``din3`` is the data input pin 3. This parameter is optional and defaults to ``-1`` (not used). -setDataOutPin -^^^^^^^^^^^^^ +setInverted +^^^^^^^^^^^ -Set and apply data output pin. +Set which pins have inverted logic when using the standard or TDM mode. Data pins cannot be inverted. .. code-block:: arduino - int setDataOutPin(int outSdPin) + void setInverted(bool bclk, bool ws, bool mclk=false) -This function will return ``true`` on success or ``fail`` in case of failure. - -setAllPins -^^^^^^^^^^ +Parameters: -Set all pins using given values in parameters. This is simply a wrapper of four functions mentioned above. +* [in] ``bclk`` true if the bit clock pin is inverted. False otherwise. -.. code-block:: arduino +* [in] ``ws`` true if the word select pin is inverted. False otherwise. - int setAllPins(int sckPin, int fsPin, int sdPin, int outSdPin, int inSdPin) +* [in] ``mclk`` true if the master clock pin is inverted. False otherwise. This parameter is optional and defaults to ``false``. -Set all pins to default i.e. take values from constants mentioned above. This simply calls the the function with the following constants. +setInvertedPdm +^^^^^^^^^^^^^^ -* ``PIN_I2S_SCK`` 14 -* ``PIN_I2S_FS`` 25 -* ``PIN_I2S_SD`` 26 -* ``PIN_I2S_SD_OUT`` 26 -* ``PIN_I2S_SD_IN`` 35 +Set which pins have inverted logic when using the PDM mode. Data pins cannot be inverted. .. code-block:: arduino - int setAllPins() + void setInvertedPdm(bool clk) -getSckPin -^^^^^^^^^ +Parameters: -Get the current value of the clock pin. +* [in] ``clk`` true if the clock pin is inverted. False otherwise. -.. code-block:: arduino +I2S Configuration +***************** - int getSckPin() +The I2S configuration can be changed during operation. -getFsPin -^^^^^^^^ +configureTX +^^^^^^^^^^^ -Get the current value of frame sync pin. +Configure the I2S TX channel. .. code-block:: arduino - int getFsPin() - -getDataPin -^^^^^^^^^^ + bool configureTX(uint32_t rate, i2s_data_bit_width_t bits_cfg, i2s_slot_mode_t ch, int8_t slot_mask=-1) -Get the current value of shared data pin. +Parameters: -.. code-block:: arduino +* [in] ``rate`` is the sampling rate in Hz, for example ``16000``. - int getDataPin() +* [in] ``bits_cfg`` is the number of bits in a channel sample, for example ``I2S_DATA_BIT_WIDTH_16BIT``. -getDataInPin -^^^^^^^^^^^^ +* [in] ``ch`` is the slot mode, for example ``I2S_SLOT_MODE_STEREO``. -Get the current value of data input pin. +* [in] ``slot_mask`` is the slot mask, for example ``0b11``. This parameter is optional and defaults to ``-1`` (not used). -.. code-block:: arduino +This function will return ``true`` on success or ``fail`` in case of failure. - int getDataInPin() +When failed, an error message will be printed if the correct log level is set. -getDataOutPin -^^^^^^^^^^^^^ +configureRX +^^^^^^^^^^^ -Get the current value of data output pin. +Configure the I2S RX channel. .. code-block:: arduino - int getDataOutPin() + bool configureRX(uint32_t rate, i2s_data_bit_width_t bits_cfg, i2s_slot_mode_t ch, i2s_rx_transform_t transform=I2S_RX_TRANSFORM_NONE) -onTransmit -^^^^^^^^^^ +Parameters: -Register the function to be called on each successful transmit event. +* [in] ``rate`` is the sampling rate in Hz, for example ``16000``. -.. code-block:: arduino +* [in] ``bits_cfg`` is the number of bits in a channel sample, for example ``I2S_DATA_BIT_WIDTH_16BIT``. - void onTransmit(void(*)(void)) +* [in] ``ch`` is the slot mode, for example ``I2S_SLOT_MODE_STEREO``. -onReceive -^^^^^^^^^ - -Register the function to be called on each successful receives event. +* [in] ``transform`` is the transform mode, for example ``I2S_RX_TRANSFORM_NONE``. + This can be used to apply a transformation/conversion to the received data. + The supported values are: ``I2S_RX_TRANSFORM_NONE`` (no transformation), + ``I2S_RX_TRANSFORM_32_TO_16`` (convert from 32 bits of data width to 16 bits) and + ``I2S_RX_TRANSFORM_16_STEREO_TO_MONO`` (convert from stereo to mono when using 16 bits of data width). -.. code-block:: arduino +This function will return ``true`` on success or ``fail`` in case of failure. - void onReceive(void(*)(void)) +When failed, an error message will be printed if the correct log level is set. -setBufferSize -^^^^^^^^^^^^^ +txChan +^^^^^^ -Set the size of buffer. +Get the TX channel handler pointer. .. code-block:: arduino - int setBufferSize(int bufferSize) + i2s_chan_handle_t txChan() -This function can be called on both the initialized or uninitialized driver. +txSampleRate +^^^^^^^^^^^^ -If called on initialized, it will change internal values for buffer size and re-initialize driver with new value. -If called on uninitialized, it will only change the internal values which will be used for next initialization. +Get the TX sample rate. -Parameter ``bufferSize`` must be in range from 8 to 1024 and the unit is sample words. The default value is 128. +.. code-block:: arduino -Example: 16 bit sample, dual channel, buffer size for input: + uint32_t txSampleRate() - ``128 = 2B sample * 2 channels * 128 buffer size * buffer count (default 2) = 1024B`` - -And more ```1024B`` for output buffer in total of ``2kB`` used. +txDataWidth +^^^^^^^^^^^ -This function always assumes dual-channel, keeping the same size even for MONO modes. +Get the TX data width (8, 16 or 32 bits). -This function will return ``true`` on success or ``fail`` in case of failure. +.. code-block:: arduino -When failed, an error message will be printed. + i2s_data_bit_width_t txDataWidth() -getBufferSize -^^^^^^^^^^^^^ +txSlotMode +^^^^^^^^^^ -Get current buffer sizes in sample words (see description for ``setBufferSize``). +Get the TX slot mode (stereo or mono). .. code-block:: arduino - int getBufferSize() + i2s_slot_mode_t txSlotMode() -Duplex vs Simplex -***************** +rxChan +^^^^^^ -Original Arduino I2S library supports only *simplex* mode (only transmit or only receive at a time). For compatibility, we kept this behavior, but ESP natively supports *duplex* mode (receive and transmit simultaneously on separate pins). -By default this library is initialized in simplex mode as it would in Arduino, switching input and output on ``sdPin`` (constant ``PIN_I2S_SD`` default pin 26). +Get the RX channel handler pointer. -setDuplex -^^^^^^^^^ +.. code-block:: arduino -Switch to duplex mode and use separate pins: + i2s_chan_handle_t rxChan() -.. code-block:: arduino +rxSampleRate +^^^^^^^^^^^^ - int setDuplex() +Get the RX sample rate. -input: inSdPin (constant PIN_I2S_SD_IN, default 35) -output: outSdPin (constant PIN_I2S_SD, default 26) +.. code-block:: arduino -setSimplex -^^^^^^^^^^ + uint32_t rxSampleRate() -(Default mode) +rxDataWidth +^^^^^^^^^^^ -Switch to simplex mode using shared data pin sdPin (constant PIN_I2S_SD, default 26). +Get the RX data width (8, 16 or 32 bits). .. code-block:: arduino - int setSimplex() + i2s_data_bit_width_t rxDataWidth() -isDuplex -^^^^^^^^ +rxSlotMode +^^^^^^^^^^ -Returns 1 if current mode is duplex, 0 if current mode is simplex (default). +Get the RX slot mode (stereo or mono). .. code-block:: arduino - int isDuplex() + i2s_slot_mode_t rxSlotMode() -Data stream -*********** +I/O Operations +************** -available +readBytes ^^^^^^^^^ -Returns number of **bytes** ready to read. +Read a certain amount of data bytes from the I2S interface. .. code-block:: arduino - int available() + size_t readBytes(char *buffer, size_t size) + +Parameters: + +* [in] ``buffer`` is the buffer to store the read data. The buffer must be at least ``size`` bytes long. + +* [in] ``size`` is the number of bytes to read. + +This function will return the number of bytes read. read ^^^^ -Read ``size`` bytes from internal buffer if possible. +Read the next available byte from the I2S interface. .. code-block:: arduino - int read(void* buffer, size_t size) + int read() -This function is non-blocking, i.e. if the requested number of bytes is not available, it will return as much as possible without waiting. +This function will return the next available byte or ``-1`` if no data is available +or an error occurred. -Hint: use ``available()`` before calling this function. +write -Parameters: +There are two versions of the write function: -[out] ``void* buffer`` buffer into which will be copied data read from internal buffer. WARNING: this buffer must be allocated before use! +The first version writes a certain amount of data bytes to the I2S interface. -[in] ``size_t size`` number of bytes required to be read. +.. code-block:: arduino -Returns number of successfully bytes read. Returns ``false``` in case of reading error. + size_t write(uint8_t *buffer, size_t size) -Read one sample. +Parameters: -.. code-block:: arduino +* [in] ``buffer`` is the buffer containing the data to be written. - int read() +* [in] ``size`` is the number of bytes to write from the buffer. -peek -^^^^ +This function will return the number of bytes written. -Read one sample from the internal buffer and returns it. +The second version writes a single byte to the I2S interface. .. code-block:: arduino - int peek() + size_t write(uint8_t d) + +Parameters: + +* [in] ``d`` is the byte to be written. -Repeated peeks will be returned in the same sample until ``read`` is called. +This function will return ``1`` if the byte was written or ``0`` if an error occurred. -flush -^^^^^ +available +^^^^^^^^^ -Force write internal buffer to driver. +Get if there is data available to be read. .. code-block:: arduino - void flush() + int available() -write -^^^^^ +This function will return ``I2S_READ_CHUNK_SIZE`` if there is data available to be read or ``-1`` if not. + +peek +^^^^ -Write a single byte. +Get the next available byte from the I2S interface without removing it from the buffer. Currently not implemented. .. code-block:: arduino - size_t write(uint8_t) + int peek() -Single-sample writes are blocking - waiting until there is free space in the internal buffer to be written into. +This function will currently always return ``-1``. -Returns number of successfully written bytes, in this case, 1. Returns 0 on error. +lastError +^^^^^^^^^ -Write single sample. +Get the last error code for an I/O operation on the I2S interface. .. code-block:: arduino - size_t write(int32_t) - -Single-sample writes are blocking - waiting until there is free space in the internal buffer to be written into. + int lastError() -Returns number of successfully written bytes. Returns 0 on error. - -Expected return number is ``bitsPerSample/8``. +recordWAV +^^^^^^^^^ -Write buffer of supplied size; +Record a short PCM WAV to memory with the current RX settings. +Returns a buffer that must be freed by the user. .. code-block:: arduino - size_t write(const void *buffer, size_t size) + uint8_t * recordWAV(size_t rec_seconds, size_t * out_size) Parameters: -[in] ``const void *buffer`` buffer to be written -[in] ``size_t size`` size of buffer in bytes +* [in] ``rec_seconds`` is the number of seconds to record. -Returns number of successfully written bytes. Returns 0 in case of error. -The expected return number is equal to ``size``. +* [out] ``out_size`` is the size of the returned buffer in bytes. -write -^^^^^ +This function will return a pointer to the buffer containing the recorded WAV data or ``NULL`` if an error occurred. -This is a wrapper of the previous function performing typecast from `uint8_t*`` to ``void*``. +playWAV +^^^^^^^ -.. code-block:: arduino +Play a PCM WAV from memory with the current TX settings. - size_t write(const uint8_t *buffer, size_t size) +.. code-block:: arduino -availableForWrite -^^^^^^^^^^^^^^^^^ + void playWAV(uint8_t * data, size_t len) -Returns number of bytes available for write. +Parameters: -.. code-block:: arduino +* [in] ``data`` is the buffer containing the WAV data. - int availableForWrite() +* [in] ``len`` is the size of the buffer in bytes. -write_blocking -^^^^^^^^^^^^^^ +playMP3 +^^^^^^^ -Core function implementing blocking write, i.e. waits until all requested data are written. +Play a MP3 from memory with the current TX settings. .. code-block:: arduino - size_t write_blocking(const void *buffer, size_t size) + bool playMP3(uint8_t *src, size_t src_len) -WARNING: If too many bytes are requested, this can cause WatchDog Trigger Reset! - -Returns number of successfully written bytes. Returns 0 on error. - -write_nonblocking -^^^^^^^^^^^^^^^^^ +Parameters: -Core function implementing non-blocking write, i.e. writes as much as possible and exits. +* [in] ``src`` is the buffer containing the MP3 data. -.. code-block:: arduino +* [in] ``src_len`` is the size of the buffer in bytes. - size_t write_nonblocking(const void *buffer, size_t size) +This function will return ``true`` on success or ``false`` in case of failure. -Returns number of successfully written bytes. Returns 0 on error. +When failed, an error message will be printed if the correct log level is set. Sample code ----------- -.. code-block:: c +.. code-block:: arduino + + #include - #include const int buff_size = 128; int available, read; uint8_t buffer[buff_size]; - - I2S.begin(I2S_PHILIPS_MODE, 16000, 16); - I2S.read(); // Switch the driver in simplex mode to receive - available = I2S.available(); - if(available < buff_size){ - read = I2S.read(buffer, available); - }else{ - read = I2S.read(buffer, buff_size); + I2SClass I2S; + + void setup() { + I2S.setPins(5, 25, 26, 35, 0); //SCK, WS, SDOUT, SDIN, MCLK + I2S.begin(I2S_MODE_STD, 16000, I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO); + I2S.read(); + available = I2S.available(); + if(available < buff_size) { + read = I2S.read(buffer, available); + } else { + read = I2S.read(buffer, buff_size); + } + I2S.write(buffer, read); + I2S.end(); } - I2S.write(buffer, read); - I2S.end(); + + void loop() {} diff --git a/libraries/ESP_I2S/examples/ES8388_loopback/ES8388.cpp b/libraries/ESP_I2S/examples/ES8388_loopback/ES8388.cpp new file mode 100644 index 00000000000..b072ddd84af --- /dev/null +++ b/libraries/ESP_I2S/examples/ES8388_loopback/ES8388.cpp @@ -0,0 +1,918 @@ +/* + This is a very basic driver for the ES8388 based on the driver written by + me for NuttX. It is not complete and is missing master mode, mono mode, many + features and configuration options. You can use readReg and writeReg to + access the registers directly and configure missing features. Feel free to + contribute by adding missing features and improving the driver. + It is intended to be used only with arduino-esp32. + + The default configuration can be found in the ES8388.h file. + + This was only tested with the ESP32-LyraT board using 44100Hz 16-bit stereo + audio. It may not work with other configurations. + + Created for arduino-esp32 on 20 Dec, 2023 + by Lucas Saavedra Vaz (lucasssvaz) +*/ + +#include + +#include "ESP_I2S.h" +#include "Wire.h" + +#include "ES8388.h" + +/**************************************************************************** + * Private Methods + ****************************************************************************/ + +/* + Name: start + + Description: + Unmute and start the ES8388 codec data transmission. +*/ + +void ES8388::start() +{ + uint8_t prev_regval = 0; + uint8_t regval = 0; + + log_v("Starting ES8388 transmission..."); + _running = true; + prev_regval = readReg(ES8388_DACCONTROL21); + + if (_audio_mode == ES_MODULE_LINE) + { + writeReg(ES8388_DACCONTROL16, + ES8388_RMIXSEL_RIN2 | + ES8388_LMIXSEL_LIN2); + + writeReg(ES8388_DACCONTROL17, + ES8388_LI2LOVOL(ES8388_MIXER_GAIN_0DB) | + ES8388_LI2LO_ENABLE | + ES8388_LD2LO_DISABLE); + + writeReg(ES8388_DACCONTROL20, + ES8388_RI2ROVOL(ES8388_MIXER_GAIN_0DB) | + ES8388_RI2RO_ENABLE | + ES8388_RD2RO_DISABLE); + + writeReg(ES8388_DACCONTROL21, + ES8388_DAC_DLL_PWD_NORMAL | + ES8388_ADC_DLL_PWD_NORMAL | + ES8388_MCLK_DIS_NORMAL | + ES8388_OFFSET_DIS_DISABLE | + ES8388_LRCK_SEL_ADC | + ES8388_SLRCK_SAME); + } + else + { + writeReg(ES8388_DACCONTROL21, + ES8388_DAC_DLL_PWD_NORMAL | + ES8388_ADC_DLL_PWD_NORMAL | + ES8388_MCLK_DIS_NORMAL | + ES8388_OFFSET_DIS_DISABLE | + ES8388_LRCK_SEL_DAC | + ES8388_SLRCK_SAME); + } + + regval = readReg(ES8388_DACCONTROL21); + + if (regval != prev_regval) + { + writeReg(ES8388_CHIPPOWER, + ES8388_DACVREF_PDN_PWRUP | + ES8388_ADCVREF_PDN_PWRUP | + ES8388_DACDLL_PDN_NORMAL | + ES8388_ADCDLL_PDN_NORMAL | + ES8388_DAC_STM_RST_RESET | + ES8388_ADC_STM_RST_RESET | + ES8388_DAC_DIGPDN_RESET | + ES8388_ADC_DIGPDN_RESET); + + writeReg(ES8388_CHIPPOWER, + ES8388_DACVREF_PDN_PWRUP | + ES8388_ADCVREF_PDN_PWRUP | + ES8388_DACDLL_PDN_NORMAL | + ES8388_ADCDLL_PDN_NORMAL | + ES8388_DAC_STM_RST_NORMAL | + ES8388_ADC_STM_RST_NORMAL | + ES8388_DAC_DIGPDN_NORMAL | + ES8388_ADC_DIGPDN_NORMAL); + } + + if (_audio_mode == ES_MODULE_LINE || _audio_mode == ES_MODULE_ADC_DAC || _audio_mode == ES_MODULE_ADC) + { + writeReg(ES8388_ADCPOWER, + ES8388_INT1LP_NORMAL | + ES8388_FLASHLP_NORMAL | + ES8388_PDNADCBIASGEN_NORMAL | + ES8388_PDNMICB_PWRON | + ES8388_PDNADCR_PWRUP | + ES8388_PDNADCL_PWRUP | + ES8388_PDNAINR_NORMAL | + ES8388_PDNAINL_NORMAL); + } + + if (_audio_mode == ES_MODULE_LINE || _audio_mode == ES_MODULE_ADC_DAC || _audio_mode == ES_MODULE_DAC) + { + writeReg(ES8388_DACPOWER, + ES8388_ROUT2_ENABLE | + ES8388_LOUT2_ENABLE | + ES8388_ROUT1_ENABLE | + ES8388_LOUT1_ENABLE | + ES8388_PDNDACR_PWRUP | + ES8388_PDNDACL_PWRUP); + } + + setmute(_audio_mode, false); + log_v("ES8388 transmission started."); +} + +/* + Name: reset + + Description: + Reset the ES8388 codec to a known state depending on the audio mode. +*/ + +void ES8388::reset() +{ + uint8_t regconfig; + + log_v("Resetting ES8388..."); + log_d("Current configuration: _bpsamp=%d, _samprate=%d, _nchannels=%d, _audio_mode=%d, _dac_output=%d, _adc_input=%d, _mic_gain=%d", + _bpsamp, _samprate, _nchannels, _audio_mode, _dac_output, _adc_input, _mic_gain); + + writeReg(ES8388_DACCONTROL3, + ES8388_DACMUTE_MUTED | + ES8388_DACLER_NORMAL | + ES8388_DACSOFTRAMP_DISABLE | + ES8388_DACRAMPRATE_4LRCK); + + writeReg(ES8388_CONTROL2, + ES8388_PDNVREFBUF_NORMAL | + ES8388_VREFLO_NORMAL | + ES8388_PDNIBIASGEN_NORMAL | + ES8388_PDNANA_NORMAL | + ES8388_LPVREFBUF_LP | + ES8388_LPVCMMOD_NORMAL | + (1 << 6)); /* Default value of undocumented bit */ + + writeReg(ES8388_CHIPPOWER, + ES8388_DACVREF_PDN_PWRUP | + ES8388_ADCVREF_PDN_PWRUP | + ES8388_DACDLL_PDN_NORMAL | + ES8388_ADCDLL_PDN_NORMAL | + ES8388_DAC_STM_RST_NORMAL | + ES8388_ADC_STM_RST_NORMAL | + ES8388_DAC_DIGPDN_NORMAL | + ES8388_ADC_DIGPDN_NORMAL); + + /* Disable the internal DLL to improve 8K sample rate */ + + writeReg(0x35, 0xa0); + writeReg(0x37, 0xd0); + writeReg(0x39, 0xd0); + + writeReg(ES8388_MASTERMODE, + ES8388_BCLKDIV(ES_MCLK_DIV_AUTO) | + ES8388_BCLK_INV_NORMAL | + ES8388_MCLKDIV2_NODIV | + ES8388_MSC_SLAVE); + + writeReg(ES8388_DACPOWER, + ES8388_ROUT2_DISABLE | + ES8388_LOUT2_DISABLE | + ES8388_ROUT1_DISABLE | + ES8388_LOUT1_DISABLE | + ES8388_PDNDACR_PWRDN | + ES8388_PDNDACL_PWRDN); + + writeReg(ES8388_CONTROL1, + ES8388_VMIDSEL_500K | + ES8388_ENREF_DISABLE | + ES8388_SEQEN_DISABLE | + ES8388_SAMEFS_SAME | + ES8388_DACMCLK_ADCMCLK | + ES8388_LRCM_ISOLATED | + ES8388_SCPRESET_NORMAL); + + setBitsPerSample(_bpsamp); + setSampleRate(_samprate); + + writeReg(ES8388_DACCONTROL16, + ES8388_RMIXSEL_RIN1 | ES8388_LMIXSEL_LIN1); + + writeReg(ES8388_DACCONTROL17, + ES8388_LI2LOVOL(ES8388_MIXER_GAIN_0DB) | + ES8388_LI2LO_DISABLE | + ES8388_LD2LO_ENABLE); + + writeReg(ES8388_DACCONTROL20, + ES8388_RI2ROVOL(ES8388_MIXER_GAIN_0DB) | + ES8388_RI2RO_DISABLE | + ES8388_RD2RO_ENABLE); + + writeReg(ES8388_DACCONTROL21, + ES8388_DAC_DLL_PWD_NORMAL | + ES8388_ADC_DLL_PWD_NORMAL | + ES8388_MCLK_DIS_NORMAL | + ES8388_OFFSET_DIS_DISABLE | + ES8388_LRCK_SEL_DAC | + ES8388_SLRCK_SAME); + + writeReg(ES8388_DACCONTROL23, ES8388_VROI_1_5K); + + writeReg(ES8388_DACCONTROL24, + ES8388_LOUT1VOL(ES8388_DAC_CHVOL_DB(0))); + + writeReg(ES8388_DACCONTROL25, + ES8388_ROUT1VOL(ES8388_DAC_CHVOL_DB(0))); + + writeReg(ES8388_DACCONTROL26, + ES8388_LOUT2VOL(ES8388_DAC_CHVOL_DB(0))); + + writeReg(ES8388_DACCONTROL27, + ES8388_ROUT2VOL(ES8388_DAC_CHVOL_DB(0))); + + setmute(ES_MODULE_DAC, ES8388_DEFAULT_MUTE); + setvolume(ES_MODULE_DAC, ES8388_DEFAULT_VOL_OUT, ES8388_DEFAULT_BALANCE); + + if (_dac_output == ES8388_DAC_OUTPUT_LINE2) + { + regconfig = ES_DAC_CHANNEL_LOUT1 | ES_DAC_CHANNEL_ROUT1; + } + else if (_dac_output == ES8388_DAC_OUTPUT_LINE1) + { + regconfig = ES_DAC_CHANNEL_LOUT2 | ES_DAC_CHANNEL_ROUT2; + } + else + { + regconfig = ES_DAC_CHANNEL_LOUT1 | ES_DAC_CHANNEL_ROUT1 | + ES_DAC_CHANNEL_LOUT2 | ES_DAC_CHANNEL_ROUT2; + } + + writeReg(ES8388_DACPOWER, regconfig); + + writeReg(ES8388_ADCPOWER, + ES8388_INT1LP_LP | + ES8388_FLASHLP_LP | + ES8388_PDNADCBIASGEN_LP | + ES8388_PDNMICB_PWRDN | + ES8388_PDNADCR_PWRDN | + ES8388_PDNADCL_PWRDN | + ES8388_PDNAINR_PWRDN | + ES8388_PDNAINL_PWRDN); + + setMicGain(24); /* +24 dB */ + + if (_adc_input == ES8388_ADC_INPUT_LINE1) + { + regconfig = ES_ADC_CHANNEL_LINPUT1_RINPUT1; + } + else if (_adc_input == ES8388_ADC_INPUT_LINE2) + { + regconfig = ES_ADC_CHANNEL_LINPUT2_RINPUT2; + } + else + { + regconfig = ES_ADC_CHANNEL_DIFFERENCE; + } + + writeReg(ES8388_ADCCONTROL2, regconfig); + + writeReg(ES8388_ADCCONTROL3, + (1 << 1) | /* Default value of undocumented bit */ + ES8388_TRI_NORMAL | + ES8388_MONOMIX_STEREO | + ES8388_DS_LINPUT1_RINPUT1); + + setBitsPerSample(_bpsamp); + setSampleRate(_samprate); + setmute(ES_MODULE_ADC, ES8388_DEFAULT_MUTE); + setvolume(ES_MODULE_ADC, ES8388_DEFAULT_VOL_IN, ES8388_DEFAULT_BALANCE); + + writeReg(ES8388_ADCPOWER, + ES8388_INT1LP_LP | + ES8388_FLASHLP_NORMAL | + ES8388_PDNADCBIASGEN_NORMAL | + ES8388_PDNMICB_PWRDN | + ES8388_PDNADCR_PWRUP | + ES8388_PDNADCL_PWRUP | + ES8388_PDNAINR_NORMAL | + ES8388_PDNAINL_NORMAL); + + /* Stop sequence to avoid noise at boot */ + + stop(); + + log_v("ES8388 reset."); +} + +/* + Name: stop + + Description: + Mute and stop the ES8388 codec data transmission. +*/ + +void ES8388::stop() +{ + log_v("Stopping ES8388 transmission..."); + _running = false; + + if (_audio_mode == ES_MODULE_LINE) + { + writeReg(ES8388_DACCONTROL21, + ES8388_DAC_DLL_PWD_NORMAL | + ES8388_ADC_DLL_PWD_NORMAL | + ES8388_MCLK_DIS_NORMAL | + ES8388_OFFSET_DIS_DISABLE | + ES8388_LRCK_SEL_DAC | + ES8388_SLRCK_SAME); + + writeReg(ES8388_DACCONTROL16, + ES8388_RMIXSEL_RIN1 | + ES8388_LMIXSEL_LIN1); + + writeReg(ES8388_DACCONTROL17, + ES8388_LI2LOVOL(ES8388_MIXER_GAIN_0DB) | + ES8388_LI2LO_DISABLE | + ES8388_LD2LO_ENABLE); + + writeReg(ES8388_DACCONTROL20, + ES8388_RI2ROVOL(ES8388_MIXER_GAIN_0DB) | + ES8388_RI2RO_DISABLE | + ES8388_RD2RO_ENABLE); + + goto stop_msg; + } + + if (_audio_mode == ES_MODULE_DAC || _audio_mode == ES_MODULE_ADC_DAC) + { + writeReg(ES8388_DACPOWER, + ES8388_ROUT2_DISABLE | + ES8388_LOUT2_DISABLE | + ES8388_ROUT1_DISABLE | + ES8388_LOUT1_DISABLE | + ES8388_PDNDACR_PWRUP | + ES8388_PDNDACL_PWRUP); + } + + if (_audio_mode == ES_MODULE_ADC || _audio_mode == ES_MODULE_ADC_DAC) + { + writeReg(ES8388_ADCPOWER, + ES8388_INT1LP_LP | + ES8388_FLASHLP_LP | + ES8388_PDNADCBIASGEN_LP | + ES8388_PDNMICB_PWRDN | + ES8388_PDNADCR_PWRDN | + ES8388_PDNADCL_PWRDN | + ES8388_PDNAINR_PWRDN | + ES8388_PDNAINL_PWRDN); + } + + if (_audio_mode == ES_MODULE_ADC_DAC) + { + writeReg(ES8388_DACCONTROL21, + ES8388_DAC_DLL_PWD_PWRDN | + ES8388_ADC_DLL_PWD_PWRDN | + ES8388_MCLK_DIS_DISABLE | + ES8388_OFFSET_DIS_DISABLE | + ES8388_LRCK_SEL_DAC | + ES8388_SLRCK_SAME); + } + +stop_msg: + setmute(_audio_mode, true); + log_v("ES8388 transmission stopped."); +} + +/* + Name: setvolume + + Description: + Set the volume of the ES8388 codec. + + Input Parameters: + module - Module to set the volume for. + volume - Volume level {0..1000}. + balance - Balance level {0..1000}. +*/ + +void ES8388::setvolume(es_module_e module, uint16_t volume, uint16_t balance) +{ + uint16_t leftlvl; + int16_t dbleftlvl; + uint16_t rightlvl; + int16_t dbrightlvl; + + log_d("Volume = %u, Balance = %u", volume, balance); + + if (volume > 1000) + { + log_w("Warning: Volume greater than 1000, setting to 1000."); + volume = 1000; + } + + if (balance > 1000) + { + log_w("Warning: Balance greater than 1000, setting to 1000."); + balance = 1000; + } + + _balance = balance; + + /* Calculate the left channel volume level {0..1000} */ + + if (_balance <= 500) + { + leftlvl = volume; + } + else if (_balance == 1000) + { + leftlvl = 0; + } + else + { + leftlvl = ((((1000 - _balance) * 100) / 500) * volume) / 100; + } + + /* Calculate the right channel volume level {0..1000} */ + + if (_balance >= 500) + { + rightlvl = volume; + } + else if (_balance == 0) + { + rightlvl = 0; + } + else + { + rightlvl = (((_balance * 100) / 500) * volume) / 100; + } + + /* Convert from (0..1000) to (-96..0) */ + + dbleftlvl = (int16_t) (leftlvl ? (20 * log10f((float)rightlvl / 1000)) : -96); + dbrightlvl = (int16_t) (rightlvl ? (20 * log10f((float)rightlvl / 1000)) : -96); + + log_v("Volume: dbleftlvl = %d, dbrightlvl = %d", dbleftlvl, dbrightlvl); + + /* Convert and truncate to 1 byte */ + + dbleftlvl = ((-dbleftlvl) << 1) & 0xff; + dbrightlvl = ((-dbrightlvl) << 1) & 0xff; + + /* Set the volume */ + + if (module == ES_MODULE_DAC || module == ES_MODULE_ADC_DAC) + { + writeReg(ES8388_DACCONTROL4, ES8388_LDACVOL(dbleftlvl)); + writeReg(ES8388_DACCONTROL5, ES8388_RDACVOL(dbrightlvl)); + _volume_out = volume; + } + + if (module == ES_MODULE_ADC || module == ES_MODULE_ADC_DAC) + { + writeReg(ES8388_ADCCONTROL8, ES8388_LADCVOL(dbleftlvl)); + writeReg(ES8388_ADCCONTROL9, ES8388_RADCVOL(dbrightlvl)); + _volume_in = volume; + } +} + +/* + Name: setmute + + Description: + Mute or unmute the selected ES8388 codec module. + + Input Parameters: + module - Module to mute or unmute. + enable - Mute or unmute. +*/ + +void ES8388::setmute(es_module_e module, bool enable) +{ + uint8_t reg = 0; + + log_d("module=%d, mute=%d", module, (int)enable); + + _mute = enable; + + if (module == ES_MODULE_DAC || module == ES_MODULE_ADC_DAC) + { + reg = readReg(ES8388_DACCONTROL3) & (~ES8388_DACMUTE_BITMASK); + writeReg(ES8388_DACCONTROL3, reg | ES8388_DACMUTE(enable)); + } + + if (module == ES_MODULE_ADC || module == ES_MODULE_ADC_DAC) + { + reg = readReg(ES8388_ADCCONTROL7) & (~ES8388_ADCMUTE_BITMASK); + writeReg(ES8388_ADCCONTROL7, reg | ES8388_ADCMUTE(enable)); + } +} + +/**************************************************************************** + * Public Methods + ****************************************************************************/ + +ES8388::~ES8388() +{ + end(); +} + +/* + Name: begin + + Description: + Initialize the ES8388 codec. Requires the I2S and I2C buses to be initialized + before calling this function. + + Input Parameters: + i2s - I2S bus instance. + i2c - I2C bus instance. Defaults to Wire. + addr - I2C address of the ES8388 codec. Defaults to 0x10. + + Return: + true - Success. + false - Failure. +*/ +bool ES8388::begin(I2SClass& i2s, TwoWire& i2c, uint8_t addr) +{ + log_v("Initializing ES8388..."); + + _i2c = &i2c; + _i2s = &i2s; + _addr = addr; + _fmt = ES8388_DEFAULT_FMT; + _mode = ES8388_DEFAULT_MODE; + _samprate = ES8388_DEFAULT_SAMPRATE; + _nchannels = ES8388_DEFAULT_NCHANNELS; + _bpsamp = ES8388_DEFAULT_BPSAMP; + _audio_mode = ES8388_DEFAULT_AUDIO_MODE; + _dac_output = ES8388_DEFAULT_DAC_OUTPUT; + _adc_input = ES8388_DEFAULT_ADC_INPUT; + _mic_gain = ES8388_DEFAULT_MIC_GAIN; + _running = false; + _lclk_div = ES_LCLK_DIV_256; + _word_length = ES_WORD_LENGTH_16BITS; + + _i2c->beginTransmission(_addr); + + if (_i2c->endTransmission() != 0) + { + log_e("Device not found at address 0x%02x. Check if the I2C and I2S buses are initialized.", _addr); + return false; + } + + reset(); + log_v("ES8388 initialized."); + return true; +} + +/* + Name: end + + Description: + Stop the ES8388 codec and reset it to a known state. +*/ + +void ES8388::end() +{ + log_v("Ending ES8388..."); + + stop(); + setmute(ES_MODULE_ADC_DAC, true); + _audio_mode = ES_MODULE_ADC_DAC; + reset(); + + log_v("ES8388 ended."); +} + +/* + Name: readReg + + Description: + Read a register from the ES8388 codec. + + Input Parameters: + reg - Register address. + + Return: + Register value. +*/ + +uint8_t ES8388::readReg(uint8_t reg) +{ + int data; + + _i2c->beginTransmission(_addr); + if (_i2c->write(reg) == 0) + { + log_e("Error writing register address 0x%02x.", reg); + return 0; + } + + if (_i2c->endTransmission(false) != 0) + { + log_e("Error ending transmission."); + return 0; + } + + if (!_i2c->requestFrom(_addr, (uint8_t)1)) + { + log_e("Error requesting data."); + return 0; + } + + if ((data = _i2c->read()) < 0) + { + log_e("Error reading data."); + return 0; + } + + return (uint8_t)data; +} + +/* + Name: writeReg + + Description: + Write a register to the ES8388 codec. + + Input Parameters: + reg - Register address. + data - Data to write. +*/ + +void ES8388::writeReg(uint8_t reg, uint8_t data) +{ + _i2c->beginTransmission(_addr); + + if (_i2c->write(reg) == 0) + { + log_e("Error writing register address 0x%02x.", reg); + return; + } + + if (_i2c->write(data) == 0) + { + log_e("Error writing data 0x%02x.", data); + return; + } + + if (_i2c->endTransmission(true) != 0) + { + log_e("Error ending transmission."); + return; + } +} + +/* + Name: setMicGain + + Description: + Set the microphone gain. + + Input Parameters: + gain - Gain level in dB {0..24}. +*/ + +void ES8388::setMicGain(uint8_t gain) +{ + static const es_mic_gain_e gain_map[] = + { + ES_MIC_GAIN_0DB, + ES_MIC_GAIN_3DB, + ES_MIC_GAIN_6DB, + ES_MIC_GAIN_9DB, + ES_MIC_GAIN_12DB, + ES_MIC_GAIN_15DB, + ES_MIC_GAIN_18DB, + ES_MIC_GAIN_21DB, + ES_MIC_GAIN_24DB, + }; + + log_d("gain=%d", gain); + + _mic_gain = gain_map[min(gain, (uint8_t) 24) / 3]; + + writeReg(ES8388_ADCCONTROL1, + ES8388_MICAMPR(_mic_gain) | + ES8388_MICAMPL(_mic_gain)); + + log_v("Mic gain set to %d", _mic_gain); +} + +/* + Name: setBitsPerSample + + Description: + Set the number of bits per sample. This also configures the I2S bus. + + Input Parameters: + bpsamp - Bits per sample {16, 24, 32}. +*/ + +void ES8388::setBitsPerSample(uint8_t bpsamp) +{ + /* ES8388 also supports 18 and 20 bits per sample, but the I2S bus does not */ + switch (bpsamp) + { + case 16: + _word_length = ES_WORD_LENGTH_16BITS; + break; + + case 24: + _word_length = ES_WORD_LENGTH_24BITS; + break; + + case 32: + _word_length = ES_WORD_LENGTH_32BITS; + break; + + default: + log_e("Data length not supported."); + return; + } + + _bpsamp = bpsamp; + _i2s->configureTX(_samprate, (i2s_data_bit_width_t)_bpsamp, I2S_SLOT_MODE_STEREO); + _i2s->configureRX(_samprate, (i2s_data_bit_width_t)_bpsamp, I2S_SLOT_MODE_STEREO); + + if (_audio_mode == ES_MODULE_ADC || _audio_mode == ES_MODULE_ADC_DAC) + { + writeReg(ES8388_ADCCONTROL4, + ES8388_ADCFORMAT(ES_I2S_NORMAL) | + ES8388_ADCWL(_word_length) | + ES8388_ADCLRP_NORM_2ND | + ES8388_DATSEL_LL); + } + + if (_audio_mode == ES_MODULE_DAC || _audio_mode == ES_MODULE_ADC_DAC) + { + writeReg(ES8388_DACCONTROL1, + ES8388_DACFORMAT(ES_I2S_NORMAL) | + ES8388_DACWL(_word_length) | + ES8388_DACLRP_NORM_2ND | + ES8388_DACLRSWAP_NORMAL); + } + + log_v("Datawidth set to %u", _bpsamp); +} + +/* + Name: setSampleRate + + Description: + Set the sample rate. This also configures the I2S bus. + The divider depends on the sample rate and the MCLK frequency. + This needs to be re-implemented to properly support all cases. + ES8388 should also support 88100Hz and 96000Hz sample rates in + double speed mode but setting it makes the audio sound distorted. + + Input Parameters: + rate - Sample rate {8000, 11025, 12000, 16000, 22050, 24000, 32000, + 44100, 48000}. +*/ + +void ES8388::setSampleRate(uint32_t rate) +{ + /* + According to the datasheet, this should only matter for the master mode + but it seems to affect the slave mode as well. + */ + + switch (rate) + { + case 8000: + _lclk_div = ES_LCLK_DIV_1536; + break; + + case 11025: + case 12000: + _lclk_div = ES_LCLK_DIV_1024; + break; + + case 16000: + _lclk_div = ES_LCLK_DIV_768; + break; + + case 22050: + case 24000: + _lclk_div = ES_LCLK_DIV_512; + break; + + case 32000: + _lclk_div = ES_LCLK_DIV_384; + break; + + case 44100: + case 48000: + _lclk_div = ES_LCLK_DIV_256; + break; + + default: + log_e("Sample rate not supported."); + return; + } + + _samprate = rate; + _i2s->configureTX(_samprate, (i2s_data_bit_width_t)_bpsamp, I2S_SLOT_MODE_STEREO); + _i2s->configureRX(_samprate, (i2s_data_bit_width_t)_bpsamp, I2S_SLOT_MODE_STEREO); + + if (_audio_mode == ES_MODULE_ADC || _audio_mode == ES_MODULE_ADC_DAC) + { + writeReg(ES8388_ADCCONTROL5, ES8388_ADCFSRATIO(_lclk_div)); + } + + if (_audio_mode == ES_MODULE_DAC || _audio_mode == ES_MODULE_ADC_DAC) + { + writeReg(ES8388_DACCONTROL2, ES8388_DACFSRATIO(_lclk_div)); + } + + log_v("Sample rate set to %d in single speed mode", _samprate); +} + +/* + Name: playWAV + + Description: + Wrapper for the I2SClass::playWAV() method. This method starts the ES8388 + codec before playing the WAV file and stops it after the WAV file has been + played. + + Input Parameters: + data - Pointer to the WAV file data. + len - Length of the WAV file data. +*/ + +void ES8388::playWAV(uint8_t* data, size_t len) +{ + _audio_mode = ES_MODULE_DAC; + reset(); + + log_v("Playing WAV file..."); + start(); + _i2s->playWAV(data, len); + stop(); + log_v("WAV file played."); +} + +/* + Name: recordWAV + + Description: + Wrapper for the I2SClass::recordWAV() method. This method starts the ES8388 + codec before recording the WAV file and stops it after the WAV file has been + recorded. + + Input Parameters: + rec_seconds - Length of the WAV file to record in seconds. + out_size - Pointer to the variable that will hold the size of the WAV file. + + Return: + Pointer to the WAV file data. +*/ + +uint8_t* ES8388::recordWAV(size_t rec_seconds, size_t* out_size) +{ + uint8_t* data; + size_t size; + + _audio_mode = ES_MODULE_ADC; + reset(); + + log_v("Recording WAV file..."); + start(); + data = _i2s->recordWAV(rec_seconds, &size); + stop(); + log_v("WAV file recorded."); + + *out_size = size; + return data; +} + +void ES8388::setOutputVolume(uint16_t volume, uint16_t balance) +{ + setvolume(ES_MODULE_DAC, volume, balance); +} + +void ES8388::setInputVolume(uint16_t volume, uint16_t balance) +{ + setvolume(ES_MODULE_ADC, volume, balance); +} + +void ES8388::setOutputMute(bool enable) +{ + setmute(ES_MODULE_DAC, enable); +} + +void ES8388::setInputMute(bool enable) +{ + setmute(ES_MODULE_ADC, enable); +} diff --git a/libraries/ESP_I2S/examples/ES8388_loopback/ES8388.h b/libraries/ESP_I2S/examples/ES8388_loopback/ES8388.h new file mode 100644 index 00000000000..e764286cfb7 --- /dev/null +++ b/libraries/ESP_I2S/examples/ES8388_loopback/ES8388.h @@ -0,0 +1,1093 @@ +/* + This is a very basic driver for the ES8388 based on the driver written by + me for NuttX. It is not complete and is missing master mode, mono mode,many + features and configuration options. You can use readReg and writeReg to + access the registers directly and configure missing features. Feel free to + contribute by adding missing features and improving the driver. + It is intended to be used only with arduino-esp32. + + The default configuration can be found in the ES8388.h file. + + This was only tested with the ESP32-LyraT board using 44100Hz 16-bit stereo + audio. It may not work with other configurations. + + Created for arduino-esp32 on 20 Dec, 2023 + by Lucas Saavedra Vaz (lucasssvaz) +*/ + +#pragma once + +#include "ESP_I2S.h" +#include "Wire.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define ES8388_DAC_CHVOL_DB(v) (2*v/3 + 30) + +/* Registers Addresses ******************************************************/ + +#define ES8388_CONTROL1 0x00 +#define ES8388_CONTROL2 0x01 +#define ES8388_CHIPPOWER 0x02 +#define ES8388_ADCPOWER 0x03 +#define ES8388_DACPOWER 0x04 +#define ES8388_CHIPLOPOW1 0x05 +#define ES8388_CHIPLOPOW2 0x06 +#define ES8388_ANAVOLMANAG 0x07 +#define ES8388_MASTERMODE 0x08 +#define ES8388_ADCCONTROL1 0x09 +#define ES8388_ADCCONTROL2 0x0a +#define ES8388_ADCCONTROL3 0x0b +#define ES8388_ADCCONTROL4 0x0c +#define ES8388_ADCCONTROL5 0x0d +#define ES8388_ADCCONTROL6 0x0e +#define ES8388_ADCCONTROL7 0x0f +#define ES8388_ADCCONTROL8 0x10 +#define ES8388_ADCCONTROL9 0x11 +#define ES8388_ADCCONTROL10 0x12 +#define ES8388_ADCCONTROL11 0x13 +#define ES8388_ADCCONTROL12 0x14 +#define ES8388_ADCCONTROL13 0x15 +#define ES8388_ADCCONTROL14 0x16 +#define ES8388_DACCONTROL1 0x17 +#define ES8388_DACCONTROL2 0x18 +#define ES8388_DACCONTROL3 0x19 +#define ES8388_DACCONTROL4 0x1a +#define ES8388_DACCONTROL5 0x1b +#define ES8388_DACCONTROL6 0x1c +#define ES8388_DACCONTROL7 0x1d +#define ES8388_DACCONTROL8 0x1e +#define ES8388_DACCONTROL9 0x1f +#define ES8388_DACCONTROL10 0x20 +#define ES8388_DACCONTROL11 0x21 +#define ES8388_DACCONTROL12 0x22 +#define ES8388_DACCONTROL13 0x23 +#define ES8388_DACCONTROL14 0x24 +#define ES8388_DACCONTROL15 0x25 +#define ES8388_DACCONTROL16 0x26 +#define ES8388_DACCONTROL17 0x27 +#define ES8388_DACCONTROL18 0x28 +#define ES8388_DACCONTROL19 0x29 +#define ES8388_DACCONTROL20 0x2a +#define ES8388_DACCONTROL21 0x2b +#define ES8388_DACCONTROL22 0x2c +#define ES8388_DACCONTROL23 0x2d +#define ES8388_DACCONTROL24 0x2e +#define ES8388_DACCONTROL25 0x2f +#define ES8388_DACCONTROL26 0x30 +#define ES8388_DACCONTROL27 0x31 +#define ES8388_DACCONTROL28 0x32 +#define ES8388_DACCONTROL29 0x33 +#define ES8388_DACCONTROL30 0x34 + +/* Register Power-up Default Values *****************************************/ + +#define ES8388_CONTROL1_DEFAULT 0x06 +#define ES8388_CONTROL2_DEFAULT 0x5c +#define ES8388_CHIPPOWER_DEFAULT 0xc3 +#define ES8388_ADCPOWER_DEFAULT 0xfc +#define ES8388_DACPOWER_DEFAULT 0xc0 +#define ES8388_CHIPLOPOW1_DEFAULT 0x00 +#define ES8388_CHIPLOPOW2_DEFAULT 0x00 +#define ES8388_ANAVOLMANAG_DEFAULT 0x7c +#define ES8388_MASTERMODE_DEFAULT 0x80 +#define ES8388_ADCCONTROL1_DEFAULT 0x00 +#define ES8388_ADCCONTROL2_DEFAULT 0x00 +#define ES8388_ADCCONTROL3_DEFAULT 0x02 +#define ES8388_ADCCONTROL4_DEFAULT 0x00 +#define ES8388_ADCCONTROL5_DEFAULT 0x06 +#define ES8388_ADCCONTROL6_DEFAULT 0x30 +#define ES8388_ADCCONTROL7_DEFAULT 0x20 +#define ES8388_ADCCONTROL8_DEFAULT 0xc0 +#define ES8388_ADCCONTROL9_DEFAULT 0xc0 +#define ES8388_ADCCONTROL10_DEFAULT 0x38 +#define ES8388_ADCCONTROL11_DEFAULT 0xb0 +#define ES8388_ADCCONTROL12_DEFAULT 0x32 +#define ES8388_ADCCONTROL13_DEFAULT 0x06 +#define ES8388_ADCCONTROL14_DEFAULT 0x00 +#define ES8388_DACCONTROL1_DEFAULT 0x00 +#define ES8388_DACCONTROL2_DEFAULT 0x06 +#define ES8388_DACCONTROL3_DEFAULT 0x22 +#define ES8388_DACCONTROL4_DEFAULT 0xc0 +#define ES8388_DACCONTROL5_DEFAULT 0xc0 +#define ES8388_DACCONTROL6_DEFAULT 0x08 +#define ES8388_DACCONTROL7_DEFAULT 0x00 +#define ES8388_DACCONTROL8_DEFAULT 0x1f +#define ES8388_DACCONTROL9_DEFAULT 0xf7 +#define ES8388_DACCONTROL10_DEFAULT 0xfd +#define ES8388_DACCONTROL11_DEFAULT 0xff +#define ES8388_DACCONTROL12_DEFAULT 0x1f +#define ES8388_DACCONTROL13_DEFAULT 0xf7 +#define ES8388_DACCONTROL14_DEFAULT 0xfd +#define ES8388_DACCONTROL15_DEFAULT 0xff +#define ES8388_DACCONTROL16_DEFAULT 0x00 +#define ES8388_DACCONTROL17_DEFAULT 0x38 +#define ES8388_DACCONTROL18_DEFAULT 0x28 +#define ES8388_DACCONTROL19_DEFAULT 0x28 +#define ES8388_DACCONTROL20_DEFAULT 0x38 +#define ES8388_DACCONTROL21_DEFAULT 0x00 +#define ES8388_DACCONTROL22_DEFAULT 0x00 +#define ES8388_DACCONTROL23_DEFAULT 0x00 +#define ES8388_DACCONTROL24_DEFAULT 0x00 +#define ES8388_DACCONTROL25_DEFAULT 0x00 +#define ES8388_DACCONTROL26_DEFAULT 0x00 +#define ES8388_DACCONTROL27_DEFAULT 0x00 +#define ES8388_DACCONTROL28_DEFAULT 0x00 +#define ES8388_DACCONTROL29_DEFAULT 0xaa +#define ES8388_DACCONTROL30_DEFAULT 0xaa + +/* Register Bit Definitions *************************************************/ + +/* 0x00 Chip Control 1 */ + +#define ES8388_VMIDSEL_SHIFT (0) +#define ES8388_VMIDSEL_BITMASK (0x03 << ES8388_VMIDSEL_SHIFT) +#define ES8388_VMIDSEL_DISABLE (0 << ES8388_VMIDSEL_SHIFT) +#define ES8388_VMIDSEL_50K (1 << ES8388_VMIDSEL_SHIFT) +#define ES8388_VMIDSEL_500K (2 << ES8388_VMIDSEL_SHIFT) +#define ES8388_VMIDSEL_5K (3 << ES8388_VMIDSEL_SHIFT) + +#define ES8388_ENREF_SHIFT (2) +#define ES8388_ENREF_BITMASK (0x01 << ES8388_ENREF_SHIFT) +#define ES8388_ENREF_DISABLE (0 << ES8388_ENREF_SHIFT) +#define ES8388_ENREF_ENABLE (1 << ES8388_ENREF_SHIFT) + +#define ES8388_SEQEN_SHIFT (3) +#define ES8388_SEQEN_BITMASK (0x01 << ES8388_SEQEN_SHIFT) +#define ES8388_SEQEN_DISABLE (0 << ES8388_SEQEN_SHIFT) +#define ES8388_SEQEN_ENABLE (1 << ES8388_SEQEN_SHIFT) + +#define ES8388_SAMEFS_SHIFT (4) +#define ES8388_SAMEFS_BITMASK (0x01 << ES8388_SAMEFS_SHIFT) +#define ES8388_SAMEFS_DIFFER (0 << ES8388_SAMEFS_SHIFT) +#define ES8388_SAMEFS_SAME (1 << ES8388_SAMEFS_SHIFT) + +#define ES8388_DACMCLK_SHIFT (5) +#define ES8388_DACMCLK_BITMASK (0x01 << ES8388_DACMCLK_SHIFT) +#define ES8388_DACMCLK_ADCMCLK (0 << ES8388_DACMCLK_SHIFT) +#define ES8388_DACMCLK_DACMCLK (1 << ES8388_DACMCLK_SHIFT) + +#define ES8388_LRCM_SHIFT (6) +#define ES8388_LRCM_BITMASK (0x01 << ES8388_LRCM_SHIFT) +#define ES8388_LRCM_ISOLATED (0 << ES8388_LRCM_SHIFT) +#define ES8388_LRCM_ALL (1 << ES8388_LRCM_SHIFT) + +#define ES8388_SCPRESET_SHIFT (7) +#define ES8388_SCPRESET_BITMASK (0x01 << ES8388_SCPRESET_SHIFT) +#define ES8388_SCPRESET_NORMAL (0 << ES8388_SCPRESET_SHIFT) +#define ES8388_SCPRESET_RESET (1 << ES8388_SCPRESET_SHIFT) + +/* 0x01 Chip Control 2 */ + +#define ES8388_PDNVREFBUF_SHIFT (0) +#define ES8388_PDNVREFBUF_BITMASK (0x01 << ES8388_PDNVREFBUF_SHIFT) +#define ES8388_PDNVREFBUF_NORMAL (0 << ES8388_PDNVREFBUF_SHIFT) +#define ES8388_PDNVREFBUF_PWRDN (1 << ES8388_PDNVREFBUF_SHIFT) + +#define ES8388_VREFLO_SHIFT (1) +#define ES8388_VREFLO_BITMASK (0x01 << ES8388_VREFLO_SHIFT) +#define ES8388_VREFLO_NORMAL (0 << ES8388_VREFLO_SHIFT) +#define ES8388_VREFLO_LP (1 << ES8388_VREFLO_SHIFT) + +#define ES8388_PDNIBIASGEN_SHIFT (2) +#define ES8388_PDNIBIASGEN_BITMASK (0x01 << ES8388_PDNIBIASGEN_SHIFT) +#define ES8388_PDNIBIASGEN_NORMAL (0 << ES8388_PDNIBIASGEN_SHIFT) +#define ES8388_PDNIBIASGEN_PWRDN (1 << ES8388_PDNIBIASGEN_SHIFT) + +#define ES8388_PDNANA_SHIFT (3) +#define ES8388_PDNANA_BITMASK (0x01 << ES8388_PDNANA_SHIFT) +#define ES8388_PDNANA_NORMAL (0 << ES8388_PDNANA_SHIFT) +#define ES8388_PDNANA_PWRDN (1 << ES8388_PDNANA_SHIFT) + +#define ES8388_LPVREFBUF_SHIFT (4) +#define ES8388_LPVREFBUF_BITMASK (0x01 << ES8388_LPVREFBUF_SHIFT) +#define ES8388_LPVREFBUF_NORMAL (0 << ES8388_LPVREFBUF_SHIFT) +#define ES8388_LPVREFBUF_LP (1 << ES8388_LPVREFBUF_SHIFT) + +#define ES8388_LPVCMMOD_SHIFT (5) +#define ES8388_LPVCMMOD_BITMASK (0x01 << ES8388_LPVCMMOD_SHIFT) +#define ES8388_LPVCMMOD_NORMAL (0 << ES8388_LPVCMMOD_SHIFT) +#define ES8388_LPVCMMOD_LP (1 << ES8388_LPVCMMOD_SHIFT) + +/* 0x02 Chip Power Management */ + +#define ES8388_DACVREF_PDN_SHIFT (0) +#define ES8388_DACVREF_PDN_BITMASK (0x01 << ES8388_DACVREF_PDN_SHIFT) +#define ES8388_DACVREF_PDN_PWRUP (0 << ES8388_DACVREF_PDN_SHIFT) +#define ES8388_DACVREF_PDN_PWRDN (1 << ES8388_DACVREF_PDN_SHIFT) + +#define ES8388_ADCVREF_PDN_SHIFT (1) +#define ES8388_ADCVREF_PDN_BITMASK (0x01 << ES8388_ADCVREF_PDN_SHIFT) +#define ES8388_ADCVREF_PDN_PWRUP (0 << ES8388_ADCVREF_PDN_SHIFT) +#define ES8388_ADCVREF_PDN_PWRDN (1 << ES8388_ADCVREF_PDN_SHIFT) + +#define ES8388_DACDLL_PDN_SHIFT (2) +#define ES8388_DACDLL_PDN_BITMASK (0x01 << ES8388_DACDLL_PDN_SHIFT) +#define ES8388_DACDLL_PDN_NORMAL (0 << ES8388_DACDLL_PDN_SHIFT) +#define ES8388_DACDLL_PDN_PWRDN (1 << ES8388_DACDLL_PDN_SHIFT) + +#define ES8388_ADCDLL_PDN_SHIFT (3) +#define ES8388_ADCDLL_PDN_BITMASK (0x01 << ES8388_ADCDLL_PDN_SHIFT) +#define ES8388_ADCDLL_PDN_NORMAL (0 << ES8388_ADCDLL_PDN_SHIFT) +#define ES8388_ADCDLL_PDN_PWRDN (1 << ES8388_ADCDLL_PDN_SHIFT) + +#define ES8388_DAC_STM_RST_SHIFT (4) +#define ES8388_DAC_STM_RST_BITMASK (0x01 << ES8388_DAC_STM_RST_SHIFT) +#define ES8388_DAC_STM_RST_NORMAL (0 << ES8388_DAC_STM_RST_SHIFT) +#define ES8388_DAC_STM_RST_RESET (1 << ES8388_DAC_STM_RST_SHIFT) + +#define ES8388_ADC_STM_RST_SHIFT (5) +#define ES8388_ADC_STM_RST_BITMASK (0x01 << ES8388_ADC_STM_RST_SHIFT) +#define ES8388_ADC_STM_RST_NORMAL (0 << ES8388_ADC_STM_RST_SHIFT) +#define ES8388_ADC_STM_RST_RESET (1 << ES8388_ADC_STM_RST_SHIFT) + +#define ES8388_DAC_DIGPDN_SHIFT (6) +#define ES8388_DAC_DIGPDN_BITMASK (0x01 << ES8388_DAC_DIGPDN_SHIFT) +#define ES8388_DAC_DIGPDN_NORMAL (0 << ES8388_DAC_DIGPDN_SHIFT) +#define ES8388_DAC_DIGPDN_RESET (1 << ES8388_DAC_DIGPDN_SHIFT) + +#define ES8388_ADC_DIGPDN_SHIFT (7) +#define ES8388_ADC_DIGPDN_BITMASK (0x01 << ES8388_ADC_DIGPDN_SHIFT) +#define ES8388_ADC_DIGPDN_NORMAL (0 << ES8388_ADC_DIGPDN_SHIFT) +#define ES8388_ADC_DIGPDN_RESET (1 << ES8388_ADC_DIGPDN_SHIFT) + +/* 0x03 ADC Power Management */ + +#define ES8388_INT1LP_SHIFT (0) +#define ES8388_INT1LP_BITMASK (0x01 << ES8388_INT1LP_SHIFT) +#define ES8388_INT1LP_NORMAL (0 << ES8388_INT1LP_SHIFT) +#define ES8388_INT1LP_LP (1 << ES8388_INT1LP_SHIFT) + +#define ES8388_FLASHLP_SHIFT (1) +#define ES8388_FLASHLP_BITMASK (0x01 << ES8388_FLASHLP_SHIFT) +#define ES8388_FLASHLP_NORMAL (0 << ES8388_FLASHLP_SHIFT) +#define ES8388_FLASHLP_LP (1 << ES8388_FLASHLP_SHIFT) + +#define ES8388_PDNADCBIASGEN_SHIFT (2) +#define ES8388_PDNADCBIASGEN_BITMASK (0x01 << ES8388_PDNADCBIASGEN_SHIFT) +#define ES8388_PDNADCBIASGEN_NORMAL (0 << ES8388_PDNADCBIASGEN_SHIFT) +#define ES8388_PDNADCBIASGEN_LP (1 << ES8388_PDNADCBIASGEN_SHIFT) + +#define ES8388_PDNMICB_SHIFT (3) +#define ES8388_PDNMICB_BITMASK (0x01 << ES8388_PDNMICB_SHIFT) +#define ES8388_PDNMICB_PWRON (0 << ES8388_PDNMICB_SHIFT) +#define ES8388_PDNMICB_PWRDN (1 << ES8388_PDNMICB_SHIFT) + +#define ES8388_PDNADCR_SHIFT (4) +#define ES8388_PDNADCR_BITMASK (0x01 << ES8388_PDNADCR_SHIFT) +#define ES8388_PDNADCR_PWRUP (0 << ES8388_PDNADCR_SHIFT) +#define ES8388_PDNADCR_PWRDN (1 << ES8388_PDNADCR_SHIFT) + +#define ES8388_PDNADCL_SHIFT (5) +#define ES8388_PDNADCL_BITMASK (0x01 << ES8388_PDNADCL_SHIFT) +#define ES8388_PDNADCL_PWRUP (0 << ES8388_PDNADCL_SHIFT) +#define ES8388_PDNADCL_PWRDN (1 << ES8388_PDNADCL_SHIFT) + +#define ES8388_PDNAINR_SHIFT (6) +#define ES8388_PDNAINR_BITMASK (0x01 << ES8388_PDNAINR_SHIFT) +#define ES8388_PDNAINR_NORMAL (0 << ES8388_PDNAINR_SHIFT) +#define ES8388_PDNAINR_PWRDN (1 << ES8388_PDNAINR_SHIFT) + +#define ES8388_PDNAINL_SHIFT (7) +#define ES8388_PDNAINL_BITMASK (0x01 << ES8388_PDNAINL_SHIFT) +#define ES8388_PDNAINL_NORMAL (0 << ES8388_PDNAINL_SHIFT) +#define ES8388_PDNAINL_PWRDN (1 << ES8388_PDNAINL_SHIFT) + +/* 0x04 DAC Power Management */ + +#define ES8388_ROUT2_SHIFT (2) +#define ES8388_ROUT2_BITMASK (0x01 << ES8388_ROUT2_SHIFT) +#define ES8388_ROUT2_DISABLE (0 << ES8388_ROUT2_SHIFT) +#define ES8388_ROUT2_ENABLE (1 << ES8388_ROUT2_SHIFT) + +#define ES8388_LOUT2_SHIFT (3) +#define ES8388_LOUT2_BITMASK (0x01 << ES8388_LOUT2_SHIFT) +#define ES8388_LOUT2_DISABLE (0 << ES8388_LOUT2_SHIFT) +#define ES8388_LOUT2_ENABLE (1 << ES8388_LOUT2_SHIFT) + +#define ES8388_ROUT1_SHIFT (4) +#define ES8388_ROUT1_BITMASK (0x01 << ES8388_ROUT1_SHIFT) +#define ES8388_ROUT1_DISABLE (0 << ES8388_ROUT1_SHIFT) +#define ES8388_ROUT1_ENABLE (1 << ES8388_ROUT1_SHIFT) + +#define ES8388_LOUT1_SHIFT (5) +#define ES8388_LOUT1_BITMASK (0x01 << ES8388_LOUT1_SHIFT) +#define ES8388_LOUT1_DISABLE (0 << ES8388_LOUT1_SHIFT) +#define ES8388_LOUT1_ENABLE (1 << ES8388_LOUT1_SHIFT) + +#define ES8388_PDNDACR_SHIFT (6) +#define ES8388_PDNDACR_BITMASK (0x01 << ES8388_PDNDACR_SHIFT) +#define ES8388_PDNDACR_PWRUP (0 << ES8388_PDNDACR_SHIFT) +#define ES8388_PDNDACR_PWRDN (1 << ES8388_PDNDACR_SHIFT) + +#define ES8388_PDNDACL_SHIFT (7) +#define ES8388_PDNDACL_BITMASK (0x01 << ES8388_PDNDACL_SHIFT) +#define ES8388_PDNDACL_PWRUP (0 << ES8388_PDNDACL_SHIFT) +#define ES8388_PDNDACL_PWRDN (1 << ES8388_PDNDACL_SHIFT) + +/* 0x05 Chip Low Power 1 */ + +#define ES8388_LPLOUT2_SHIFT (3) +#define ES8388_LPLOUT2_BITMASK (0x01 << ES8388_LPLOUT2_SHIFT) +#define ES8388_LPLOUT2_NORMAL (0 << ES8388_LPLOUT2_SHIFT) +#define ES8388_LPLOUT2_LP (1 << ES8388_LPLOUT2_SHIFT) + +#define ES8388_LPLOUT1_SHIFT (5) +#define ES8388_LPLOUT1_BITMASK (0x01 << ES8388_LPLOUT1_SHIFT) +#define ES8388_LPLOUT1_NORMAL (0 << ES8388_LPLOUT1_SHIFT) +#define ES8388_LPLOUT1_LP (1 << ES8388_LPLOUT1_SHIFT) + +#define ES8388_LPDACR_SHIFT (6) +#define ES8388_LPDACR_BITMASK (0x01 << ES8388_LPDACR_SHIFT) +#define ES8388_LPDACR_NORMAL (0 << ES8388_LPDACR_SHIFT) +#define ES8388_LPDACR_LP (1 << ES8388_LPDACR_SHIFT) + +#define ES8388_LPDACL_SHIFT (7) +#define ES8388_LPDACL_BITMASK (0x01 << ES8388_LPDACL_SHIFT) +#define ES8388_LPDACL_NORMAL (0 << ES8388_LPDACL_SHIFT) +#define ES8388_LPDACL_LP (1 << ES8388_LPDACL_SHIFT) + +/* 0x06 Chip Low Power 2 */ + +#define ES8388_LPDACVRP_SHIFT (0) +#define ES8388_LPDACVRP_BITMASK (0x01 << ES8388_LPDACVRP_SHIFT) +#define ES8388_LPDACVRP_NORMAL (0 << ES8388_LPDACVRP_SHIFT) +#define ES8388_LPDACVRP_LP (1 << ES8388_LPDACVRP_SHIFT) + +#define ES8388_LPADCVRP_SHIFT (1) +#define ES8388_LPADCVRP_BITMASK (0x01 << ES8388_LPDACVRP_SHIFT) +#define ES8388_LPADCVRP_NORMAL (0 << ES8388_LPDACVRP_SHIFT) +#define ES8388_LPADCVRP_LP (1 << ES8388_LPDACVRP_SHIFT) + +#define ES8388_LPLMIX_SHIFT (6) +#define ES8388_LPLMIX_BITMASK (0x01 << ES8388_LPLMIX_SHIFT) +#define ES8388_LPLMIX_NORMAL (0 << ES8388_LPLMIX_SHIFT) +#define ES8388_LPLMIX_LP (1 << ES8388_LPLMIX_SHIFT) + +#define ES8388_LPPGA_SHIFT (7) +#define ES8388_LPPGA_BITMASK (0x01 << ES8388_LPPGA_SHIFT) +#define ES8388_LPPGA_NORMAL (0 << ES8388_LPPGA_SHIFT) +#define ES8388_LPPGA_LP (1 << ES8388_LPPGA_SHIFT) + +/* 0x08 Master Mode Control */ + +#define ES8388_BCLKDIV_SHIFT (0) +#define ES8388_BCLKDIV_BITMASK (0x1f << ES8388_BCLKDIV_SHIFT) +#define ES8388_BCLKDIV(a) (a << ES8388_BCLKDIV_SHIFT) + +#define ES8388_BCLK_INV_SHIFT (5) +#define ES8388_BCLK_INV_BITMASL (0x01 << ES8388_BCLK_INV_SHIFT) +#define ES8388_BCLK_INV_NORMAL (0 << ES8388_BCLK_INV_SHIFT) +#define ES8388_BCLK_INV_INVERTED (1 << ES8388_BCLK_INV_SHIFT) + +#define ES8388_MCLKDIV2_SHIFT (6) +#define ES8388_MCLKDIV2_BITMASK (0x01 << ES8388_MCLKDIV2_SHIFT) +#define ES8388_MCLKDIV2_NODIV (0 << ES8388_MCLKDIV2_SHIFT) +#define ES8388_MCLKDIV2_DIV2 (1 << ES8388_MCLKDIV2_SHIFT) + +#define ES8388_MSC_SHIFT (7) +#define ES8388_MSC_BITMASK (0x01 << ES8388_MSC_SHIFT) +#define ES8388_MSC_SLAVE (0 << ES8388_MSC_SHIFT) +#define ES8388_MSC_MASTER (1 << ES8388_MSC_SHIFT) + +/* 0x09 ADC Control 1 */ + +#define ES8388_MICAMPR_SHIFT (0) +#define ES8388_MICAMPR_BITMASK (0x0f << ES8388_MICAMPR_SHIFT) +#define ES8388_MICAMPR(a) (a << ES8388_MICAMPR_SHIFT) + +#define ES8388_MICAMPL_SHIFT (4) +#define ES8388_MICAMPL_BITMASK (0x0f << ES8388_MICAMPL_SHIFT) +#define ES8388_MICAMPL(a) (a << ES8388_MICAMPL_SHIFT) + +/* 0x0a ADC Control 2 */ + +#define ES8388_DSR_SHIFT (2) +#define ES8388_DSR_BITMASK (0x01 << ES8388_DSR_SHIFT) +#define ES8388_DSR_LINPUT1_RINPUT1 (0 << ES8388_DSR_SHIFT) +#define ES8388_DSR_LINPUT2_RINPUT2 (1 << ES8388_DSR_SHIFT) + +#define ES8388_DSSEL_SHIFT (3) +#define ES8388_DSSEL_BITMASK (0x01 << ES8388_DSSEL_SHIFT) +#define ES8388_DSSEL_ONE_REG (0 << ES8388_DSSEL_SHIFT) +#define ES8388_DSSEL_MULT_REG (1 << ES8388_DSSEL_SHIFT) + +#define ES8388_RINSEL_SHIFT (4) +#define ES8388_RINSEL_BITMASK (0x03 << ES8388_RINSEL_SHIFT) +#define ES8388_RINSEL_RINPUT1 (0 << ES8388_RINSEL_SHIFT) +#define ES8388_RINSEL_RINPUT2 (1 << ES8388_RINSEL_SHIFT) +#define ES8388_RINSEL_DIFF (3 << ES8388_RINSEL_SHIFT) + +#define ES8388_LINSEL_SHIFT (6) +#define ES8388_LINSEL_BITMASK (0x03 << ES8388_LINSEL_SHIFT) +#define ES8388_LINSEL_LINPUT1 (0 << ES8388_LINSEL_SHIFT) +#define ES8388_LINSEL_LINPUT2 (1 << ES8388_LINSEL_SHIFT) +#define ES8388_LINSEL_DIFF (3 << ES8388_LINSEL_SHIFT) + +/* 0x0b ADC Control 3 */ + +#define ES8388_TRI_SHIFT (2) +#define ES8388_TRI_BITMASK (0x01 << ES8388_TRI_SHIFT) +#define ES8388_TRI_NORMAL (0 << ES8388_TRI_SHIFT) +#define ES8388_TRI_TRISTATED (1 << ES8388_TRI_SHIFT) + +#define ES8388_MONOMIX_SHIFT (3) +#define ES8388_MONOMIX_BITMASK (0x03 << ES8388_MONOMIX_SHIFT) +#define ES8388_MONOMIX_STEREO (0 << ES8388_MONOMIX_SHIFT) +#define ES8388_MONOMIX_LADC (1 << ES8388_MONOMIX_SHIFT) +#define ES8388_MONOMIX_RADC (2 << ES8388_MONOMIX_SHIFT) + +#define ES8388_DS_SHIFT (7) +#define ES8388_DS_BITMASK (0x01 << ES8388_DS_SHIFT) +#define ES8388_DS_LINPUT1_RINPUT1 (0 << ES8388_DS_SHIFT) +#define ES8388_DS_LINPUT2_RINPUT2 (1 << ES8388_DS_SHIFT) + +/* 0x0c ADC Control 4 */ + +#define ES8388_ADCFORMAT_SHIFT (0) +#define ES8388_ADCFORMAT_BITMASK (0x03 << ES8388_ADCFORMAT_SHIFT) +#define ES8388_ADCFORMAT(a) (a << ES8388_ADCFORMAT_SHIFT) + +#define ES8388_ADCWL_SHIFT (2) +#define ES8388_ADCWL_BITMASK (0x07 << ES8388_ADCWL_SHIFT) +#define ES8388_ADCWL(a) (a << ES8388_ADCWL_SHIFT) + +#define ES8388_ADCLRP_SHIFT (5) +#define ES8388_ADCLRP_BITMASK (0x01 << ES8388_ADCLRP_SHIFT) +#define ES8388_ADCLRP_NORM_2ND (0 << ES8388_ADCLRP_SHIFT) +#define ES8388_ADCLRP_INV_1ST (1 << ES8388_ADCLRP_SHIFT) + +#define ES8388_DATSEL_SHIFT (6) +#define ES8388_DATSEL_BITMASK (0x03 << ES8388_DATSEL_SHIFT) +#define ES8388_DATSEL_LL (0 << ES8388_DATSEL_SHIFT) +#define ES8388_DATSEL_LR (1 << ES8388_DATSEL_SHIFT) +#define ES8388_DATSEL_RR (2 << ES8388_DATSEL_SHIFT) +#define ES8388_DATSEL_RL (3 << ES8388_DATSEL_SHIFT) + +/* 0x0d ADC Control 5 */ + +#define ES8388_ADCFSRATIO_SHIFT (0) +#define ES8388_ADCFSRATIO_BITMASK (0x1f << ES8388_ADCFSRATIO_SHIFT) +#define ES8388_ADCFSRATIO(a) (a << ES8388_ADCFSRATIO_SHIFT) + +#define ES8388_ADCFSMODE_SHIFT (5) +#define ES8388_ADCFSMODE_BITMASK (0x01 << ES8388_ADCFSMODE_SHIFT) +#define ES8388_ADCFSMODE_SINGLE (0 << ES8388_ADCFSMODE_SHIFT) +#define ES8388_ADCFSMODE_DOUBLE (1 << ES8388_ADCFSMODE_SHIFT) + +/* 0x0e ADC Control 6 */ + +#define ES8388_ADC_HPF_R_SHIFT (4) +#define ES8388_ADC_HPF_R_BITMASK (0x01 << ES8388_ADC_HPF_R_SHIFT) +#define ES8388_ADC_HPF_R_DISABLE (0 << ES8388_ADC_HPF_R_SHIFT) +#define ES8388_ADC_HPF_R_ENABLE (1 << ES8388_ADC_HPF_R_SHIFT) + +#define ES8388_ADC_HPF_L_SHIFT (5) +#define ES8388_ADC_HPF_L_BITMASK (0x01 << ES8388_ADC_HPF_L_SHIFT) +#define ES8388_ADC_HPF_L_DISABLE (0 << ES8388_ADC_HPF_L_SHIFT) +#define ES8388_ADC_HPF_L_ENABLE (1 << ES8388_ADC_HPF_L_SHIFT) + +#define ES8388_ADC_INVR_SHIFT (6) +#define ES8388_ADC_INVR_BITMASK (0x01 << ES8388_ADC_INVR_SHIFT) +#define ES8388_ADC_INVR_NORMAL (0 << ES8388_ADC_INVR_SHIFT) +#define ES8388_ADC_INVR_INVERTED (1 << ES8388_ADC_INVR_SHIFT) + +#define ES8388_ADC_INVL_SHIFT (7) +#define ES8388_ADC_INVL_BITMASK (0x01 << ES8388_ADC_INVL_SHIFT) +#define ES8388_ADC_INVL_NORMAL (0 << ES8388_ADC_INVL_SHIFT) +#define ES8388_ADC_INVL_INVERTED (1 << ES8388_ADC_INVL_SHIFT) + +/* 0x0f ADC Control 7 */ + +#define ES8388_ADCMUTE_SHIFT (2) +#define ES8388_ADCMUTE_BITMASK (0x01 << ES8388_ADCMUTE_SHIFT) +#define ES8388_ADCMUTE(a) (((int)a) << ES8388_ADCMUTE_SHIFT) +#define ES8388_ADCMUTE_NORMAL (0 << ES8388_ADCMUTE_SHIFT) +#define ES8388_ADCMUTE_MUTED (1 << ES8388_ADCMUTE_SHIFT) + +#define ES8388_ADCLER_SHIFT (3) +#define ES8388_ADCLER_BITMASK (0x01 << ES8388_ADCLER_SHIFT) +#define ES8388_ADCLER_NORMAL (0 << ES8388_ADCLER_SHIFT) +#define ES8388_ADCLER_ADCLEFT (1 << ES8388_ADCLER_SHIFT) + +#define ES8388_ADCSOFTRAMP_SHIFT (5) +#define ES8388_ADCSOFTRAMP_BITMASK (0x01 << ES8388_ADCSOFTRAMP_SHIFT) +#define ES8388_ADCSOFTRAMP_DISABLE (0 << ES8388_ADCSOFTRAMP_SHIFT) +#define ES8388_ADCSOFTRAMP_ENABLE (1 << ES8388_ADCSOFTRAMP_SHIFT) + +#define ES8388_ADCRAMPRATE_SHIFT (6) +#define ES8388_ADCRAMPRATE_BITMASK (0x03 << ES8388_ADCRAMPRATE_SHIFT) +#define ES8388_ADCRAMPRATE_4LRCK (0 << ES8388_ADCRAMPRATE_SHIFT) +#define ES8388_ADCRAMPRATE_8LRCK (1 << ES8388_ADCRAMPRATE_SHIFT) +#define ES8388_ADCRAMPRATE_16LRCK (2 << ES8388_ADCRAMPRATE_SHIFT) +#define ES8388_ADCRAMPRATE_32LRCK (3 << ES8388_ADCRAMPRATE_SHIFT) + +/* 0x10 ADC Control 8 */ + +#define ES8388_LADCVOL_SHIFT (0) +#define ES8388_LADCVOL_BITMASK (0xff << ES8388_LADCVOL_SHIFT) +#define ES8388_LADCVOL(a) (a << ES8388_LADCVOL_SHIFT) + +/* 0x11 ADC Control 9 */ + +#define ES8388_RADCVOL_SHIFT (0) +#define ES8388_RADCVOL_BITMASK (0xff << ES8388_RADCVOL_SHIFT) +#define ES8388_RADCVOL(a) (a << ES8388_RADCVOL_SHIFT) + +/* 0x12 ADC Control 10 */ + +#define ES8388_MINGAIN_SHIFT (0) +#define ES8388_MINGAIN_BITMASK (0x07 << ES8388_MINGAIN_SHIFT) +#define ES8388_MINGAIN(a) (a << ES8388_MINGAIN_SHIFT) + +#define ES8388_MAXGAIN_SHIFT (3) +#define ES8388_MAXGAIN_BITMASK (0x07 << ES8388_MAXGAIN_SHIFT) +#define ES8388_MAXGAIN(a) (a << ES8388_MAXGAIN_SHIFT) + +#define ES8388_ADCSEL_SHIFT (6) +#define ES8388_ADCSEL_BITMASK (0x03 << ES8388_ADCSEL_SHIFT) +#define ES8388_ADCSEL_OFF (0 << ES8388_ADCSEL_SHIFT) +#define ES8388_ADCSEL_RIGHT (1 << ES8388_ADCSEL_SHIFT) +#define ES8388_ADCSEL_LEFT (2 << ES8388_ADCSEL_SHIFT) +#define ES8388_ADCSEL_STEREO (3 << ES8388_ADCSEL_SHIFT) + +/* 0x13 ADC Control 11 */ + +#define ES8388_ALCHLD_SHIFT (0) +#define ES8388_ALCHLD_BITMASK (0x0f << ES8388_ALCHLD_SHIFT) +#define ES8388_ALCHLD(a) (a << ES8388_ALCHLD_SHIFT) + +#define ES8388_ALCLVL_SHIFT (4) +#define ES8388_ALCLVL_BITMASK (0x0f << ES8388_ALCLVL_SHIFT) +#define ES8388_ALCLVL(a) (a << ES8388_ALCLVL_SHIFT) + +/* 0x14 ADC Control 12 */ + +#define ES8388_ALCATK_SHIFT (0) +#define ES8388_ALCATK_BITMASK (0x0f << ES8388_ALCATK_SHIFT) +#define ES8388_ALCATK(a) (a << ES8388_ALCATK_SHIFT) + +#define ES8388_ALCDCY_SHIFT (4) +#define ES8388_ALCDCY_BITMASK (0x0f << ES8388_ALCDCY_SHIFT) +#define ES8388_ALCDCY(a) (a << ES8388_ALCDCY_SHIFT) + +/* 0x15 ADC Control 13 */ + +#define ES8388_WIN_SIZE_SHIFT (0) +#define ES8388_WIN_SIZE_BITMASK (0x1f << ES8388_WIN_SIZE_SHIFT) +#define ES8388_WIN_SIZE(a) (a << ES8388_WIN_SIZE_SHIFT) + +#define ES8388_TIME_OUT_SHIFT (5) +#define ES8388_TIME_OUT_BITMASK (0x01 << ES8388_TIME_OUT_SHIFT) +#define ES8388_TIME_OUT_DISABLE (0 << ES8388_TIME_OUT_SHIFT) +#define ES8388_TIME_OUT_ENABLE (1 << ES8388_TIME_OUT_SHIFT) + +#define ES8388_ALCZC_SHIFT (6) +#define ES8388_ALCZC_BITMASK (0x01 << ES8388_ALCZC_SHIFT) +#define ES8388_ALCZC_DISABLE (0 << ES8388_ALCZC_SHIFT) +#define ES8388_ALCZC_ENABLE (1 << ES8388_ALCZC_SHIFT) + +#define ES8388_ALCMODE_SHIFT (7) +#define ES8388_ALCMODE_BITMASK (0x01 << ES8388_ALCMODE_SHIFT) +#define ES8388_ALCMODE_NORMAL (0 << ES8388_ALCMODE_SHIFT) +#define ES8388_ALCMODE_LIMITER (1 << ES8388_ALCMODE_SHIFT) + +/* 0x16 ADC Control 14 */ + +#define ES8388_NGAT_SHIFT (0) +#define ES8388_NGAT_BITMASK (0x01 << ES8388_NGAT_SHIFT) +#define ES8388_NGAT_DISABLE (0 << ES8388_NGAT_SHIFT) +#define ES8388_NGAT_ENABLE (1 << ES8388_NGAT_SHIFT) + +#define ES8388_NGG_SHIFT (1) +#define ES8388_NGG_BITMASK (0x01 << ES8388_NGG_SHIFT) +#define ES8388_NGG_CONST (0 << ES8388_NGG_SHIFT) +#define ES8388_NGG_MUTE (1 << ES8388_NGG_SHIFT) + +#define ES8388_NGTH_SHIFT (3) +#define ES8388_NGTH_BITMASK (0x1f << ES8388_NGTH_SHIFT) +#define ES8388_NGTH(a) (a << ES8388_NGTH_SHIFT) + +/* 0x17 DAC Control 1 */ + +#define ES8388_DACFORMAT_SHIFT (1) +#define ES8388_DACFORMAT_BITMASK (0x03 << ES8388_DACFORMAT_SHIFT) +#define ES8388_DACFORMAT(a) (a << ES8388_DACFORMAT_SHIFT) + +#define ES8388_DACWL_SHIFT (3) +#define ES8388_DACWL_BITMASK (0x07 << ES8388_DACWL_SHIFT) +#define ES8388_DACWL(a) (a << ES8388_DACWL_SHIFT) + +#define ES8388_DACLRP_SHIFT (6) +#define ES8388_DACLRP_BITMASK (0x01 << ES8388_DACLRP_SHIFT) +#define ES8388_DACLRP_NORM_2ND (0 << ES8388_DACLRP_SHIFT) +#define ES8388_DACLRP_INV_1ST (1 << ES8388_DACLRP_SHIFT) + +#define ES8388_DACLRSWAP_SHIFT (7) +#define ES8388_DACLRSWAP_BITMASK (0x01 << ES8388_DACLRSWAP_SHIFT) +#define ES8388_DACLRSWAP_NORMAL (0 << ES8388_DACLRSWAP_SHIFT) +#define ES8388_DACLRSWAP_SWAP (1 << ES8388_DACLRSWAP_SHIFT) + +/* 0x18 DAC Control 2 */ + +#define ES8388_DACFSRATIO_SHIFT (0) +#define ES8388_DACFSRATIO_BITMASK (0x1f << ES8388_DACFSRATIO_SHIFT) +#define ES8388_DACFSRATIO(a) (a << ES8388_DACFSRATIO_SHIFT) + +#define ES8388_DACFSMODE_SHIFT (5) +#define ES8388_DACFSMODE_BITMASK (0x01 << ES8388_DACFSMODE_SHIFT) +#define ES8388_DACFSMODE_SINGLE (0 << ES8388_DACFSMODE_SHIFT) +#define ES8388_DACFSMODE_DOUBLE (1 << ES8388_DACFSMODE_SHIFT) + +/* 0x19 DAC Control 3 */ + +#define ES8388_DACMUTE_SHIFT (2) +#define ES8388_DACMUTE_BITMASK (0x01 << ES8388_DACMUTE_SHIFT) +#define ES8388_DACMUTE(a) (((int)a) << ES8388_DACMUTE_SHIFT) +#define ES8388_DACMUTE_NORMAL (0 << ES8388_DACMUTE_SHIFT) +#define ES8388_DACMUTE_MUTED (1 << ES8388_DACMUTE_SHIFT) + +#define ES8388_DACLER_SHIFT (3) +#define ES8388_DACLER_BITMASK (0x01 << ES8388_DACLER_SHIFT) +#define ES8388_DACLER_NORMAL (0 << ES8388_DACLER_SHIFT) +#define ES8388_DACLER_ADCLEFT (1 << ES8388_DACLER_SHIFT) + +#define ES8388_DACSOFTRAMP_SHIFT (5) +#define ES8388_DACSOFTRAMP_BITMASK (0x01 << ES8388_DACSOFTRAMP_SHIFT) +#define ES8388_DACSOFTRAMP_DISABLE (0 << ES8388_DACSOFTRAMP_SHIFT) +#define ES8388_DACSOFTRAMP_ENABLE (1 << ES8388_DACSOFTRAMP_SHIFT) + +#define ES8388_DACRAMPRATE_SHIFT (6) +#define ES8388_DACRAMPRATE_BITMASK (0x03 << ES8388_DACRAMPRATE_SHIFT) +#define ES8388_DACRAMPRATE_4LRCK (0 << ES8388_DACRAMPRATE_SHIFT) +#define ES8388_DACRAMPRATE_32LRCK (1 << ES8388_DACRAMPRATE_SHIFT) +#define ES8388_DACRAMPRATE_64LRCK (2 << ES8388_DACRAMPRATE_SHIFT) +#define ES8388_DACRAMPRATE_128LRCK (3 << ES8388_DACRAMPRATE_SHIFT) + +/* 0x1a DAC Control 4 */ + +#define ES8388_LDACVOL_SHIFT (0) +#define ES8388_LDACVOL_BITMASK (0xff << ES8388_LDACVOL_SHIFT) +#define ES8388_LDACVOL(a) (a << ES8388_LDACVOL_SHIFT) + +/* 0x1b DAC Control 5 */ + +#define ES8388_RDACVOL_SHIFT (0) +#define ES8388_RDACVOL_BITMASK (0xff << ES8388_RDACVOL_SHIFT) +#define ES8388_RDACVOL(a) (a << ES8388_RDACVOL_SHIFT) + +/* 0x1c DAC Control 6 */ + +#define ES8388_CLICKFREE_SHIFT (3) +#define ES8388_CLICKFREE_BITMASK (0x01 << ES8388_CLICKFREE_SHIFT) +#define ES8388_CLICKFREE_DISABLE (0 << ES8388_CLICKFREE_SHIFT) +#define ES8388_CLICKFREE_ENABLE (1 << ES8388_CLICKFREE_SHIFT) + +#define ES8388_DAC_INVR_SHIFT (4) +#define ES8388_DAC_INVR_BITMASK (0x01 << ES8388_DAC_INVR_SHIFT) +#define ES8388_DAC_INVR_NOINV (0 << ES8388_DAC_INVR_SHIFT) +#define ES8388_DAC_INVR_180INV (1 << ES8388_DAC_INVR_SHIFT) + +#define ES8388_DAC_INVL_SHIFT (5) +#define ES8388_DAC_INVL_BITMASK (0x01 << ES8388_DAC_INVL_SHIFT) +#define ES8388_DAC_INVL_NOINV (0 << ES8388_DAC_INVL_SHIFT) +#define ES8388_DAC_INVL_180INV (1 << ES8388_DAC_INVL_SHIFT) + +#define ES8388_DEEMP_SHIFT (6) +#define ES8388_DEEMP_BITMASK (0x03 << ES8388_DEEMP_SHIFT) +#define ES8388_DEEMP_DISABLE (0 << ES8388_DEEMP_SHIFT) +#define ES8388_DEEMP_32KHZ (1 << ES8388_DEEMP_SHIFT) +#define ES8388_DEEMP_44KHZ (2 << ES8388_DEEMP_SHIFT) +#define ES8388_DEEMP_48KHZ (3 << ES8388_DEEMP_SHIFT) + +/* 0x1d DAC Control 7 */ + +#define ES8388_VPP_SCALE_SHIFT (0) +#define ES8388_VPP_SCALE_BITMASK (0x03 << ES8388_VPP_SCALE_SHIFT) +#define ES8388_VPP_SCALE_3_5V (0 << ES8388_VPP_SCALE_SHIFT) +#define ES8388_VPP_SCALE_4_0V (1 << ES8388_VPP_SCALE_SHIFT) +#define ES8388_VPP_SCALE_3_0V (2 << ES8388_VPP_SCALE_SHIFT) +#define ES8388_VPP_SCALE_2_5V (3 << ES8388_VPP_SCALE_SHIFT) + +#define ES8388_SE_SHIFT (2) +#define ES8388_SE_BITMASK (0x07 << ES8388_SE_SHIFT) +#define ES8388_SE(a) (a << ES8388_SE_SHIFT) + +#define ES8388_MONO_SHIFT (5) +#define ES8388_MONO_BITMASK (0x01 << ES8388_MONO_SHIFT) +#define ES8388_MONO_STEREO (0 << ES8388_MONO_SHIFT) +#define ES8388_MONO_MONO (1 << ES8388_MONO_SHIFT) + +#define ES8388_ZEROR_SHIFT (6) +#define ES8388_ZEROR_BITMASK (0x01 << ES8388_ZEROR_SHIFT) +#define ES8388_ZEROR_NORMAL (0 << ES8388_ZEROR_SHIFT) +#define ES8388_ZEROR_ZERO (1 << ES8388_ZEROR_SHIFT) + +#define ES8388_ZEROL_SHIFT (7) +#define ES8388_ZEROL_BITMASK (0x01 << ES8388_ZEROL_SHIFT) +#define ES8388_ZEROL_NORMAL (0 << ES8388_ZEROL_SHIFT) +#define ES8388_ZEROL_ZERO (1 << ES8388_ZEROL_SHIFT) + +/* 0x1e DAC Control 8 + * 0x1f DAC Control 9 + * 0x20 DAC Control 10 + * 0x21 DAC Control 11 + * 0x22 DAC Control 12 + * 0x23 DAC Control 13 + * 0x24 DAC Control 14 + * 0x25 DAC Control 15 + */ + +#define ES8388_SHELVING_COEF_SHIFT (0) +#define ES8388_SHELVING_COEF_BITMASK (0xff << ES8388_SHELVING_COEF_SHIFT) +#define ES8388_SHELVING_COEF(a) (a << ES8388_SHELVING_COEF_SHIFT) + +/* 0x26 DAC Control 16 */ + +#define ES8388_RMIXSEL_SHIFT (0) +#define ES8388_RMIXSEL_BITMASK (0x07 << ES8388_RMIXSEL_SHIFT) +#define ES8388_RMIXSEL_RIN1 (0 << ES8388_RMIXSEL_SHIFT) +#define ES8388_RMIXSEL_RIN2 (1 << ES8388_RMIXSEL_SHIFT) +#define ES8388_RMIXSEL_PIN (3 << ES8388_RMIXSEL_SHIFT) +#define ES8388_RMIXSEL_NIN (4 << ES8388_RMIXSEL_SHIFT) + +#define ES8388_LMIXSEL_SHIFT (3) +#define ES8388_LMIXSEL_BITMASK (0x07 << ES8388_LMIXSEL_SHIFT) +#define ES8388_LMIXSEL_LIN1 (0 << ES8388_LMIXSEL_SHIFT) +#define ES8388_LMIXSEL_LIN2 (1 << ES8388_LMIXSEL_SHIFT) +#define ES8388_LMIXSEL_PIN (3 << ES8388_LMIXSEL_SHIFT) +#define ES8388_LMIXSEL_NIN (4 << ES8388_LMIXSEL_SHIFT) + +/* 0x27 DAC Control 17 */ + +#define ES8388_LI2LOVOL_SHIFT (3) +#define ES8388_LI2LOVOL_BITMASK (0x07 << ES8388_LI2LOVOL_SHIFT) +#define ES8388_LI2LOVOL(a) (a << ES8388_LI2LOVOL_SHIFT) + +#define ES8388_LI2LO_SHIFT (6) +#define ES8388_LI2LO_BITMASK (0x01 << ES8388_LI2LO_SHIFT) +#define ES8388_LI2LO_DISABLE (0 << ES8388_LI2LO_SHIFT) +#define ES8388_LI2LO_ENABLE (1 << ES8388_LI2LO_SHIFT) + +#define ES8388_LD2LO_SHIFT (7) +#define ES8388_LD2LO_BITMASK (0x01 << ES8388_LD2LO_SHIFT) +#define ES8388_LD2LO_DISABLE (0 << ES8388_LD2LO_SHIFT) +#define ES8388_LD2LO_ENABLE (1 << ES8388_LD2LO_SHIFT) + +/* 0x2a DAC Control 20 */ + +#define ES8388_RI2ROVOL_SHIFT (3) +#define ES8388_RI2ROVOL_BITMASK (0x07 << ES8388_RI2ROVOL_SHIFT) +#define ES8388_RI2ROVOL(a) (a << ES8388_RI2ROVOL_SHIFT) + +#define ES8388_RI2RO_SHIFT (6) +#define ES8388_RI2RO_BITMASK (0x01 << ES8388_RI2RO_SHIFT) +#define ES8388_RI2RO_DISABLE (0 << ES8388_RI2RO_SHIFT) +#define ES8388_RI2RO_ENABLE (1 << ES8388_RI2RO_SHIFT) + +#define ES8388_RD2RO_SHIFT (7) +#define ES8388_RD2RO_BITMASK (0x01 << ES8388_RD2RO_SHIFT) +#define ES8388_RD2RO_DISABLE (0 << ES8388_RD2RO_SHIFT) +#define ES8388_RD2RO_ENABLE (1 << ES8388_RD2RO_SHIFT) + +/* 0x2b DAC Control 21 */ + +#define ES8388_DAC_DLL_PWD_SHIFT (2) +#define ES8388_DAC_DLL_PWD_BITMASK (0x01 << ES8388_DAC_DLL_PWD_SHIFT) +#define ES8388_DAC_DLL_PWD_NORMAL (0 << ES8388_DAC_DLL_PWD_SHIFT) +#define ES8388_DAC_DLL_PWD_PWRDN (1 << ES8388_DAC_DLL_PWD_SHIFT) + +#define ES8388_ADC_DLL_PWD_SHIFT (3) +#define ES8388_ADC_DLL_PWD_BITMASK (0x01 << ES8388_ADC_DLL_PWD_SHIFT) +#define ES8388_ADC_DLL_PWD_NORMAL (0 << ES8388_ADC_DLL_PWD_SHIFT) +#define ES8388_ADC_DLL_PWD_PWRDN (1 << ES8388_ADC_DLL_PWD_SHIFT) + +#define ES8388_MCLK_DIS_SHIFT (4) +#define ES8388_MCLK_DIS_BITMASK (0x01 << ES8388_MCLK_DIS_SHIFT) +#define ES8388_MCLK_DIS_NORMAL (0 << ES8388_MCLK_DIS_SHIFT) +#define ES8388_MCLK_DIS_DISABLE (1 << ES8388_MCLK_DIS_SHIFT) + +#define ES8388_OFFSET_DIS_SHIFT (5) +#define ES8388_OFFSET_DIS_BITMASK (0x01 << ES8388_OFFSET_DIS_SHIFT) +#define ES8388_OFFSET_DIS_DISABLE (0 << ES8388_OFFSET_DIS_SHIFT) +#define ES8388_OFFSET_DIS_ENABLE (1 << ES8388_OFFSET_DIS_SHIFT) + +#define ES8388_LRCK_SEL_SHIFT (6) +#define ES8388_LRCK_SEL_BITMASK (0x01 << ES8388_LRCK_SEL_SHIFT) +#define ES8388_LRCK_SEL_DAC (0 << ES8388_LRCK_SEL_SHIFT) +#define ES8388_LRCK_SEL_ADC (1 << ES8388_LRCK_SEL_SHIFT) + +#define ES8388_SLRCK_SHIFT (7) +#define ES8388_SLRCK_BITMASK (0x01 << ES8388_SLRCK_SHIFT) +#define ES8388_SLRCK_SEPARATE (0 << ES8388_SLRCK_SHIFT) +#define ES8388_SLRCK_SAME (1 << ES8388_SLRCK_SHIFT) + +/* 0x2c DAC Control 22 */ + +#define ES8388_OFFSET_SHIFT (0) +#define ES8388_OFFSET_BITMASK (0xff << ES8388_OFFSET_SHIFT) +#define ES8388_OFFSET(a) (a << ES8388_OFFSET_SHIFT) + +/* 0x2d DAC Control 23 */ + +#define ES8388_VROI_SHIFT (4) +#define ES8388_VROI_BITMASK (0x01 << ES8388_VROI_SHIFT) +#define ES8388_VROI_1_5K (0 << ES8388_VROI_SHIFT) +#define ES8388_VROI_40K (1 << ES8388_VROI_SHIFT) + +/* 0x2e DAC Control 24 */ + +#define ES8388_LOUT1VOL_SHIFT (0) +#define ES8388_LOUT1VOL_BITMASK (0x3f << ES8388_LOUT1VOL_SHIFT) +#define ES8388_LOUT1VOL(a) (a << ES8388_LOUT1VOL_SHIFT) + +/* 0x2f DAC Control 25 */ + +#define ES8388_ROUT1VOL_SHIFT (0) +#define ES8388_ROUT1VOL_BITMASK (0x3f << ES8388_ROUT1VOL_SHIFT) +#define ES8388_ROUT1VOL(a) (a << ES8388_ROUT1VOL_SHIFT) + +/* 0x30 DAC Control 26 */ + +#define ES8388_LOUT2VOL_SHIFT (0) +#define ES8388_LOUT2VOL_BITMASK (0x3f << ES8388_LOUT2VOL_SHIFT) +#define ES8388_LOUT2VOL(a) (a << ES8388_LOUT2VOL_SHIFT) + +/* 0x31 DAC Control 27 */ + +#define ES8388_ROUT2VOL_SHIFT (0) +#define ES8388_ROUT2VOL_BITMASK (0x3f << ES8388_ROUT2VOL_SHIFT) +#define ES8388_ROUT2VOL(a) (a << ES8388_ROUT2VOL_SHIFT) + +/* Codec Default Parameters *************************************************/ + +#define ES8388_DEFAULT_SAMPRATE 44100 +#define ES8388_DEFAULT_NCHANNELS 2 +#define ES8388_DEFAULT_BPSAMP 16 +#define ES8388_DEFAULT_VOL_OUT 250 +#define ES8388_DEFAULT_VOL_IN 1000 +#define ES8388_DEFAULT_BALANCE 500 +#define ES8388_DEFAULT_MUTE true +#define ES8388_DEFAULT_AUDIO_MODE ES_MODULE_ADC_DAC +#define ES8388_DEFAULT_DAC_OUTPUT ES8388_DAC_OUTPUT_ALL +#define ES8388_DEFAULT_ADC_INPUT ES8388_ADC_INPUT_LINE1 +#define ES8388_DEFAULT_MIC_GAIN ES_MIC_GAIN_24DB +#define ES8388_DEFAULT_MODE ES_MODE_SLAVE +#define ES8388_DEFAULT_FMT ES_I2S_NORMAL + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +typedef enum +{ + ES8388_DAC_OUTPUT_LINE1, + ES8388_DAC_OUTPUT_LINE2, + ES8388_DAC_OUTPUT_ALL, +} es8388_dac_output_e; + +typedef enum +{ + ES8388_ADC_INPUT_LINE1, + ES8388_ADC_INPUT_LINE2, + ES8388_ADC_INPUT_ALL, + ES8388_ADC_INPUT_DIFFERENCE, +} es8388_adc_input_e; + +typedef enum +{ + ES8388_MIXER_GAIN_6DB, + ES8388_MIXER_GAIN_3DB, + ES8388_MIXER_GAIN_0DB, + ES8388_MIXER_GAIN_N3DB, + ES8388_MIXER_GAIN_N6DB, + ES8388_MIXER_GAIN_N9DB, + ES8388_MIXER_GAIN_N12DB, + ES8388_MIXER_GAIN_N15DB, +} es8388_mixer_gain_e; + +typedef enum +{ + ES_WORD_LENGTH_16BITS = 0x03, + ES_WORD_LENGTH_18BITS = 0x02, + ES_WORD_LENGTH_20BITS = 0x01, + ES_WORD_LENGTH_24BITS = 0x00, + ES_WORD_LENGTH_32BITS = 0x04 +} es_word_length_e; + +typedef enum +{ + ES_MCLK_DIV_AUTO, + ES_MCLK_DIV_1, + ES_MCLK_DIV_2, + ES_MCLK_DIV_3, + ES_MCLK_DIV_4, + ES_MCLK_DIV_6, + ES_MCLK_DIV_8, + ES_MCLK_DIV_9, + ES_MCLK_DIV_11, + ES_MCLK_DIV_12, + ES_MCLK_DIV_16, + ES_MCLK_DIV_18, + ES_MCLK_DIV_22, + ES_MCLK_DIV_24, + ES_MCLK_DIV_33, + ES_MCLK_DIV_36, + ES_MCLK_DIV_44, + ES_MCLK_DIV_48, + ES_MCLK_DIV_66, + ES_MCLK_DIV_72, + ES_MCLK_DIV_5, + ES_MCLK_DIV_10, + ES_MCLK_DIV_15, + ES_MCLK_DIV_17, + ES_MCLK_DIV_20, + ES_MCLK_DIV_25, + ES_MCLK_DIV_30, + ES_MCLK_DIV_32, + ES_MCLK_DIV_34, + ES_MCLK_DIV_7, + ES_MCLK_DIV_13, + ES_MCLK_DIV_14 +} es_sclk_div_e; + +typedef enum +{ + ES_LCLK_DIV_128 = 0, + ES_LCLK_DIV_192 = 1, + ES_LCLK_DIV_256 = 2, + ES_LCLK_DIV_384 = 3, + ES_LCLK_DIV_512 = 4, + ES_LCLK_DIV_576 = 5, + ES_LCLK_DIV_768 = 6, + ES_LCLK_DIV_1024 = 7, + ES_LCLK_DIV_1152 = 8, + ES_LCLK_DIV_1408 = 9, + ES_LCLK_DIV_1536 = 10, + ES_LCLK_DIV_2112 = 11, + ES_LCLK_DIV_2304 = 12, + ES_LCLK_DIV_125 = 16, + ES_LCLK_DIV_136 = 17, + ES_LCLK_DIV_250 = 18, + ES_LCLK_DIV_272 = 19, + ES_LCLK_DIV_375 = 20, + ES_LCLK_DIV_500 = 21, + ES_LCLK_DIV_544 = 22, + ES_LCLK_DIV_750 = 23, + ES_LCLK_DIV_1000 = 24, + ES_LCLK_DIV_1088 = 25, + ES_LCLK_DIV_1496 = 26, + ES_LCLK_DIV_1500 = 27 +} es_lclk_div_e; + +typedef enum +{ + ES_D2SE_PGA_GAIN_DIS, + ES_D2SE_PGA_GAIN_EN +} es_d2se_pga_e; + +typedef enum +{ + ES_ADC_CHANNEL_LINPUT1_RINPUT1 = 0x00, + ES_ADC_CHANNEL_MIC1 = 0x05, + ES_ADC_CHANNEL_MIC2 = 0x06, + ES_ADC_CHANNEL_LINPUT2_RINPUT2 = 0x50, + ES_ADC_CHANNEL_DIFFERENCE = 0xf0 +} es_adc_channel_e; + +typedef enum +{ + ES_DAC_CHANNEL_LOUT1 = 0x04, + ES_DAC_CHANNEL_LOUT2 = 0x08, + ES_DAC_CHANNEL_SPK = 0x09, + ES_DAC_CHANNEL_ROUT1 = 0x10, + ES_DAC_CHANNEL_ROUT2 = 0x20, + ES_DAC_CHANNEL_ALL = 0x3c +} es_dac_channel_e; + +typedef enum +{ + ES_MIC_GAIN_0DB, + ES_MIC_GAIN_3DB, + ES_MIC_GAIN_6DB, + ES_MIC_GAIN_9DB, + ES_MIC_GAIN_12DB, + ES_MIC_GAIN_15DB, + ES_MIC_GAIN_18DB, + ES_MIC_GAIN_21DB, + ES_MIC_GAIN_24DB +} es_mic_gain_e; + +typedef enum +{ + ES_MODULE_ADC = 1, + ES_MODULE_DAC, + ES_MODULE_ADC_DAC, + ES_MODULE_LINE +} es_module_e; + +typedef enum +{ + ES_MODE_SLAVE, + ES_MODE_MASTER +} es_mode_e; + +typedef enum +{ + ES_I2S_NORMAL, + ES_I2S_LEFT, + ES_I2S_RIGHT, + ES_I2S_DSP +} es_i2s_fmt_e; + +/**************************************************************************** + * Class Definitions + ****************************************************************************/ + +class ES8388 +{ + private: + TwoWire* _i2c; /* The I2C bus */ + I2SClass* _i2s; /* The I2S bus */ + uint8_t _addr; /* The I2C address */ + es_i2s_fmt_e _fmt; /* The current I2S format */ + es_mode_e _mode; /* The current codec mode */ + uint32_t _samprate; /* Configured samprate (samples/sec) */ + uint16_t _balance; /* Current balance level {0..1000} */ + uint16_t _volume_out; /* Current output volume level {0..1000} */ + uint16_t _volume_in; /* Current input volume level {0..1000} */ + uint8_t _nchannels; /* Number of channels (1 or 2) */ + uint8_t _bpsamp; /* Bits per sample */ + bool _mute; /* True: Output is muted */ + es_module_e _audio_mode; /* The current audio mode of the ES8388 chip */ + es8388_dac_output_e _dac_output; /* The current output of the ES8388 DAC */ + es8388_adc_input_e _adc_input; /* The current input of the ES8388 ADC */ + es_mic_gain_e _mic_gain; /* The current microphone gain */ + bool _running; /* True: The ES8388 is running */ + es_lclk_div_e _lclk_div; /* The current LCLK divider */ + es_word_length_e _word_length; /* The current word length (enum of _bpsamp) */ + + void reset(); + void start(); + void stop(); + void setvolume(es_module_e module, uint16_t volume, uint16_t balance); + void setmute(es_module_e module, bool enable); + + public: + ~ES8388(); + bool begin(I2SClass& i2s, TwoWire& i2c = Wire, uint8_t addr = 0x10); + void end(); + void playWAV(uint8_t* data, size_t len); + uint8_t* recordWAV(size_t rec_seconds, size_t* out_size); + uint8_t readReg(uint8_t reg); + void writeReg(uint8_t reg, uint8_t data); + void setOutputVolume(uint16_t volume, uint16_t balance); + void setInputVolume(uint16_t volume, uint16_t balance); + void setOutputMute(bool enable); + void setInputMute(bool enable); + void setBitsPerSample(uint8_t bpsamp); + void setSampleRate(uint32_t rate); + void setMicGain(uint8_t gain); +}; diff --git a/libraries/ESP_I2S/examples/ES8388_loopback/ES8388_loopback.ino b/libraries/ESP_I2S/examples/ES8388_loopback/ES8388_loopback.ino new file mode 100644 index 00000000000..e709e7df428 --- /dev/null +++ b/libraries/ESP_I2S/examples/ES8388_loopback/ES8388_loopback.ino @@ -0,0 +1,86 @@ +/* + ESP32-LyraT I2S ES8388 loopback example + This simple example demonstrates using the I2S library in combination + with the ES8388 codec on the ESP32-LyraT board to record and play back + audio data. + + Don't forget to enable the PSRAM in the Tools menu! + + Created for arduino-esp32 on 20 Dec, 2023 + by Lucas Saavedra Vaz (lucasssvaz) +*/ + +#include "ESP_I2S.h" +#include "Wire.h" + +#include "ES8388.h" + +/* Pin definitions */ + +/* I2C */ +const uint8_t I2C_SCL = 23; +const uint8_t I2C_SDA = 18; +const uint32_t I2C_FREQ = 400000; + +/* I2S */ +const uint8_t I2S_MCLK = 0; /* Master clock */ +const uint8_t I2S_SCK = 5; /* Audio data bit clock */ +const uint8_t I2S_WS = 25; /* Audio data left and right clock */ +const uint8_t I2S_SDOUT = 26; /* ESP32 audio data output (to speakers) */ +const uint8_t I2S_SDIN = 35; /* ESP32 audio data input (from microphone) */ + +/* PA */ +const uint8_t PA_ENABLE = 21; /* Power amplifier enable */ + +void setup() { + I2SClass i2s; + ES8388 codec; + uint8_t *wav_buffer; + size_t wav_size; + + // Initialize the serial port + Serial.begin(115200); + while (!Serial) { delay(10); } + + pinMode(PA_ENABLE, OUTPUT); + digitalWrite(PA_ENABLE, HIGH); + + Serial.println("Initializing I2C bus..."); + + // Initialize the I2C bus + Wire.begin(I2C_SDA, I2C_SCL, I2C_FREQ); + + Serial.println("Initializing I2S bus..."); + + // Set up the pins used for audio input + i2s.setPins(I2S_SCK, I2S_WS, I2S_SDOUT, I2S_SDIN, I2S_MCLK); + + // Initialize the I2S bus in standard mode + if (!i2s.begin(I2S_MODE_STD, 44100, I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO, I2S_STD_SLOT_BOTH)) { + Serial.println("Failed to initialize I2S bus!"); + return; + } + + Serial.println("Initializing ES8388..."); + + if (!codec.begin(i2s)) { + Serial.println("Failed to initialize ES8388!"); + return; + } + + Serial.println("Recording 10 seconds of audio data..."); + + // Record 10 seconds of audio data + wav_buffer = codec.recordWAV(10, &wav_size); + + Serial.println("Recording complete. Playing audio data in 3 seconds."); + delay(3000); + + // Play the audio data + Serial.println("Playing audio data..."); + codec.playWAV(wav_buffer, wav_size); + + Serial.println("Application complete."); +} + +void loop() {} diff --git a/libraries/ESP_I2S/examples/Record_to_WAV/.skip.esp32c3 b/libraries/ESP_I2S/examples/Record_to_WAV/.skip.esp32c3 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/ESP_I2S/examples/Record_to_WAV/.skip.esp32c6 b/libraries/ESP_I2S/examples/Record_to_WAV/.skip.esp32c6 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/ESP_I2S/examples/Record_to_WAV/.skip.esp32h2 b/libraries/ESP_I2S/examples/Record_to_WAV/.skip.esp32h2 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/ESP_I2S/examples/Record_to_WAV/.skip.esp32s2 b/libraries/ESP_I2S/examples/Record_to_WAV/.skip.esp32s2 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/ESP_I2S/examples/Record_to_WAV/Record_to_WAV.ino b/libraries/ESP_I2S/examples/Record_to_WAV/Record_to_WAV.ino new file mode 100644 index 00000000000..6d3fe038b00 --- /dev/null +++ b/libraries/ESP_I2S/examples/Record_to_WAV/Record_to_WAV.ino @@ -0,0 +1,90 @@ +/* + ESP32-S2-EYE I2S record to WAV example + This simple example demonstrates using the I2S library to record + 5 seconds of audio data and write it to a WAV file on the SD card. + + Don't forget to select the OPI PSRAM, 8MB flash size and Enable USB CDC + on boot in the Tools menu! + + Created for arduino-esp32 on 18 Dec, 2023 + by Lucas Saavedra Vaz (lucasssvaz) +*/ + +#include "ESP_I2S.h" +#include "FS.h" +#include "SD_MMC.h" + +const uint8_t I2S_SCK = 41; +const uint8_t I2S_WS = 42; +const uint8_t I2S_DIN = 2; + +const uint8_t SD_CMD = 38; +const uint8_t SD_CLK = 39; +const uint8_t SD_DATA0 = 40; + +void setup() { + // Create an instance of the I2SClass + I2SClass i2s; + + // Create variables to store the audio data + uint8_t *wav_buffer; + size_t wav_size; + + // Initialize the serial port + Serial.begin(115200); + while (!Serial) { delay(10); } + + Serial.println("Initializing I2S bus..."); + + // Set up the pins used for audio input + i2s.setPins(I2S_SCK, I2S_WS, -1, I2S_DIN); + + // Initialize the I2S bus in standard mode + if (!i2s.begin(I2S_MODE_STD, 16000, I2S_DATA_BIT_WIDTH_32BIT, I2S_SLOT_MODE_MONO, I2S_STD_SLOT_LEFT)) { + Serial.println("Failed to initialize I2S bus!"); + return; + } + + Serial.println("I2S bus initialized."); + Serial.println("Initializing SD card..."); + + // Set up the pins used for SD card access + if (!SD_MMC.setPins(SD_CLK, SD_CMD, SD_DATA0)) { + Serial.println("Failed to set SD pins!"); + return; + } + + // Mount the SD card + if(!SD_MMC.begin("/sdcard", true)){ + Serial.println("Failed to initialize SD card!"); + return; + } + + Serial.println("SD card initialized."); + Serial.println("Recording 5 seconds of audio data..."); + + // Record 5 seconds of audio data + wav_buffer = i2s.recordWAV(5, &wav_size); + + // Create a file on the SD card + File file = SD_MMC.open("/test.wav", FILE_WRITE); + if (!file) { + Serial.println("Failed to open file for writing!"); + return; + } + + Serial.println("Writing audio data to file..."); + + // Write the audio data to the file + if (file.write(wav_buffer, wav_size) != wav_size) { + Serial.println("Failed to write audio data to file!"); + return; + } + + // Close the file + file.close(); + + Serial.println("Application complete."); +} + +void loop() {} diff --git a/libraries/ESP_I2S/examples/Simple_tone/Simple_tone.ino b/libraries/ESP_I2S/examples/Simple_tone/Simple_tone.ino new file mode 100644 index 00000000000..a9da190cf43 --- /dev/null +++ b/libraries/ESP_I2S/examples/Simple_tone/Simple_tone.ino @@ -0,0 +1,68 @@ +/* + This example generates a square wave based tone at a specified frequency + and sample rate. Then outputs the data using the I2S interface to a + MAX08357 I2S Amp Breakout board. + I2S Circuit: + * Arduino/Genuino Zero, MKR family and Nano 33 IoT + * MAX08357: + * GND connected GND + * VIN connected 5V + * LRC connected to pin 0 (Zero) or 3 (MKR), A2 (Nano) or 25 (ESP32) + * BCLK connected to pin 1 (Zero) or 2 (MKR), A3 (Nano) or 5 (ESP32) + * DIN connected to pin 9 (Zero) or A6 (MKR), 4 (Nano) or 26 (ESP32) + DAC Circuit: + * ESP32 or ESP32-S2 + * Audio amplifier + - Note: + - ESP32 has DAC on GPIO pins 25 and 26. + - ESP32-S2 has DAC on GPIO pins 17 and 18. + - Connect speaker(s) or headphones. + created 17 November 2016 + by Sandeep Mistry + For ESP extended + Tomas Pilny + 2nd September 2021 + Lucas Saavedra Vaz (lucasssvaz) + 22nd December 2023 + */ + +#include + +const int frequency = 440; // frequency of square wave in Hz +const int amplitude = 500; // amplitude of square wave +const int sampleRate = 8000; // sample rate in Hz + +i2s_data_bit_width_t bps = I2S_DATA_BIT_WIDTH_16BIT; +i2s_mode_t mode = I2S_MODE_STD; +i2s_slot_mode_t slot = I2S_SLOT_MODE_STEREO; + +const int halfWavelength = (sampleRate / frequency); // half wavelength of square wave + +int32_t sample = amplitude; // current sample value +int count = 0; + +I2SClass i2s; + +void setup() { + Serial.begin(115200); + Serial.println("I2S simple tone"); + + // start I2S at the sample rate with 16-bits per sample + if (!i2s.begin(mode, sampleRate, bps, slot)) { + Serial.println("Failed to initialize I2S!"); + while (1); // do nothing + } +} + +void loop() { + if (count % halfWavelength == 0 ) { + // invert the sample every half wavelength count multiple to generate square wave + sample = -1 * sample; + } + + i2s.write(sample); // Right channel + i2s.write(sample); // Left channel + + // increment the counter for the next sample + count++; +} From 7fbd9a163ce253f6b1e27a740bf558e03c9381fd Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Tue, 23 Jan 2024 11:52:10 +0100 Subject: [PATCH 07/34] Update LittleFS Platformio example (#9151) * rm not anymore needed `LittleFS Builder.py` * use custom partition scheme to guarantee a big enough SPIFFS partition scheme is used. --- .../LittleFS/examples/LITTLEFS_PlatformIO/littlefsbuilder.py | 2 -- .../LittleFS/examples/LITTLEFS_PlatformIO/platformio.ini | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 libraries/LittleFS/examples/LITTLEFS_PlatformIO/littlefsbuilder.py diff --git a/libraries/LittleFS/examples/LITTLEFS_PlatformIO/littlefsbuilder.py b/libraries/LittleFS/examples/LITTLEFS_PlatformIO/littlefsbuilder.py deleted file mode 100644 index 9cda26f5aba..00000000000 --- a/libraries/LittleFS/examples/LITTLEFS_PlatformIO/littlefsbuilder.py +++ /dev/null @@ -1,2 +0,0 @@ -Import("env") -env.Replace( MKFSTOOL=env.get("PROJECT_DIR") + '/mklittlefs' ) # PlatformIO now believes it has actually created a SPIFFS diff --git a/libraries/LittleFS/examples/LITTLEFS_PlatformIO/platformio.ini b/libraries/LittleFS/examples/LITTLEFS_PlatformIO/platformio.ini index 4d3087a3012..dce1ac84456 100644 --- a/libraries/LittleFS/examples/LITTLEFS_PlatformIO/platformio.ini +++ b/libraries/LittleFS/examples/LITTLEFS_PlatformIO/platformio.ini @@ -17,8 +17,6 @@ framework = arduino [env:esp32] platform = espressif32 board = esp32dev -;board_build.partitions = partitions_custom.csv +board_build.partitions = partitions_custom.csv monitor_filters = esp32_exception_decoder monitor_speed = 115200 - -extra_scripts = ./littlefsbuilder.py From 9258a8c0d44ca2fe79013dc5e64cefcbc7765759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Proch=C3=A1zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Tue, 23 Jan 2024 12:02:34 +0100 Subject: [PATCH 08/34] fix(component): Add license and switch include-exclude files (#9162) --- idf_component.yml | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/idf_component.yml b/idf_component.yml index cb56652e9ed..2188f0437dc 100644 --- a/idf_component.yml +++ b/idf_component.yml @@ -1,5 +1,6 @@ description: "Arduino core for ESP32, ESP32-S and ESP32-C series of SoCs" url: "https://github.com/espressif/arduino-esp32" +license: "LGPL-2.1" targets: - esp32 - esp32s2 @@ -12,7 +13,6 @@ tags: - arduino files: include: - - "cores/**/*" - "variants/esp32/**/*" - "variants/esp32s2/**/*" - "variants/esp32s3/**/*" @@ -20,11 +20,27 @@ files: - "variants/esp32c3/**/*" - "variants/esp32c6/**/*" - "variants/esp32h2/**/*" - - "libraries/**/*" - - "CMakeLists.txt" - - "Kconfig.projbuild" exclude: - - "**/*" + - "docs/" + - "docs/**/*" + - "idf_component_examples/" + - "idf_component_examples/**/*" + - "package/" + - "package/**/*" + - "tests/" + - "tests/**/*" + - "tools/" + - "tools/**/*" + - "variants/**/*" + - ".gitignore" + - ".gitmodules" + - ".readthedocs.yaml" + - "boards.txt" + - "CODE_OF_CONDUCT.md" + - "LICENSE.md" + - "package.json" + - "platform.txt" + - "programmers.txt" dependencies: idf: ">=5.1" # mdns 1.2.1 is necessary to build H2 with no WiFi @@ -66,5 +82,5 @@ dependencies: rules: - if: "target in [esp32s3]" examples: - - path: idf_component_examples/ + - path: ./idf_component_examples/Hello_world From d177e4446fc463030e28f1ba0a7009f97d26d5ed Mon Sep 17 00:00:00 2001 From: "Jeff H - openSAR.net" Date: Tue, 23 Jan 2024 04:10:21 -0800 Subject: [PATCH 09/34] Create new pins_arduino.h and update boards.txt to add Heltec Wireless Tracker board (#8725) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Create pins_arduino.h * Update boards.txt * Update boards.txt * "Addressed feedback from the review" * Update boards.txt * fix(): Remove unnecessary eraseflash + reorder * fix(heltec): Remove extra libs --------- Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com> --- boards.txt | 91 +++++++++++++++++-- .../heltec_wireless_tracker/pins_arduino.h | 30 +++--- 2 files changed, 96 insertions(+), 25 deletions(-) diff --git a/boards.txt b/boards.txt index 9830c45d443..5cc2bf42d81 100644 --- a/boards.txt +++ b/boards.txt @@ -20699,7 +20699,7 @@ heltec_wireless_tracker.upload.tool=esptool_py heltec_wireless_tracker.upload.tool.default=esptool_py heltec_wireless_tracker.upload.tool.network=esp_ota -heltec_wireless_tracker.upload.maximum_size=3342336 +heltec_wireless_tracker.upload.maximum_size=1310720 heltec_wireless_tracker.upload.maximum_data_size=327680 heltec_wireless_tracker.upload.flags= heltec_wireless_tracker.upload.extra_flags= @@ -20722,16 +20722,58 @@ heltec_wireless_tracker.build.cdc_on_boot=0 heltec_wireless_tracker.build.msc_on_boot=0 heltec_wireless_tracker.build.dfu_on_boot=0 heltec_wireless_tracker.build.f_cpu=240000000L -heltec_wireless_tracker.build.flash_size=8MB +heltec_wireless_tracker.build.flash_size=4MB heltec_wireless_tracker.build.flash_freq=80m heltec_wireless_tracker.build.flash_mode=dio heltec_wireless_tracker.build.boot=qio heltec_wireless_tracker.build.boot_freq=80m -heltec_wireless_tracker.build.partitions=default_8MB +heltec_wireless_tracker.build.partitions=default heltec_wireless_tracker.build.loop_core= heltec_wireless_tracker.build.event_core= heltec_wireless_tracker.build.psram_type=qspi heltec_wireless_tracker.build.memory_type={build.boot}_{build.psram_type} +heltec_wireless_tracker.build.defines=-D{build.band} {build.psram_val} -DLoRaWAN_DEBUG_LEVEL={build.LoRaWanDebugLevel} -DACTIVE_REGION=LORAMAC_{build.band} -DLORAWAN_PREAMBLE_LENGTH={build.LORAWAN_PREAMBLE_LENGTH} -DLORAWAN_DEVEUI_AUTO={build.LORAWAN_DEVEUI_AUTO} -D{build.board} + +heltec_wireless_tracker.menu.PSRAM.disabled=Disabled +heltec_wireless_tracker.menu.PSRAM.disabled.build.psram_val= +heltec_wireless_tracker.menu.PSRAM.disabled.build.psram_type=qspi +heltec_wireless_tracker.menu.PSRAM.enabled=QSPI PSRAM +heltec_wireless_tracker.menu.PSRAM.enabled.build.psram_val=-DBOARD_HAS_PSRAM +heltec_wireless_tracker.menu.PSRAM.enabled.build.psram_type=qspi +heltec_wireless_tracker.menu.PSRAM.opi=OPI PSRAM +heltec_wireless_tracker.menu.PSRAM.opi.build.psram_val=-DBOARD_HAS_PSRAM +heltec_wireless_tracker.menu.PSRAM.opi.build.psram_type=opi + +heltec_wireless_tracker.menu.FlashMode.qio=QIO 80MHz +heltec_wireless_tracker.menu.FlashMode.qio.build.flash_mode=dio +heltec_wireless_tracker.menu.FlashMode.qio.build.boot=qio +heltec_wireless_tracker.menu.FlashMode.qio.build.boot_freq=80m +heltec_wireless_tracker.menu.FlashMode.qio.build.flash_freq=80m +heltec_wireless_tracker.menu.FlashMode.qio120=QIO 120MHz +heltec_wireless_tracker.menu.FlashMode.qio120.build.flash_mode=dio +heltec_wireless_tracker.menu.FlashMode.qio120.build.boot=qio +heltec_wireless_tracker.menu.FlashMode.qio120.build.boot_freq=120m +heltec_wireless_tracker.menu.FlashMode.qio120.build.flash_freq=80m +heltec_wireless_tracker.menu.FlashMode.dio=DIO 80MHz +heltec_wireless_tracker.menu.FlashMode.dio.build.flash_mode=dio +heltec_wireless_tracker.menu.FlashMode.dio.build.boot=dio +heltec_wireless_tracker.menu.FlashMode.dio.build.boot_freq=80m +heltec_wireless_tracker.menu.FlashMode.dio.build.flash_freq=80m +heltec_wireless_tracker.menu.FlashMode.opi=OPI 80MHz +heltec_wireless_tracker.menu.FlashMode.opi.build.flash_mode=dout +heltec_wireless_tracker.menu.FlashMode.opi.build.boot=opi +heltec_wireless_tracker.menu.FlashMode.opi.build.boot_freq=80m +heltec_wireless_tracker.menu.FlashMode.opi.build.flash_freq=80m + +heltec_wireless_tracker.menu.FlashSize.4M=4MB (32Mb) +heltec_wireless_tracker.menu.FlashSize.4M.build.flash_size=4MB +heltec_wireless_tracker.menu.FlashSize.8M=8MB (64Mb) +heltec_wireless_tracker.menu.FlashSize.8M.build.flash_size=8MB +heltec_wireless_tracker.menu.FlashSize.8M.build.partitions=default_8MB +heltec_wireless_tracker.menu.FlashSize.16M=16MB (128Mb) +heltec_wireless_tracker.menu.FlashSize.16M.build.flash_size=16MB +#heltec_wireless_tracker.menu.FlashSize.32M=32MB (256Mb) +#heltec_wireless_tracker.menu.FlashSize.32M.build.flash_size=32MB heltec_wireless_tracker.menu.LoopCore.1=Core 1 heltec_wireless_tracker.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 @@ -20748,8 +20790,8 @@ heltec_wireless_tracker.menu.USBMode.hwcdc.build.usb_mode=1 heltec_wireless_tracker.menu.USBMode.default=USB-OTG (TinyUSB) heltec_wireless_tracker.menu.USBMode.default.build.usb_mode=0 -heltec_wireless_tracker.menu.CDCOnBoot.default=Enabled -heltec_wireless_tracker.menu.CDCOnBoot.default.build.cdc_on_boot=1 +heltec_wireless_tracker.menu.CDCOnBoot.default=Disabled +heltec_wireless_tracker.menu.CDCOnBoot.default.build.cdc_on_boot=0 heltec_wireless_tracker.menu.CDCOnBoot.cdc=Enabled heltec_wireless_tracker.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 @@ -20770,6 +20812,43 @@ heltec_wireless_tracker.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB) heltec_wireless_tracker.menu.UploadMode.cdc.upload.use_1200bps_touch=true heltec_wireless_tracker.menu.UploadMode.cdc.upload.wait_for_upload_port=true +heltec_wireless_tracker.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +heltec_wireless_tracker.menu.PartitionScheme.default.build.partitions=default +heltec_wireless_tracker.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +heltec_wireless_tracker.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +heltec_wireless_tracker.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT) +heltec_wireless_tracker.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +heltec_wireless_tracker.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +heltec_wireless_tracker.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +heltec_wireless_tracker.menu.PartitionScheme.minimal.build.partitions=minimal +heltec_wireless_tracker.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +heltec_wireless_tracker.menu.PartitionScheme.no_ota.build.partitions=no_ota +heltec_wireless_tracker.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +heltec_wireless_tracker.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +heltec_wireless_tracker.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +heltec_wireless_tracker.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +heltec_wireless_tracker.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +heltec_wireless_tracker.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +heltec_wireless_tracker.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +heltec_wireless_tracker.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +heltec_wireless_tracker.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +heltec_wireless_tracker.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +heltec_wireless_tracker.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +heltec_wireless_tracker.menu.PartitionScheme.huge_app.build.partitions=huge_app +heltec_wireless_tracker.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +heltec_wireless_tracker.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +heltec_wireless_tracker.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +heltec_wireless_tracker.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +heltec_wireless_tracker.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT) +heltec_wireless_tracker.menu.PartitionScheme.fatflash.build.partitions=ffat +heltec_wireless_tracker.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +heltec_wireless_tracker.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS) +heltec_wireless_tracker.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +heltec_wireless_tracker.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 +heltec_wireless_tracker.menu.PartitionScheme.rainmaker=RainMaker +heltec_wireless_tracker.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +heltec_wireless_tracker.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 + heltec_wireless_tracker.menu.CPUFreq.240=240MHz (WiFi) heltec_wireless_tracker.menu.CPUFreq.240.build.f_cpu=240000000L heltec_wireless_tracker.menu.CPUFreq.160=160MHz (WiFi) @@ -20851,8 +20930,6 @@ heltec_wireless_tracker.menu.LORAWAN_PREAMBLE_LENGTH.0.build.LORAWAN_PREAMBLE_LE heltec_wireless_tracker.menu.LORAWAN_PREAMBLE_LENGTH.1=16(For M00 and M00L) heltec_wireless_tracker.menu.LORAWAN_PREAMBLE_LENGTH.1.build.LORAWAN_PREAMBLE_LENGTH=16 -heltec_wireless_tracker.build.defines=-D{build.band} -DLoRaWAN_DEBUG_LEVEL={build.LoRaWanDebugLevel} -DACTIVE_REGION=LORAMAC_{build.band} -DLORAWAN_PREAMBLE_LENGTH={build.LORAWAN_PREAMBLE_LENGTH} -DLORAWAN_DEVEUI_AUTO={build.LORAWAN_DEVEUI_AUTO} -D{build.board} - heltec_wireless_tracker.menu.EraseFlash.none=Disabled heltec_wireless_tracker.menu.EraseFlash.none.upload.erase_cmd= heltec_wireless_tracker.menu.EraseFlash.all=Enabled diff --git a/variants/heltec_wireless_tracker/pins_arduino.h b/variants/heltec_wireless_tracker/pins_arduino.h index 8c05fb57dcb..d8a759a094c 100644 --- a/variants/heltec_wireless_tracker/pins_arduino.h +++ b/variants/heltec_wireless_tracker/pins_arduino.h @@ -4,24 +4,23 @@ #include #include "soc/soc_caps.h" -#define WIRELESS_TRACKER true - -#define DISPLAY_HEIGHT 80 -#define DISPLAY_WIDTH 160 - #define USB_VID 0x303a #define USB_PID 0x1001 -static const uint8_t LED_BUILTIN = 18; +// Some boards have too low voltage on this pin (board design bug) +// Use different pin with 3V and connect with 48 +// and change this setup for the chosen pin (for example 38) +static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+48; #define BUILTIN_LED LED_BUILTIN // backward compatibility -#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN - +#define LED_BUILTIN LED_BUILTIN +#define RGB_BUILTIN LED_BUILTIN +#define RGB_BRIGHTNESS 64 static const uint8_t TX = 43; static const uint8_t RX = 44; -static const uint8_t SDA = 5; -static const uint8_t SCL = 6; +static const uint8_t SDA = 41; +static const uint8_t SCL = 42; static const uint8_t SS = 8; static const uint8_t MOSI = 10; @@ -66,12 +65,7 @@ static const uint8_t T14 = 14; static const uint8_t Vext = 3; static const uint8_t LED = 18; - -static const uint8_t ST7735_CS_PIN = 38; -static const uint8_t ST7735_RST_PIN = 39; -static const uint8_t ST7735_DC_PIN = 40; -static const uint8_t ST7735_SCLK_PIN = 41; -static const uint8_t ST7735_MOSI_PIN = 42; -static const uint8_t ST7735_LED_K_PIN = 21; - +static const uint8_t RST_OLED = 39; +static const uint8_t SCL_OLED = 41; +static const uint8_t SDA_OLED = 42; #endif /* Pins_Arduino_h */ From 23c6779d87bc9d237d306943511e540b847aca4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Proch=C3=A1zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Tue, 23 Jan 2024 13:10:43 +0100 Subject: [PATCH 10/34] fix(i2c): Moved i2c pins out of CONFIG_DISABLE_HAL_LOCKS (#9164) --- cores/esp32/esp32-hal-i2c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cores/esp32/esp32-hal-i2c.c b/cores/esp32/esp32-hal-i2c.c index e70428ac5bc..b76fa963e81 100644 --- a/cores/esp32/esp32-hal-i2c.c +++ b/cores/esp32/esp32-hal-i2c.c @@ -42,9 +42,10 @@ typedef volatile struct { uint32_t frequency; #if !CONFIG_DISABLE_HAL_LOCKS SemaphoreHandle_t lock; +#endif int8_t scl; int8_t sda; -#endif + } i2c_bus_t; static i2c_bus_t bus[SOC_I2C_NUM]; From e73af48e22e4c232f4cf7117fab40934fbdbf3cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Andr=C3=A1ssy?= <10706773+JAndrassy@users.noreply.github.com> Date: Tue, 23 Jan 2024 13:54:54 +0100 Subject: [PATCH 11/34] Revert "undeprecate available() (#9027)" (#9165) This reverts commit 5d97e02ad777100430dd443ac3e3458e5d5f72df. --- libraries/WiFi/src/WiFiServer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/WiFi/src/WiFiServer.h b/libraries/WiFi/src/WiFiServer.h index 5a022d14829..2c2ebc0b8f2 100644 --- a/libraries/WiFi/src/WiFiServer.h +++ b/libraries/WiFi/src/WiFiServer.h @@ -44,7 +44,7 @@ class WiFiServer : public Server { log_v("WiFiServer::WiFiServer(addr=%s, port=%d, ...)", addr.toString().c_str(), port); } ~WiFiServer(){ end();} - WiFiClient available(); + WiFiClient available() __attribute__((deprecated("Renamed to accept()."))); WiFiClient accept(); void begin(uint16_t port=0); void begin(uint16_t port, int reuse_enable); From 39043b8586cbdb5ce66857758226d6a329eaf450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Andr=C3=A1ssy?= <10706773+JAndrassy@users.noreply.github.com> Date: Tue, 23 Jan 2024 14:05:12 +0100 Subject: [PATCH 12/34] WiFiServer - don't inherit from Print and Server (#8930) because print-to-all-clients is not implemented Co-authored-by: Rodrigo Garcia Co-authored-by: Me No Dev --- libraries/WiFi/src/WiFiServer.cpp | 6 ------ libraries/WiFi/src/WiFiServer.h | 8 +------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/libraries/WiFi/src/WiFiServer.cpp b/libraries/WiFi/src/WiFiServer.cpp index 9d79b5f7c46..2e8dcc9e350 100644 --- a/libraries/WiFi/src/WiFiServer.cpp +++ b/libraries/WiFi/src/WiFiServer.cpp @@ -32,12 +32,6 @@ int WiFiServer::setTimeout(uint32_t seconds){ return setsockopt(sockfd, SOL_SOCKET, SO_SNDTIMEO, (char *)&tv, sizeof(struct timeval)); } -size_t WiFiServer::write(const uint8_t *data, size_t len){ - return 0; -} - -void WiFiServer::stopAll(){} - WiFiClient WiFiServer::available(){ return accept(); } diff --git a/libraries/WiFi/src/WiFiServer.h b/libraries/WiFi/src/WiFiServer.h index 2c2ebc0b8f2..bef9b9b1e3b 100644 --- a/libraries/WiFi/src/WiFiServer.h +++ b/libraries/WiFi/src/WiFiServer.h @@ -24,7 +24,7 @@ #include "WiFiClient.h" #include "IPAddress.h" -class WiFiServer : public Server { +class WiFiServer { private: int sockfd; int _accepted_sockfd = -1; @@ -51,18 +51,12 @@ class WiFiServer : public Server { void setNoDelay(bool nodelay); bool getNoDelay(); bool hasClient(); - size_t write(const uint8_t *data, size_t len); - size_t write(uint8_t data){ - return write(&data, 1); - } - using Print::write; void end(); void close(); void stop(); operator bool(){return _listening;} int setTimeout(uint32_t seconds); - void stopAll(); }; #endif /* _WIFISERVER_H_ */ From cceebb58f170c34a2356f0d22106dd6f0d141023 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Tue, 23 Jan 2024 11:28:30 -0300 Subject: [PATCH 13/34] Improves WiFiMulti (#9139) * feat(wifi): Improves WiFiMulti * fix(wifi): Fixes Initialization of Security Mode * feat(wifi): simplifies the example by using HTTPClient * fix(WiFi): fixes a type in the commentaries --- .../examples/WiFiMultiAdvanced/.skip.esp32h2 | 0 .../WiFiMultiAdvanced/WiFiMultiAdvanced.ino | 64 ++++++++ libraries/WiFi/src/WiFiMulti.cpp | 145 ++++++++++++++---- libraries/WiFi/src/WiFiMulti.h | 30 +++- 4 files changed, 211 insertions(+), 28 deletions(-) create mode 100644 libraries/WiFi/examples/WiFiMultiAdvanced/.skip.esp32h2 create mode 100644 libraries/WiFi/examples/WiFiMultiAdvanced/WiFiMultiAdvanced.ino diff --git a/libraries/WiFi/examples/WiFiMultiAdvanced/.skip.esp32h2 b/libraries/WiFi/examples/WiFiMultiAdvanced/.skip.esp32h2 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/WiFi/examples/WiFiMultiAdvanced/WiFiMultiAdvanced.ino b/libraries/WiFi/examples/WiFiMultiAdvanced/WiFiMultiAdvanced.ino new file mode 100644 index 00000000000..55a3e4d49a6 --- /dev/null +++ b/libraries/WiFi/examples/WiFiMultiAdvanced/WiFiMultiAdvanced.ino @@ -0,0 +1,64 @@ +/* + * This sketch tries to connect to the best AP available + * and tests for captive portals on open networks + * + */ + +#include +#include +#include + +WiFiMulti wifiMulti; + +// callback used to check Internet connectivity +bool testConnection(){ + HTTPClient http; + http.begin("http://www.espressif.com"); + int httpCode = http.GET(); + // we expect to get a 301 because it will ask to use HTTPS instead of HTTP + if (httpCode == HTTP_CODE_MOVED_PERMANENTLY) return true; + return false; +} + +void setup() +{ + Serial.begin(115200); + delay(10); + + wifiMulti.addAP("ssid_from_AP_1", "your_password_for_AP_1"); + wifiMulti.addAP("ssid_from_AP_2", "your_password_for_AP_2"); + wifiMulti.addAP("ssid_from_AP_3", "your_password_for_AP_3"); + + // These options can help when you need ANY kind of wifi connection to get a config file, report errors, etc. + wifiMulti.setStrictMode(false); // Default is true. Library will disconnect and forget currently connected AP if it's not in the AP list. + wifiMulti.setAllowOpenAP(true); // Default is false. True adds open APs to the AP list. + wifiMulti.setConnectionTestCallbackFunc(testConnection); // Attempts to connect to a remote webserver in case of captive portals. + + Serial.println("Connecting Wifi..."); + if(wifiMulti.run() == WL_CONNECTED) { + Serial.println(""); + Serial.println("WiFi connected"); + Serial.println("IP address: "); + Serial.println(WiFi.localIP()); + } +} + +void loop() +{ + static bool isConnected = false; + uint8_t WiFiStatus = wifiMulti.run(); + + if (WiFiStatus == WL_CONNECTED) { + if (!isConnected) { + Serial.println(""); + Serial.println("WiFi connected"); + Serial.println("IP address: "); + Serial.println(WiFi.localIP()); + } + isConnected = true; + } else { + Serial.println("WiFi not connected!"); + isConnected = false; + delay(5000); + } +} diff --git a/libraries/WiFi/src/WiFiMulti.cpp b/libraries/WiFi/src/WiFiMulti.cpp index 22ec1ea46f9..b0de3a44484 100644 --- a/libraries/WiFi/src/WiFiMulti.cpp +++ b/libraries/WiFi/src/WiFiMulti.cpp @@ -33,10 +33,9 @@ WiFiMulti::WiFiMulti() ipv6_support = false; } -WiFiMulti::~WiFiMulti() +void WiFiMulti::APlistClean(void) { - for(uint32_t i = 0; i < APlist.size(); i++) { - WifiAPlist_t entry = APlist[i]; + for(auto entry : APlist) { if(entry.ssid) { free(entry.ssid); } @@ -47,17 +46,22 @@ WiFiMulti::~WiFiMulti() APlist.clear(); } +WiFiMulti::~WiFiMulti() +{ + APlistClean(); +} + bool WiFiMulti::addAP(const char* ssid, const char *passphrase) { WifiAPlist_t newAP; - if(!ssid || *ssid == 0x00 || strlen(ssid) > 31) { + if(!ssid || *ssid == '\0' || strlen(ssid) > 31) { // fail SSID too long or missing! log_e("[WIFI][APlistAdd] no ssid or ssid too long"); return false; } - if(passphrase && strlen(passphrase) > 64) { + if(passphrase && strlen(passphrase) > 63) { // fail passphrase too long! log_e("[WIFI][APlistAdd] passphrase too long"); return false; @@ -70,7 +74,7 @@ bool WiFiMulti::addAP(const char* ssid, const char *passphrase) return false; } - if(passphrase && *passphrase != 0x00) { + if(passphrase && *passphrase != '\0') { newAP.passphrase = strdup(passphrase); if(!newAP.passphrase) { log_e("[WIFI][APlistAdd] fail newAP.passphrase == 0"); @@ -80,7 +84,7 @@ bool WiFiMulti::addAP(const char* ssid, const char *passphrase) } else { newAP.passphrase = NULL; } - + newAP.hasFailed = false; APlist.push_back(newAP); log_i("[WIFI][APlistAdd] add SSID: %s", newAP.ssid); return true; @@ -91,9 +95,20 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout) int8_t scanResult; uint8_t status = WiFi.status(); if(status == WL_CONNECTED) { - for(uint32_t x = 0; x < APlist.size(); x++) { - if(WiFi.SSID()==APlist[x].ssid) { + if (!_bWFMInit && _connectionTestCBFunc != NULL){ + if (_connectionTestCBFunc() == true) { + _bWFMInit = true; + return status; + } + } else { + if (!_bStrict) { return status; + } else { + for(auto ap : APlist) { + if(WiFi.SSID() == ap.ssid) { + return status; + } + } } } WiFi.disconnect(false,false); @@ -102,22 +117,27 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout) } scanResult = WiFi.scanNetworks(); - if(scanResult == WIFI_SCAN_RUNNING) { + if (scanResult == WIFI_SCAN_RUNNING) { // scan is running return WL_NO_SSID_AVAIL; - } else if(scanResult >= 0) { + } else if (scanResult >= 0) { // scan done analyze - WifiAPlist_t bestNetwork { NULL, NULL }; + int32_t bestIndex = 0; + WifiAPlist_t bestNetwork { NULL, NULL, false }; int bestNetworkDb = INT_MIN; + int bestNetworkSec = WIFI_AUTH_MAX; uint8_t bestBSSID[6]; int32_t bestChannel = 0; log_i("[WIFI] scan done"); - if(scanResult == 0) { + if (scanResult == 0) { log_e("[WIFI] no networks found"); } else { log_i("[WIFI] %d networks found", scanResult); + + int8_t failCount = 0; + int8_t foundCount = 0; for(int8_t i = 0; i < scanResult; ++i) { String ssid_scan; @@ -127,22 +147,47 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout) int32_t chan_scan; WiFi.getNetworkInfo(i, ssid_scan, sec_scan, rssi_scan, BSSID_scan, chan_scan); + // add any Open WiFi AP to the list, if allowed with setAllowOpenAP(true) + if (_bAllowOpenAP && sec_scan == WIFI_AUTH_OPEN){ + bool found = false; + for(auto check : APlist) { + if (ssid_scan == check.ssid){ + found = true; + break; + } + } + // If we didn't find it, add this Open WiFi AP to the list + if (!found){ + log_i("[WIFI][APlistAdd] adding Open WiFi SSID: %s", ssid_scan.c_str()); + addAP(ssid_scan.c_str()); + } + } bool known = false; - for(uint32_t x = APlist.size() ; x > 0; x--) { - WifiAPlist_t entry = APlist[x-1]; + for(uint32_t x = 0; x < APlist.size(); x++) { + WifiAPlist_t entry = APlist[x]; if(ssid_scan == entry.ssid) { // SSID match - known = true; - if(rssi_scan > bestNetworkDb) { // best network - if(sec_scan == WIFI_AUTH_OPEN || entry.passphrase) { // check for passphrase if not open wlan - bestNetworkDb = rssi_scan; - bestChannel = chan_scan; - memcpy((void*) &bestNetwork, (void*) &entry, sizeof(bestNetwork)); - memcpy((void*) &bestBSSID, (void*) BSSID_scan, sizeof(bestBSSID)); + log_v("known ssid: %s, has failed: %s", entry.ssid, entry.hasFailed ? "yes" : "no"); + foundCount++; + if (!entry.hasFailed){ + known = true; + log_v("rssi_scan: %d, bestNetworkDb: %d", rssi_scan, bestNetworkDb); + if(rssi_scan > bestNetworkDb) { // best network + if(_bAllowOpenAP || (sec_scan == WIFI_AUTH_OPEN || entry.passphrase)) { // check for passphrase if not open wlan + log_v("best network is now: %s", ssid_scan); + bestIndex = x; + bestNetworkSec = sec_scan; + bestNetworkDb = rssi_scan; + bestChannel = chan_scan; + memcpy((void*) &bestNetwork, (void*) &entry, sizeof(bestNetwork)); + memcpy((void*) &bestBSSID, (void*) BSSID_scan, sizeof(bestBSSID)); + } } + break; + } else { + failCount++; } - break; } } @@ -152,8 +197,12 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout) log_d(" %d: [%d][%02X:%02X:%02X:%02X:%02X:%02X] %s (%d) %c", i, chan_scan, BSSID_scan[0], BSSID_scan[1], BSSID_scan[2], BSSID_scan[3], BSSID_scan[4], BSSID_scan[5], ssid_scan.c_str(), rssi_scan, (sec_scan == WIFI_AUTH_OPEN) ? ' ' : '*'); } } + log_v("foundCount = %d, failCount = %d", foundCount, failCount); + // if all the APs in the list have failed, reset the failure flags + if (foundCount == failCount) { + resetFails(); // keeps trying the APs in the list + } } - // clean up ram WiFi.scanDelete(); @@ -163,12 +212,15 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout) if (ipv6_support == true) { WiFi.enableIPv6(); } - WiFi.begin(bestNetwork.ssid, bestNetwork.passphrase, bestChannel, bestBSSID); + WiFi.disconnect(); + delay(10); + WiFi.begin(bestNetwork.ssid, (_bAllowOpenAP && bestNetworkSec == WIFI_AUTH_OPEN) ? NULL : bestNetwork.passphrase, bestChannel, bestBSSID); status = WiFi.status(); + _bWFMInit = true; auto startTime = millis(); // wait for connection, fail, or timeout - while(status != WL_CONNECTED && status != WL_NO_SSID_AVAIL && status != WL_CONNECT_FAILED && (millis() - startTime) <= connectTimeout) { + while(status != WL_CONNECTED && (millis() - startTime) <= connectTimeout) { // && status != WL_NO_SSID_AVAIL && status != WL_CONNECT_FAILED delay(10); status = WiFi.status(); } @@ -180,15 +232,32 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout) log_d("[WIFI] IP: %s", WiFi.localIP().toString().c_str()); log_d("[WIFI] MAC: %s", WiFi.BSSIDstr().c_str()); log_d("[WIFI] Channel: %d", WiFi.channel()); + + if (_connectionTestCBFunc != NULL) { + // We connected to an AP but if it's a captive portal we're not going anywhere. Test it. + if (_connectionTestCBFunc()) { + resetFails(); + } else { + markAsFailed(bestIndex); + WiFi.disconnect(); + delay(10); + status = WiFi.status(); + } + } else { + resetFails(); + } break; case WL_NO_SSID_AVAIL: log_e("[WIFI] Connecting Failed AP not found."); + markAsFailed(bestIndex); break; case WL_CONNECT_FAILED: log_e("[WIFI] Connecting Failed."); + markAsFailed(bestIndex); break; default: log_e("[WIFI] Connecting Failed (%d).", status); + markAsFailed(bestIndex); break; } } else { @@ -210,3 +279,27 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout) void WiFiMulti::enableIPv6(bool state) { ipv6_support = state; } + +void WiFiMulti::markAsFailed(int32_t i) { + APlist[i].hasFailed = true; + log_d("[WIFI] Marked SSID %s as failed", APlist[i].ssid); +} + +void WiFiMulti::resetFails(){ + for(uint32_t i = 0; i < APlist.size(); i++) { + APlist[i].hasFailed = false; + } + log_d("[WIFI] Resetting failure flags"); +} + +void WiFiMulti::setStrictMode(bool bStrict) { + _bStrict = bStrict; +} + +void WiFiMulti::setAllowOpenAP(bool bAllowOpenAP) { + _bAllowOpenAP = bAllowOpenAP; +} + +void WiFiMulti::setConnectionTestCallbackFunc(ConnectionTestCB_t cbFunc) { + _connectionTestCBFunc = cbFunc; +} diff --git a/libraries/WiFi/src/WiFiMulti.h b/libraries/WiFi/src/WiFiMulti.h index d8551fab9dd..75a40c87679 100644 --- a/libraries/WiFi/src/WiFiMulti.h +++ b/libraries/WiFi/src/WiFiMulti.h @@ -32,8 +32,11 @@ typedef struct { char * ssid; char * passphrase; + bool hasFailed; } WifiAPlist_t; +typedef std::function ConnectionTestCB_t; + class WiFiMulti { public: @@ -41,13 +44,36 @@ class WiFiMulti ~WiFiMulti(); bool addAP(const char* ssid, const char *passphrase = NULL); - - void enableIPv6(bool state); uint8_t run(uint32_t connectTimeout=5000); + void enableIPv6(bool state); + + // Force (default: true) to only keep connected or to connect to an AP from the provided WiFiMulti list. + // When bStrict is false, it will keep the last/current connected AP even if not in the WiFiMulti List. + void setStrictMode(bool bStrict = true); + + // allows (true) to connect to ANY open AP, even if not in the user list + // default false (do not connect to an open AP that has not been explicitaly added by the user to list) + void setAllowOpenAP(bool bAllowOpenAP = false); + + // clears the current list of Multi APs and frees the memory + void APlistClean(void); + + // allow the user to define a callback function that will validate the connection to the Internet. + // if the callback returns true, the connection is considered valid and the AP will added to the validated AP list. + // set the callback to NULL to disable the feature and validate any SSID that is in the list. + void setConnectionTestCallbackFunc(ConnectionTestCB_t cbFunc); private: std::vector APlist; bool ipv6_support; + + bool _bStrict = true; + bool _bAllowOpenAP = false; + ConnectionTestCB_t _connectionTestCBFunc = NULL; + bool _bWFMInit = false; + + void markAsFailed(int32_t i); + void resetFails(); }; #endif /* WIFICLIENTMULTI_H_ */ From 7966f4ae7966855359db7c4c6178955745cffd2c Mon Sep 17 00:00:00 2001 From: safocl Date: Wed, 31 Jan 2024 14:50:35 +0400 Subject: [PATCH 14/34] Fix ambiguous for TwoWire::requestFrom() methods and align API with Arduino.cc (#8817) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix ambiguous for TwoWire::requestFrom() methods. * Remove TwoWire::begin(int) overload Inside the function, this overload truncated the data type to a shorter one. This could break some users' hopes. * Rewrite TwoWire with using HardwareI2C - implement proposal https://github.com/espressif/arduino-esp32/pull/8818#issuecomment-1792191815 to bring the HARDWARE interface into compliance * Fix TwoWire::end() return type. * Fix TwoWire::setClock() return type. * Fix no return statement in the TwoWire::requestFrom. * fix(libraries/Wire): fix bad return-statement Remove non-void values of the return-statements in function returning 'void'. * style(libraries/Wire): replace tabs with spaces * refactor(libraries/Wire): use slave without support TwoWire::begin(uint8_t address) should be available without slave support by SoC? * refactor(libraries/Wire): remove unused variables Compiler reports "Wire.cpp:393:15: error: variable 'err' set but not used [-Werror=unused-but-set-variable]". * refactor(libraries/Wire): remove unused variables Compiler reports "Wire.cpp:337:15: error: variable 'err' set but not used [-Werror=unused-but-set-variable]". * fix(libraries/Wire): hide slave support elements TwoWire::user_onRequest is used only in conjunction with slave support? * refactor(libraries/Wire): remove temporary comment * fix(libraries/Wire): restore an accidentally deleted implementation TwoWire::endTransmission() was accidentally deleted from a cpp file. * refactor(libraries/Wire): return return types In TwoWire class return return types. * fix(libraries/Wire): fix return type * refactor(libraries/Wire): add return statement if slave isn't supported Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com> * refactor(libraries/Wire): fix indentation Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com> * refactor(libraries/Wire): fix indentation Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com> * refactor(libraries/Wire): fix indentation Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com> * refactor(libraries/Wire): remove unnecessary empty lines --------- Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com> --- cores/esp32/HardwareI2C.h | 42 ++++++++++++++ libraries/Wire/src/Wire.cpp | 97 +++++++++----------------------- libraries/Wire/src/Wire.h | 107 ++++++++++++++---------------------- 3 files changed, 109 insertions(+), 137 deletions(-) create mode 100644 cores/esp32/HardwareI2C.h diff --git a/cores/esp32/HardwareI2C.h b/cores/esp32/HardwareI2C.h new file mode 100644 index 00000000000..830c24a80d6 --- /dev/null +++ b/cores/esp32/HardwareI2C.h @@ -0,0 +1,42 @@ +/* + Copyright (c) 2016 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include "Stream.h" + +class HardwareI2C : public Stream +{ + public: + virtual bool begin() = 0; + virtual bool begin(uint8_t address) = 0; + virtual bool end() = 0; + + virtual bool setClock(uint32_t freq) = 0; + + virtual void beginTransmission(uint8_t address) = 0; + virtual uint8_t endTransmission(bool stopBit) = 0; + virtual uint8_t endTransmission(void) = 0; + + virtual size_t requestFrom(uint8_t address, size_t len, bool stopBit) = 0; + virtual size_t requestFrom(uint8_t address, size_t len) = 0; + + virtual void onReceive(void(*)(int)) = 0; + virtual void onRequest(void(*)(void)) = 0; +}; diff --git a/libraries/Wire/src/Wire.cpp b/libraries/Wire/src/Wire.cpp index 4b81d99f70d..ac8c353575f 100644 --- a/libraries/Wire/src/Wire.cpp +++ b/libraries/Wire/src/Wire.cpp @@ -149,7 +149,7 @@ bool TwoWire::setPins(int sdaPin, int sclPin) return !i2cIsInit(num); } -bool TwoWire::allocateWireBuffer(void) +bool TwoWire::allocateWireBuffer() { // or both buffer can be allocated or none will be if (rxBuffer == NULL) { @@ -171,7 +171,7 @@ bool TwoWire::allocateWireBuffer(void) return true; } -void TwoWire::freeWireBuffer(void) +void TwoWire::freeWireBuffer() { if (rxBuffer != NULL) { free(rxBuffer); @@ -424,7 +424,7 @@ uint16_t TwoWire::getTimeOut() return _timeOutMillis; } -void TwoWire::beginTransmission(uint16_t address) +void TwoWire::beginTransmission(uint8_t address) { #if SOC_I2C_SUPPORT_SLAVE if(is_slave){ @@ -492,7 +492,12 @@ uint8_t TwoWire::endTransmission(bool sendStop) return 4; } -size_t TwoWire::requestFrom(uint16_t address, size_t size, bool sendStop) +uint8_t TwoWire::endTransmission() +{ + return endTransmission(true); +} + +size_t TwoWire::requestFrom(uint8_t address, size_t size, bool sendStop) { #if SOC_I2C_SUPPORT_SLAVE if(is_slave){ @@ -550,6 +555,10 @@ size_t TwoWire::requestFrom(uint16_t address, size_t size, bool sendStop) return rxLength; } +size_t TwoWire::requestFrom(uint8_t address, size_t size){ + return requestFrom(address, size, true); +} + size_t TwoWire::write(uint8_t data) { if (txBuffer == NULL){ @@ -574,13 +583,13 @@ size_t TwoWire::write(const uint8_t *data, size_t quantity) } -int TwoWire::available(void) +int TwoWire::available() { int result = rxLength - rxIndex; return result; } -int TwoWire::read(void) +int TwoWire::read() { int value = -1; if (rxBuffer == NULL){ @@ -593,7 +602,7 @@ int TwoWire::read(void) return value; } -int TwoWire::peek(void) +int TwoWire::peek() { int value = -1; if (rxBuffer == NULL){ @@ -606,7 +615,7 @@ int TwoWire::peek(void) return value; } -void TwoWire::flush(void) +void TwoWire::flush() { rxIndex = 0; rxLength = 0; @@ -614,62 +623,19 @@ void TwoWire::flush(void) //i2cFlush(num); // cleanup } -size_t TwoWire::requestFrom(uint8_t address, size_t len, bool sendStop) -{ - return requestFrom(static_cast(address), static_cast(len), static_cast(sendStop)); -} - -uint8_t TwoWire::requestFrom(uint8_t address, uint8_t len, uint8_t sendStop) -{ - return requestFrom(static_cast(address), static_cast(len), static_cast(sendStop)); -} - -uint8_t TwoWire::requestFrom(uint16_t address, uint8_t len, uint8_t sendStop) -{ - return requestFrom(address, static_cast(len), static_cast(sendStop)); -} - -/* Added to match the Arduino function definition: https://github.com/arduino/ArduinoCore-API/blob/173e8eadced2ad32eeb93bcbd5c49f8d6a055ea6/api/HardwareI2C.h#L39 - * See: https://github.com/arduino-libraries/ArduinoECCX08/issues/25 -*/ -uint8_t TwoWire::requestFrom(uint16_t address, uint8_t len, bool stopBit) -{ - return requestFrom((uint16_t)address, (size_t)len, stopBit); -} - -uint8_t TwoWire::requestFrom(uint8_t address, uint8_t len) -{ - return requestFrom(static_cast(address), static_cast(len), true); -} - -uint8_t TwoWire::requestFrom(uint16_t address, uint8_t len) -{ - return requestFrom(address, static_cast(len), true); -} - -uint8_t TwoWire::requestFrom(int address, int len) -{ - return requestFrom(static_cast(address), static_cast(len), true); -} - -uint8_t TwoWire::requestFrom(int address, int len, int sendStop) -{ - return static_cast(requestFrom(static_cast(address), static_cast(len), static_cast(sendStop))); -} - -void TwoWire::beginTransmission(int address) -{ - beginTransmission(static_cast(address)); -} - -void TwoWire::beginTransmission(uint8_t address) +void TwoWire::onReceive( void (*function)(int) ) { - beginTransmission(static_cast(address)); +#if SOC_I2C_SUPPORT_SLAVE + user_onReceive = function; +#endif } -uint8_t TwoWire::endTransmission(void) +// sets function called on slave read +void TwoWire::onRequest( void (*function)(void) ) { - return endTransmission(true); +#if SOC_I2C_SUPPORT_SLAVE + user_onRequest = function; +#endif } #if SOC_I2C_SUPPORT_SLAVE @@ -714,17 +680,6 @@ void TwoWire::onRequestService(uint8_t num, void * arg) } } -void TwoWire::onReceive( void (*function)(int) ) -{ - user_onReceive = function; -} - -// sets function called on slave read -void TwoWire::onRequest( void (*function)(void) ) -{ - user_onRequest = function; -} - #endif /* SOC_I2C_SUPPORT_SLAVE */ TwoWire Wire = TwoWire(0); diff --git a/libraries/Wire/src/Wire.h b/libraries/Wire/src/Wire.h index 569d3abf1a0..2a5e9b4215d 100644 --- a/libraries/Wire/src/Wire.h +++ b/libraries/Wire/src/Wire.h @@ -30,11 +30,13 @@ #if SOC_I2C_SUPPORTED #include +#include #if !CONFIG_DISABLE_HAL_LOCKS #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/semphr.h" #endif +#include "HardwareI2C.h" #include "Stream.h" // WIRE_HAS_BUFFER_SIZE means Wire has setBufferSize() @@ -50,7 +52,7 @@ typedef void(*user_onRequest)(void); typedef void(*user_onReceive)(uint8_t*, int); #endif /* SOC_I2C_SUPPORT_SLAVE */ -class TwoWire: public Stream +class TwoWire: public HardwareI2C { protected: uint8_t num; @@ -81,12 +83,41 @@ class TwoWire: public Stream static void onReceiveService(uint8_t, uint8_t*, size_t, bool, void *); #endif /* SOC_I2C_SUPPORT_SLAVE */ bool initPins(int sdaPin, int sclPin); - bool allocateWireBuffer(void); - void freeWireBuffer(void); + bool allocateWireBuffer(); + void freeWireBuffer(); public: TwoWire(uint8_t bus_num); ~TwoWire(); + + bool begin() override final + { + return begin(-1, -1); + } + + bool begin(uint8_t address) override final + { +#if SOC_I2C_SUPPORT_SLAVE + return begin(address, -1, -1, 0); +#else + log_e("I2C slave is not supported on " CONFIG_IDF_TARGET); + return false; +#endif + } + + bool end() override; + + bool setClock(uint32_t freq) override; + + void beginTransmission(uint8_t address) override; + uint8_t endTransmission(bool stopBit) override; + uint8_t endTransmission() override; + + size_t requestFrom(uint8_t address, size_t len, bool stopBit) override; + size_t requestFrom(uint8_t address, size_t len) override; + + void onReceive(void(*)(int)) override; + void onRequest(void(*)(void)) override; //call setPins() first, so that begin() can be called without arguments from libraries bool setPins(int sda, int scl); @@ -95,78 +126,22 @@ class TwoWire: public Stream #if SOC_I2C_SUPPORT_SLAVE bool begin(uint8_t slaveAddr, int sda, int scl, uint32_t frequency); #endif /* SOC_I2C_SUPPORT_SLAVE */ - // Explicit Overload for Arduino MainStream API compatibility - inline bool begin() - { - return begin(-1, -1, static_cast(0)); - } -#if SOC_I2C_SUPPORT_SLAVE - inline bool begin(uint8_t addr) - { - return begin(addr, -1, -1, 0); - } - inline bool begin(int addr) - { - return begin(static_cast(addr), -1, -1, 0); - } -#endif /* SOC_I2C_SUPPORT_SLAVE */ - bool end(); size_t setBufferSize(size_t bSize); void setTimeOut(uint16_t timeOutMillis); // default timeout of i2c transactions is 50ms uint16_t getTimeOut(); - bool setClock(uint32_t); uint32_t getClock(); - void beginTransmission(uint16_t address); - void beginTransmission(uint8_t address); - void beginTransmission(int address); - - uint8_t endTransmission(bool sendStop); - uint8_t endTransmission(void); - - size_t requestFrom(uint16_t address, size_t size, bool sendStop); - uint8_t requestFrom(uint16_t address, uint8_t size, bool sendStop); - uint8_t requestFrom(uint16_t address, uint8_t size, uint8_t sendStop); - size_t requestFrom(uint8_t address, size_t len, bool stopBit); - uint8_t requestFrom(uint16_t address, uint8_t size); - uint8_t requestFrom(uint8_t address, uint8_t size, uint8_t sendStop); - uint8_t requestFrom(uint8_t address, uint8_t size); - uint8_t requestFrom(int address, int size, int sendStop); - uint8_t requestFrom(int address, int size); - - size_t write(uint8_t); - size_t write(const uint8_t *, size_t); - int available(void); - int read(void); - int peek(void); - void flush(void); - - inline size_t write(const char * s) - { - return write((uint8_t*) s, strlen(s)); - } - inline size_t write(unsigned long n) - { - return write((uint8_t)n); - } - inline size_t write(long n) - { - return write((uint8_t)n); - } - inline size_t write(unsigned int n) - { - return write((uint8_t)n); - } - inline size_t write(int n) - { - return write((uint8_t)n); - } + size_t write(uint8_t) override; + size_t write(const uint8_t *, size_t) override; + int available() override; + int read() override; + int peek() override; + void flush() override; + #if SOC_I2C_SUPPORT_SLAVE - void onReceive( void (*)(int) ); - void onRequest( void (*)(void) ); size_t slaveWrite(const uint8_t *, size_t); #endif /* SOC_I2C_SUPPORT_SLAVE */ }; From 5148374c46f8e89c94e4e2e1e517ddaab9efdb15 Mon Sep 17 00:00:00 2001 From: Elias Santistevan Date: Wed, 31 Jan 2024 03:51:36 -0700 Subject: [PATCH 15/34] Adds SparkFun Pro Micro C3 Variant File (#9158) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adds SparkFun Pro Micro ESP32-C3 variant file Adds SparkFun Pro Micro ESP32-C3 variant to boards.txt * removes some pin definitions that are defined elsewhere * removes the accidental camel case in variant folder name * Attempts again to fix camel case in the variant file --------- Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com> --- boards.txt | 151 +++++++++++++++++- .../sparkfun_pro_micro_esp32c3/pins_arduino.h | 48 ++++++ 2 files changed, 198 insertions(+), 1 deletion(-) create mode 100644 variants/sparkfun_pro_micro_esp32c3/pins_arduino.h diff --git a/boards.txt b/boards.txt index 5cc2bf42d81..baac41030dd 100644 --- a/boards.txt +++ b/boards.txt @@ -6375,6 +6375,155 @@ sparkfun_esp32c6_qwiic_pocket.menu.EraseFlash.all.upload.erase_cmd=-e ############################################################## +# SparkFun Pro Micro ESP32C3 + +sparkfun_pro_micro_esp32c3.name=SparkFun Pro Micro - ESP32C3 +sparkfun_pro_micro_esp32c3.vid.0=0x1B4F +sparkfun_pro_micro_esp32c3.pid.0=0x0035 + +sparkfun_pro_micro_esp32c3.bootloader.tool=esptool_py +sparkfun_pro_micro_esp32c3.bootloader.tool.default=esptool_py + +sparkfun_pro_micro_esp32c3.upload.tool=esptool_py +sparkfun_pro_micro_esp32c3.upload.tool.default=esptool_py +sparkfun_pro_micro_esp32c3.upload.tool.network=esp_ota + +sparkfun_pro_micro_esp32c3.upload.maximum_size=1310720 +sparkfun_pro_micro_esp32c3.upload.maximum_data_size=327680 +sparkfun_pro_micro_esp32c3.upload.flags= +sparkfun_pro_micro_esp32c3.upload.extra_flags= +sparkfun_pro_micro_esp32c3.upload.use_1200bps_touch=false +sparkfun_pro_micro_esp32c3.upload.wait_for_upload_port=false + +sparkfun_pro_micro_esp32c3.serial.disableDTR=false +sparkfun_pro_micro_esp32c3.serial.disableRTS=false + +sparkfun_pro_micro_esp32c3.build.tarch=riscv32 +sparkfun_pro_micro_esp32c3.build.bootloader_addr=0x0 +sparkfun_pro_micro_esp32c3.build.target=esp +sparkfun_pro_micro_esp32c3.build.mcu=esp32c3 +sparkfun_pro_micro_esp32c3.build.core=esp32 +sparkfun_pro_micro_esp32c3.build.variant=sparkfun_pro_micro_esp32c3 +sparkfun_pro_micro_esp32c3.build.board=SPARKFUN_PRO_MICRO_ESP32C3 + +sparkfun_pro_micro_esp32c3.build.cdc_on_boot=1 +sparkfun_pro_micro_esp32c3.build.f_cpu=160000000L +sparkfun_pro_micro_esp32c3.build.flash_size=4MB +sparkfun_pro_micro_esp32c3.build.flash_freq=80m +sparkfun_pro_micro_esp32c3.build.flash_mode=dio +sparkfun_pro_micro_esp32c3.build.boot=qio +sparkfun_pro_micro_esp32c3.build.partitions=default +sparkfun_pro_micro_esp32c3.build.defines= + +sparkfun_pro_micro_esp32c3.menu.JTAGAdapter.default=Disabled +sparkfun_pro_micro_esp32c3.menu.JTAGAdapter.default.build.copy_jtag_files=0 +sparkfun_pro_micro_esp32c3.menu.JTAGAdapter.builtin=Integrated USB JTAG +sparkfun_pro_micro_esp32c3.menu.JTAGAdapter.builtin.build.openocdscript=esp32c3-builtin.cfg +sparkfun_pro_micro_esp32c3.menu.JTAGAdapter.builtin.build.copy_jtag_files=1 +sparkfun_pro_micro_esp32c3.menu.JTAGAdapter.external=FTDI Adapter +sparkfun_pro_micro_esp32c3.menu.JTAGAdapter.external.build.openocdscript=esp32c3-ftdi.cfg +sparkfun_pro_micro_esp32c3.menu.JTAGAdapter.external.build.copy_jtag_files=1 +sparkfun_pro_micro_esp32c3.menu.JTAGAdapter.bridge=ESP USB Bridge +sparkfun_pro_micro_esp32c3.menu.JTAGAdapter.bridge.build.openocdscript=esp32c3-bridge.cfg +sparkfun_pro_micro_esp32c3.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 + +sparkfun_pro_micro_esp32c3.menu.CDCOnBoot.cdc=Enabled +sparkfun_pro_micro_esp32c3.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 +sparkfun_pro_micro_esp32c3.menu.CDCOnBoot.default=Enabled +sparkfun_pro_micro_esp32c3.menu.CDCOnBoot.default.build.cdc_on_boot=0 + +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.default.build.partitions=default +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.minimal.build.partitions=minimal +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.no_ota.build.partitions=no_ota +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.huge_app.build.partitions=huge_app +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 + +sparkfun_pro_micro_esp32c3.menu.CPUFreq.160=160MHz (WiFi) +sparkfun_pro_micro_esp32c3.menu.CPUFreq.160.build.f_cpu=160000000L +sparkfun_pro_micro_esp32c3.menu.CPUFreq.80=80MHz (WiFi) +sparkfun_pro_micro_esp32c3.menu.CPUFreq.80.build.f_cpu=80000000L +sparkfun_pro_micro_esp32c3.menu.CPUFreq.40=40MHz +sparkfun_pro_micro_esp32c3.menu.CPUFreq.40.build.f_cpu=40000000L +sparkfun_pro_micro_esp32c3.menu.CPUFreq.20=20MHz +sparkfun_pro_micro_esp32c3.menu.CPUFreq.20.build.f_cpu=20000000L +sparkfun_pro_micro_esp32c3.menu.CPUFreq.10=10MHz +sparkfun_pro_micro_esp32c3.menu.CPUFreq.10.build.f_cpu=10000000L + +sparkfun_pro_micro_esp32c3.menu.FlashMode.qio=QIO +sparkfun_pro_micro_esp32c3.menu.FlashMode.qio.build.flash_mode=dio +sparkfun_pro_micro_esp32c3.menu.FlashMode.qio.build.boot=qio +sparkfun_pro_micro_esp32c3.menu.FlashMode.dio=DIO +sparkfun_pro_micro_esp32c3.menu.FlashMode.dio.build.flash_mode=dio +sparkfun_pro_micro_esp32c3.menu.FlashMode.dio.build.boot=dio +sparkfun_pro_micro_esp32c3.menu.FlashMode.qout=QOUT +sparkfun_pro_micro_esp32c3.menu.FlashMode.qout.build.flash_mode=dout +sparkfun_pro_micro_esp32c3.menu.FlashMode.qout.build.boot=qout +sparkfun_pro_micro_esp32c3.menu.FlashMode.dout=DOUT +sparkfun_pro_micro_esp32c3.menu.FlashMode.dout.build.flash_mode=dout +sparkfun_pro_micro_esp32c3.menu.FlashMode.dout.build.boot=dout + +sparkfun_pro_micro_esp32c3.menu.FlashFreq.80=80MHz +sparkfun_pro_micro_esp32c3.menu.FlashFreq.80.build.flash_freq=80m +sparkfun_pro_micro_esp32c3.menu.FlashFreq.40=40MHz +sparkfun_pro_micro_esp32c3.menu.FlashFreq.40.build.flash_freq=40m + +sparkfun_pro_micro_esp32c3.menu.FlashSize.4M=4MB (32Mb) +sparkfun_pro_micro_esp32c3.menu.FlashSize.4M.build.flash_size=4MB + +sparkfun_pro_micro_esp32c3.menu.UploadSpeed.921600=921600 +sparkfun_pro_micro_esp32c3.menu.UploadSpeed.921600.upload.speed=921600 +sparkfun_pro_micro_esp32c3.menu.UploadSpeed.115200=115200 +sparkfun_pro_micro_esp32c3.menu.UploadSpeed.115200.upload.speed=115200 +sparkfun_pro_micro_esp32c3.menu.UploadSpeed.256000.windows=256000 +sparkfun_pro_micro_esp32c3.menu.UploadSpeed.256000.upload.speed=256000 +sparkfun_pro_micro_esp32c3.menu.UploadSpeed.230400.windows.upload.speed=256000 +sparkfun_pro_micro_esp32c3.menu.UploadSpeed.230400=230400 +sparkfun_pro_micro_esp32c3.menu.UploadSpeed.230400.upload.speed=230400 +sparkfun_pro_micro_esp32c3.menu.UploadSpeed.460800.linux=460800 +sparkfun_pro_micro_esp32c3.menu.UploadSpeed.460800.macosx=460800 +sparkfun_pro_micro_esp32c3.menu.UploadSpeed.460800.upload.speed=460800 +sparkfun_pro_micro_esp32c3.menu.UploadSpeed.512000.windows=512000 +sparkfun_pro_micro_esp32c3.menu.UploadSpeed.512000.upload.speed=512000 + +sparkfun_pro_micro_esp32c3.menu.DebugLevel.none=None +sparkfun_pro_micro_esp32c3.menu.DebugLevel.none.build.code_debug=0 +sparkfun_pro_micro_esp32c3.menu.DebugLevel.error=Error +sparkfun_pro_micro_esp32c3.menu.DebugLevel.error.build.code_debug=1 +sparkfun_pro_micro_esp32c3.menu.DebugLevel.warn=Warn +sparkfun_pro_micro_esp32c3.menu.DebugLevel.warn.build.code_debug=2 +sparkfun_pro_micro_esp32c3.menu.DebugLevel.info=Info +sparkfun_pro_micro_esp32c3.menu.DebugLevel.info.build.code_debug=3 +sparkfun_pro_micro_esp32c3.menu.DebugLevel.debug=Debug +sparkfun_pro_micro_esp32c3.menu.DebugLevel.debug.build.code_debug=4 +sparkfun_pro_micro_esp32c3.menu.DebugLevel.verbose=Verbose +sparkfun_pro_micro_esp32c3.menu.DebugLevel.verbose.build.code_debug=5 + +sparkfun_pro_micro_esp32c3.menu.EraseFlash.none=Disabled +sparkfun_pro_micro_esp32c3.menu.EraseFlash.none.upload.erase_cmd= +sparkfun_pro_micro_esp32c3.menu.EraseFlash.all=Enabled +sparkfun_pro_micro_esp32c3.menu.EraseFlash.all.upload.erase_cmd=-e + +############################################################## + nina_w10.name=u-blox NINA-W10 series (ESP32) nina_w10.bootloader.tool=esptool_py @@ -32898,4 +33047,4 @@ makergo_c3_supermini.menu.EraseFlash.none.upload.erase_cmd= makergo_c3_supermini.menu.EraseFlash.all=Enabled makergo_c3_supermini.menu.EraseFlash.all.upload.erase_cmd=-e -############################################################## \ No newline at end of file +############################################################## diff --git a/variants/sparkfun_pro_micro_esp32c3/pins_arduino.h b/variants/sparkfun_pro_micro_esp32c3/pins_arduino.h new file mode 100644 index 00000000000..8c29399fc63 --- /dev/null +++ b/variants/sparkfun_pro_micro_esp32c3/pins_arduino.h @@ -0,0 +1,48 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +#define USB_VID 0x1B4F +#define USB_PID 0x0035 +#define USB_MANUFACTURER "SparkFun" +#define USB_PRODUCT "SparkFun_Pro_Micro-ESP32C3" +#define USB_SERIAL "" // Empty string for MAC adddress + +static const uint8_t LED_BUILTIN = 10; + +static const uint8_t TX = 21; +static const uint8_t RX = 20; + +static const uint8_t A0 = 0; +static const uint8_t A1 = 1; +static const uint8_t A2 = 2; +static const uint8_t A3 = 3; +static const uint8_t A4 = 4; + +static const uint8_t D0 = 0; +static const uint8_t D1 = 1; +static const uint8_t D2 = 2; +static const uint8_t D3 = 3; +static const uint8_t D4 = 4; +static const uint8_t D5 = 5; +static const uint8_t D6 = 6; +static const uint8_t D7 = 7; +static const uint8_t D8 = 8; +static const uint8_t D9 = 9; +static const uint8_t D10 = 10; + +static const uint8_t SDA = 5; +static const uint8_t SCL = 6; + +static const uint8_t SS = 10; +static const uint8_t MOSI = 3; +static const uint8_t MISO = 1; +static const uint8_t SCK = 0; + +static const uint8_t PIN_I2S_SCK = 6; // Frame clock, no bit clock +static const uint8_t PIN_I2S_SD_DOUT = 7; // data out +static const uint8_t PIN_I2S_SD_IN = 5; // data in +static const uint8_t PIN_I2S_FS = 10; // frame select + +#endif /* Pins_Arduino_h */ From 8eaa893eff5418f27647a070c4e573f84504c680 Mon Sep 17 00:00:00 2001 From: yelo Date: Wed, 31 Jan 2024 18:51:56 +0800 Subject: [PATCH 16/34] feat: Add board support for Nologo ESP32C3 Super Mini (#9174) detail of nologo esp32c3 super mini: https://www.nologo.tech/product/esp32/esp32c3SuperMini/esp32C3SuperMini.html --- boards.txt | 140 ++++++++++++++++++ .../nologo_esp32c3_super_mini/pins_arduino.h | 28 ++++ 2 files changed, 168 insertions(+) create mode 100644 variants/nologo_esp32c3_super_mini/pins_arduino.h diff --git a/boards.txt b/boards.txt index baac41030dd..e9cc0bc7c17 100644 --- a/boards.txt +++ b/boards.txt @@ -13967,6 +13967,146 @@ nodemcu-32s.menu.EraseFlash.all.upload.erase_cmd=-e ############################################################## +nologo_esp32c3_super_mini.name=Nologo ESP32C3 Super Mini +nologo_esp32c3_super_mini.vid.0=0x303a +nologo_esp32c3_super_mini.pid.0=0x1001 + +nologo_esp32c3_super_mini.upload.tool=esptool_py +nologo_esp32c3_super_mini.upload.tool.default=esptool_py +nologo_esp32c3_super_mini.upload.tool.network=esp_ota +nologo_esp32c3_super_mini.upload.maximum_size=1310720 +nologo_esp32c3_super_mini.upload.maximum_data_size=327680 +nologo_esp32c3_super_mini.upload.flags= +nologo_esp32c3_super_mini.upload.extra_flags= +nologo_esp32c3_super_mini.upload.use_1200bps_touch=false +nologo_esp32c3_super_mini.upload.wait_for_upload_port=false + +nologo_esp32c3_super_mini.serial.disableDTR=false +nologo_esp32c3_super_mini.serial.disableRTS=false + +nologo_esp32c3_super_mini.build.tarch=riscv32 +nologo_esp32c3_super_mini.build.target=esp +nologo_esp32c3_super_mini.build.mcu=esp32c3 +nologo_esp32c3_super_mini.build.core=esp32 +nologo_esp32c3_super_mini.build.variant=nologo_esp32c3_super_mini +nologo_esp32c3_super_mini.build.board=NOLOGO_ESP32C3_SUPER_MINI +nologo_esp32c3_super_mini.build.bootloader_addr=0x0 + +nologo_esp32c3_super_mini.build.usb_mode=1 +nologo_esp32c3_super_mini.build.cdc_on_boot=1 +nologo_esp32c3_super_mini.build.f_cpu=160000000L +nologo_esp32c3_super_mini.build.flash_size=4MB +nologo_esp32c3_super_mini.build.flash_freq=80m +nologo_esp32c3_super_mini.build.flash_mode=qio +nologo_esp32c3_super_mini.build.boot=qio +nologo_esp32c3_super_mini.build.partitions=default +nologo_esp32c3_super_mini.build.defines= + +nologo_esp32c3_super_mini.menu.USBMode.hwcdc=Hardware CDC and JTAG +nologo_esp32c3_super_mini.menu.USBMode.hwcdc.build.usb_mode=1 +nologo_esp32c3_super_mini.menu.USBMode.default=USB-OTG +nologo_esp32c3_super_mini.menu.USBMode.default.build.usb_mode=0 + +nologo_esp32c3_super_mini.menu.JTAGAdapter.default=Disabled +nologo_esp32c3_super_mini.menu.JTAGAdapter.default.build.copy_jtag_files=0 +nologo_esp32c3_super_mini.menu.JTAGAdapter.builtin=Integrated USB JTAG +nologo_esp32c3_super_mini.menu.JTAGAdapter.builtin.build.openocdscript=esp32c3-builtin.cfg +nologo_esp32c3_super_mini.menu.JTAGAdapter.builtin.build.copy_jtag_files=1 +nologo_esp32c3_super_mini.menu.JTAGAdapter.external=FTDI Adapter +nologo_esp32c3_super_mini.menu.JTAGAdapter.external.build.openocdscript=esp32c3-ftdi.cfg +nologo_esp32c3_super_mini.menu.JTAGAdapter.external.build.copy_jtag_files=1 +nologo_esp32c3_super_mini.menu.JTAGAdapter.bridge=ESP USB Bridge +nologo_esp32c3_super_mini.menu.JTAGAdapter.bridge.build.openocdscript=esp32c3-bridge.cfg +nologo_esp32c3_super_mini.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 + +nologo_esp32c3_super_mini.menu.CDCOnBoot.default=Enabled +nologo_esp32c3_super_mini.menu.CDCOnBoot.default.build.cdc_on_boot=1 +nologo_esp32c3_super_mini.menu.CDCOnBoot.cdc=Enabled +nologo_esp32c3_super_mini.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 + +nologo_esp32c3_super_mini.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +nologo_esp32c3_super_mini.menu.PartitionScheme.default.build.partitions=default +nologo_esp32c3_super_mini.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +nologo_esp32c3_super_mini.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +nologo_esp32c3_super_mini.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +nologo_esp32c3_super_mini.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +nologo_esp32c3_super_mini.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +nologo_esp32c3_super_mini.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +nologo_esp32c3_super_mini.menu.PartitionScheme.minimal.build.partitions=minimal +nologo_esp32c3_super_mini.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +nologo_esp32c3_super_mini.menu.PartitionScheme.no_ota.build.partitions=no_ota +nologo_esp32c3_super_mini.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +nologo_esp32c3_super_mini.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +nologo_esp32c3_super_mini.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +nologo_esp32c3_super_mini.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +nologo_esp32c3_super_mini.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +nologo_esp32c3_super_mini.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +nologo_esp32c3_super_mini.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +nologo_esp32c3_super_mini.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +nologo_esp32c3_super_mini.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +nologo_esp32c3_super_mini.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +nologo_esp32c3_super_mini.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +nologo_esp32c3_super_mini.menu.PartitionScheme.huge_app.build.partitions=huge_app +nologo_esp32c3_super_mini.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 + +nologo_esp32c3_super_mini.menu.CPUFreq.160=160MHz (WiFi) +nologo_esp32c3_super_mini.menu.CPUFreq.160.build.f_cpu=160000000L +nologo_esp32c3_super_mini.menu.CPUFreq.80=80MHz (WiFi) +nologo_esp32c3_super_mini.menu.CPUFreq.80.build.f_cpu=80000000L +nologo_esp32c3_super_mini.menu.CPUFreq.40=40MHz +nologo_esp32c3_super_mini.menu.CPUFreq.40.build.f_cpu=40000000L +nologo_esp32c3_super_mini.menu.CPUFreq.20=20MHz +nologo_esp32c3_super_mini.menu.CPUFreq.20.build.f_cpu=20000000L +nologo_esp32c3_super_mini.menu.CPUFreq.10=10MHz +nologo_esp32c3_super_mini.menu.CPUFreq.10.build.f_cpu=10000000L + +nologo_esp32c3_super_mini.menu.FlashMode.qio=QIO +nologo_esp32c3_super_mini.menu.FlashMode.qio.build.flash_mode=dio +nologo_esp32c3_super_mini.menu.FlashMode.qio.build.boot=qio +nologo_esp32c3_super_mini.menu.FlashMode.dio=DIO +nologo_esp32c3_super_mini.menu.FlashMode.dio.build.flash_mode=dio +nologo_esp32c3_super_mini.menu.FlashMode.dio.build.boot=dio + +nologo_esp32c3_super_mini.menu.FlashFreq.80=80MHz +nologo_esp32c3_super_mini.menu.FlashFreq.80.build.flash_freq=80m +nologo_esp32c3_super_mini.menu.FlashFreq.40=40MHz +nologo_esp32c3_super_mini.menu.FlashFreq.40.build.flash_freq=40m + +nologo_esp32c3_super_mini.menu.UploadSpeed.921600=921600 +nologo_esp32c3_super_mini.menu.UploadSpeed.921600.upload.speed=921600 +nologo_esp32c3_super_mini.menu.UploadSpeed.115200=115200 +nologo_esp32c3_super_mini.menu.UploadSpeed.115200.upload.speed=115200 +nologo_esp32c3_super_mini.menu.UploadSpeed.256000.windows=256000 +nologo_esp32c3_super_mini.menu.UploadSpeed.256000.upload.speed=256000 +nologo_esp32c3_super_mini.menu.UploadSpeed.230400.windows.upload.speed=256000 +nologo_esp32c3_super_mini.menu.UploadSpeed.230400=230400 +nologo_esp32c3_super_mini.menu.UploadSpeed.230400.upload.speed=230400 +nologo_esp32c3_super_mini.menu.UploadSpeed.460800.linux=460800 +nologo_esp32c3_super_mini.menu.UploadSpeed.460800.macosx=460800 +nologo_esp32c3_super_mini.menu.UploadSpeed.460800.upload.speed=460800 +nologo_esp32c3_super_mini.menu.UploadSpeed.512000.windows=512000 +nologo_esp32c3_super_mini.menu.UploadSpeed.512000.upload.speed=512000 + +nologo_esp32c3_super_mini.menu.DebugLevel.none=None +nologo_esp32c3_super_mini.menu.DebugLevel.none.build.code_debug=0 +nologo_esp32c3_super_mini.menu.DebugLevel.error=Error +nologo_esp32c3_super_mini.menu.DebugLevel.error.build.code_debug=1 +nologo_esp32c3_super_mini.menu.DebugLevel.warn=Warn +nologo_esp32c3_super_mini.menu.DebugLevel.warn.build.code_debug=2 +nologo_esp32c3_super_mini.menu.DebugLevel.info=Info +nologo_esp32c3_super_mini.menu.DebugLevel.info.build.code_debug=3 +nologo_esp32c3_super_mini.menu.DebugLevel.debug=Debug +nologo_esp32c3_super_mini.menu.DebugLevel.debug.build.code_debug=4 +nologo_esp32c3_super_mini.menu.DebugLevel.verbose=Verbose +nologo_esp32c3_super_mini.menu.DebugLevel.verbose.build.code_debug=5 + +nologo_esp32c3_super_mini.menu.EraseFlash.none=Disabled +nologo_esp32c3_super_mini.menu.EraseFlash.none.upload.erase_cmd= +nologo_esp32c3_super_mini.menu.EraseFlash.all=Enabled +nologo_esp32c3_super_mini.menu.EraseFlash.all.upload.erase_cmd=-e + +############################################################## + mhetesp32devkit.name=MH ET LIVE ESP32DevKIT mhetesp32devkit.bootloader.tool=esptool_py diff --git a/variants/nologo_esp32c3_super_mini/pins_arduino.h b/variants/nologo_esp32c3_super_mini/pins_arduino.h new file mode 100644 index 00000000000..3b4c144cca6 --- /dev/null +++ b/variants/nologo_esp32c3_super_mini/pins_arduino.h @@ -0,0 +1,28 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +static const uint8_t LED_BUILTIN = 8; +#define BUILTIN_LED LED_BUILTIN // backward compatibility +#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN + +static const uint8_t TX = 21; +static const uint8_t RX = 20; + +static const uint8_t SDA = 8; +static const uint8_t SCL = 9; + +static const uint8_t SS = 7; +static const uint8_t MOSI = 6; +static const uint8_t MISO = 5; +static const uint8_t SCK = 4; + +static const uint8_t A0 = 0; +static const uint8_t A1 = 1; +static const uint8_t A2 = 2; +static const uint8_t A3 = 3; +static const uint8_t A4 = 4; +static const uint8_t A5 = 5; + +#endif /* Pins_Arduino_h */ From ead76fd395025c60e1f200363eec33865df38ec4 Mon Sep 17 00:00:00 2001 From: Dryw Wade Date: Wed, 31 Jan 2024 03:52:18 -0700 Subject: [PATCH 17/34] Add SparkFun ESP32-C6 Thing Plus Variant (#9178) * Add SparkFun ESP32-C6 Thing Plus to boards.txt * Add SparkFun ESP32-C6 Thing Plus variant --- boards.txt | 165 ++++++++++++++++++ .../pins_arduino.h | 35 ++++ 2 files changed, 200 insertions(+) create mode 100644 variants/sparkfun_esp32c6_thing_plus/pins_arduino.h diff --git a/boards.txt b/boards.txt index e9cc0bc7c17..203502a8fa7 100644 --- a/boards.txt +++ b/boards.txt @@ -5805,6 +5805,171 @@ sparkfun_esp32s2_thing_plus.menu.EraseFlash.all.upload.erase_cmd=-e ############################################################## +sparkfun_esp32c6_thing_plus.name=SparkFun ESP32-C6 Thing Plus +sparkfun_esp32c6_thing_plus.vid.0=0x303a +sparkfun_esp32c6_thing_plus.pid.0=0x1001 + +sparkfun_esp32c6_thing_plus.bootloader.tool=esptool_py +sparkfun_esp32c6_thing_plus.bootloader.tool.default=esptool_py + +sparkfun_esp32c6_thing_plus.upload.tool=esptool_py +sparkfun_esp32c6_thing_plus.upload.tool.default=esptool_py +sparkfun_esp32c6_thing_plus.upload.tool.network=esp_ota + +sparkfun_esp32c6_thing_plus.upload.maximum_size=1310720 +sparkfun_esp32c6_thing_plus.upload.maximum_data_size=327680 +sparkfun_esp32c6_thing_plus.upload.flags= +sparkfun_esp32c6_thing_plus.upload.extra_flags= +sparkfun_esp32c6_thing_plus.upload.use_1200bps_touch=false +sparkfun_esp32c6_thing_plus.upload.wait_for_upload_port=false + +sparkfun_esp32c6_thing_plus.serial.disableDTR=false +sparkfun_esp32c6_thing_plus.serial.disableRTS=false + +sparkfun_esp32c6_thing_plus.build.tarch=riscv32 +sparkfun_esp32c6_thing_plus.build.target=esp +sparkfun_esp32c6_thing_plus.build.mcu=esp32c6 +sparkfun_esp32c6_thing_plus.build.core=esp32 +sparkfun_esp32c6_thing_plus.build.variant=sparkfun_esp32c6_thing_plus +sparkfun_esp32c6_thing_plus.build.board=ESP32C6_THING_PLUS +sparkfun_esp32c6_thing_plus.build.bootloader_addr=0x0 + +sparkfun_esp32c6_thing_plus.build.cdc_on_boot=0 +sparkfun_esp32c6_thing_plus.build.f_cpu=160000000L +sparkfun_esp32c6_thing_plus.build.flash_size=4MB +sparkfun_esp32c6_thing_plus.build.flash_freq=80m +sparkfun_esp32c6_thing_plus.build.flash_mode=qio +sparkfun_esp32c6_thing_plus.build.boot=qio +sparkfun_esp32c6_thing_plus.build.partitions=default +sparkfun_esp32c6_thing_plus.build.defines= + +## IDE 2.0 Seems to not update the value +sparkfun_esp32c6_thing_plus.menu.JTAGAdapter.default=Disabled +sparkfun_esp32c6_thing_plus.menu.JTAGAdapter.default.build.copy_jtag_files=0 +sparkfun_esp32c6_thing_plus.menu.JTAGAdapter.builtin=Integrated USB JTAG +sparkfun_esp32c6_thing_plus.menu.JTAGAdapter.builtin.build.openocdscript=esp32c6-builtin.cfg +sparkfun_esp32c6_thing_plus.menu.JTAGAdapter.builtin.build.copy_jtag_files=1 +sparkfun_esp32c6_thing_plus.menu.JTAGAdapter.external=FTDI Adapter +sparkfun_esp32c6_thing_plus.menu.JTAGAdapter.external.build.openocdscript=esp32c6-ftdi.cfg +sparkfun_esp32c6_thing_plus.menu.JTAGAdapter.external.build.copy_jtag_files=1 +sparkfun_esp32c6_thing_plus.menu.JTAGAdapter.bridge=ESP USB Bridge +sparkfun_esp32c6_thing_plus.menu.JTAGAdapter.bridge.build.openocdscript=esp32c6-bridge.cfg +sparkfun_esp32c6_thing_plus.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 + +sparkfun_esp32c6_thing_plus.menu.CDCOnBoot.default=Enabled +sparkfun_esp32c6_thing_plus.menu.CDCOnBoot.default.build.cdc_on_boot=1 +sparkfun_esp32c6_thing_plus.menu.CDCOnBoot.cdc=Disabled +sparkfun_esp32c6_thing_plus.menu.CDCOnBoot.cdc.build.cdc_on_boot=0 + +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.default.build.partitions=default +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.minimal.build.partitions=minimal +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.no_ota.build.partitions=no_ota +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.huge_app.build.partitions=huge_app +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.fatflash.build.partitions=ffat +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9.9MB FATFS) +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.rainmaker=RainMaker +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.custom=Custom +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.custom.build.partitions= +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +sparkfun_esp32c6_thing_plus.menu.CPUFreq.160=160MHz (WiFi) +sparkfun_esp32c6_thing_plus.menu.CPUFreq.160.build.f_cpu=160000000L +sparkfun_esp32c6_thing_plus.menu.CPUFreq.80=80MHz (WiFi) +sparkfun_esp32c6_thing_plus.menu.CPUFreq.80.build.f_cpu=80000000L +sparkfun_esp32c6_thing_plus.menu.CPUFreq.40=40MHz +sparkfun_esp32c6_thing_plus.menu.CPUFreq.40.build.f_cpu=40000000L +sparkfun_esp32c6_thing_plus.menu.CPUFreq.20=20MHz +sparkfun_esp32c6_thing_plus.menu.CPUFreq.20.build.f_cpu=20000000L +sparkfun_esp32c6_thing_plus.menu.CPUFreq.10=10MHz +sparkfun_esp32c6_thing_plus.menu.CPUFreq.10.build.f_cpu=10000000L + +sparkfun_esp32c6_thing_plus.menu.FlashMode.qio=QIO +sparkfun_esp32c6_thing_plus.menu.FlashMode.qio.build.flash_mode=dio +sparkfun_esp32c6_thing_plus.menu.FlashMode.qio.build.boot=qio +sparkfun_esp32c6_thing_plus.menu.FlashMode.dio=DIO +sparkfun_esp32c6_thing_plus.menu.FlashMode.dio.build.flash_mode=dio +sparkfun_esp32c6_thing_plus.menu.FlashMode.dio.build.boot=dio + +sparkfun_esp32c6_thing_plus.menu.FlashFreq.80=80MHz +sparkfun_esp32c6_thing_plus.menu.FlashFreq.80.build.flash_freq=80m +sparkfun_esp32c6_thing_plus.menu.FlashFreq.40=40MHz +sparkfun_esp32c6_thing_plus.menu.FlashFreq.40.build.flash_freq=40m + +sparkfun_esp32c6_thing_plus.menu.FlashSize.4M=4MB (32Mb) +sparkfun_esp32c6_thing_plus.menu.FlashSize.4M.build.flash_size=4MB +sparkfun_esp32c6_thing_plus.menu.FlashSize.8M=8MB (64Mb) +sparkfun_esp32c6_thing_plus.menu.FlashSize.8M.build.flash_size=8MB +sparkfun_esp32c6_thing_plus.menu.FlashSize.8M.build.partitions=default_8MB +sparkfun_esp32c6_thing_plus.menu.FlashSize.2M=2MB (16Mb) +sparkfun_esp32c6_thing_plus.menu.FlashSize.2M.build.flash_size=2MB +sparkfun_esp32c6_thing_plus.menu.FlashSize.2M.build.partitions=minimal +sparkfun_esp32c6_thing_plus.menu.FlashSize.16M=16MB (128Mb) +sparkfun_esp32c6_thing_plus.menu.FlashSize.16M.build.flash_size=16MB + +sparkfun_esp32c6_thing_plus.menu.UploadSpeed.921600=921600 +sparkfun_esp32c6_thing_plus.menu.UploadSpeed.921600.upload.speed=921600 +sparkfun_esp32c6_thing_plus.menu.UploadSpeed.115200=115200 +sparkfun_esp32c6_thing_plus.menu.UploadSpeed.115200.upload.speed=115200 +sparkfun_esp32c6_thing_plus.menu.UploadSpeed.256000.windows=256000 +sparkfun_esp32c6_thing_plus.menu.UploadSpeed.256000.upload.speed=256000 +sparkfun_esp32c6_thing_plus.menu.UploadSpeed.230400.windows.upload.speed=256000 +sparkfun_esp32c6_thing_plus.menu.UploadSpeed.230400=230400 +sparkfun_esp32c6_thing_plus.menu.UploadSpeed.230400.upload.speed=230400 +sparkfun_esp32c6_thing_plus.menu.UploadSpeed.460800.linux=460800 +sparkfun_esp32c6_thing_plus.menu.UploadSpeed.460800.macosx=460800 +sparkfun_esp32c6_thing_plus.menu.UploadSpeed.460800.upload.speed=460800 +sparkfun_esp32c6_thing_plus.menu.UploadSpeed.512000.windows=512000 +sparkfun_esp32c6_thing_plus.menu.UploadSpeed.512000.upload.speed=512000 + +sparkfun_esp32c6_thing_plus.menu.DebugLevel.none=None +sparkfun_esp32c6_thing_plus.menu.DebugLevel.none.build.code_debug=0 +sparkfun_esp32c6_thing_plus.menu.DebugLevel.error=Error +sparkfun_esp32c6_thing_plus.menu.DebugLevel.error.build.code_debug=1 +sparkfun_esp32c6_thing_plus.menu.DebugLevel.warn=Warn +sparkfun_esp32c6_thing_plus.menu.DebugLevel.warn.build.code_debug=2 +sparkfun_esp32c6_thing_plus.menu.DebugLevel.info=Info +sparkfun_esp32c6_thing_plus.menu.DebugLevel.info.build.code_debug=3 +sparkfun_esp32c6_thing_plus.menu.DebugLevel.debug=Debug +sparkfun_esp32c6_thing_plus.menu.DebugLevel.debug.build.code_debug=4 +sparkfun_esp32c6_thing_plus.menu.DebugLevel.verbose=Verbose +sparkfun_esp32c6_thing_plus.menu.DebugLevel.verbose.build.code_debug=5 + +sparkfun_esp32c6_thing_plus.menu.EraseFlash.none=Disabled +sparkfun_esp32c6_thing_plus.menu.EraseFlash.none.upload.erase_cmd= +sparkfun_esp32c6_thing_plus.menu.EraseFlash.all=Enabled +sparkfun_esp32c6_thing_plus.menu.EraseFlash.all.upload.erase_cmd=-e + +############################################################## + esp32micromod.name=SparkFun ESP32 MicroMod esp32micromod.bootloader.tool=esptool_py diff --git a/variants/sparkfun_esp32c6_thing_plus/pins_arduino.h b/variants/sparkfun_esp32c6_thing_plus/pins_arduino.h new file mode 100644 index 00000000000..60bd42884d1 --- /dev/null +++ b/variants/sparkfun_esp32c6_thing_plus/pins_arduino.h @@ -0,0 +1,35 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include +#include "soc/soc_caps.h" + +#define PIN_NEOPIXEL 23 +// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino +static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+PIN_NEOPIXEL; +#define BUILTIN_LED LED_BUILTIN // backward compatibility +#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN +// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() +#define RGB_BUILTIN LED_BUILTIN +#define RGB_BRIGHTNESS 64 + +static const uint8_t TX = 16; +static const uint8_t RX = 17; + +static const uint8_t SDA = 6; +static const uint8_t SCL = 7; + +static const uint8_t SS = 5; +static const uint8_t MOSI = 20; +static const uint8_t MISO = 21; +static const uint8_t SCK = 19; + +static const uint8_t A0 = 0; +static const uint8_t A1 = 1; +static const uint8_t A2 = 2; +static const uint8_t A3 = 3; +static const uint8_t A4 = 4; +static const uint8_t A5 = 5; +static const uint8_t A6 = 6; + +#endif /* Pins_Arduino_h */ From f764af0d1cdfcb264b648228db2fcb7d16b3c8de Mon Sep 17 00:00:00 2001 From: "Dirk O. Kaar" <19971886+dok-net@users.noreply.github.com> Date: Wed, 31 Jan 2024 11:53:56 +0100 Subject: [PATCH 18/34] Ticker updated to match extensions in ESP8266 API (#2849) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update Ticker API to compatibility with ESP8266, prepares for co-op loop Scheduler * Fixing Build server complaints * Fix omitted casts in template member function * Changes after review * Expose µs resolution of OS API in Ticker class * Return Ticker to libraries only for modularity. * Unify Ticker examples. * Default for LED_BUILTIN * In Ticker, the *scheduled functions become available in another development branch. * Astyle from ESP8266 * Fixed Arduino keywords.txt * 64bit integers instead of 32bits, timer functions on ESP32 accept 64bit integers. * Move code from header into compiliation unit. Reformat. * Test case same as ESP8266 * Implementing inline in header saves 204+ bytes program size. * Examples * Fix a compiler warning due to c-style casting. * Revert formatting changes * More format reversions * Revert * Revert * Revert --------- Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> --- .../Ticker/examples/Arguments/Arguments.ino | 51 ------------ .../examples/TickerBasic/TickerBasic.ino | 49 +++++++++++ .../TickerParameter/TickerParameter.ino | 54 ++++++++++++ libraries/Ticker/keywords.txt | 4 + libraries/Ticker/src/Ticker.cpp | 17 +++- libraries/Ticker/src/Ticker.h | 83 +++++++++++++------ 6 files changed, 177 insertions(+), 81 deletions(-) delete mode 100644 libraries/Ticker/examples/Arguments/Arguments.ino create mode 100644 libraries/Ticker/examples/TickerBasic/TickerBasic.ino create mode 100644 libraries/Ticker/examples/TickerParameter/TickerParameter.ino diff --git a/libraries/Ticker/examples/Arguments/Arguments.ino b/libraries/Ticker/examples/Arguments/Arguments.ino deleted file mode 100644 index 7f5bc5cde21..00000000000 --- a/libraries/Ticker/examples/Arguments/Arguments.ino +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This example demonstrates used of Ticker with arguments. - * You can call the same callback function with different argument on different times. - * Based on the argument the callback can perform different tasks. - */ - -#include -#include - -// Arguments for the function must remain valid (not run out of scope) otherwise the function would read garbage data. -int LED_PIN_1 = 4; -#ifdef LED_BUILTIN - int LED_PIN_2 = LED_BUILTIN; -#else - int LED_PIN_2 = 8; -#endif - -Ticker tickerSetHigh; -Ticker tickerSetLow; - -// Argument to callback must always be passed a reference -void swapState(int *pin) { - static int led_1_state = 1; - static int led_2_state = 1; - if(*pin == LED_PIN_1){ - Serial.printf("[%lu ms] set pin %d to state: %d\n", millis(), *pin, led_1_state); - digitalWrite(*pin, led_1_state); - led_1_state = led_1_state ? 0 : 1; // reverse for next pass - }else if(*pin == LED_PIN_2){ - Serial.printf("[%lu ms] set pin %d to state: %d\n", millis(), *pin, led_2_state); - digitalWrite(*pin, led_2_state); - led_2_state = led_2_state ? 0 : 1; // reverse for next pass - } -} - -void setup() { - Serial.begin(115200); - pinMode(LED_PIN_1, OUTPUT); - pinMode(LED_PIN_2, OUTPUT); - //digitalWrite(1, LOW); - - // Blink LED every 500 ms on LED_PIN_1 - tickerSetLow.attach_ms(500, swapState, &LED_PIN_1); - - // Blink LED every 1000 ms on LED_PIN_2 - tickerSetHigh.attach_ms(1000, swapState, &LED_PIN_2); -} - -void loop() { - -} diff --git a/libraries/Ticker/examples/TickerBasic/TickerBasic.ino b/libraries/Ticker/examples/TickerBasic/TickerBasic.ino new file mode 100644 index 00000000000..8de5a1282ad --- /dev/null +++ b/libraries/Ticker/examples/TickerBasic/TickerBasic.ino @@ -0,0 +1,49 @@ +/* + Basic Ticker usage + + Ticker is an object that will call a given function with a certain period. + Each Ticker calls one function. You can have as many Tickers as you like, + memory being the only limitation. + + A function may be attached to a ticker and detached from the ticker. + There are two variants of the attach function: attach and attach_ms. + The first one takes period in seconds, the second one in milliseconds. + + The built-in LED will be blinking. +*/ + +#include + +#ifndef LED_BUILTIN +#define LED_BUILTIN 13 +#endif + +Ticker flipper; + +int count = 0; + +void flip() { + int state = digitalRead(LED_BUILTIN); // get the current state of GPIO1 pin + digitalWrite(LED_BUILTIN, !state); // set pin to the opposite state + + ++count; + // when the counter reaches a certain value, start blinking like crazy + if (count == 20) { + flipper.attach(0.1, flip); + } + // when the counter reaches yet another value, stop blinking + else if (count == 120) { + flipper.detach(); + } +} + +void setup() { + pinMode(LED_BUILTIN, OUTPUT); + digitalWrite(LED_BUILTIN, LOW); + + // flip the pin every 0.3s + flipper.attach(0.3, flip); +} + +void loop() { +} diff --git a/libraries/Ticker/examples/TickerParameter/TickerParameter.ino b/libraries/Ticker/examples/TickerParameter/TickerParameter.ino new file mode 100644 index 00000000000..ceb79e32f54 --- /dev/null +++ b/libraries/Ticker/examples/TickerParameter/TickerParameter.ino @@ -0,0 +1,54 @@ +/* + Passing paramters to Ticker callbacks + + Apart from void(void) functions, the Ticker library supports + functions taking one argument. This argument's size has to be less or + equal to 4 bytes (so char, short, int, float, void*, char* types will do). + + This sample runs two tickers that both call one callback function, + but with different arguments. + + The built-in LED will be pulsing. +*/ + +#include + +#ifndef LED_BUILTIN +#define LED_BUILTIN 13 +#endif + +Ticker tickerSetLow; +Ticker tickerSetHigh; +Ticker tickerSetChar; + +void setPinLow() { + digitalWrite(LED_BUILTIN, 0); +} + +void setPinHigh() { + digitalWrite(LED_BUILTIN, 1); +} + +void setPin(int state) { + digitalWrite(LED_BUILTIN, state); +} + +void setPinChar(char state) { + digitalWrite(LED_BUILTIN, state); +} + +void setup() { + pinMode(LED_BUILTIN, OUTPUT); + + // every 25 ms, call setPinLow() + tickerSetLow.attach_ms(25, setPinLow); + + // every 26 ms, call setPinHigh() + tickerSetHigh.attach_ms(26, setPinHigh); + + // every 54 ms, call setPinChar(1) + tickerSetChar.attach_ms(26, setPinChar, (char)1); +} + +void loop() { +} diff --git a/libraries/Ticker/keywords.txt b/libraries/Ticker/keywords.txt index 81cce2c8ea5..f5f1266516d 100644 --- a/libraries/Ticker/keywords.txt +++ b/libraries/Ticker/keywords.txt @@ -10,5 +10,9 @@ Ticker KEYWORD1 attach KEYWORD2 attach_ms KEYWORD2 +attach_us KEYWORD2 once KEYWORD2 +once_ms KEYWORD2 +once_us KEYWORD2 detach KEYWORD2 +active KEYWORD2 diff --git a/libraries/Ticker/src/Ticker.cpp b/libraries/Ticker/src/Ticker.cpp index 629361b2dd0..6c996ed56b3 100644 --- a/libraries/Ticker/src/Ticker.cpp +++ b/libraries/Ticker/src/Ticker.cpp @@ -31,7 +31,7 @@ Ticker::~Ticker() { detach(); } -void Ticker::_attach_ms(uint32_t milliseconds, bool repeat, callback_with_arg_t callback, uint32_t arg) { +void Ticker::_attach_us(uint64_t micros, bool repeat, callback_with_arg_t callback, void* arg) { esp_timer_create_args_t _timerConfig; _timerConfig.arg = reinterpret_cast(arg); _timerConfig.callback = callback; @@ -43,9 +43,9 @@ void Ticker::_attach_ms(uint32_t milliseconds, bool repeat, callback_with_arg_t } esp_timer_create(&_timerConfig, &_timer); if (repeat) { - esp_timer_start_periodic(_timer, milliseconds * 1000ULL); + esp_timer_start_periodic(_timer, micros); } else { - esp_timer_start_once(_timer, milliseconds * 1000ULL); + esp_timer_start_once(_timer, micros); } } @@ -54,10 +54,19 @@ void Ticker::detach() { esp_timer_stop(_timer); esp_timer_delete(_timer); _timer = nullptr; + _callback_function = nullptr; } } -bool Ticker::active() { +bool Ticker::active() const { if (!_timer) return false; return esp_timer_is_active(_timer); } + +void Ticker::_static_callback(void* arg) +{ + Ticker* _this = reinterpret_cast(arg); + if (_this && _this->_callback_function) + _this->_callback_function(); +} + diff --git a/libraries/Ticker/src/Ticker.h b/libraries/Ticker/src/Ticker.h index 82804e0f37d..50ab424c275 100644 --- a/libraries/Ticker/src/Ticker.h +++ b/libraries/Ticker/src/Ticker.h @@ -28,79 +28,110 @@ extern "C" { #include "esp_timer.h" } +#include class Ticker { public: Ticker(); ~Ticker(); - typedef void (*callback_t)(void); + typedef void (*callback_with_arg_t)(void*); + typedef std::function callback_function_t; + + void attach(float seconds, callback_function_t callback) + { + _callback_function = std::move(callback); + _attach_us(1000000ULL * seconds, true, _static_callback, this); + } - void attach(float seconds, callback_t callback) + void attach_ms(uint64_t milliseconds, callback_function_t callback) { - _attach_ms(seconds * 1000, true, reinterpret_cast(callback), 0); + _callback_function = std::move(callback); + _attach_us(1000ULL * milliseconds, true, _static_callback, this); } - void attach_ms(uint32_t milliseconds, callback_t callback) + void attach_us(uint64_t micros, callback_function_t callback) { - _attach_ms(milliseconds, true, reinterpret_cast(callback), 0); + _callback_function = std::move(callback); + _attach_us(micros, true, _static_callback, this); } template void attach(float seconds, void (*callback)(TArg), TArg arg) { - static_assert(sizeof(TArg) <= sizeof(uint32_t), "attach() callback argument size must be <= 4 bytes"); + static_assert(sizeof(TArg) <= sizeof(void*), "attach() callback argument size must be <= sizeof(void*)"); // C-cast serves two purposes: // static_cast for smaller integer types, // reinterpret_cast + const_cast for pointer types - uint32_t arg32 = (uint32_t)arg; - _attach_ms(seconds * 1000, true, reinterpret_cast(callback), arg32); + _attach_us(1000000ULL * seconds, true, reinterpret_cast(callback), reinterpret_cast(arg)); + } + + template + void attach_ms(uint64_t milliseconds, void (*callback)(TArg), TArg arg) + { + static_assert(sizeof(TArg) <= sizeof(void*), "attach() callback argument size must be <= sizeof(void*)"); + _attach_us(1000ULL * milliseconds, true, reinterpret_cast(callback), reinterpret_cast(arg)); } template - void attach_ms(uint32_t milliseconds, void (*callback)(TArg), TArg arg) + void attach_us(uint64_t micros, void (*callback)(TArg), TArg arg) { - static_assert(sizeof(TArg) <= sizeof(uint32_t), "attach_ms() callback argument size must be <= 4 bytes"); - uint32_t arg32 = (uint32_t)arg; - _attach_ms(milliseconds, true, reinterpret_cast(callback), arg32); + static_assert(sizeof(TArg) <= sizeof(void*), "attach() callback argument size must be <= sizeof(void*)"); + _attach_us(micros, true, reinterpret_cast(callback), reinterpret_cast(arg)); } - void once(float seconds, callback_t callback) + void once(float seconds, callback_function_t callback) { - _attach_ms(seconds * 1000, false, reinterpret_cast(callback), 0); + _callback_function = std::move(callback); + _attach_us(1000000ULL * seconds, false, _static_callback, this); } - void once_ms(uint32_t milliseconds, callback_t callback) + void once_ms(uint64_t milliseconds, callback_function_t callback) { - _attach_ms(milliseconds, false, reinterpret_cast(callback), 0); + _callback_function = std::move(callback); + _attach_us(1000ULL * milliseconds, false, _static_callback, this); + } + + void once_us(uint64_t micros, callback_function_t callback) + { + _callback_function = std::move(callback); + _attach_us(micros, false, _static_callback, this); } template void once(float seconds, void (*callback)(TArg), TArg arg) { - static_assert(sizeof(TArg) <= sizeof(uint32_t), "attach() callback argument size must be <= 4 bytes"); - uint32_t arg32 = (uint32_t)(arg); - _attach_ms(seconds * 1000, false, reinterpret_cast(callback), arg32); + static_assert(sizeof(TArg) <= sizeof(void*), "attach() callback argument size must be <= sizeof(void*)"); + _attach_us(1000000ULL * seconds, false, reinterpret_cast(callback), reinterpret_cast(arg)); + } + + template + void once_ms(uint64_t milliseconds, void (*callback)(TArg), TArg arg) + { + static_assert(sizeof(TArg) <= sizeof(void*), "attach() callback argument size must be <= sizeof(void*)"); + _attach_us(1000ULL * milliseconds, false, reinterpret_cast(callback), reinterpret_cast(arg)); } template - void once_ms(uint32_t milliseconds, void (*callback)(TArg), TArg arg) + void once_us(uint64_t micros, void (*callback)(TArg), TArg arg) { - static_assert(sizeof(TArg) <= sizeof(uint32_t), "attach_ms() callback argument size must be <= 4 bytes"); - uint32_t arg32 = (uint32_t)(arg); - _attach_ms(milliseconds, false, reinterpret_cast(callback), arg32); + static_assert(sizeof(TArg) <= sizeof(void*), "attach() callback argument size must be <= sizeof(void*)"); + _attach_us(micros, false, reinterpret_cast(callback), reinterpret_cast(arg)); } void detach(); - bool active(); + bool active() const; protected: - void _attach_ms(uint32_t milliseconds, bool repeat, callback_with_arg_t callback, uint32_t arg); + static void _static_callback(void* arg); + callback_function_t _callback_function = nullptr; -protected: esp_timer_handle_t _timer; + +private: + void _attach_us(uint64_t micros, bool repeat, callback_with_arg_t callback, void* arg); }; From 77b64506a6edee295ba4738f6e52db3891041e3c Mon Sep 17 00:00:00 2001 From: Leif Date: Wed, 31 Jan 2024 17:54:34 +0700 Subject: [PATCH 19/34] ArduinoOTA upload intermittent failure fixed (#4657) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * OTA upload often fails when client.read() return -1 and we subsequently try to write 4 gigabytes to flash. Fixed by signed comparison and retry. * Delay of 1ms already solves the issue * Update libraries/ArduinoOTA/src/ArduinoOTA.cpp Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com> --------- Co-authored-by: Leif Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com> --- libraries/ArduinoOTA/src/ArduinoOTA.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/ArduinoOTA/src/ArduinoOTA.cpp b/libraries/ArduinoOTA/src/ArduinoOTA.cpp index f7ad9105813..ee9c3e95301 100644 --- a/libraries/ArduinoOTA/src/ArduinoOTA.cpp +++ b/libraries/ArduinoOTA/src/ArduinoOTA.cpp @@ -315,6 +315,10 @@ void ArduinoOTAClass::_runUpdate() { size_t r = client.read(buf, available); if(r != available){ log_w("didn't read enough! %u != %u", r, available); + if((int32_t) r<0) { + delay(1); + continue; //let's not try to write 4 gigabytes when client.read returns -1 + } } written = Update.write(buf, r); From b62d95bc0507746d64a702c0cb3dc9c11cb157c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Proch=C3=A1zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Wed, 31 Jan 2024 11:56:55 +0100 Subject: [PATCH 20/34] fix(ci): Update actions to use Node.js 20 (#9194) --- .github/workflows/allboards.yml | 6 +++--- .github/workflows/boards.yml | 4 ++-- .github/workflows/build_py_tools.yml | 4 ++-- .github/workflows/docs_build.yml | 4 ++-- .github/workflows/docs_deploy.yml | 4 ++-- .github/workflows/gh-pages.yml | 2 +- .github/workflows/hil.yml | 6 +++--- .github/workflows/lib.yml | 4 ++-- .github/workflows/push.yml | 18 +++++++++--------- .github/workflows/release.yml | 4 ++-- .github/workflows/upload-idf-component.yml | 2 +- 11 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/allboards.yml b/.github/workflows/allboards.yml index 49370120339..4a2d4349ac3 100644 --- a/.github/workflows/allboards.yml +++ b/.github/workflows/allboards.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.client_payload.branch }} @@ -33,7 +33,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.client_payload.branch }} @@ -66,7 +66,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.client_payload.branch }} diff --git a/.github/workflows/boards.yml b/.github/workflows/boards.yml index 3e189231932..a16de38d5a5 100644 --- a/.github/workflows/boards.yml +++ b/.github/workflows/boards.yml @@ -18,7 +18,7 @@ jobs: steps: # This step makes the contents of the repository available to the workflow - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup jq uses: dcarbone/install-jq-action@v1.0.1 @@ -43,7 +43,7 @@ jobs: steps: # This step makes the contents of the repository available to the workflow - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Check if build.board is uppercase run: | diff --git a/.github/workflows/build_py_tools.yml b/.github/workflows/build_py_tools.yml index 46ecf6da756..e83f566e170 100644 --- a/.github/workflows/build_py_tools.yml +++ b/.github/workflows/build_py_tools.yml @@ -17,7 +17,7 @@ jobs: all_changed_files: ${{ steps.verify-changed-files.outputs.all_changed_files }} steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 2 ref: ${{ github.event.pull_request.head.ref }} @@ -87,7 +87,7 @@ jobs: echo "tool $tool was changed" done - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} - name: Set up Python 3.8 diff --git a/.github/workflows/docs_build.yml b/.github/workflows/docs_build.yml index 2009425a33e..d5cd652f3df 100644 --- a/.github/workflows/docs_build.yml +++ b/.github/workflows/docs_build.yml @@ -22,10 +22,10 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.10' - name: Build diff --git a/.github/workflows/docs_deploy.yml b/.github/workflows/docs_deploy.yml index a8021f67e34..07dc03ba547 100644 --- a/.github/workflows/docs_deploy.yml +++ b/.github/workflows/docs_deploy.yml @@ -20,10 +20,10 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.10' - name: Deploy Documentation diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index cea5e1eac86..5d8e1794a8a 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -16,7 +16,7 @@ jobs: name: Build GitHub Pages runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Copy Files env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/hil.yml b/.github/workflows/hil.yml index 10c937f1bfe..0b29d4aafb9 100644 --- a/.github/workflows/hil.yml +++ b/.github/workflows/hil.yml @@ -25,7 +25,7 @@ jobs: chunks: ${{ steps.gen-chunks.outputs.chunks }} steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Generate Chunks matrix id: gen-chunks @@ -51,7 +51,7 @@ jobs: chunks: ${{fromJson(needs.gen_chunks.outputs.chunks)}} steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build sketches run: | bash .github/scripts/tests_build.sh -c -t ${{matrix.chip}} -i ${{matrix.chunks}} -m ${{env.MAX_CHUNKS}} @@ -78,7 +78,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download ${{matrix.chip}}-${{matrix.chunks}} artifacts uses: actions/download-artifact@v3 diff --git a/.github/workflows/lib.yml b/.github/workflows/lib.yml index 5e44e705e29..3995aaad4fd 100644 --- a/.github/workflows/lib.yml +++ b/.github/workflows/lib.yml @@ -57,7 +57,7 @@ jobs: steps: # This step makes the contents of the repository available to the workflow - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Compile sketch uses: P-R-O-C-H-Y/compile-sketches@main @@ -87,7 +87,7 @@ jobs: steps: # Check out repository - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ env.GITHUB_TOKEN }} fetch-depth: '0' diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 9a0561c92cd..c7c48225ca4 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -18,7 +18,7 @@ jobs: name: Check cmake file runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: bash ./.github/scripts/check-cmakelists.sh # Ubuntu @@ -31,13 +31,13 @@ jobs: chunk: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: '3.x' - name: Cache tools id: cache-linux - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ./tools/dist @@ -58,8 +58,8 @@ jobs: os: [windows-latest, macOS-latest] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: '3.x' - name: Build Sketches @@ -75,8 +75,8 @@ jobs: os: [ubuntu-latest, windows-latest, macOS-latest] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: '3.x' - name: Build Sketches @@ -97,7 +97,7 @@ jobs: container: espressif/idf:${{ matrix.idf_ver }} steps: - name: Check out arduino-esp32 as a component - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive path: components/arduino-esp32 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c5555027bf0..3a59d7a7dc4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,10 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.x' - name: Build Release diff --git a/.github/workflows/upload-idf-component.yml b/.github/workflows/upload-idf-component.yml index 8fcebf00204..ca21361689f 100644 --- a/.github/workflows/upload-idf-component.yml +++ b/.github/workflows/upload-idf-component.yml @@ -7,7 +7,7 @@ jobs: upload_components: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: "recursive" From bbe09cce0eff5dd2bc2270ca424e95595d187bb9 Mon Sep 17 00:00:00 2001 From: Aron Rubin Date: Wed, 31 Jan 2024 07:47:10 -0500 Subject: [PATCH 21/34] Separated library sources in cmake for selective. (#5136) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Separated library sources in cmake for selective. * Reodered selective process to match CI script * Fixed missing SimpleBLE in library list * fix(cmake): Remove duplicate or non existing sources * fix(cmake): Remove required component --------- Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com> --- CMakeLists.txt | 200 +++++++++++++++++++++++++++++++------------------ 1 file changed, 127 insertions(+), 73 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 802a8f87d2a..bba8b88b146 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,29 +74,85 @@ set(CORE_SRCS cores/esp32/WString.cpp ) -set(LIBRARY_SRCS - libraries/ArduinoOTA/src/ArduinoOTA.cpp - libraries/AsyncUDP/src/AsyncUDP.cpp +set(ARDUINO_ALL_LIBRARIES + ArduinoOTA + AsyncUDP + BLE + BluetoothSerial + DNSServer + EEPROM + ESP_I2S + ESP_SR + ESPmDNS + Ethernet + FFat + FS + HTTPClient + HTTPUpdate + Insights + LittleFS + NetBIOS + Preferences + RainMaker + SD_MMC + SD + SimpleBLE + SPIFFS + SPI + Ticker + Update + USB + WebServer + WiFiClientSecure + WiFi + WiFiProv + Wire + ) + +set(ARDUINO_LIBRARY_ArduinoOTA_SRCS libraries/ArduinoOTA/src/ArduinoOTA.cpp) +set(ARDUINO_LIBRARY_ArduinoOTA_REQUIRES esp_https_ota) + +set(ARDUINO_LIBRARY_AsyncUDP_SRCS libraries/AsyncUDP/src/AsyncUDP.cpp) + +set(ARDUINO_LIBRARY_BluetoothSerial_SRCS libraries/BluetoothSerial/src/BluetoothSerial.cpp libraries/BluetoothSerial/src/BTAddress.cpp libraries/BluetoothSerial/src/BTAdvertisedDeviceSet.cpp - libraries/BluetoothSerial/src/BTScanResultsSet.cpp - libraries/DNSServer/src/DNSServer.cpp - libraries/EEPROM/src/EEPROM.cpp - libraries/ESP_I2S/src/ESP_I2S.cpp + libraries/BluetoothSerial/src/BTScanResultsSet.cpp) + +set(ARDUINO_LIBRARY_DNSServer_SRCS libraries/DNSServer/src/DNSServer.cpp) + +set(ARDUINO_LIBRARY_EEPROM_SRCS libraries/EEPROM/src/EEPROM.cpp) + +set(ARDUINO_LIBRARY_ESP_I2S_SRCS libraries/ESP_I2S/src/ESP_I2S.cpp) + +set(ARDUINO_LIBRARY_ESP_SR_SRCS libraries/ESP_SR/src/ESP_SR.cpp - libraries/ESP_SR/src/esp32-hal-sr.c - libraries/ESPmDNS/src/ESPmDNS.cpp - libraries/Ethernet/src/ETH.cpp - libraries/FFat/src/FFat.cpp + libraries/ESP_SR/src/esp32-hal-sr.c) + +set(ARDUINO_LIBRARY_ESPmDNS_SRCS libraries/ESPmDNS/src/ESPmDNS.cpp) + +set(ARDUINO_LIBRARY_Ethernet_SRCS libraries/Ethernet/src/ETH.cpp) + +set(ARDUINO_LIBRARY_FFat_SRCS libraries/FFat/src/FFat.cpp) + +set(ARDUINO_LIBRARY_FS_SRCS libraries/FS/src/FS.cpp - libraries/FS/src/vfs_api.cpp - libraries/HTTPClient/src/HTTPClient.cpp - libraries/HTTPUpdate/src/HTTPUpdate.cpp - libraries/LittleFS/src/LittleFS.cpp - libraries/Insights/src/Insights.cpp - libraries/NetBIOS/src/NetBIOS.cpp - libraries/Preferences/src/Preferences.cpp + libraries/FS/src/vfs_api.cpp) + +set(ARDUINO_LIBRARY_HTTPClient_SRCS libraries/HTTPClient/src/HTTPClient.cpp) + +set(ARDUINO_LIBRARY_HTTPUpdate_SRCS libraries/HTTPUpdate/src/HTTPUpdate.cpp) + +set(ARDUINO_LIBRARY_Insights_SRCS libraries/Insights/src/Insights.cpp) + +set(ARDUINO_LIBRARY_LittleFS_SRCS libraries/LittleFS/src/LittleFS.cpp) + +set(ARDUINO_LIBRARY_NetBIOS_SRCS libraries/NetBIOS/src/NetBIOS.cpp) + +set(ARDUINO_LIBRARY_Preferences_SRCS libraries/Preferences/src/Preferences.cpp) + +set(ARDUINO_LIBRARY_RainMaker_SRCS libraries/RainMaker/src/RMaker.cpp libraries/RainMaker/src/RMakerNode.cpp libraries/RainMaker/src/RMakerParam.cpp @@ -104,17 +160,28 @@ set(LIBRARY_SRCS libraries/RainMaker/src/RMakerType.cpp libraries/RainMaker/src/RMakerQR.cpp libraries/RainMaker/src/RMakerUtils.cpp - libraries/RainMaker/src/AppInsights.cpp - libraries/SD_MMC/src/SD_MMC.cpp + libraries/RainMaker/src/AppInsights.cpp) + +set(ARDUINO_LIBRARY_SD_MMC_SRCS libraries/SD_MMC/src/SD_MMC.cpp) + +set(ARDUINO_LIBRARY_SD_SRCS libraries/SD/src/SD.cpp libraries/SD/src/sd_diskio.cpp - libraries/SD/src/sd_diskio_crc.c - libraries/SimpleBLE/src/SimpleBLE.cpp - libraries/SPIFFS/src/SPIFFS.cpp - libraries/SPI/src/SPI.cpp - libraries/Ticker/src/Ticker.cpp + libraries/SD/src/sd_diskio_crc.c) + +set(ARDUINO_LIBRARY_SimpleBLE_SRCS libraries/SimpleBLE/src/SimpleBLE.cpp) + +set(ARDUINO_LIBRARY_SPIFFS_SRCS libraries/SPIFFS/src/SPIFFS.cpp) + +set(ARDUINO_LIBRARY_SPI_SRCS libraries/SPI/src/SPI.cpp) + +set(ARDUINO_LIBRARY_Ticker_SRCS libraries/Ticker/src/Ticker.cpp) + +set(ARDUINO_LIBRARY_Update_SRCS libraries/Update/src/Updater.cpp - libraries/Update/src/HttpsOTAUpdate.cpp + libraries/Update/src/HttpsOTAUpdate.cpp) + +set(ARDUINO_LIBRARY_USB_SRCS libraries/USB/src/USBHID.cpp libraries/USB/src/USBMIDI.cpp libraries/USB/src/USBHIDMouse.cpp @@ -123,12 +190,18 @@ set(LIBRARY_SRCS libraries/USB/src/USBHIDConsumerControl.cpp libraries/USB/src/USBHIDSystemControl.cpp libraries/USB/src/USBHIDVendor.cpp - libraries/USB/src/USBVendor.cpp + libraries/USB/src/USBVendor.cpp) + +set(ARDUINO_LIBRARY_WebServer_SRCS libraries/WebServer/src/WebServer.cpp libraries/WebServer/src/Parsing.cpp - libraries/WebServer/src/detail/mimetable.cpp + libraries/WebServer/src/detail/mimetable.cpp) + +set(ARDUINO_LIBRARY_WiFiClientSecure_SRCS libraries/WiFiClientSecure/src/ssl_client.cpp - libraries/WiFiClientSecure/src/WiFiClientSecure.cpp + libraries/WiFiClientSecure/src/WiFiClientSecure.cpp) + +set(ARDUINO_LIBRARY_WiFi_SRCS libraries/WiFi/src/WiFiAP.cpp libraries/WiFi/src/WiFiClient.cpp libraries/WiFi/src/WiFi.cpp @@ -137,12 +210,13 @@ set(LIBRARY_SRCS libraries/WiFi/src/WiFiScan.cpp libraries/WiFi/src/WiFiServer.cpp libraries/WiFi/src/WiFiSTA.cpp - libraries/WiFi/src/WiFiUdp.cpp - libraries/WiFiProv/src/WiFiProv.cpp - libraries/Wire/src/Wire.cpp - ) + libraries/WiFi/src/WiFiUdp.cpp) + +set(ARDUINO_LIBRARY_WiFiProv_SRCS libraries/WiFiProv/src/WiFiProv.cpp) -set(BLE_SRCS +set(ARDUINO_LIBRARY_Wire_SRCS libraries/Wire/src/Wire.cpp) + +set(ARDUINO_LIBRARY_BLE_SRCS libraries/BLE/src/BLE2902.cpp libraries/BLE/src/BLE2904.cpp libraries/BLE/src/BLEAddress.cpp @@ -174,48 +248,28 @@ set(BLE_SRCS libraries/BLE/src/GeneralUtils.cpp ) -set(includedirs - variants/${CONFIG_ARDUINO_VARIANT}/ - cores/esp32/ - libraries/ArduinoOTA/src - libraries/AsyncUDP/src - libraries/BLE/src - libraries/BluetoothSerial/src - libraries/DNSServer/src - libraries/EEPROM/src - libraries/ESP_I2S/src - libraries/ESP_SR/src - libraries/ESP32/src - libraries/ESPmDNS/src - libraries/Ethernet/src - libraries/FFat/src - libraries/FS/src - libraries/HTTPClient/src - libraries/HTTPUpdate/src - libraries/LittleFS/src - libraries/Insights/src - libraries/NetBIOS/src - libraries/Preferences/src - libraries/RainMaker/src - libraries/SD_MMC/src - libraries/SD/src - libraries/SimpleBLE/src - libraries/SPIFFS/src - libraries/SPI/src - libraries/Ticker/src - libraries/Update/src - libraries/USB/src - libraries/WebServer/src - libraries/WiFiClientSecure/src - libraries/WiFi/src - libraries/WiFiProv/src - libraries/Wire/src - ) +set(ARDUINO_LIBRARIES_SRCS) +set(ARDUINO_LIBRARIES_REQUIRES) +set(ARDUINO_LIBRARIES_INCLUDEDIRS) +foreach(libname IN LISTS ARDUINO_ALL_LIBRARIES) + if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_${libname}) + if(ARDUINO_LIBRARY_${libname}_SRCS) + list(APPEND ARDUINO_LIBRARIES_SRCS ${ARDUINO_LIBRARY_${libname}_SRCS}) + endif() + if(ARDUINO_LIBRARY_${libname}_REQUIRES) + list(APPEND ARDUINO_LIBRARIES_REQUIRES ${ARDUINO_LIBRARY_${libname}_REQUIRES}) + endif() + if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libraries/${libname}/src) + list(APPEND ARDUINO_LIBRARIES_INCLUDEDIRS libraries/${libname}/src) + endif() + endif() +endforeach() -set(srcs ${CORE_SRCS} ${LIBRARY_SRCS} ${BLE_SRCS}) +set(includedirs variants/${CONFIG_ARDUINO_VARIANT}/ cores/esp32/ ${ARDUINO_LIBRARIES_INCLUDEDIRS}) +set(srcs ${CORE_SRCS} ${ARDUINO_LIBRARIES_SRCS}) set(priv_includes cores/esp32/libb64) set(requires spi_flash esp_partition mbedtls wifi_provisioning wpa_supplicant esp_adc esp_eth http_parser) -set(priv_requires fatfs nvs_flash app_update spiffs bootloader_support bt esp_hid) +set(priv_requires fatfs nvs_flash app_update spiffs bootloader_support bt esp_hid ${ARDUINO_LIBRARIES_REQUIRES}) idf_component_register(INCLUDE_DIRS ${includedirs} PRIV_INCLUDE_DIRS ${priv_includes} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires}) From 83e2612f8c308056609ef772a0dc422f7c5b4c11 Mon Sep 17 00:00:00 2001 From: yelo Date: Wed, 31 Jan 2024 22:07:06 +0800 Subject: [PATCH 22/34] feat: Add board support for Nologo ESP32S3 Pico (#9181) detail of nologo esp32s3 pico: https://www.nologo.tech/product/esp32/esp32s3Pico/esp32S3Pico.html --- boards.txt | 241 ++++++++++++++++++++ variants/nologo_esp32s3_pico/pins_arduino.h | 37 +++ 2 files changed, 278 insertions(+) create mode 100644 variants/nologo_esp32s3_pico/pins_arduino.h diff --git a/boards.txt b/boards.txt index 203502a8fa7..3261b181bf7 100644 --- a/boards.txt +++ b/boards.txt @@ -14272,6 +14272,247 @@ nologo_esp32c3_super_mini.menu.EraseFlash.all.upload.erase_cmd=-e ############################################################## +nologo_esp32s3_pico.name=Nologo ESP32S3 Pico +nologo_esp32s3_pico.vid.0=0x303a +nologo_esp32s3_pico.pid.0=0x1001 + +nologo_esp32s3_pico.bootloader.tool=esptool_py +nologo_esp32s3_pico.bootloader.tool.default=esptool_py + +nologo_esp32s3_pico.upload.tool=esptool_py +nologo_esp32s3_pico.upload.tool.default=esptool_py +nologo_esp32s3_pico.upload.tool.network=esp_ota + +nologo_esp32s3_pico.upload.maximum_size=1310720 +nologo_esp32s3_pico.upload.maximum_data_size=327680 +nologo_esp32s3_pico.upload.flags= +nologo_esp32s3_pico.upload.extra_flags= +nologo_esp32s3_pico.upload.use_1200bps_touch=false +nologo_esp32s3_pico.upload.wait_for_upload_port=false + +nologo_esp32s3_pico.serial.disableDTR=false +nologo_esp32s3_pico.serial.disableRTS=false + +nologo_esp32s3_pico.build.tarch=xtensa +nologo_esp32s3_pico.build.bootloader_addr=0x0 +nologo_esp32s3_pico.build.target=esp32s3 +nologo_esp32s3_pico.build.mcu=esp32s3 +nologo_esp32s3_pico.build.core=esp32 +nologo_esp32s3_pico.build.variant=nologo_esp32s3_pico +nologo_esp32s3_pico.build.board=NOLOGO_ESP32S3_PICO + +nologo_esp32s3_pico.build.usb_mode=1 +nologo_esp32s3_pico.build.cdc_on_boot=1 +nologo_esp32s3_pico.build.msc_on_boot=0 +nologo_esp32s3_pico.build.dfu_on_boot=0 +nologo_esp32s3_pico.build.f_cpu=240000000L +nologo_esp32s3_pico.build.flash_size=8MB +nologo_esp32s3_pico.build.flash_freq=80m +nologo_esp32s3_pico.build.flash_mode=dio +nologo_esp32s3_pico.build.boot=qio +nologo_esp32s3_pico.build.boot_freq=80m +nologo_esp32s3_pico.build.partitions=default +nologo_esp32s3_pico.build.defines= +nologo_esp32s3_pico.build.loop_core= +nologo_esp32s3_pico.build.event_core= +nologo_esp32s3_pico.build.psram_type=qspi +nologo_esp32s3_pico.build.memory_type={build.boot}_{build.psram_type} + +## IDE 2.0 Seems to not update the value +nologo_esp32s3_pico.menu.JTAGAdapter.default=Disabled +nologo_esp32s3_pico.menu.JTAGAdapter.default.build.copy_jtag_files=0 +nologo_esp32s3_pico.menu.JTAGAdapter.builtin=Integrated USB JTAG +nologo_esp32s3_pico.menu.JTAGAdapter.builtin.build.openocdscript=esp32s3-builtin.cfg +nologo_esp32s3_pico.menu.JTAGAdapter.builtin.build.copy_jtag_files=1 +nologo_esp32s3_pico.menu.JTAGAdapter.external=FTDI Adapter +nologo_esp32s3_pico.menu.JTAGAdapter.external.build.openocdscript=esp32s3-ftdi.cfg +nologo_esp32s3_pico.menu.JTAGAdapter.external.build.copy_jtag_files=1 +nologo_esp32s3_pico.menu.JTAGAdapter.bridge=ESP USB Bridge +nologo_esp32s3_pico.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg +nologo_esp32s3_pico.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 + +nologo_esp32s3_pico.menu.PSRAM.disabled=Disabled +nologo_esp32s3_pico.menu.PSRAM.disabled.build.defines= +nologo_esp32s3_pico.menu.PSRAM.disabled.build.psram_type=qspi +nologo_esp32s3_pico.menu.PSRAM.enabled=QSPI PSRAM +nologo_esp32s3_pico.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM +nologo_esp32s3_pico.menu.PSRAM.enabled.build.psram_type=qspi +nologo_esp32s3_pico.menu.PSRAM.opi=OPI PSRAM +nologo_esp32s3_pico.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM +nologo_esp32s3_pico.menu.PSRAM.opi.build.psram_type=opi + +nologo_esp32s3_pico.menu.FlashMode.qio=QIO 80MHz +nologo_esp32s3_pico.menu.FlashMode.qio.build.flash_mode=dio +nologo_esp32s3_pico.menu.FlashMode.qio.build.boot=qio +nologo_esp32s3_pico.menu.FlashMode.qio.build.boot_freq=80m +nologo_esp32s3_pico.menu.FlashMode.qio.build.flash_freq=80m +nologo_esp32s3_pico.menu.FlashMode.qio120=QIO 120MHz +nologo_esp32s3_pico.menu.FlashMode.qio120.build.flash_mode=dio +nologo_esp32s3_pico.menu.FlashMode.qio120.build.boot=qio +nologo_esp32s3_pico.menu.FlashMode.qio120.build.boot_freq=120m +nologo_esp32s3_pico.menu.FlashMode.qio120.build.flash_freq=80m +nologo_esp32s3_pico.menu.FlashMode.dio=DIO 80MHz +nologo_esp32s3_pico.menu.FlashMode.dio.build.flash_mode=dio +nologo_esp32s3_pico.menu.FlashMode.dio.build.boot=dio +nologo_esp32s3_pico.menu.FlashMode.dio.build.boot_freq=80m +nologo_esp32s3_pico.menu.FlashMode.dio.build.flash_freq=80m +nologo_esp32s3_pico.menu.FlashMode.opi=OPI 80MHz +nologo_esp32s3_pico.menu.FlashMode.opi.build.flash_mode=dout +nologo_esp32s3_pico.menu.FlashMode.opi.build.boot=opi +nologo_esp32s3_pico.menu.FlashMode.opi.build.boot_freq=80m +nologo_esp32s3_pico.menu.FlashMode.opi.build.flash_freq=80m + +nologo_esp32s3_pico.menu.FlashSize.8M=8MB (64Mb) +nologo_esp32s3_pico.menu.FlashSize.8M.build.flash_size=8MB +nologo_esp32s3_pico.menu.FlashSize.8M.build.partitions=default_8MB +nologo_esp32s3_pico.menu.FlashSize.16M=16MB (128Mb) +nologo_esp32s3_pico.menu.FlashSize.16M.build.flash_size=16MB + +nologo_esp32s3_pico.menu.LoopCore.1=Core 1 +nologo_esp32s3_pico.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +nologo_esp32s3_pico.menu.LoopCore.0=Core 0 +nologo_esp32s3_pico.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +nologo_esp32s3_pico.menu.EventsCore.1=Core 1 +nologo_esp32s3_pico.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +nologo_esp32s3_pico.menu.EventsCore.0=Core 0 +nologo_esp32s3_pico.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +nologo_esp32s3_pico.menu.USBMode.hwcdc=Hardware CDC and JTAG +nologo_esp32s3_pico.menu.USBMode.hwcdc.build.usb_mode=1 +nologo_esp32s3_pico.menu.USBMode.default=USB-OTG (TinyUSB) +nologo_esp32s3_pico.menu.USBMode.default.build.usb_mode=0 + +nologo_esp32s3_pico.menu.CDCOnBoot.default=Enabled +nologo_esp32s3_pico.menu.CDCOnBoot.default.build.cdc_on_boot=1 +nologo_esp32s3_pico.menu.CDCOnBoot.cdc=Enabled +nologo_esp32s3_pico.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 + +nologo_esp32s3_pico.menu.MSCOnBoot.default=Disabled +nologo_esp32s3_pico.menu.MSCOnBoot.default.build.msc_on_boot=0 +nologo_esp32s3_pico.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode) +nologo_esp32s3_pico.menu.MSCOnBoot.msc.build.msc_on_boot=1 + +nologo_esp32s3_pico.menu.DFUOnBoot.default=Disabled +nologo_esp32s3_pico.menu.DFUOnBoot.default.build.dfu_on_boot=0 +nologo_esp32s3_pico.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode) +nologo_esp32s3_pico.menu.DFUOnBoot.dfu.build.dfu_on_boot=1 + +nologo_esp32s3_pico.menu.UploadMode.default=UART0 / Hardware CDC +nologo_esp32s3_pico.menu.UploadMode.default.upload.use_1200bps_touch=false +nologo_esp32s3_pico.menu.UploadMode.default.upload.wait_for_upload_port=false +nologo_esp32s3_pico.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB) +nologo_esp32s3_pico.menu.UploadMode.cdc.upload.use_1200bps_touch=true +nologo_esp32s3_pico.menu.UploadMode.cdc.upload.wait_for_upload_port=true + +nologo_esp32s3_pico.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +nologo_esp32s3_pico.menu.PartitionScheme.default.build.partitions=default +nologo_esp32s3_pico.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +nologo_esp32s3_pico.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +nologo_esp32s3_pico.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +nologo_esp32s3_pico.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +nologo_esp32s3_pico.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +nologo_esp32s3_pico.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +nologo_esp32s3_pico.menu.PartitionScheme.minimal.build.partitions=minimal +nologo_esp32s3_pico.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +nologo_esp32s3_pico.menu.PartitionScheme.no_ota.build.partitions=no_ota +nologo_esp32s3_pico.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +nologo_esp32s3_pico.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +nologo_esp32s3_pico.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +nologo_esp32s3_pico.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +nologo_esp32s3_pico.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +nologo_esp32s3_pico.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +nologo_esp32s3_pico.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +nologo_esp32s3_pico.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +nologo_esp32s3_pico.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +nologo_esp32s3_pico.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +nologo_esp32s3_pico.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +nologo_esp32s3_pico.menu.PartitionScheme.huge_app.build.partitions=huge_app +nologo_esp32s3_pico.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +nologo_esp32s3_pico.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +nologo_esp32s3_pico.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +nologo_esp32s3_pico.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +nologo_esp32s3_pico.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) +nologo_esp32s3_pico.menu.PartitionScheme.fatflash.build.partitions=ffat +nologo_esp32s3_pico.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +nologo_esp32s3_pico.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9.9MB FATFS) +nologo_esp32s3_pico.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +nologo_esp32s3_pico.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 +nologo_esp32s3_pico.menu.PartitionScheme.rainmaker=RainMaker +nologo_esp32s3_pico.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +nologo_esp32s3_pico.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 +nologo_esp32s3_pico.menu.PartitionScheme.app5M_fat24M_32MB=32M Flash (4.8MB APP/22MB FATFS) +nologo_esp32s3_pico.menu.PartitionScheme.app5M_fat24M_32MB.build.partitions=large_fat_32MB +nologo_esp32s3_pico.menu.PartitionScheme.app5M_fat24M_32MB.upload.maximum_size=4718592 +nologo_esp32s3_pico.menu.PartitionScheme.app5M_little24M_32MB=32M Flash (4.8MB APP/22MB LittleFS) +nologo_esp32s3_pico.menu.PartitionScheme.app5M_little24M_32MB.build.partitions=large_littlefs_32MB +nologo_esp32s3_pico.menu.PartitionScheme.app5M_little24M_32MB.upload.maximum_size=4718592 +nologo_esp32s3_pico.menu.PartitionScheme.esp_sr_16=ESP SR 16M (3MB APP/7MB SPIFFS/2.9MB MODEL) +nologo_esp32s3_pico.menu.PartitionScheme.esp_sr_16.upload.maximum_size=3145728 +nologo_esp32s3_pico.menu.PartitionScheme.esp_sr_16.upload.extra_flags=0xD10000 {build.path}/srmodels.bin +nologo_esp32s3_pico.menu.PartitionScheme.esp_sr_16.build.partitions=esp_sr_16 +nologo_esp32s3_pico.menu.PartitionScheme.zigbee_zczr=Zigbee ZCZR 4MB with spiffs +nologo_esp32s3_pico.menu.PartitionScheme.zigbee_zczr.build.partitions=zigbee_zczr +nologo_esp32s3_pico.menu.PartitionScheme.zigbee_zczr.upload.maximum_size=1310720 +nologo_esp32s3_pico.menu.PartitionScheme.custom=Custom +nologo_esp32s3_pico.menu.PartitionScheme.custom.build.partitions= +nologo_esp32s3_pico.menu.PartitionScheme.custom.upload.maximum_size=16777216 + +nologo_esp32s3_pico.menu.CPUFreq.240=240MHz (WiFi) +nologo_esp32s3_pico.menu.CPUFreq.240.build.f_cpu=240000000L +nologo_esp32s3_pico.menu.CPUFreq.160=160MHz (WiFi) +nologo_esp32s3_pico.menu.CPUFreq.160.build.f_cpu=160000000L +nologo_esp32s3_pico.menu.CPUFreq.80=80MHz (WiFi) +nologo_esp32s3_pico.menu.CPUFreq.80.build.f_cpu=80000000L +nologo_esp32s3_pico.menu.CPUFreq.40=40MHz +nologo_esp32s3_pico.menu.CPUFreq.40.build.f_cpu=40000000L +nologo_esp32s3_pico.menu.CPUFreq.20=20MHz +nologo_esp32s3_pico.menu.CPUFreq.20.build.f_cpu=20000000L +nologo_esp32s3_pico.menu.CPUFreq.10=10MHz +nologo_esp32s3_pico.menu.CPUFreq.10.build.f_cpu=10000000L + +nologo_esp32s3_pico.menu.UploadSpeed.921600=921600 +nologo_esp32s3_pico.menu.UploadSpeed.921600.upload.speed=921600 +nologo_esp32s3_pico.menu.UploadSpeed.115200=115200 +nologo_esp32s3_pico.menu.UploadSpeed.115200.upload.speed=115200 +nologo_esp32s3_pico.menu.UploadSpeed.256000.windows=256000 +nologo_esp32s3_pico.menu.UploadSpeed.256000.upload.speed=256000 +nologo_esp32s3_pico.menu.UploadSpeed.230400.windows.upload.speed=256000 +nologo_esp32s3_pico.menu.UploadSpeed.230400=230400 +nologo_esp32s3_pico.menu.UploadSpeed.230400.upload.speed=230400 +nologo_esp32s3_pico.menu.UploadSpeed.460800.linux=460800 +nologo_esp32s3_pico.menu.UploadSpeed.460800.macosx=460800 +nologo_esp32s3_pico.menu.UploadSpeed.460800.upload.speed=460800 +nologo_esp32s3_pico.menu.UploadSpeed.512000.windows=512000 +nologo_esp32s3_pico.menu.UploadSpeed.512000.upload.speed=512000 + +nologo_esp32s3_pico.menu.DebugLevel.none=None +nologo_esp32s3_pico.menu.DebugLevel.none.build.code_debug=0 +nologo_esp32s3_pico.menu.DebugLevel.error=Error +nologo_esp32s3_pico.menu.DebugLevel.error.build.code_debug=1 +nologo_esp32s3_pico.menu.DebugLevel.warn=Warn +nologo_esp32s3_pico.menu.DebugLevel.warn.build.code_debug=2 +nologo_esp32s3_pico.menu.DebugLevel.info=Info +nologo_esp32s3_pico.menu.DebugLevel.info.build.code_debug=3 +nologo_esp32s3_pico.menu.DebugLevel.debug=Debug +nologo_esp32s3_pico.menu.DebugLevel.debug.build.code_debug=4 +nologo_esp32s3_pico.menu.DebugLevel.verbose=Verbose +nologo_esp32s3_pico.menu.DebugLevel.verbose.build.code_debug=5 + +nologo_esp32s3_pico.menu.EraseFlash.none=Disabled +nologo_esp32s3_pico.menu.EraseFlash.none.upload.erase_cmd= +nologo_esp32s3_pico.menu.EraseFlash.all=Enabled +nologo_esp32s3_pico.menu.EraseFlash.all.upload.erase_cmd=-e + +nologo_esp32s3_pico.menu.ZigbeeMode.default=Disabled +nologo_esp32s3_pico.menu.ZigbeeMode.default.build.zigbee_mode= +nologo_esp32s3_pico.menu.ZigbeeMode.default.build.zigbee_libs= +nologo_esp32s3_pico.menu.ZigbeeMode.zczr=Zigbee ZCZR (coordinator) +nologo_esp32s3_pico.menu.ZigbeeMode.zczr.build.zigbee_mode=-DZIGBEE_MODE_ZCZR +nologo_esp32s3_pico.menu.ZigbeeMode.zczr.build.zigbee_libs=-lesp_zb_api_zczr -lesp_zb_cli_command -lzboss_stack.zczr.trace -lzboss_stack.zczr -lzboss_port + +############################################################## + mhetesp32devkit.name=MH ET LIVE ESP32DevKIT mhetesp32devkit.bootloader.tool=esptool_py diff --git a/variants/nologo_esp32s3_pico/pins_arduino.h b/variants/nologo_esp32s3_pico/pins_arduino.h new file mode 100644 index 00000000000..42109e0c12b --- /dev/null +++ b/variants/nologo_esp32s3_pico/pins_arduino.h @@ -0,0 +1,37 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include +#include "soc/soc_caps.h" + +#define USB_VID 0x303a +#define USB_PID 0x1001 + +static const uint8_t LED_BUILTIN = 21; +#define BUILTIN_LED LED_BUILTIN +#define LED_BUILTIN LED_BUILTIN +#define RGB_BUILTIN SOC_GPIO_PIN_COUNT + LED_BUILTIN +#define RGB_BRIGHTNESS 64 + +// SPI - unused but you can create your own definition in your sketch +static const int8_t SCK = -1; +static const int8_t MISO = -1; +static const int8_t MOSI = -1; +static const int8_t SS = -1; + +// I2C - unused but you can create your own definition in your sketch +static const uint8_t SDA = -1; +static const uint8_t SCL = -1; + +static const uint8_t A0 = 1; +static const uint8_t A1 = 2; +static const uint8_t A2 = 3; +static const uint8_t A3 = 4; +static const uint8_t A4 = 5; +static const uint8_t A5 = 6; +static const uint8_t A6 = 7; +static const uint8_t A7 = 8; +static const uint8_t A8 = 9; +static const uint8_t A9 = 10; + +#endif /* Pins_Arduino_h */ From b163583bf8253ce3754341fad28acc98dd68ac02 Mon Sep 17 00:00:00 2001 From: Andrea Canale Date: Thu, 1 Feb 2024 10:16:13 +0100 Subject: [PATCH 23/34] feat(usb): Add more keys in USBHIDKeyboard (#9190) * Add more keys value that can be used with Keyboard.press() --- libraries/USB/src/USBHIDKeyboard.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/USB/src/USBHIDKeyboard.h b/libraries/USB/src/USBHIDKeyboard.h index 1a2056e9083..0c75c7dcfc9 100644 --- a/libraries/USB/src/USBHIDKeyboard.h +++ b/libraries/USB/src/USBHIDKeyboard.h @@ -63,6 +63,7 @@ typedef union { #define KEY_DOWN_ARROW 0xD9 #define KEY_LEFT_ARROW 0xD8 #define KEY_RIGHT_ARROW 0xD7 +#define KEY_MENU 0xFE #define KEY_SPACE 0x20 #define KEY_BACKSPACE 0xB2 #define KEY_TAB 0xB3 @@ -74,6 +75,7 @@ typedef union { #define KEY_PAGE_DOWN 0xD6 #define KEY_HOME 0xD2 #define KEY_END 0xD5 +#define KEY_NUM_LOCK 0xDB #define KEY_CAPS_LOCK 0xC1 #define KEY_F1 0xC2 #define KEY_F2 0xC3 @@ -99,6 +101,9 @@ typedef union { #define KEY_F22 0xF9 #define KEY_F23 0xFA #define KEY_F24 0xFB +#define KEY_PRINT_SCREEN 0xCE +#define KEY_SCROLL_LOCK 0xCF +#define KEY_PAUSE 0xD0 #define LED_NUMLOCK 0x01 #define LED_CAPSLOCK 0x02 From 5d73dd593f5f4f2037e75e5014a4ba2e82034b8e Mon Sep 17 00:00:00 2001 From: Pedro Minatel Date: Thu, 1 Feb 2024 09:24:11 +0000 Subject: [PATCH 24/34] [Docs] Change/clean the requirements file (#9196) * Changes on the requirements file to remove dependencies * Comment removed --------- Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> --- docs/requirements.txt | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 7c819ff0836..71b14c5c135 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,15 +1,3 @@ -esp-docs==1.4.* +esp-docs>=1.4.0 sphinx-copybutton==0.5.0 sphinx-tabs==3.2.0 -sphinxcontrib-actdiag==3.0.0 -sphinxcontrib-applehelp==1.0.4 -sphinxcontrib-blockdiag==3.0.0 -sphinxcontrib-devhelp==1.0.2 -sphinxcontrib-htmlhelp==2.0.1 -sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-nwdiag==2.0.0 -sphinxcontrib-qthelp==1.0.3 -sphinxcontrib-seqdiag==3.0.0 -sphinxcontrib-serializinghtml==1.1.5 -sphinxcontrib-svg2pdfconverter==1.2.0 -sphinxcontrib-wavedrom==3.0.4 From 7c5196df1bf43339190d190b90b838c78b0a8b40 Mon Sep 17 00:00:00 2001 From: Clemens Kirchgatterer Date: Thu, 1 Feb 2024 11:24:14 +0100 Subject: [PATCH 25/34] fix(webserver): Proposal for simplifying webserver file uploads via form POST. (#9167) * Proposal for fixing file webserver uploads via form upload. The form parser has shown to have issues with files ending with "--\r\n". This commit replaces the form parser with the parser from ESP8266, which passes the test case. * Replace _uploadReadByte() in WebServer/Parsing.cpp with ESP8266 implementation. --- libraries/WebServer/src/Parsing.cpp | 167 +++++++++------------------- 1 file changed, 55 insertions(+), 112 deletions(-) diff --git a/libraries/WebServer/src/Parsing.cpp b/libraries/WebServer/src/Parsing.cpp index 1debeb730ea..f3b19b19d6e 100644 --- a/libraries/WebServer/src/Parsing.cpp +++ b/libraries/WebServer/src/Parsing.cpp @@ -309,42 +309,14 @@ void WebServer::_uploadWriteByte(uint8_t b){ _currentUpload->buf[_currentUpload->currentSize++] = b; } -int WebServer::_uploadReadByte(WiFiClient& client){ +int WebServer::_uploadReadByte(WiFiClient& client) { int res = client.read(); - if(res < 0) { - // keep trying until you either read a valid byte or timeout - unsigned long startMillis = millis(); - long timeoutIntervalMillis = client.getTimeout(); - boolean timedOut = false; - for(;;) { - if (!client.connected()) return -1; - // loosely modeled after blinkWithoutDelay pattern - while(!timedOut && !client.available() && client.connected()){ - delay(2); - timedOut = millis() - startMillis >= timeoutIntervalMillis; - } - res = client.read(); - if(res >= 0) { - return res; // exit on a valid read - } - // NOTE: it is possible to get here and have all of the following - // assertions hold true - // - // -- client.available() > 0 - // -- client.connected == true - // -- res == -1 - // - // a simple retry strategy overcomes this which is to say the - // assertion is not permanent, but the reason that this works - // is elusive, and possibly indicative of a more subtle underlying - // issue - - timedOut = millis() - startMillis >= timeoutIntervalMillis; - if(timedOut) { - return res; // exit on a timeout - } - } + if (res < 0) { + while(!client.available() && client.connected()) + delay(2); + + res = client.read(); } return res; @@ -436,88 +408,59 @@ bool WebServer::_parseForm(WiFiClient& client, String boundary, uint32_t len){ if(_currentHandler && _currentHandler->canUpload(_currentUri)) _currentHandler->upload(*this, _currentUri, *_currentUpload); _currentUpload->status = UPLOAD_FILE_WRITE; - int argByte = _uploadReadByte(client); -readfile: - while(argByte != 0x0D){ - if(argByte < 0) return _parseFormUploadAborted(); - _uploadWriteByte(argByte); - argByte = _uploadReadByte(client); - } - - argByte = _uploadReadByte(client); - if(argByte < 0) return _parseFormUploadAborted(); - if (argByte == 0x0A){ - argByte = _uploadReadByte(client); - if(argByte < 0) return _parseFormUploadAborted(); - if ((char)argByte != '-'){ - //continue reading the file - _uploadWriteByte(0x0D); - _uploadWriteByte(0x0A); - goto readfile; - } else { - argByte = _uploadReadByte(client); - if(argByte < 0) return _parseFormUploadAborted(); - if ((char)argByte != '-'){ - //continue reading the file - _uploadWriteByte(0x0D); - _uploadWriteByte(0x0A); - _uploadWriteByte((uint8_t)('-')); - goto readfile; - } - } - - uint8_t endBuf[boundary.length()]; - uint32_t i = 0; - while(i < boundary.length()){ - argByte = _uploadReadByte(client); - if(argByte < 0) return _parseFormUploadAborted(); - if ((char)argByte == 0x0D){ - _uploadWriteByte(0x0D); - _uploadWriteByte(0x0A); - _uploadWriteByte((uint8_t)('-')); - _uploadWriteByte((uint8_t)('-')); - uint32_t j = 0; - while(j < i){ - _uploadWriteByte(endBuf[j++]); - } - goto readfile; - } - endBuf[i++] = (uint8_t)argByte; - } - - if (strstr((const char*)endBuf, boundary.c_str()) != NULL){ - if(_currentHandler && _currentHandler->canUpload(_currentUri)) - _currentHandler->upload(*this, _currentUri, *_currentUpload); - _currentUpload->totalSize += _currentUpload->currentSize; - _currentUpload->status = UPLOAD_FILE_END; - if(_currentHandler && _currentHandler->canUpload(_currentUri)) - _currentHandler->upload(*this, _currentUri, *_currentUpload); - log_v("End File: %s Type: %s Size: %d", _currentUpload->filename.c_str(), _currentUpload->type.c_str(), _currentUpload->totalSize); - line = client.readStringUntil(0x0D); - client.readStringUntil(0x0A); - if (line == "--"){ - log_v("Done Parsing POST"); - break; + int fastBoundaryLen = 4 /* \r\n-- */ + boundary.length() + 1 /* \0 */; + char fastBoundary[ fastBoundaryLen ]; + snprintf(fastBoundary, fastBoundaryLen, "\r\n--%s", boundary.c_str()); + int boundaryPtr = 0; + while ( true ) { + int ret = _uploadReadByte(client); + if (ret < 0) { + // Unexpected, we should have had data available per above + return _parseFormUploadAborted(); } - continue; - } else { - _uploadWriteByte(0x0D); - _uploadWriteByte(0x0A); - _uploadWriteByte((uint8_t)('-')); - _uploadWriteByte((uint8_t)('-')); - uint32_t i = 0; - while(i < boundary.length()){ - _uploadWriteByte(endBuf[i++]); + char in = (char) ret; + if (in == fastBoundary[ boundaryPtr ]) { + // The input matched the current expected character, advance and possibly exit this file + boundaryPtr++; + if (boundaryPtr == fastBoundaryLen - 1) { + // We read the whole boundary line, we're done here! + break; + } + } else { + // The char doesn't match what we want, so dump whatever matches we had, the read in char, and reset ptr to start + for (int i = 0; i < boundaryPtr; i++) { + _uploadWriteByte( fastBoundary[ i ] ); + } + if (in == fastBoundary[ 0 ]) { + // This could be the start of the real end, mark it so and don't emit/skip it + boundaryPtr = 1; + } else { + // Not the 1st char of our pattern, so emit and ignore + _uploadWriteByte( in ); + boundaryPtr = 0; + } } - argByte = _uploadReadByte(client); - goto readfile; - } - } else { - _uploadWriteByte(0x0D); - goto readfile; } - break; + // Found the boundary string, finish processing this file upload + if (_currentHandler && _currentHandler->canUpload(_currentUri)) + _currentHandler->upload(*this, _currentUri, *_currentUpload); + _currentUpload->totalSize += _currentUpload->currentSize; + _currentUpload->status = UPLOAD_FILE_END; + if (_currentHandler && _currentHandler->canUpload(_currentUri)) + _currentHandler->upload(*this, _currentUri, *_currentUpload); + log_v("End File: %s Type: %s Size: %d", + _currentUpload->filename.c_str(), + _currentUpload->type.c_str(), + (int)_currentUpload->totalSize); + if (!client.connected()) return _parseFormUploadAborted(); + line = client.readStringUntil('\r'); + client.readStringUntil('\n'); + if (line == "--") { // extra two dashes mean we reached the end of all form fields + log_v("Done Parsing POST"); + break; + } + continue; } } } From d14873ab8a95b86c8f38ceaed01642dd2909dcb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Proch=C3=A1zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:38:07 +0100 Subject: [PATCH 26/34] Add Zigbee examples (#9024) * feat: added zigbee light and switch examples * fix: added skip files for unsupported socs * fix(example): Removed Serial and updated readme. * fix(): Simplify examples + fix zigbee partition table --- .../Zigbee/Zigbee_Light_Bulb/.skip.esp32 | 0 .../Zigbee/Zigbee_Light_Bulb/.skip.esp32c3 | 0 .../Zigbee/Zigbee_Light_Bulb/.skip.esp32c6 | 0 .../Zigbee/Zigbee_Light_Bulb/.skip.esp32h2 | 0 .../Zigbee/Zigbee_Light_Bulb/.skip.esp32s2 | 0 .../Zigbee/Zigbee_Light_Bulb/.skip.esp32s3 | 0 .../Zigbee/Zigbee_Light_Bulb/README.md | 70 ++++ .../Zigbee_Light_Bulb/Zigbee_Light_Bulb.ino | 191 +++++++++++ .../Zigbee/Zigbee_Light_Switch/.skip.esp32 | 0 .../Zigbee/Zigbee_Light_Switch/.skip.esp32c3 | 0 .../Zigbee/Zigbee_Light_Switch/.skip.esp32c6 | 0 .../Zigbee/Zigbee_Light_Switch/.skip.esp32h2 | 0 .../Zigbee/Zigbee_Light_Switch/.skip.esp32s2 | 0 .../Zigbee/Zigbee_Light_Switch/.skip.esp32s3 | 0 .../Zigbee/Zigbee_Light_Switch/README.md | 70 ++++ .../Zigbee_Light_Switch.ino | 302 ++++++++++++++++++ tools/partitions/zigbee_zczr.csv | 2 +- 17 files changed, 634 insertions(+), 1 deletion(-) create mode 100644 libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/.skip.esp32 create mode 100644 libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/.skip.esp32c3 create mode 100644 libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/.skip.esp32c6 create mode 100644 libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/.skip.esp32h2 create mode 100644 libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/.skip.esp32s2 create mode 100644 libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/.skip.esp32s3 create mode 100644 libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/README.md create mode 100644 libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/Zigbee_Light_Bulb.ino create mode 100644 libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/.skip.esp32 create mode 100644 libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/.skip.esp32c3 create mode 100644 libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/.skip.esp32c6 create mode 100644 libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/.skip.esp32h2 create mode 100644 libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/.skip.esp32s2 create mode 100644 libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/.skip.esp32s3 create mode 100644 libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/README.md create mode 100644 libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/Zigbee_Light_Switch.ino diff --git a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/.skip.esp32 b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/.skip.esp32 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/.skip.esp32c3 b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/.skip.esp32c3 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/.skip.esp32c6 b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/.skip.esp32c6 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/.skip.esp32h2 b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/.skip.esp32h2 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/.skip.esp32s2 b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/.skip.esp32s2 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/.skip.esp32s3 b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/.skip.esp32s3 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/README.md b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/README.md new file mode 100644 index 00000000000..a1de3abef2c --- /dev/null +++ b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/README.md @@ -0,0 +1,70 @@ +# Arduino-ESP32 Zigbee Light Bulb Example + +This example shows how to configure the Zigbee end device and use it as a HA on/off light bulb. + +**This example is based on ESP-Zigbee-SDK example esp_zigbee_HA_sample/HA_on_off_light.** + +# Supported Targets + +Currently, this example supports the following targets. + +| Supported Targets | ESP32-C6 | ESP32-H2 | +| ----------------- | -------- | -------- | + +## Hardware Required + +* One development board (ESP32-H2 or ESP32-C6) acting as Zigbee coordinator (loaded with Zigbee_Light_switch example) +* A USB cable for power supply and programming +* Choose another board (ESP32-H2 or ESP32-C6) as Zigbee end device (loaded with Zigbee_Light_bulb example) + +### Configure the Project + +Set the LED GPIO by changing the `LED_PIN` definition. By default, the LED_PIN is `RGB_BUILTIN`. +By default, the `neoPixelWrite` function is used to control the LED. You can change it to digitalWrite to control a simple LED. + +#### Using Arduino IDE + +To get more information about the Espressif boards see [Espressif Development Kits](https://www.espressif.com/en/products/devkits). + +* Before Compile/Verify, select the correct board: `Tools -> Board`. +* Select the End device Zigbee mode: `Tools -> Zigbee mode: Zigbee ED (end device)` +* Select Partition Scheme for Zigbee: `Tools -> Partition Scheme: Zigbee 4MB with spiffs` +* Select the COM port: `Tools -> Port: xxx` where the `xxx` is the detected COM port. + +## Troubleshooting + +If the End device flashed with this example is not connecting to the coordinator, erase the flash before flashing it to the board. It is recommended to do this if you did changes to the coordinator. +You can do the following: + +* In the Arduino IDE go to the Tools menu and set `Erase All Flash Before Sketch Upload` to `Enabled` +* In the sketch uncomment function `esp_zb_nvram_erase_at_start(true);` located in `esp_zb_task` function. + +***Important: Make sure you are using a good quality USB cable and that you have a reliable power source*** + +* **LED not blinking:** Check the wiring connection and the IO selection. +* **Programming Fail:** If the programming/flash procedure fails, try reducing the serial connection speed. +* **COM port not detected:** Check the USB cable and the USB to Serial driver installation. + +If the error persists, you can ask for help at the official [ESP32 forum](https://esp32.com) or see [Contribute](#contribute). + +## Contribute + +To know how to contribute to this project, see [How to contribute.](https://github.com/espressif/arduino-esp32/blob/master/CONTRIBUTING.rst) + +If you have any **feedback** or **issue** to report on this example/library, please open an issue or fix it by creating a new PR. Contributions are more than welcome! + +Before creating a new issue, be sure to try Troubleshooting and check if the same issue was already created by someone else. + +## Resources + +The ESP Zigbee SDK provides more examples: +* ESP Zigbee SDK Docs: [Link](https://docs.espressif.com/projects/esp-zigbee-sdk) +* ESP Zigbee SDK Repo: [Link](https://github.com/espressif/esp-zigbee-sdk) + +* Official ESP32 Forum: [Link](https://esp32.com) +* Arduino-ESP32 Official Repository: [espressif/arduino-esp32](https://github.com/espressif/arduino-esp32) +* ESP32 Datasheet: [Link to datasheet](https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf) +* ESP32-S2 Datasheet: [Link to datasheet](https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf) +* ESP32-C3 Datasheet: [Link to datasheet](https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf) +* ESP32-S3 Datasheet: [Link to datasheet](https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf) +* Official ESP-IDF documentation: [ESP-IDF](https://idf.espressif.com) diff --git a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/Zigbee_Light_Bulb.ino b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/Zigbee_Light_Bulb.ino new file mode 100644 index 00000000000..1fc99897d9d --- /dev/null +++ b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/Zigbee_Light_Bulb.ino @@ -0,0 +1,191 @@ +// Copyright 2023 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @brief This example demonstrates simple Zigbee light bulb. + * + * The example demonstrates how to use ESP Zigbee stack to create a end device light bulb. + * The light bulb is a Zigbee end device, which is controlled by a Zigbee coordinator. + * + * Proper Zigbee mode must be selected in Tools->Zigbee mode + * and also the correct partition scheme must be selected in Tools->Partition Scheme. + * + * Please check the README.md for instructions and more detailed description. + */ + +#ifndef ZIGBEE_MODE_ED +#error "Zigbee end device mode is not selected in Tools->Zigbee mode" +#endif + +#include "esp_zigbee_core.h" +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "ha/esp_zigbee_ha_standard.h" + +#define LED_PIN RGB_BUILTIN + +/* Default End Device config */ +#define ESP_ZB_ZED_CONFIG() \ + { \ + .esp_zb_role = ESP_ZB_DEVICE_TYPE_ED, \ + .install_code_policy = INSTALLCODE_POLICY_ENABLE, \ + .nwk_cfg = { \ + .zed_cfg = { \ + .ed_timeout = ED_AGING_TIMEOUT, \ + .keep_alive = ED_KEEP_ALIVE, \ + }, \ + }, \ + } + +#define ESP_ZB_DEFAULT_RADIO_CONFIG() \ + { \ + .radio_mode = RADIO_MODE_NATIVE, \ + } + +#define ESP_ZB_DEFAULT_HOST_CONFIG() \ + { \ + .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + } + +/* Zigbee configuration */ +#define INSTALLCODE_POLICY_ENABLE false /* enable the install code policy for security */ +#define ED_AGING_TIMEOUT ESP_ZB_ED_AGING_TIMEOUT_64MIN +#define ED_KEEP_ALIVE 3000 /* 3000 millisecond */ +#define HA_ESP_LIGHT_ENDPOINT 10 /* esp light bulb device endpoint, used to process light controlling commands */ +#define ESP_ZB_PRIMARY_CHANNEL_MASK ESP_ZB_TRANSCEIVER_ALL_CHANNELS_MASK /* Zigbee primary channel mask use in the example */ + +/********************* Zigbee functions **************************/ +static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask) +{ + ESP_ERROR_CHECK(esp_zb_bdb_start_top_level_commissioning(mode_mask)); +} + +void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct) +{ + uint32_t *p_sg_p = signal_struct->p_app_signal; + esp_err_t err_status = signal_struct->esp_err_status; + esp_zb_app_signal_type_t sig_type = (esp_zb_app_signal_type_t)*p_sg_p; + switch (sig_type) { + case ESP_ZB_ZDO_SIGNAL_SKIP_STARTUP: + log_i("Zigbee stack initialized"); + esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_INITIALIZATION); + break; + case ESP_ZB_BDB_SIGNAL_DEVICE_FIRST_START: + case ESP_ZB_BDB_SIGNAL_DEVICE_REBOOT: + if (err_status == ESP_OK) { + log_i("Start network steering"); + esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_NETWORK_STEERING); + } else { + /* commissioning failed */ + log_w("Failed to initialize Zigbee stack (status: %s)", esp_err_to_name(err_status)); + } + break; + case ESP_ZB_BDB_SIGNAL_STEERING: + if (err_status == ESP_OK) { + esp_zb_ieee_addr_t extended_pan_id; + esp_zb_get_extended_pan_id(extended_pan_id); + log_i("Joined network successfully (Extended PAN ID: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x, PAN ID: 0x%04hx, Channel:%d, Short Address: 0x%04hx)", + extended_pan_id[7], extended_pan_id[6], extended_pan_id[5], extended_pan_id[4], + extended_pan_id[3], extended_pan_id[2], extended_pan_id[1], extended_pan_id[0], + esp_zb_get_pan_id(), esp_zb_get_current_channel(), esp_zb_get_short_address()); + } else { + log_i("Network steering was not successful (status: %s)", esp_err_to_name(err_status)); + esp_zb_scheduler_alarm((esp_zb_callback_t)bdb_start_top_level_commissioning_cb, ESP_ZB_BDB_MODE_NETWORK_STEERING, 1000); + } + break; + default: + log_i("ZDO signal: %s (0x%x), status: %s", esp_zb_zdo_signal_to_string(sig_type), sig_type, + esp_err_to_name(err_status)); + break; + } +} + +static esp_err_t zb_action_handler(esp_zb_core_action_callback_id_t callback_id, const void *message) +{ + esp_err_t ret = ESP_OK; + switch (callback_id) { + case ESP_ZB_CORE_SET_ATTR_VALUE_CB_ID: + ret = zb_attribute_handler((esp_zb_zcl_set_attr_value_message_t *)message); + break; + default: + log_w("Receive Zigbee action(0x%x) callback", callback_id); + break; + } + return ret; +} + +static void esp_zb_task(void *pvParameters) +{ + esp_zb_cfg_t zb_nwk_cfg = ESP_ZB_ZED_CONFIG(); + esp_zb_init(&zb_nwk_cfg); + esp_zb_on_off_light_cfg_t light_cfg = ESP_ZB_DEFAULT_ON_OFF_LIGHT_CONFIG(); + esp_zb_ep_list_t *esp_zb_on_off_light_ep = esp_zb_on_off_light_ep_create(HA_ESP_LIGHT_ENDPOINT, &light_cfg); + esp_zb_device_register(esp_zb_on_off_light_ep); + esp_zb_core_action_handler_register(zb_action_handler); + esp_zb_set_primary_network_channel_set(ESP_ZB_PRIMARY_CHANNEL_MASK); + + //Erase NVRAM before creating connection to new Coordinator + //esp_zb_nvram_erase_at_start(true); //Comment out this line to erase NVRAM data if you are conneting to new Coordinator + + ESP_ERROR_CHECK(esp_zb_start(false)); + esp_zb_main_loop_iteration(); +} + +/* Handle the light attribute */ + +static esp_err_t zb_attribute_handler(const esp_zb_zcl_set_attr_value_message_t *message) +{ + esp_err_t ret = ESP_OK; + bool light_state = 0; + + if(!message){ + log_e("Empty message"); + } + if(message->info.status != ESP_ZB_ZCL_STATUS_SUCCESS){ + log_e("Received message: error status(%d)", message->info.status); + } + + log_i("Received message: endpoint(%d), cluster(0x%x), attribute(0x%x), data size(%d)", message->info.dst_endpoint, message->info.cluster, + message->attribute.id, message->attribute.data.size); + if (message->info.dst_endpoint == HA_ESP_LIGHT_ENDPOINT) { + if (message->info.cluster == ESP_ZB_ZCL_CLUSTER_ID_ON_OFF) { + if (message->attribute.id == ESP_ZB_ZCL_ATTR_ON_OFF_ON_OFF_ID && message->attribute.data.type == ESP_ZB_ZCL_ATTR_TYPE_BOOL) { + light_state = message->attribute.data.value ? *(bool *)message->attribute.data.value : light_state; + log_i("Light sets to %s", light_state ? "On" : "Off"); + neopixelWrite(LED_PIN,255*light_state,255*light_state,255*light_state); // Toggle light + } + } + } + return ret; +} + +/********************* Arduino functions **************************/ +void setup() { + // Init Zigbee + esp_zb_platform_config_t config = { + .radio_config = ESP_ZB_DEFAULT_RADIO_CONFIG(), + .host_config = ESP_ZB_DEFAULT_HOST_CONFIG(), + }; + ESP_ERROR_CHECK(esp_zb_platform_config(&config)); + + // Init RMT and leave light OFF + neopixelWrite(LED_PIN,0,0,0); + + // Start Zigbee task + xTaskCreate(esp_zb_task, "Zigbee_main", 4096, NULL, 5, NULL); +} + +void loop() { + //empty, zigbee running in task +} diff --git a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/.skip.esp32 b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/.skip.esp32 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/.skip.esp32c3 b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/.skip.esp32c3 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/.skip.esp32c6 b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/.skip.esp32c6 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/.skip.esp32h2 b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/.skip.esp32h2 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/.skip.esp32s2 b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/.skip.esp32s2 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/.skip.esp32s3 b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/.skip.esp32s3 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/README.md b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/README.md new file mode 100644 index 00000000000..98f509150a1 --- /dev/null +++ b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/README.md @@ -0,0 +1,70 @@ +# Arduino-ESP32 Zigbee Light Switch Example + +This example shows how to configure Zigbee Coordinator and use it as an HA on/off light switch. + +**This example is based on ESP-Zigbee-SDK example esp_zigbee_HA_sample/HA_on_off_switch.** + +# Supported Targets + +Currently, this example supports the following targets. + +| Supported Targets | ESP32-C6 | ESP32-H2 | +| ----------------- | -------- | -------- | + +## Hardware Required + +* One development board (ESP32-H2 or ESP32-C6) acting as Zigbee end device (loaded with Zigbee_Light_bulb example). +* A USB cable for power supply and programming. +* Choose another board (ESP32-H2 or ESP32-C6) as Zigbee coordinator (loaded with Zigbee_Light_switch example). + +### Configure the Project + +Set the Button Switch GPIO by changing the `GPIO_INPUT_IO_TOGGLE_SWITCH` definition. By default, the LED_PIN is `GPIO_NUM_9`. + +#### Using Arduino IDE + +To get more information about the Espressif boards see [Espressif Development Kits](https://www.espressif.com/en/products/devkits). + +* Before Compile/Verify, select the correct board: `Tools -> Board`. +* Select the Coordinator Zigbee mode: `Tools -> Zigbee mode: Zigbee ZCZR (coordinator)`. +* Select Partition Scheme for Zigbee: `Tools -> Partition Scheme: Zigbee 4MB with spiffs`. +* Select the COM port: `Tools -> Port: xxx where the `xxx` is the detected COM port. +* Optional: Set debug level to info to see logs from Zigbee stack: `Tools -> Core Debug Level: Info`. + +## Troubleshooting + +If the End device flashed with the example `Zigbee_Light_Bulb` is not connecting to the coordinator, erase the flash of the End device before flashing the example to the board. It is recommended to do this if you re-flash the coordinator. +You can do the following: + +* In the Arduino IDE go to the Tools menu and set `Erase All Flash Before Sketch Upload` to `Enabled`. +* In the `Zigbee_Light_Bulb` example sketch uncomment function `esp_zb_nvram_erase_at_start(true);` located in `esp_zb_task` function. + +***Important: Make sure you are using a good quality USB cable and that you have a reliable power source*** + +* **LED not blinking:** Check the wiring connection and the IO selection. +* **Programming Fail:** If the programming/flash procedure fails, try reducing the serial connection speed. +* **COM port not detected:** Check the USB cable and the USB to Serial driver installation. + +If the error persists, you can ask for help at the official [ESP32 forum](https://esp32.com) or see [Contribute](#contribute). + +## Contribute + +To know how to contribute to this project, see [How to contribute.](https://github.com/espressif/arduino-esp32/blob/master/CONTRIBUTING.rst) + +If you have any **feedback** or **issue** to report on this example/library, please open an issue or fix it by creating a new PR. Contributions are more than welcome! + +Before creating a new issue, be sure to try Troubleshooting and check if the same issue was already created by someone else. + +## Resources + +The ESP Zigbee SDK provides more examples: +* ESP Zigbee SDK Docs: [Link](https://docs.espressif.com/projects/esp-zigbee-sdk) +* ESP Zigbee SDK Repo: [Link](https://github.com/espressif/esp-zigbee-sdk) + +* Official ESP32 Forum: [Link](https://esp32.com) +* Arduino-ESP32 Official Repository: [espressif/arduino-esp32](https://github.com/espressif/arduino-esp32) +* ESP32 Datasheet: [Link to datasheet](https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf) +* ESP32-S2 Datasheet: [Link to datasheet](https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf) +* ESP32-C3 Datasheet: [Link to datasheet](https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf) +* ESP32-S3 Datasheet: [Link to datasheet](https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf) +* Official ESP-IDF documentation: [ESP-IDF](https://idf.espressif.com) diff --git a/libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/Zigbee_Light_Switch.ino b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/Zigbee_Light_Switch.ino new file mode 100644 index 00000000000..d0f2d5c2ee8 --- /dev/null +++ b/libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/Zigbee_Light_Switch.ino @@ -0,0 +1,302 @@ +// Copyright 2023 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @brief This example demonstrates simple Zigbee light switch. + * + * The example demonstrates how to use ESP Zigbee stack to control a light bulb. + * The light bulb is a Zigbee end device, which is controlled by a Zigbee coordinator. + * Button switch and Zigbee runs in separate tasks. + * + * Proper Zigbee mode must be selected in Tools->Zigbee mode + * and also the correct partition scheme must be selected in Tools->Partition Scheme. + * + * Please check the README.md for instructions and more detailed description. + */ + +#ifndef ZIGBEE_MODE_ZCZR +#error "Zigbee coordinator mode is not selected in Tools->Zigbee mode" +#endif + +#include "esp_zigbee_core.h" +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "ha/esp_zigbee_ha_standard.h" + +/* Switch configuration */ +#define GPIO_INPUT_IO_TOGGLE_SWITCH GPIO_NUM_9 +#define PAIR_SIZE(TYPE_STR_PAIR) (sizeof(TYPE_STR_PAIR) / sizeof(TYPE_STR_PAIR[0])) + +typedef enum { + SWITCH_ON_CONTROL, + SWITCH_OFF_CONTROL, + SWITCH_ONOFF_TOGGLE_CONTROL, + SWITCH_LEVEL_UP_CONTROL, + SWITCH_LEVEL_DOWN_CONTROL, + SWITCH_LEVEL_CYCLE_CONTROL, + SWITCH_COLOR_CONTROL, +} switch_func_t; + +typedef struct { + uint8_t pin; + switch_func_t func; +} switch_func_pair_t; + +typedef enum { + SWITCH_IDLE, + SWITCH_PRESS_ARMED, + SWITCH_PRESS_DETECTED, + SWITCH_PRESSED, + SWITCH_RELEASE_DETECTED, +} switch_state_t; + +static switch_func_pair_t button_func_pair[] = { + {GPIO_INPUT_IO_TOGGLE_SWITCH, SWITCH_ONOFF_TOGGLE_CONTROL} +}; + +/* Default Coordinator config */ +#define ESP_ZB_ZC_CONFIG() \ + { \ + .esp_zb_role = ESP_ZB_DEVICE_TYPE_COORDINATOR, \ + .install_code_policy = INSTALLCODE_POLICY_ENABLE, \ + .nwk_cfg = { \ + .zczr_cfg = { \ + .max_children = MAX_CHILDREN, \ + }, \ + } \ + } + +#define ESP_ZB_DEFAULT_RADIO_CONFIG() \ + { \ + .radio_mode = RADIO_MODE_NATIVE, \ + } + +#define ESP_ZB_DEFAULT_HOST_CONFIG() \ + { \ + .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + } + +typedef struct light_bulb_device_params_s { + esp_zb_ieee_addr_t ieee_addr; + uint8_t endpoint; + uint16_t short_addr; +} light_bulb_device_params_t; + +/* Zigbee configuration */ +#define MAX_CHILDREN 10 /* the max amount of connected devices */ +#define INSTALLCODE_POLICY_ENABLE false /* enable the install code policy for security */ +#define HA_ONOFF_SWITCH_ENDPOINT 1 /* esp light switch device endpoint */ +#define ESP_ZB_PRIMARY_CHANNEL_MASK ESP_ZB_TRANSCEIVER_ALL_CHANNELS_MASK /* Zigbee primary channel mask use in the example */ + +/********************* Define functions **************************/ +static void esp_zb_buttons_handler(switch_func_pair_t *button_func_pair) +{ + if (button_func_pair->func == SWITCH_ONOFF_TOGGLE_CONTROL) { + /* implemented light switch toggle functionality */ + esp_zb_zcl_on_off_cmd_t cmd_req; + cmd_req.zcl_basic_cmd.src_endpoint = HA_ONOFF_SWITCH_ENDPOINT; + cmd_req.address_mode = ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT; + cmd_req.on_off_cmd_id = ESP_ZB_ZCL_CMD_ON_OFF_TOGGLE_ID; + log_i("Send 'on_off toggle' command"); + esp_zb_zcl_on_off_cmd_req(&cmd_req); + } +} + +static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask) +{ + ESP_ERROR_CHECK(esp_zb_bdb_start_top_level_commissioning(mode_mask)); +} + +static void bind_cb(esp_zb_zdp_status_t zdo_status, void *user_ctx) +{ + if (zdo_status == ESP_ZB_ZDP_STATUS_SUCCESS) { + log_i("Bound successfully!"); + if (user_ctx) { + light_bulb_device_params_t *light = (light_bulb_device_params_t *)user_ctx; + log_i("The light originating from address(0x%x) on endpoint(%d)", light->short_addr, light->endpoint); + free(light); + } + } +} + +static void user_find_cb(esp_zb_zdp_status_t zdo_status, uint16_t addr, uint8_t endpoint, void *user_ctx) +{ + if (zdo_status == ESP_ZB_ZDP_STATUS_SUCCESS) { + log_i("Found light"); + esp_zb_zdo_bind_req_param_t bind_req; + light_bulb_device_params_t *light = (light_bulb_device_params_t *)malloc(sizeof(light_bulb_device_params_t)); + light->endpoint = endpoint; + light->short_addr = addr; + esp_zb_ieee_address_by_short(light->short_addr, light->ieee_addr); + esp_zb_get_long_address(bind_req.src_address); + bind_req.src_endp = HA_ONOFF_SWITCH_ENDPOINT; + bind_req.cluster_id = ESP_ZB_ZCL_CLUSTER_ID_ON_OFF; + bind_req.dst_addr_mode = ESP_ZB_ZDO_BIND_DST_ADDR_MODE_64_BIT_EXTENDED; + memcpy(bind_req.dst_address_u.addr_long, light->ieee_addr, sizeof(esp_zb_ieee_addr_t)); + bind_req.dst_endp = endpoint; + bind_req.req_dst_addr = esp_zb_get_short_address(); + log_i("Try to bind On/Off"); + esp_zb_zdo_device_bind_req(&bind_req, bind_cb, (void *)light); + } +} + +void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct) +{ + uint32_t *p_sg_p = signal_struct->p_app_signal; + esp_err_t err_status = signal_struct->esp_err_status; + esp_zb_app_signal_type_t sig_type = (esp_zb_app_signal_type_t)*p_sg_p; + esp_zb_zdo_signal_device_annce_params_t *dev_annce_params = NULL; + switch (sig_type) { + case ESP_ZB_ZDO_SIGNAL_SKIP_STARTUP: + log_i("Zigbee stack initialized"); + esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_INITIALIZATION); + break; + case ESP_ZB_BDB_SIGNAL_DEVICE_FIRST_START: + case ESP_ZB_BDB_SIGNAL_DEVICE_REBOOT: + if (err_status == ESP_OK) { + log_i("Start network formation"); + esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_NETWORK_FORMATION); + } else { + log_e("Failed to initialize Zigbee stack (status: %s)", esp_err_to_name(err_status)); + } + break; + case ESP_ZB_BDB_SIGNAL_FORMATION: + if (err_status == ESP_OK) { + esp_zb_ieee_addr_t extended_pan_id; + esp_zb_get_extended_pan_id(extended_pan_id); + log_i("Formed network successfully (Extended PAN ID: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x, PAN ID: 0x%04hx, Channel:%d, Short Address: 0x%04hx)", + extended_pan_id[7], extended_pan_id[6], extended_pan_id[5], extended_pan_id[4], + extended_pan_id[3], extended_pan_id[2], extended_pan_id[1], extended_pan_id[0], + esp_zb_get_pan_id(), esp_zb_get_current_channel(), esp_zb_get_short_address()); + esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_NETWORK_STEERING); + } else { + log_i("Restart network formation (status: %s)", esp_err_to_name(err_status)); + esp_zb_scheduler_alarm((esp_zb_callback_t)bdb_start_top_level_commissioning_cb, ESP_ZB_BDB_MODE_NETWORK_FORMATION, 1000); + } + break; + case ESP_ZB_BDB_SIGNAL_STEERING: + if (err_status == ESP_OK) { + log_i("Network steering started"); + } + break; + case ESP_ZB_ZDO_SIGNAL_DEVICE_ANNCE: + dev_annce_params = (esp_zb_zdo_signal_device_annce_params_t *)esp_zb_app_signal_get_params(p_sg_p); + log_i("New device commissioned or rejoined (short: 0x%04hx)", dev_annce_params->device_short_addr); + esp_zb_zdo_match_desc_req_param_t cmd_req; + cmd_req.dst_nwk_addr = dev_annce_params->device_short_addr; + cmd_req.addr_of_interest = dev_annce_params->device_short_addr; + esp_zb_zdo_find_on_off_light(&cmd_req, user_find_cb, NULL); + break; + default: + log_i("ZDO signal: %s (0x%x), status: %s", esp_zb_zdo_signal_to_string(sig_type), sig_type, + esp_err_to_name(err_status)); + break; + } +} + +static void esp_zb_task(void *pvParameters) +{ + esp_zb_cfg_t zb_nwk_cfg = ESP_ZB_ZC_CONFIG(); + esp_zb_init(&zb_nwk_cfg); + esp_zb_on_off_switch_cfg_t switch_cfg = ESP_ZB_DEFAULT_ON_OFF_SWITCH_CONFIG(); + esp_zb_ep_list_t *esp_zb_on_off_switch_ep = esp_zb_on_off_switch_ep_create(HA_ONOFF_SWITCH_ENDPOINT, &switch_cfg); + esp_zb_device_register(esp_zb_on_off_switch_ep); + esp_zb_set_primary_network_channel_set(ESP_ZB_PRIMARY_CHANNEL_MASK); + ESP_ERROR_CHECK(esp_zb_start(false)); + esp_zb_main_loop_iteration(); +} + +/********************* GPIO functions **************************/ +static QueueHandle_t gpio_evt_queue = NULL; + +static void IRAM_ATTR gpio_isr_handler(void *arg) +{ + xQueueSendFromISR(gpio_evt_queue, (switch_func_pair_t *)arg, NULL); +} + +static void switch_gpios_intr_enabled(bool enabled) +{ + for (int i = 0; i < PAIR_SIZE(button_func_pair); ++i) { + if (enabled) { + enableInterrupt((button_func_pair[i]).pin); + } else { + disableInterrupt((button_func_pair[i]).pin); + } + } +} + +/********************* Arduino functions **************************/ +void setup() { + // Init Zigbee + esp_zb_platform_config_t config = { + .radio_config = ESP_ZB_DEFAULT_RADIO_CONFIG(), + .host_config = ESP_ZB_DEFAULT_HOST_CONFIG(), + }; + + ESP_ERROR_CHECK(esp_zb_platform_config(&config)); + + // Init button switch + for (int i = 0; i < PAIR_SIZE(button_func_pair); i++) { + pinMode(button_func_pair[i].pin, INPUT_PULLUP); + /* create a queue to handle gpio event from isr */ + gpio_evt_queue = xQueueCreate(10, sizeof(switch_func_pair_t)); + if ( gpio_evt_queue == 0) { + log_e("Queue was not created and must not be used"); + while(1); + } + attachInterruptArg(button_func_pair[i].pin, gpio_isr_handler, (void *) (button_func_pair + i), FALLING); + } + + // Start Zigbee task + xTaskCreate(esp_zb_task, "Zigbee_main", 4096, NULL, 5, NULL); +} + +void loop() { + // Handle button switch in loop() + uint8_t pin = 0; + switch_func_pair_t button_func_pair; + static switch_state_t switch_state = SWITCH_IDLE; + bool evt_flag = false; + + /* check if there is any queue received, if yes read out the button_func_pair */ + if (xQueueReceive(gpio_evt_queue, &button_func_pair, portMAX_DELAY)) { + pin = button_func_pair.pin; + switch_gpios_intr_enabled(false); + evt_flag = true; + } + while (evt_flag) { + bool value = digitalRead(pin); + switch (switch_state) { + case SWITCH_IDLE: + switch_state = (value == LOW) ? SWITCH_PRESS_DETECTED : SWITCH_IDLE; + break; + case SWITCH_PRESS_DETECTED: + switch_state = (value == LOW) ? SWITCH_PRESS_DETECTED : SWITCH_RELEASE_DETECTED; + break; + case SWITCH_RELEASE_DETECTED: + switch_state = SWITCH_IDLE; + /* callback to button_handler */ + (*esp_zb_buttons_handler)(&button_func_pair); + break; + default: + break; + } + if (switch_state == SWITCH_IDLE) { + switch_gpios_intr_enabled(true); + evt_flag = false; + break; + } + vTaskDelay(10 / portTICK_PERIOD_MS); + } +} diff --git a/tools/partitions/zigbee_zczr.csv b/tools/partitions/zigbee_zczr.csv index 984bf0d081f..5bceac4a5a6 100644 --- a/tools/partitions/zigbee_zczr.csv +++ b/tools/partitions/zigbee_zczr.csv @@ -3,7 +3,7 @@ nvs, data, nvs, 0x9000, 0x5000, otadata, data, ota, 0xe000, 0x2000, app0, app, ota_0, 0x10000, 0x140000, app1, app, ota_1, 0x150000,0x140000, -spiffs, data, spiffs, 0x28F000,0x15A000, +spiffs, data, spiffs, 0x290000,0x15A000, zb_storage, data, fat, 0x3EA000,0x4000, zb_fct, data, fat, 0x3EE000,0x1000, rcp_fw, data, spiffs, 0x3EF000,0x1000, From 4cbce10cb178b389827cca9f5c16ade99fa347b6 Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Mon, 5 Feb 2024 08:59:16 -0300 Subject: [PATCH 27/34] Add support for hidden networks in WiFiMulti (#9202) * Add support for hidden networks in WiFiMulti * Update WiFiMulti.cpp * Update WiFiMulti.cpp --- libraries/WiFi/src/WiFiMulti.cpp | 76 +++++++++++++++++++++++++++----- libraries/WiFi/src/WiFiMulti.h | 2 +- 2 files changed, 65 insertions(+), 13 deletions(-) diff --git a/libraries/WiFi/src/WiFiMulti.cpp b/libraries/WiFi/src/WiFiMulti.cpp index b0de3a44484..60a25be4285 100644 --- a/libraries/WiFi/src/WiFiMulti.cpp +++ b/libraries/WiFi/src/WiFiMulti.cpp @@ -90,9 +90,10 @@ bool WiFiMulti::addAP(const char* ssid, const char *passphrase) return true; } -uint8_t WiFiMulti::run(uint32_t connectTimeout) +uint8_t WiFiMulti::run(uint32_t connectTimeout, bool scanHidden) { int8_t scanResult; + unsigned long startTime; uint8_t status = WiFi.status(); if(status == WL_CONNECTED) { if (!_bWFMInit && _connectionTestCBFunc != NULL){ @@ -116,13 +117,13 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout) status = WiFi.status(); } - scanResult = WiFi.scanNetworks(); + scanResult = WiFi.scanNetworks(false, scanHidden); if (scanResult == WIFI_SCAN_RUNNING) { // scan is running return WL_NO_SSID_AVAIL; } else if (scanResult >= 0) { // scan done analyze - int32_t bestIndex = 0; + int32_t bestIndex = -1; WifiAPlist_t bestNetwork { NULL, NULL, false }; int bestNetworkDb = INT_MIN; int bestNetworkSec = WIFI_AUTH_MAX; @@ -145,8 +146,10 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout) uint8_t sec_scan; uint8_t* BSSID_scan; int32_t chan_scan; + bool hidden_scan; WiFi.getNetworkInfo(i, ssid_scan, sec_scan, rssi_scan, BSSID_scan, chan_scan); + hidden_scan = (ssid_scan.length() == 0) && scanHidden; // add any Open WiFi AP to the list, if allowed with setAllowOpenAP(true) if (_bAllowOpenAP && sec_scan == WIFI_AUTH_OPEN){ bool found = false; @@ -163,14 +166,49 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout) } } + if (hidden_scan) { + log_v("hidden ssid on channel %d found, trying to connect with known credentials...", chan_scan); + } + bool known = false; for(uint32_t x = 0; x < APlist.size(); x++) { WifiAPlist_t entry = APlist[x]; - if(ssid_scan == entry.ssid) { // SSID match - log_v("known ssid: %s, has failed: %s", entry.ssid, entry.hasFailed ? "yes" : "no"); - foundCount++; - if (!entry.hasFailed){ + if(ssid_scan == entry.ssid || hidden_scan) { // SSID match or hidden network found + if (!hidden_scan) { + log_v("known ssid: %s, has failed: %s", entry.ssid, entry.hasFailed ? "yes" : "no"); + foundCount++; + } + if (!entry.hasFailed) { + if (hidden_scan) { + WiFi.begin(entry.ssid, entry.passphrase, chan_scan, BSSID_scan); + + // If the ssid returned from the scan is empty, it is a hidden SSID + // it appears that the WiFi.begin() function is asynchronous and takes + // additional time to connect to a hidden SSID. Therefore a delay of 1000ms + // is added for hidden SSIDs before calling WiFi.status() + delay(1000); + + status = WiFi.status(); + startTime = millis(); + + while (status != WL_CONNECTED && (millis() - startTime) <= connectTimeout) + { + delay(10); + status = WiFi.status(); + } + + WiFi.disconnect(); + delay(10); + + if (status == WL_CONNECTED) { + log_v("hidden ssid %s found", entry.ssid); + ssid_scan = entry.ssid; + foundCount++; + } else { + continue; + } + } known = true; log_v("rssi_scan: %d, bestNetworkDb: %d", rssi_scan, bestNetworkDb); if(rssi_scan > bestNetworkDb) { // best network @@ -191,10 +229,24 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout) } } - if(known) { - log_d(" ---> %d: [%d][%02X:%02X:%02X:%02X:%02X:%02X] %s (%d) %c", i, chan_scan, BSSID_scan[0], BSSID_scan[1], BSSID_scan[2], BSSID_scan[3], BSSID_scan[4], BSSID_scan[5], ssid_scan.c_str(), rssi_scan, (sec_scan == WIFI_AUTH_OPEN) ? ' ' : '*'); + if (known) { + log_d(" ---> %d: [%d][%02X:%02X:%02X:%02X:%02X:%02X] %s (%d) (%c) (%s)", + i, + chan_scan, + BSSID_scan[0], BSSID_scan[1], BSSID_scan[2], BSSID_scan[3], BSSID_scan[4], BSSID_scan[5], + ssid_scan.c_str(), + rssi_scan, + (sec_scan == WIFI_AUTH_OPEN) ? ' ' : '*', + (hidden_scan) ? "hidden" : "visible"); } else { - log_d(" %d: [%d][%02X:%02X:%02X:%02X:%02X:%02X] %s (%d) %c", i, chan_scan, BSSID_scan[0], BSSID_scan[1], BSSID_scan[2], BSSID_scan[3], BSSID_scan[4], BSSID_scan[5], ssid_scan.c_str(), rssi_scan, (sec_scan == WIFI_AUTH_OPEN) ? ' ' : '*'); + log_d(" %d: [%d][%02X:%02X:%02X:%02X:%02X:%02X] %s (%d) (%c) (%s)", + i, + chan_scan, + BSSID_scan[0], BSSID_scan[1], BSSID_scan[2], BSSID_scan[3], BSSID_scan[4], BSSID_scan[5], + ssid_scan.c_str(), + rssi_scan, + (sec_scan == WIFI_AUTH_OPEN) ? ' ' : '*', + (hidden_scan) ? "hidden" : "visible"); } } log_v("foundCount = %d, failCount = %d", foundCount, failCount); @@ -206,7 +258,7 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout) // clean up ram WiFi.scanDelete(); - if(bestNetwork.ssid) { + if(bestIndex >= 0) { log_i("[WIFI] Connecting BSSID: %02X:%02X:%02X:%02X:%02X:%02X SSID: %s Channel: %d (%d)", bestBSSID[0], bestBSSID[1], bestBSSID[2], bestBSSID[3], bestBSSID[4], bestBSSID[5], bestNetwork.ssid, bestChannel, bestNetworkDb); if (ipv6_support == true) { @@ -218,7 +270,7 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout) status = WiFi.status(); _bWFMInit = true; - auto startTime = millis(); + startTime = millis(); // wait for connection, fail, or timeout while(status != WL_CONNECTED && (millis() - startTime) <= connectTimeout) { // && status != WL_NO_SSID_AVAIL && status != WL_CONNECT_FAILED delay(10); diff --git a/libraries/WiFi/src/WiFiMulti.h b/libraries/WiFi/src/WiFiMulti.h index 75a40c87679..9dfac2c4204 100644 --- a/libraries/WiFi/src/WiFiMulti.h +++ b/libraries/WiFi/src/WiFiMulti.h @@ -44,7 +44,7 @@ class WiFiMulti ~WiFiMulti(); bool addAP(const char* ssid, const char *passphrase = NULL); - uint8_t run(uint32_t connectTimeout=5000); + uint8_t run(uint32_t connectTimeout=5000, bool scanHidden=false); void enableIPv6(bool state); // Force (default: true) to only keep connected or to connect to an AP from the provided WiFiMulti list. From 3a36a8d7f87edfdd0bb5a3b40825305b0489a095 Mon Sep 17 00:00:00 2001 From: Luca Burelli Date: Wed, 7 Feb 2024 10:56:21 +0100 Subject: [PATCH 28/34] fix(platform): use numbers in all recipe hooks (#9220) The Arduino Platform Specification requires that the recipe hooks are distinguished by a number and does not endorse using text labels. Fix all the usages of recipe hooks to use numbers. Closes arduino/arduino-cli#2369 . --- platform.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/platform.txt b/platform.txt index 0ff2eae7395..20189bd2010 100644 --- a/platform.txt +++ b/platform.txt @@ -146,13 +146,13 @@ recipe.hooks.prebuild.6.pattern.windows=cmd /c if not exist "{build.path}\build_ # Set -DARDUINO_CORE_BUILD only on core file compilation file_opts.path={build.path}/file_opts -recipe.hooks.prebuild.set_core_build_flag.pattern=/usr/bin/env bash -c ": > '{file_opts.path}'" -recipe.hooks.core.prebuild.set_core_build_flag.pattern=/usr/bin/env bash -c "echo -DARDUINO_CORE_BUILD > '{file_opts.path}'" -recipe.hooks.core.postbuild.set_core_build_flag.pattern=/usr/bin/env bash -c ": > '{file_opts.path}'" +recipe.hooks.prebuild.7.pattern=/usr/bin/env bash -c ": > '{file_opts.path}'" +recipe.hooks.core.prebuild.1.pattern=/usr/bin/env bash -c "echo -DARDUINO_CORE_BUILD > '{file_opts.path}'" +recipe.hooks.core.postbuild.1.pattern=/usr/bin/env bash -c ": > '{file_opts.path}'" -recipe.hooks.prebuild.set_core_build_flag.pattern.windows=cmd /c type nul > "{file_opts.path}" -recipe.hooks.core.prebuild.set_core_build_flag.pattern.windows=cmd /c echo "-DARDUINO_CORE_BUILD" > "{file_opts.path}" -recipe.hooks.core.postbuild.set_core_build_flag.pattern.windows=cmd /c type nul > "{file_opts.path}" +recipe.hooks.prebuild.7.pattern.windows=cmd /c type nul > "{file_opts.path}" +recipe.hooks.core.prebuild.1.pattern.windows=cmd /c echo "-DARDUINO_CORE_BUILD" > "{file_opts.path}" +recipe.hooks.core.postbuild.1.pattern.windows=cmd /c type nul > "{file_opts.path}" # Generate debug.cfg (must be postbuild) recipe.hooks.postbuild.1.pattern=/usr/bin/env bash -c "[ {build.copy_jtag_files} -eq 0 ] || cp -f "{debug.server.openocd.scripts_dir}"board/{build.openocdscript} "{build.source.path}"/debug.cfg" From 7d595547e86ffc1f6a0183d34d3f3f6ccf0bd6e6 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Wed, 7 Feb 2024 09:43:54 -0300 Subject: [PATCH 29/34] SPI (fix): Adds SPI 3 to the ESP32-S2 and adds comments about it (#9216) * SPI (fix): Adds SPI 3 to the ESP32-S2 and adds comments about it * SPI (fix): added a space - typo error, simple fix. --- cores/esp32/esp32-hal-spi.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cores/esp32/esp32-hal-spi.h b/cores/esp32/esp32-hal-spi.h index 2c0a6329dc9..5c8eb58d059 100644 --- a/cores/esp32/esp32-hal-spi.h +++ b/cores/esp32/esp32-hal-spi.h @@ -31,12 +31,15 @@ extern "C" { #if CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32S3 #define FSPI 0 #define HSPI 1 -#else -#define FSPI 1 //SPI bus attached to the flash (can use the same data lines but different SS) -#define HSPI 2 //SPI bus normally mapped to pins 12 - 15, but can be matrixed to any pins -#if CONFIG_IDF_TARGET_ESP32 -#define VSPI 3 //SPI bus normally attached to pins 5, 18, 19 and 23, but can be matrixed to any pins -#endif +#elif CONFIG_IDF_TARGET_ESP32S2 +#define FSPI 1 //SPI 1 bus. ESP32S2: for external memory only (can use the same data lines but different SS) +#define HSPI 2 //SPI 2 bus. ESP32S2: external memory or device - it can be matrixed to any pins +#define SPI2 2 // Another name for ESP32S2 SPI 2 +#define SPI3 3 //SPI 3 bus. ESP32S2: device only - it can be matrixed to any pins +#elif CONFIG_IDF_TARGET_ESP32 +#define FSPI 1 //SPI 1 bus attached to the flash (can use the same data lines but different SS) +#define HSPI 2 //SPI 2 bus normally mapped to pins 12 - 15, but can be matrixed to any pins +#define VSPI 3 //SPI 3 bus normally attached to pins 5, 18, 19 and 23, but can be matrixed to any pins #endif // This defines are not representing the real Divider of the ESP32 From e1a3525b5aa5ebce09436b0a5443849bfad274c5 Mon Sep 17 00:00:00 2001 From: LiveSparks Date: Wed, 7 Feb 2024 18:15:27 +0530 Subject: [PATCH 30/34] fix(esp32): Added a timeout option to the BLEClient's connect function (#9005) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(esp32): Added timeout to BLEClient.connect fn * Update libraries/BLE/src/BLEClient.cpp Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> --------- Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com> --- libraries/BLE/src/BLEClient.cpp | 18 +++++++++++++++--- libraries/BLE/src/BLEClient.h | 3 ++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/libraries/BLE/src/BLEClient.cpp b/libraries/BLE/src/BLEClient.cpp index ae82c2417a1..60ee53c0fa0 100644 --- a/libraries/BLE/src/BLEClient.cpp +++ b/libraries/BLE/src/BLEClient.cpp @@ -92,12 +92,23 @@ bool BLEClient::connect(BLEAdvertisedDevice* device) { return connect(address, type); } +/** + * Add overloaded function to ease connect to peer device with not public address + */ +bool BLEClient::connectTimeout(BLEAdvertisedDevice* device, uint32_t timeoutMs) { + BLEAddress address = device->getAddress(); + esp_ble_addr_type_t type = device->getAddressType(); + return connect(address, type, timeoutMs); +} + /** * @brief Connect to the partner (BLE Server). * @param [in] address The address of the partner. + * @param [in] type The type of the address. + * @param [in] timeoutMs The number of milliseconds to wait for the connection to complete. * @return True on success. */ -bool BLEClient::connect(BLEAddress address, esp_ble_addr_type_t type) { +bool BLEClient::connect(BLEAddress address, esp_ble_addr_type_t type, uint32_t timeoutMs) { log_v(">> connect(%s)", address.toString().c_str()); // We need the connection handle that we get from registering the application. We register the app @@ -142,9 +153,10 @@ bool BLEClient::connect(BLEAddress address, esp_ble_addr_type_t type) { return false; } - rc = m_semaphoreOpenEvt.wait("connect"); // Wait for the connection to complete. + bool got_sem = m_semaphoreOpenEvt.timedWait("connect", timeoutMs); // Wait for the connection to complete. + rc = m_semaphoreOpenEvt.value(); // check the status of the connection and cleanup in case of failure - if (rc != ESP_GATT_OK) { + if (!got_sem || rc != ESP_GATT_OK) { BLEDevice::removePeerDevice(m_appId, true); esp_ble_gattc_app_unregister(m_gattc_if); m_gattc_if = ESP_GATT_IF_NONE; diff --git a/libraries/BLE/src/BLEClient.h b/libraries/BLE/src/BLEClient.h index 0207a214b66..2c8bc2c4ab9 100644 --- a/libraries/BLE/src/BLEClient.h +++ b/libraries/BLE/src/BLEClient.h @@ -37,7 +37,8 @@ class BLEClient { ~BLEClient(); bool connect(BLEAdvertisedDevice* device); - bool connect(BLEAddress address, esp_ble_addr_type_t type = BLE_ADDR_TYPE_PUBLIC); // Connect to the remote BLE Server + bool connectTimeout(BLEAdvertisedDevice* device, uint32_t timeoutMS = portMAX_DELAY); + bool connect(BLEAddress address, esp_ble_addr_type_t type = BLE_ADDR_TYPE_PUBLIC, uint32_t timeoutMS = portMAX_DELAY); // Connect to the remote BLE Server void disconnect(); // Disconnect from the remote BLE Server BLEAddress getPeerAddress(); // Get the address of the remote BLE Server int getRssi(); // Get the RSSI of the remote BLE Server From d59efdcecd5ca32e1f552e5d23b962749020e7dc Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Wed, 7 Feb 2024 15:43:06 +0200 Subject: [PATCH 31/34] Rework cbuf to use FreeRTOS Ringbuffer (#7860) * Rework cbuf to use FreeRTOS Ringbuffer * Update cbuf.cpp * Fix typo * Initialize with NULL * Implement peek method * Add initializer --------- Co-authored-by: Lucas Saavedra Vaz Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> --- cores/esp32/cbuf.cpp | 278 +++++++++++++++++++++++++++++-------------- cores/esp32/cbuf.h | 40 +++---- 2 files changed, 200 insertions(+), 118 deletions(-) diff --git a/cores/esp32/cbuf.cpp b/cores/esp32/cbuf.cpp index ef7370a8a07..4a110fd732a 100644 --- a/cores/esp32/cbuf.cpp +++ b/cores/esp32/cbuf.cpp @@ -19,178 +19,272 @@ */ #include "cbuf.h" +#include "esp32-hal-log.h" + +#if CONFIG_DISABLE_HAL_LOCKS +#define CBUF_MUTEX_CREATE() +#define CBUF_MUTEX_LOCK() +#define CBUF_MUTEX_UNLOCK() +#define CBUF_MUTEX_DELETE() +#else +#define CBUF_MUTEX_CREATE() if(_lock == NULL){_lock = xSemaphoreCreateMutex(); if(_lock == NULL){log_e("failed to create mutex");}} +#define CBUF_MUTEX_LOCK() if(_lock != NULL){xSemaphoreTakeRecursive(_lock, portMAX_DELAY);} +#define CBUF_MUTEX_UNLOCK() if(_lock != NULL){xSemaphoreGiveRecursive(_lock);} +#define CBUF_MUTEX_DELETE() if(_lock != NULL){SemaphoreHandle_t l = _lock; _lock = NULL; vSemaphoreDelete(l);} +#endif cbuf::cbuf(size_t size) : - next(NULL), _size(size+1), _buf(new char[size+1]), _bufend(_buf + size + 1), _begin(_buf), _end(_begin) + next(NULL), + has_peek(false), + peek_byte(0), + _buf(xRingbufferCreate(size, RINGBUF_TYPE_BYTEBUF)) { + if(_buf == NULL) { + log_e("failed to allocate ring buffer"); + } + CBUF_MUTEX_CREATE(); } cbuf::~cbuf() { - delete[] _buf; + CBUF_MUTEX_LOCK(); + if(_buf != NULL){ + RingbufHandle_t b = _buf; + _buf = NULL; + vRingbufferDelete(b); + } + CBUF_MUTEX_UNLOCK(); + CBUF_MUTEX_DELETE(); } size_t cbuf::resizeAdd(size_t addSize) { - return resize(_size + addSize); + return resize(size() + addSize); } size_t cbuf::resize(size_t newSize) { + CBUF_MUTEX_LOCK(); + size_t _size = size(); + if(newSize == _size) { + return _size; + } - size_t bytes_available = available(); - newSize += 1; // not lose any data // if data can be lost use remove or flush before resize - if((newSize < bytes_available) || (newSize == _size)) { + size_t bytes_available = available(); + if(newSize < bytes_available) { + CBUF_MUTEX_UNLOCK(); + log_e("new size is less than the currently available data size"); return _size; } - char *newbuf = new char[newSize]; - char *oldbuf = _buf; - - if(!newbuf) { + RingbufHandle_t newbuf = xRingbufferCreate(newSize, RINGBUF_TYPE_BYTEBUF); + if(newbuf == NULL) { + CBUF_MUTEX_UNLOCK(); + log_e("failed to allocate new ring buffer"); return _size; } - if(_buf) { - read(newbuf, bytes_available); - memset((newbuf + bytes_available), 0x00, (newSize - bytes_available)); + if(_buf != NULL) { + if(bytes_available){ + char * old_data = (char *)malloc(bytes_available); + if(old_data == NULL){ + vRingbufferDelete(newbuf); + CBUF_MUTEX_UNLOCK(); + log_e("failed to allocate temporary buffer"); + return _size; + } + bytes_available = read(old_data, bytes_available); + if(!bytes_available){ + free(old_data); + vRingbufferDelete(newbuf); + CBUF_MUTEX_UNLOCK(); + log_e("failed to read previous data"); + return _size; + } + if(xRingbufferSend(newbuf, (void*)old_data, bytes_available, 0) != pdTRUE){ + write(old_data, bytes_available); + free(old_data); + vRingbufferDelete(newbuf); + CBUF_MUTEX_UNLOCK(); + log_e("failed to restore previous data"); + return _size; + } + free(old_data); + } + + RingbufHandle_t b = _buf; + _buf = newbuf; + vRingbufferDelete(b); + } else { + _buf = newbuf; } - - _begin = newbuf; - _end = newbuf + bytes_available; - _bufend = newbuf + newSize; - _size = newSize; - - _buf = newbuf; - delete[] oldbuf; - - return _size; + CBUF_MUTEX_UNLOCK(); + return newSize; } size_t cbuf::available() const { - if(_end >= _begin) { - return _end - _begin; + size_t available = 0; + if(_buf != NULL){ + vRingbufferGetInfo(_buf, NULL, NULL, NULL, NULL, (UBaseType_t *)&available); } - return _size - (_begin - _end); + if (has_peek) available++; + return available; } size_t cbuf::size() { + size_t _size = 0; + if(_buf != NULL){ + _size = xRingbufferGetMaxItemSize(_buf); + } return _size; } size_t cbuf::room() const { - if(_end >= _begin) { - return _size - (_end - _begin) - 1; + size_t _room = 0; + if(_buf != NULL){ + _room = xRingbufferGetCurFreeSize(_buf); } - return _begin - _end - 1; + return _room; +} + +bool cbuf::empty() const +{ + return available() == 0; +} + +bool cbuf::full() const +{ + return room() == 0; } int cbuf::peek() { - if(empty()) { + if (!available()) { return -1; } - return static_cast(*_begin); -} + int c; -size_t cbuf::peek(char *dst, size_t size) -{ - size_t bytes_available = available(); - size_t size_to_read = (size < bytes_available) ? size : bytes_available; - size_t size_read = size_to_read; - char * begin = _begin; - if(_end < _begin && size_to_read > (size_t) (_bufend - _begin)) { - size_t top_size = _bufend - _begin; - memcpy(dst, _begin, top_size); - begin = _buf; - size_to_read -= top_size; - dst += top_size; - } - memcpy(dst, begin, size_to_read); - return size_read; + CBUF_MUTEX_LOCK(); + if (has_peek) { + c = peek_byte; + } else { + c = read(); + if (c >= 0) { + has_peek = true; + peek_byte = c; + } + } + CBUF_MUTEX_UNLOCK(); + return c; } int cbuf::read() { - if(empty()) { + char result = 0; + if(!read(&result, 1)){ return -1; } - - char result = *_begin; - _begin = wrap_if_bufend(_begin + 1); return static_cast(result); } size_t cbuf::read(char* dst, size_t size) { + CBUF_MUTEX_LOCK(); size_t bytes_available = available(); - size_t size_to_read = (size < bytes_available) ? size : bytes_available; - size_t size_read = size_to_read; - if(_end < _begin && size_to_read > (size_t) (_bufend - _begin)) { - size_t top_size = _bufend - _begin; - memcpy(dst, _begin, top_size); - _begin = _buf; - size_to_read -= top_size; - dst += top_size; - } - memcpy(dst, _begin, size_to_read); - _begin = wrap_if_bufend(_begin + size_to_read); + if(!bytes_available || !size){ + CBUF_MUTEX_UNLOCK(); + return 0; + } + + if (has_peek) { + if (dst != NULL) { + *dst++ = peek_byte; + } + size--; + } + + size_t size_read = 0; + if (size) { + size_t received_size = 0; + size_t size_to_read = (size < bytes_available) ? size : bytes_available; + uint8_t *received_buff = (uint8_t *)xRingbufferReceiveUpTo(_buf, &received_size, 0, size_to_read); + if (received_buff != NULL) { + if(dst != NULL){ + memcpy(dst, received_buff, received_size); + } + vRingbufferReturnItem(_buf, received_buff); + size_read = received_size; + size_to_read -= received_size; + // wrap around data + if(size_to_read){ + received_size = 0; + received_buff = (uint8_t *)xRingbufferReceiveUpTo(_buf, &received_size, 0, size_to_read); + if (received_buff != NULL) { + if(dst != NULL){ + memcpy(dst+size_read, received_buff, received_size); + } + vRingbufferReturnItem(_buf, received_buff); + size_read += received_size; + } else { + log_e("failed to read wrap around data from ring buffer"); + } + } + } else { + log_e("failed to read from ring buffer"); + } + } + + if (has_peek) { + has_peek = false; + size_read++; + } + + CBUF_MUTEX_UNLOCK(); return size_read; } size_t cbuf::write(char c) { - if(full()) { - return 0; - } - - *_end = c; - _end = wrap_if_bufend(_end + 1); - return 1; + return write(&c, 1); } size_t cbuf::write(const char* src, size_t size) { + CBUF_MUTEX_LOCK(); size_t bytes_available = room(); + if(!bytes_available || !size){ + CBUF_MUTEX_UNLOCK(); + return 0; + } size_t size_to_write = (size < bytes_available) ? size : bytes_available; - size_t size_written = size_to_write; - if(_end >= _begin && size_to_write > (size_t) (_bufend - _end)) { - size_t top_size = _bufend - _end; - memcpy(_end, src, top_size); - _end = _buf; - size_to_write -= top_size; - src += top_size; + if(xRingbufferSend(_buf, (void*)src, size_to_write, 0) != pdTRUE){ + CBUF_MUTEX_UNLOCK(); + log_e("failed to write to ring buffer"); + return 0; } - memcpy(_end, src, size_to_write); - _end = wrap_if_bufend(_end + size_to_write); - return size_written; + CBUF_MUTEX_UNLOCK(); + return size_to_write; } void cbuf::flush() { - _begin = _buf; - _end = _buf; + read(NULL, available()); } size_t cbuf::remove(size_t size) { + CBUF_MUTEX_LOCK(); size_t bytes_available = available(); - if(size >= bytes_available) { - flush(); - return 0; - } - size_t size_to_remove = (size < bytes_available) ? size : bytes_available; - if(_end < _begin && size_to_remove > (size_t) (_bufend - _begin)) { - size_t top_size = _bufend - _begin; - _begin = _buf; - size_to_remove -= top_size; + if(bytes_available && size){ + size_t size_to_remove = (size < bytes_available) ? size : bytes_available; + bytes_available -= read(NULL, size_to_remove); } - _begin = wrap_if_bufend(_begin + size_to_remove); - return available(); + CBUF_MUTEX_UNLOCK(); + return bytes_available; } diff --git a/cores/esp32/cbuf.h b/cores/esp32/cbuf.h index 490352e3202..29e11efb83e 100644 --- a/cores/esp32/cbuf.h +++ b/cores/esp32/cbuf.h @@ -18,12 +18,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef __cbuf_h -#define __cbuf_h +#pragma once #include #include #include +#include "sdkconfig.h" +#include "freertos/FreeRTOS.h" +#include "freertos/ringbuf.h" +#include "freertos/semphr.h" class cbuf { @@ -33,23 +36,14 @@ class cbuf size_t resizeAdd(size_t addSize); size_t resize(size_t newSize); + size_t available() const; size_t size(); - size_t room() const; - - inline bool empty() const - { - return _begin == _end; - } - - inline bool full() const - { - return wrap_if_bufend(_end + 1) == _begin; - } + bool empty() const; + bool full() const; int peek(); - size_t peek(char *dst, size_t size); int read(); size_t read(char* dst, size_t size); @@ -61,19 +55,13 @@ class cbuf size_t remove(size_t size); cbuf *next; + bool has_peek; + uint8_t peek_byte; protected: - inline char* wrap_if_bufend(char* ptr) const - { - return (ptr == _bufend) ? _buf : ptr; - } - - size_t _size; - char* _buf; - const char* _bufend; - char* _begin; - char* _end; + RingbufHandle_t _buf = NULL; +#if !CONFIG_DISABLE_HAL_LOCKS + SemaphoreHandle_t _lock = NULL; +#endif }; - -#endif//__cbuf_h From bbbbec977a301152be357ed42dd5d59a8651f372 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Wed, 7 Feb 2024 14:49:01 +0100 Subject: [PATCH 32/34] Fix ESP32-Solo WDT on HTTP OTA update (#5426) * Fix ESP32-Solo WDT on HTTP OTA update * Fix ESP32-Solo WDT on HTTP OTA update * Fix commits --------- Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> --- cores/esp32/Esp.cpp | 4 ++++ libraries/Update/src/Updater.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/cores/esp32/Esp.cpp b/cores/esp32/Esp.cpp index ecbf4877d90..925a67dfbad 100644 --- a/cores/esp32/Esp.cpp +++ b/cores/esp32/Esp.cpp @@ -248,6 +248,10 @@ String EspClass::getSketchMD5() md5.add(pb, readBytes); lengthLeft -= readBytes; offset += readBytes; + + #if CONFIG_FREERTOS_UNICORE + delay(1); // Fix solo WDT + #endif } free(pb); md5.calculate(); diff --git a/libraries/Update/src/Updater.cpp b/libraries/Update/src/Updater.cpp index b519b76c380..9980558dbba 100644 --- a/libraries/Update/src/Updater.cpp +++ b/libraries/Update/src/Updater.cpp @@ -393,6 +393,10 @@ size_t UpdateClass::writeStream(Stream &data) { if((_bufferLen == remaining() || _bufferLen == SPI_FLASH_SEC_SIZE) && !_writeBuffer()) return written; written += toRead; + + #if CONFIG_FREERTOS_UNICORE + delay(1); // Fix solo WDT + #endif } return written; } From aceea3e519aad0d519568716ed7162093fb37b87 Mon Sep 17 00:00:00 2001 From: theeprawn <43965085+theeprawn@users.noreply.github.com> Date: Wed, 7 Feb 2024 14:29:37 +0000 Subject: [PATCH 33/34] Adds feature to decrypt uploaded image bin files. Used esp-idf to encrypt a bin file. (#5807) * Update Update.h * Update Updater.cpp * Add files via upload * Add files via upload * Add files via upload * Update Update.h * Update Updater.cpp * Add files via upload * Revert changes * Revert changes * Fix CI * Fix format * Skip H2 * Use new * Fix comments and formatting * Format example * Remove binaries and QoL improvements --------- Co-authored-by: Me No Dev Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> --- .../HTTP_Client_AES_OTA_Update/.skip.esp32h2 | 0 .../HTTP_Client_AES_OTA_Update.ino | 333 ++++++++++++++++++ .../HTTP_Client_AES_OTA_Update/updater.php | 64 ++++ .../HTTP_Server_AES_OTA_Update/.skip.esp32h2 | 0 .../HTTP_Server_AES_OTA_Update.ino | 235 ++++++++++++ libraries/Update/src/Update.h | 49 ++- libraries/Update/src/Updater.cpp | 163 +++++++++ 7 files changed, 843 insertions(+), 1 deletion(-) create mode 100644 libraries/Update/examples/HTTP_Client_AES_OTA_Update/.skip.esp32h2 create mode 100644 libraries/Update/examples/HTTP_Client_AES_OTA_Update/HTTP_Client_AES_OTA_Update.ino create mode 100644 libraries/Update/examples/HTTP_Client_AES_OTA_Update/updater.php create mode 100644 libraries/Update/examples/HTTP_Server_AES_OTA_Update/.skip.esp32h2 create mode 100644 libraries/Update/examples/HTTP_Server_AES_OTA_Update/HTTP_Server_AES_OTA_Update.ino diff --git a/libraries/Update/examples/HTTP_Client_AES_OTA_Update/.skip.esp32h2 b/libraries/Update/examples/HTTP_Client_AES_OTA_Update/.skip.esp32h2 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/Update/examples/HTTP_Client_AES_OTA_Update/HTTP_Client_AES_OTA_Update.ino b/libraries/Update/examples/HTTP_Client_AES_OTA_Update/HTTP_Client_AES_OTA_Update.ino new file mode 100644 index 00000000000..e9b1aa75a5e --- /dev/null +++ b/libraries/Update/examples/HTTP_Client_AES_OTA_Update/HTTP_Client_AES_OTA_Update.ino @@ -0,0 +1,333 @@ +/* +An example of how to use HTTPClient to download an encrypted and plain image files OTA from a web server. +This example uses Wifi & HTTPClient to connect to webserver and two functions for obtaining firmware image from webserver. +One uses the example 'updater.php' code on server to check and/or send relavent download firmware image file, +the other directly downloads the firmware file from web server. + +To use:- +Make a folder/directory on your webserver where your firmware images will be uploaded to. ie. /firmware +The 'updater.php' file can also be uploaded to the same folder. Edit and change definitions in 'update.php' to suit your needs. +In sketch: + set HTTPUPDATE_HOST to domain name or IP address if on LAN of your web server + set HTTPUPDATE_UPDATER_URI to path and file to call 'updater.php' +or set HTTPUPDATE_DIRECT_URI to path and firmware file to download + edit other HTTPUPDATE_ as needed + +Encrypted image will help protect your app image file from being copied and used on blank devices, encrypt your image file by using espressif IDF. +First install an app on device that has Update setup with the OTA decrypt mode on, same key, address and flash_crypt_conf as used in IDF to encrypt image file or vice versa. + +For easier development use the default U_AES_DECRYPT_AUTO decrypt mode. This mode allows both plain and encrypted app images to be uploaded. + +Note:- App image can also encrypted on device, by using espressif IDF to configure & enabled FLASH encryption, suggest the use of a different 'OTA_KEY' key for update from the eFuses 'flash_encryption' key used by device. + + ie. "Update.setupCrypt(OTA_KEY, OTA_ADDRESS, OTA_CFG);" + +defaults:- {if not set ie. "Update.setupCrypt();" } + OTA_KEY = 0 ( 0 = no key, disables decryption ) + OTA_ADDRESS = 0 ( suggest dont set address to app0=0x10000 usually or app1=varies ) + OTA_CFG = 0xf + OTA_MODE = U_AES_DECRYPT_AUTO + +OTA_MODE options:- + U_AES_DECRYPT_NONE decryption disabled, loads OTA image files as sent(plain) + U_AES_DECRYPT_AUTO auto loads both plain & encrypted OTA FLASH image files, and plain OTA SPIFFS image files + U_AES_DECRYPT_ON decrypts OTA image files + +https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/ + +Example: + espsecure.py encrypt_flash_data -k ota_key.bin --flash_crypt_conf 0xf -a 0x4320 -o output_filename.bin source_filename.bin + +espsecure.py encrypt_flash_data = runs the idf encryption function to make a encrypted output file from a source file + -k text = path/filename to the AES 256bit(32byte) encryption key file + --flash_crypt_conf 0xn = 0x0 to 0xf, the more bits set the higher the security of encryption(address salting, 0x0 would use ota_key with no address salting) + -a 0xnnnnnn00 = 0x00 to 0x00fffff0 address offset(must be a multiple of 16, but better to use multiple of 32), used to offset the salting (has no effect when = --flash_crypt_conf 0x0) + -o text = path/filename to save encrypted output file to + text = path/filename to open source file from +*/ + +#include +#include +#include +#include +#include + +//========================================================================== +//========================================================================== +const char* WIFI_SSID = "wifi-ssid"; +const char* WIFI_PASSWORD = "wifi-password"; + +const uint8_t OTA_KEY[32] = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, \ + 0x38, 0x39, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, \ + 0x61, 0x20, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, \ + 0x74, 0x65, 0x73, 0x74, 0x20, 0x6b, 0x65, 0x79 }; + +/* +const uint8_t OTA_KEY[32] = {'0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', ' ', 't', 'h', 'i', 's', ' ', + 'a', ' ', 's', 'i', 'm', 'p', 'l', 'e', + 't', 'e', 's', 't', ' ', 'k', 'e', 'y' }; +*/ + +//const uint8_t OTA_KEY[33] = "0123456789 this a simpletest key"; + +const uint32_t OTA_ADDRESS = 0x4320; +const uint32_t OTA_CFG = 0x0f; +const uint32_t OTA_MODE = U_AES_DECRYPT_AUTO; + +const char* HTTPUPDATE_USERAGRENT = "ESP32-Updater"; +//const char* HTTPUPDATE_HOST = "www.yourdomain.com"; +const char* HTTPUPDATE_HOST = "192.168.1.2"; +const uint16_t HTTPUPDATE_PORT = 80; +const char* HTTPUPDATE_UPDATER_URI = "/firmware/updater.php"; //uri to 'updater.php' +const char* HTTPUPDATE_DIRECT_URI = "/firmware/HTTP_Client_AES_OTA_Update-v1.1.xbin"; //uri to image file + +const char* HTTPUPDATE_USER = NULL; //use NULL if no authentication needed +//const char* HTTPUPDATE_USER = "user"; +const char* HTTPUPDATE_PASSWORD = "password"; + +const char* HTTPUPDATE_BRAND = "21"; /* Brand ID */ +const char* HTTPUPDATE_MODEL = "HTTP_Client_AES_OTA_Update"; /* Project name */ +const char* HTTPUPDATE_FIRMWARE = "0.9"; /* Firmware version */ + +//========================================================================== +//========================================================================== +String urlEncode(const String& url, const char* safeChars="-_.~") { + String encoded = ""; + char temp[4]; + + for (int i = 0; i < url.length(); i++){ + temp[0] = url.charAt(i); + if(temp[0] == 32){//space + encoded.concat('+'); + }else if( (temp[0] >= 48 && temp[0] <= 57) /*0-9*/ + || (temp[0] >= 65 && temp[0] <= 90) /*A-Z*/ + || (temp[0] >= 97 && temp[0] <= 122) /*a-z*/ + || (strchr(safeChars, temp[0]) != NULL) /* "=&-_.~" */ + ){ + encoded.concat(temp[0]); + }else{ //character needs encoding + snprintf(temp, 4, "%%%02X", temp[0]); + encoded.concat(temp); + } + } + return encoded; +} + +//========================================================================== +bool addQuery(String* query, const String name, const String value) { + if( name.length() && value.length() ){ + if( query->length() < 3 ){ + *query = "?"; + }else{ + query->concat('&'); + } + query->concat( urlEncode(name) ); + query->concat('='); + query->concat( urlEncode(value) ); + return true; + } + return false; +} + +//========================================================================== +//========================================================================== +void printProgress(size_t progress, const size_t& size) { + static int last_progress=-1; + if(size>0){ + progress = (progress*100)/size; + progress = (progress>100 ? 100 : progress); //0-100 + if( progress != last_progress ){ + Serial.printf("Progress: %d%%\n", progress); + last_progress = progress; + } + } +} + +//========================================================================== +bool http_downloadUpdate(HTTPClient& http, uint32_t size=0) { + size = (size == 0 ? http.getSize() : size); + if(size == 0){ + return false; + } + WiFiClient *client = http.getStreamPtr(); + + if( !Update.begin(size, U_FLASH) ) { + Serial.printf("Update.begin failed! (%s)\n", Update.errorString() ); + return false; + } + + if( !Update.setupCrypt(OTA_KEY, OTA_ADDRESS, OTA_CFG, OTA_MODE)){ + Serial.println("Update.setupCrypt failed!"); + } + + if( Update.writeStream(*client) != size ) { + Serial.printf("Update.writeStream failed! (%s)\n", Update.errorString() ); + return false; + } + + if( !Update.end() ) { + Serial.printf("Update.end failed! (%s)\n", Update.errorString() ); + return false; + } + return true; +} + +//========================================================================== +int http_sendRequest(HTTPClient& http) { + +//set request Headers to be sent to server + http.useHTTP10(true); // use HTTP/1.0 for update since the update handler not support any transfer Encoding + http.setTimeout(8000); + http.addHeader("Cache-Control", "no-cache"); + +//set own name for HTTPclient user-agent + http.setUserAgent(HTTPUPDATE_USERAGRENT); + + int code = http.GET(); //send the GET request to HTTP server + int len = http.getSize(); + + if(code == HTTP_CODE_OK){ + return (len>0 ? len : 0); //return 0 or length of image to download + }else if(code < 0){ + Serial.printf("Error: %s\n", http.errorToString(code).c_str()); + return code; //error code should be minus between -1 to -11 + }else{ + Serial.printf("Error: HTTP Server response code %i\n", code); + return -code; //return code should be minus between -100 to -511 + } +} + +//========================================================================== +/* http_updater sends a GET request to 'update.php' on web server */ +bool http_updater(const String& host, const uint16_t& port, String uri, const bool& download, const char* user=NULL, const char* password=NULL) { +//add GET query params to be sent to server (are used by server 'updater.php' code to determine what action to take) + String query = ""; + addQuery(&query, "cmd",(download ? "download" :"check") ); //action command + +//setup HTTPclient to be ready to connect & send a request to HTTP server + HTTPClient http; + WiFiClient client; + uri.concat(query); //GET query added to end of uri path + if( !http.begin(client, host, port, uri) ){ + return false; //httpclient setup error + } + Serial.printf( "Sending HTTP request 'http://%s:%i%s'\n", host.c_str(), port, uri.c_str() ); + +//set basic authorization, if needed for webpage access + if(user != NULL && password != NULL){ + http.setAuthorization(user, password); //set basic Authorization to server, if needed be gain access + } + +//add unique Headers to be sent to server used by server 'update.php' code to determine there a suitable firmware update image avaliable + http.addHeader("Brand-Code", HTTPUPDATE_BRAND); + http.addHeader("Model", HTTPUPDATE_MODEL); + http.addHeader("Firmware", HTTPUPDATE_FIRMWARE); + +//set headers to look for to get returned values in servers http response to our http request + const char * headerkeys[] = { "update", "version" }; //server returns update 0=no update found, 1=update found, version=version of update found + size_t headerkeyssize = sizeof(headerkeys) / sizeof(char*); + http.collectHeaders(headerkeys, headerkeyssize); + +//connect & send HTTP request to server + int size = http_sendRequest(http); + +//is there an image to download + if( size > 0 || (!download && size == 0) ){ + if( !http.header("update") || http.header("update").toInt() == 0 ){ + Serial.println("No Firmware avaliable"); + }else if( !http.header("version") || http.header("version").toFloat() <= String(HTTPUPDATE_FIRMWARE).toFloat() ){ + Serial.println("Firmware is upto Date"); + }else{ +//image avaliabe to download & update + if(!download){ + Serial.printf( "Found V%s Firmware\n", http.header("version").c_str() ); + }else{ + Serial.printf( "Downloading & Installing V%s Firmware\n", http.header("version").c_str() ); + } + if( !download || http_downloadUpdate(http) ){ + http.end(); //end connection + return true; + } + } + } + + http.end(); //end connection + return false; +} + +//========================================================================== +/* this downloads Firmware image file directly from web server */ +bool http_direct(const String& host, const uint16_t& port, const String& uri, const char* user=NULL, const char* password=NULL) { +//setup HTTPclient to be ready to connect & send a request to HTTP server + HTTPClient http; + WiFiClient client; + if( !http.begin(client, host, port, uri) ){ + return false; //httpclient setup error + } + Serial.printf( "Sending HTTP request 'http://%s:%i%s'\n", host.c_str(), port, uri.c_str() ); + +//set basic authorization, if needed for webpage access + if(user != NULL && password != NULL){ + http.setAuthorization(user, password); //set basic Authorization to server, if needed be gain access + } + +//connect & send HTTP request to server + int size = http_sendRequest(http); + +//is there an image to download + if(size > 0){ + if( http_downloadUpdate(http) ){ + http.end(); + return true; //end connection + } + }else{ + Serial.println("Image File not found"); + } + + http.end(); //end connection + return false; +} + +//========================================================================== +//========================================================================== + +void setup() { + Serial.begin(115200); + Serial.println(); + Serial.printf("Booting %s V%s\n", HTTPUPDATE_MODEL, HTTPUPDATE_FIRMWARE); + + WiFi.mode(WIFI_AP_STA); + WiFi.begin(WIFI_SSID, WIFI_PASSWORD); + if(WiFi.waitForConnectResult() != WL_CONNECTED){ + Serial.println("WiFi failed, retrying."); + } + int i = 0; + while (WiFi.waitForConnectResult() != WL_CONNECTED){ + Serial.print("."); + if( (++i % 100) == 0){ + Serial.println(); + } + delay(100); + } + Serial.printf( "Connected to Wifi\nLocal IP: %s\n", WiFi.localIP().toString().c_str() ); + + Update.onProgress(printProgress); + + Serial.println("Checking with Server, if New Firmware avaliable"); + if( http_updater(HTTPUPDATE_HOST, HTTPUPDATE_PORT, HTTPUPDATE_UPDATER_URI, 0, HTTPUPDATE_USER, HTTPUPDATE_PASSWORD) ){ //check for new firmware + if( http_updater(HTTPUPDATE_HOST, HTTPUPDATE_PORT, HTTPUPDATE_UPDATER_URI, 1, HTTPUPDATE_USER, HTTPUPDATE_PASSWORD) ){ //update to new firmware + Serial.println("Firmware Update Sucessfull, rebooting"); + ESP.restart(); + } + } + + Serial.println("Checking Server for Firmware Image File to Download & Install"); + if( http_direct(HTTPUPDATE_HOST, HTTPUPDATE_PORT, HTTPUPDATE_DIRECT_URI, HTTPUPDATE_USER, HTTPUPDATE_PASSWORD) ){ + Serial.println("Firmware Update Sucessfull, rebooting"); + ESP.restart(); + } +} + +void loop() { +} diff --git a/libraries/Update/examples/HTTP_Client_AES_OTA_Update/updater.php b/libraries/Update/examples/HTTP_Client_AES_OTA_Update/updater.php new file mode 100644 index 00000000000..4edfb75a126 --- /dev/null +++ b/libraries/Update/examples/HTTP_Client_AES_OTA_Update/updater.php @@ -0,0 +1,64 @@ + $value) { + $headers += [$name => $value]; + } + verify( in_array($headers['Brand-Code'], $brand_codes) ); + + $GetArgs = filter_input_array(INPUT_GET); + verify( in_array($GetArgs['cmd'], $commands) ); + + if($GetArgs['cmd'] == "check" || $GetArgs['cmd'] == "download"){ +/*********************************************************************************/ +/* $firmware version & filename definitions for different Brands, Models & Firmware versions */ + if($headers['Brand-Code'] == "21"){ + if($headers['Model'] == "HTTP_Client_AES_OTA_Update"){ + + if($headers['Firmware'] < "0.9"){//ie. update to latest of this major version + $firmware = array('version'=>"0.9", 'filename'=>"HTTP_Client_AES_OTA_Update-v0.9.xbin"); + } + elseif($headers['Firmware'] == "0.9"){//ie. update between major versions + $firmware = array('version'=>"1.0", 'filename'=>"HTTP_Client_AES_OTA_Update-v1.0.xbin"); + } + elseif($headers['Firmware'] <= "1.4"){//ie. update to latest version + $firmware = array('version'=>"1.4", 'filename'=>"HTTP_Client_AES_OTA_Update-v1.4.xbin"); + } + + } + } +/* end of $firmware definitions for firmware update images on server */ +/*********************************************************************************/ + + if( !$firmware['filename'] || !file_exists($firmware['filename']) ){ + header('update: 0' );//no update avaliable + exit; + }else{ + header('update: 1' );//update avaliable + header('version: ' . $firmware['version'] ); + if($GetArgs['cmd'] == "download"){ +//Get file type and set it as Content Type + $finfo = finfo_open(FILEINFO_MIME_TYPE); + header('Content-Type: ' . finfo_file($finfo, $firmware['filename']));//application/octet-stream for binary file + finfo_close($finfo); +//Define file size + header('Content-Length: ' . filesize($firmware['filename'])); + readfile($firmware['filename']); //send file + } + exit; + } + } + + verify(false); +?> diff --git a/libraries/Update/examples/HTTP_Server_AES_OTA_Update/.skip.esp32h2 b/libraries/Update/examples/HTTP_Server_AES_OTA_Update/.skip.esp32h2 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/libraries/Update/examples/HTTP_Server_AES_OTA_Update/HTTP_Server_AES_OTA_Update.ino b/libraries/Update/examples/HTTP_Server_AES_OTA_Update/HTTP_Server_AES_OTA_Update.ino new file mode 100644 index 00000000000..b4c611d2739 --- /dev/null +++ b/libraries/Update/examples/HTTP_Server_AES_OTA_Update/HTTP_Server_AES_OTA_Update.ino @@ -0,0 +1,235 @@ +/* +An example of how to use Update to upload encrypted and plain image files OTA. This example uses a simple webserver & Wifi connection via AP or STA with mDNS and DNS for simple host URI. + +Encrypted image will help protect your app image file from being copied and used on blank devices, encrypt your image file by using espressif IDF. +First install an app on device that has Update setup with the OTA decrypt mode on, same key, address and flash_crypt_conf as used in IDF to encrypt image file or vice versa. + +For easier development use the default U_AES_DECRYPT_AUTO decrypt mode. This mode allows both plain and encrypted app images to be uploaded. + +Note:- App image can also encrypted on device, by using espressif IDF to configure & enabled FLASH encryption, suggest the use of a different 'OTA_KEY' key for update from the eFuses 'flash_encryption' key used by device. + + ie. "Update.setupCrypt(OTA_KEY, OTA_ADDRESS, OTA_CFG);" + +defaults:- {if not set ie. "Update.setupCrypt();" } + OTA_KEY = 0 ( 0 = no key, disables decryption ) + OTA_ADDRESS = 0 ( suggest dont set address to app0=0x10000 usually or app1=varies ) + OTA_CFG = 0xf + OTA_MODE = U_AES_DECRYPT_AUTO + +OTA_MODE options:- + U_AES_DECRYPT_NONE decryption disabled, loads OTA image files as sent(plain) + U_AES_DECRYPT_AUTO auto loads both plain & encrypted OTA FLASH image files, and plain OTA SPIFFS image files + U_AES_DECRYPT_ON decrypts OTA image files + +https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/ + +Example: + espsecure.py encrypt_flash_data -k ota_key.bin --flash_crypt_conf 0xf -a 0x4320 -o output_filename.bin source_filename.bin + +espsecure.py encrypt_flash_data = runs the idf encryption function to make a encrypted output file from a source file + -k text = path/filename to the AES 256bit(32byte) encryption key file + --flash_crypt_conf 0xn = 0x0 to 0xf, the more bits set the higher the security of encryption(address salting, 0x0 would use ota_key with no address salting) + -a 0xnnnnnn00 = 0x00 to 0x00fffff0 address offset(must be a multiple of 16, but better to use multiple of 32), used to offset the salting (has no effect when = --flash_crypt_conf 0x0) + -o text = path/filename to save encrypted output file to + text = path/filename to open source file from +*/ + +#include +#include +#include +#include +#include +#include + +WebServer httpServer(80); + +//with WIFI_MODE_AP defined the ESP32 is a wifi AP, with it undefined ESP32 tries to connect to wifi STA +#define WIFI_MODE_AP + +#ifdef WIFI_MODE_AP + #include + DNSServer dnsServer; +#endif + +const char* host = "esp32-web"; +const char* ssid = "wifi-ssid"; +const char* password = "wifi-password"; + +const uint8_t OTA_KEY[32] = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, \ + 0x38, 0x39, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, \ + 0x61, 0x20, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, \ + 0x74, 0x65, 0x73, 0x74, 0x20, 0x6b, 0x65, 0x79 }; + +/* +const uint8_t OTA_KEY[32] = {'0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', ' ', 't', 'h', 'i', 's', ' ', + 'a', ' ', 's', 'i', 'm', 'p', 'l', 'e', + 't', 'e', 's', 't', ' ', 'k', 'e', 'y' }; +*/ + +//const uint8_t OTA_KEY[33] = "0123456789 this a simpletest key"; + +const uint32_t OTA_ADDRESS = 0x4320; //OTA_ADDRESS value has no effect when OTA_CFG = 0x00 +const uint32_t OTA_CFG = 0x0f; +const uint32_t OTA_MODE = U_AES_DECRYPT_AUTO; + +/*=================================================================*/ +const char* update_path = "update"; + +static const char UpdatePage_HTML[] PROGMEM = +R"( + + + Image Upload + + + + +
+ Firmware:

+

+ +
+


+
+ FileSystem:

+

+ +
+ + )"; + +/*=================================================================*/ + +void printProgress(size_t progress, size_t size) { + static int last_progress=-1; + if(size>0){ + progress = (progress*100)/size; + progress = (progress>100 ? 100 : progress); //0-100 + if( progress != last_progress ){ + Serial.printf("\nProgress: %d%%", progress); + last_progress = progress; + } + } +} + +void setupHttpUpdateServer() { + //redirecting not found web pages back to update page + httpServer.onNotFound( [&]() { //webpage not found + httpServer.sendHeader("Location", String("../")+String(update_path) ); + httpServer.send(302, F("text/html"), "" ); + }); + + // handler for the update web page + httpServer.on(String("/")+String(update_path), HTTP_GET, [&]() { + httpServer.send_P(200, PSTR("text/html"), UpdatePage_HTML); + }); + + // handler for the update page form POST + httpServer.on( String("/")+String(update_path), HTTP_POST, [&]() { + // handler when file upload finishes + if (Update.hasError()) { + httpServer.send(200, F("text/html"), String(F("Update error: ")) + String(Update.errorString()) ); + } else { + httpServer.client().setNoDelay(true); + httpServer.send(200, PSTR("text/html"), String(F("Update Success! Rebooting...")) ); + delay(100); + httpServer.client().stop(); + ESP.restart(); + } + }, [&]() { + // handler for the file upload, get's the sketch bytes, and writes + // them through the Update object + HTTPUpload& upload = httpServer.upload(); + if (upload.status == UPLOAD_FILE_START) { + Serial.printf("Update: %s\n", upload.filename.c_str()); + if (upload.name == "filesystem") { + if (!Update.begin(SPIFFS.totalBytes(), U_SPIFFS)) {//start with max available size + Update.printError(Serial); + } + } else { + uint32_t maxSketchSpace = (ESP.getFreeSketchSpace() - 0x1000) & 0xFFFFF000; + if (!Update.begin(maxSketchSpace, U_FLASH)) {//start with max available size + Update.printError(Serial); + } + } + } else if ( upload.status == UPLOAD_FILE_ABORTED || Update.hasError() ) { + if(upload.status == UPLOAD_FILE_ABORTED){ + if(!Update.end(false)){ + Update.printError(Serial); + } + Serial.println("Update was aborted"); + } + } else if (upload.status == UPLOAD_FILE_WRITE) { + Serial.printf("."); + if (Update.write(upload.buf, upload.currentSize) != upload.currentSize) { + Update.printError(Serial); + } + } else if (upload.status == UPLOAD_FILE_END) { + if (Update.end(true)) { //true to set the size to the current progress + Serial.printf("Update Success: %u\nRebooting...\n", upload.totalSize); + } else { + Update.printError(Serial); + } + } + delay(0); + }); + + Update.onProgress(printProgress); +} + +/*=================================================================*/ + +void setup(void) { + Serial.begin(115200); + Serial.println(); + Serial.println("Booting Sketch..."); + WiFi.mode(WIFI_AP_STA); +#ifdef WIFI_MODE_AP + WiFi.softAP(ssid, password); + dnsServer.setErrorReplyCode(DNSReplyCode::NoError); + dnsServer.start(53, "*", WiFi.softAPIP() ); //if DNS started with "*" for domain name, it will reply with provided IP to all DNS request + Serial.printf("Wifi AP started, IP address: %s\n", WiFi.softAPIP().toString().c_str() ); + Serial.printf("You can connect to ESP32 AP use:-\n ssid: %s\npassword: %s\n\n", ssid, password); +#else + WiFi.begin(ssid, password); + if(WiFi.waitForConnectResult() != WL_CONNECTED){ + Serial.println("WiFi failed, retrying."); + } + int i = 0; + while (WiFi.waitForConnectResult() != WL_CONNECTED){ + Serial.print("."); + if( (++i % 100) == 0){ + Serial.println(); + } + delay(100); + } + Serial.printf("Connected to Wifi\nLocal IP: %s\n", WiFi.localIP().toString().c_str()); +#endif + + if( MDNS.begin(host) ) { + Serial.println("mDNS responder started"); + } + + setupHttpUpdateServer(); + + if( Update.setupCrypt(OTA_KEY, OTA_ADDRESS, OTA_CFG, OTA_MODE)){ + Serial.println("Upload Decryption Ready"); + } + + httpServer.begin(); + + MDNS.addService("http", "tcp", 80); +#ifdef WIFI_MODE_AP + Serial.printf("HTTPUpdateServer ready with Captive DNS!\nOpen http://anyname.xyz/%s in your browser\n", update_path); +#else + Serial.printf("HTTPUpdateServer ready!\nOpen http://%s.local/%s in your browser\n", host, update_path); +#endif +} + +void loop(void) { + httpServer.handleClient(); +#ifdef WIFI_MODE_AP + dnsServer.processNextRequest(); //DNS captive portal for easy access to this device webserver +#endif +} diff --git a/libraries/Update/src/Update.h b/libraries/Update/src/Update.h index d34efe73196..cb99508238b 100644 --- a/libraries/Update/src/Update.h +++ b/libraries/Update/src/Update.h @@ -5,6 +5,7 @@ #include #include #include "esp_partition.h" +#include "aes/esp_aes.h" #define UPDATE_ERROR_OK (0) #define UPDATE_ERROR_WRITE (1) @@ -19,6 +20,7 @@ #define UPDATE_ERROR_NO_PARTITION (10) #define UPDATE_ERROR_BAD_ARGUMENT (11) #define UPDATE_ERROR_ABORT (12) +#define UPDATE_ERROR_DECRYPT (13) #define UPDATE_SIZE_UNKNOWN 0xFFFFFFFF @@ -26,7 +28,15 @@ #define U_SPIFFS 100 #define U_AUTH 200 -#define ENCRYPTED_BLOCK_SIZE 16 +#define ENCRYPTED_BLOCK_SIZE 16 +#define ENCRYPTED_TWEAK_BLOCK_SIZE 32 +#define ENCRYPTED_KEY_SIZE 32 + +#define U_AES_DECRYPT_NONE 0 +#define U_AES_DECRYPT_AUTO 1 +#define U_AES_DECRYPT_ON 2 +#define U_AES_DECRYPT_MODE_MASK 3 +#define U_AES_IMAGE_DECRYPTING_BIT 4 #define SPI_SECTORS_PER_BLOCK 16 // usually large erase block is 32k/64k #define SPI_FLASH_BLOCK_SIZE (SPI_SECTORS_PER_BLOCK*SPI_FLASH_SEC_SIZE) @@ -48,6 +58,15 @@ class UpdateClass { */ bool begin(size_t size=UPDATE_SIZE_UNKNOWN, int command = U_FLASH, int ledPin = -1, uint8_t ledOn = LOW, const char *label = NULL); + /* + Setup decryption configuration + Crypt Key is 32bytes(256bits) block of data, use the same key as used to encrypt image file + Crypt Address, use the same value as used to encrypt image file + Crypt Config, use the same value as used to encrypt image file + Crypt Mode, used to select if image files should be decrypted or not + */ + bool setupCrypt(const uint8_t *cryptKey=0, size_t cryptAddress=0, uint8_t cryptConfig=0xf, int cryptMode=U_AES_DECRYPT_AUTO); + /* Writes a buffer to the flash and increments the address Returns the amount written @@ -75,6 +94,26 @@ class UpdateClass { */ bool end(bool evenIfRemaining = false); + /* + sets AES256 key(32 bytes) used for decrypting image file + */ + bool setCryptKey(const uint8_t *cryptKey); + + /* + sets crypt mode used on image files + */ + bool setCryptMode(const int cryptMode); + + /* + sets address used for decrypting image file + */ + void setCryptAddress(const size_t cryptAddress){ _cryptAddress = cryptAddress & 0x00fffff0; } + + /* + sets crypt config used for decrypting image file + */ + void setCryptConfig(const uint8_t cryptConfig){ _cryptCfg = cryptConfig & 0x0f; } + /* Aborts the running update */ @@ -165,6 +204,8 @@ class UpdateClass { private: void _reset(); void _abort(uint8_t err); + void _cryptKeyTweak(size_t cryptAddress, uint8_t *tweaked_key); + bool _decryptBuffer(); bool _writeBuffer(); bool _verifyHeader(uint8_t data); bool _verifyEnd(); @@ -173,6 +214,8 @@ class UpdateClass { uint8_t _error; + uint8_t *_cryptKey; + uint8_t *_cryptBuffer; uint8_t *_buffer; uint8_t *_skipBuffer; size_t _bufferLen; @@ -188,6 +231,10 @@ class UpdateClass { int _ledPin; uint8_t _ledOn; + + uint8_t _cryptMode; + size_t _cryptAddress; + uint8_t _cryptCfg; }; #if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_UPDATE) diff --git a/libraries/Update/src/Updater.cpp b/libraries/Update/src/Updater.cpp index 9980558dbba..bd22419d37a 100644 --- a/libraries/Update/src/Updater.cpp +++ b/libraries/Update/src/Updater.cpp @@ -31,6 +31,8 @@ static const char * _err2str(uint8_t _error){ return ("Bad Argument"); } else if(_error == UPDATE_ERROR_ABORT){ return ("Aborted"); + } else if(_error == UPDATE_ERROR_DECRYPT){ + return ("Decryption error"); } return ("UNKNOWN"); } @@ -59,7 +61,10 @@ bool UpdateClass::_enablePartition(const esp_partition_t* partition){ UpdateClass::UpdateClass() : _error(0) +, _cryptKey(0) +, _cryptBuffer(0) , _buffer(0) +, _skipBuffer(0) , _bufferLen(0) , _size(0) , _progress_callback(NULL) @@ -67,6 +72,9 @@ UpdateClass::UpdateClass() , _paroffset(0) , _command(U_FLASH) , _partition(NULL) +, _cryptMode(U_AES_DECRYPT_AUTO) +, _cryptAddress(0) +, _cryptCfg(0xf) { } @@ -83,6 +91,7 @@ void UpdateClass::_reset() { delete[] _skipBuffer; } + _cryptBuffer = nullptr; _buffer = nullptr; _skipBuffer = nullptr; _bufferLen = 0; @@ -176,6 +185,48 @@ bool UpdateClass::begin(size_t size, int command, int ledPin, uint8_t ledOn, con return true; } +bool UpdateClass::setupCrypt(const uint8_t *cryptKey, size_t cryptAddress, uint8_t cryptConfig, int cryptMode){ + if(setCryptKey(cryptKey)){ + if(setCryptMode(cryptMode)){ + setCryptAddress(cryptAddress); + setCryptConfig(cryptConfig); + return true; + } + } + return false; +} + +bool UpdateClass::setCryptKey(const uint8_t *cryptKey){ + if(!cryptKey){ + if (_cryptKey){ + delete[] _cryptKey; + _cryptKey = 0; + log_d("AES key unset"); + } + return false; //key cleared, no key to decrypt with + } + //initialize + if(!_cryptKey){ + _cryptKey = new (std::nothrow) uint8_t[ENCRYPTED_KEY_SIZE]; + } + if(!_cryptKey){ + log_e("new failed"); + return false; + } + memcpy(_cryptKey, cryptKey, ENCRYPTED_KEY_SIZE); + return true; +} + +bool UpdateClass::setCryptMode(const int cryptMode){ + if(cryptMode >= U_AES_DECRYPT_NONE && cryptMode <= U_AES_DECRYPT_ON){ + _cryptMode = cryptMode; + }else{ + log_e("bad crypt mode arguement %i", cryptMode); + return false; + } + return true; +} + void UpdateClass::_abort(uint8_t err){ _reset(); _error = err; @@ -185,7 +236,119 @@ void UpdateClass::abort(){ _abort(UPDATE_ERROR_ABORT); } +void UpdateClass::_cryptKeyTweak(size_t cryptAddress, uint8_t *tweaked_key){ + memcpy(tweaked_key, _cryptKey, ENCRYPTED_KEY_SIZE ); + if(_cryptCfg == 0) return; //no tweaking needed, use crypt key as-is + + const uint8_t pattern[] = { 23, 23, 23, 14, 23, 23, 23, 12, 23, 23, 23, 10, 23, 23, 23, 8 }; + int pattern_idx = 0; + int key_idx = 0; + int bit_len = 0; + uint32_t tweak = 0; + cryptAddress &= 0x00ffffe0; //bit 23-5 + cryptAddress <<= 8; //bit23 shifted to bit31(MSB) + while(pattern_idx < sizeof(pattern)){ + tweak = cryptAddress<<(23 - pattern[pattern_idx]); //bit shift for small patterns + // alternative to: tweak = rotl32(tweak,8 - bit_len); + tweak = (tweak<<(8 - bit_len)) | (tweak>>(24 + bit_len)); //rotate to line up with end of previous tweak bits + bit_len += pattern[pattern_idx++] - 4; //add number of bits in next pattern(23-4 = 19bits = 23bit to 5bit) + while(bit_len > 7){ + tweaked_key[key_idx++] ^= tweak; //XOR byte + // alternative to: tweak = rotl32(tweak, 8); + tweak = (tweak<<8) | (tweak>>24); //compiler should optimize to use rotate(fast) + bit_len -=8; + } + tweaked_key[key_idx] ^= tweak; //XOR remaining bits, will XOR zeros if no remaining bits + } + if(_cryptCfg == 0xf) return; //return with fully tweaked key + + //some of tweaked key bits need to be restore back to crypt key bits + const uint8_t cfg_bits[] = { 67, 65, 63, 61 }; + key_idx = 0; + pattern_idx = 0; + while(key_idx < ENCRYPTED_KEY_SIZE){ + bit_len += cfg_bits[pattern_idx]; + if( (_cryptCfg & (1< 0){ + if( bit_len > 7 || ((_cryptCfg & (2<>bit_len); + tweaked_key[key_idx] |= (_cryptKey[key_idx] & (~(0xff>>bit_len)) ); + } + key_idx++; + bit_len -= 8; + } + }else{ //keep tweaked key bits + while(bit_len > 0){ + if( bit_len <8 && ((_cryptCfg & (2<>bit_len)); + tweaked_key[key_idx] |= (_cryptKey[key_idx] & (0xff>>bit_len)); + } + key_idx++; + bit_len -= 8; + } + } + pattern_idx++; + } +} + +bool UpdateClass::_decryptBuffer(){ + if(!_cryptKey){ + log_w("AES key not set"); + return false; + } + if(_bufferLen%ENCRYPTED_BLOCK_SIZE !=0 ){ + log_e("buffer size error"); + return false; + } + if(!_cryptBuffer){ + _cryptBuffer = new (std::nothrow) uint8_t[ENCRYPTED_BLOCK_SIZE]; + } + if(!_cryptBuffer){ + log_e("new failed"); + return false; + } + uint8_t tweaked_key[ENCRYPTED_KEY_SIZE]; //tweaked crypt key + int done = 0; + + esp_aes_context ctx; //initialize AES + esp_aes_init( &ctx ); + while((_bufferLen - done) >= ENCRYPTED_BLOCK_SIZE){ + for(int i=0; i < ENCRYPTED_BLOCK_SIZE; i++) _cryptBuffer[(ENCRYPTED_BLOCK_SIZE - 1) - i] = _buffer[i + done]; //reverse order 16 bytes to decrypt + if( ((_cryptAddress + _progress + done) % ENCRYPTED_TWEAK_BLOCK_SIZE) == 0 || done == 0 ){ + _cryptKeyTweak(_cryptAddress + _progress + done, tweaked_key); //update tweaked crypt key + if( esp_aes_setkey( &ctx, tweaked_key, 256 ) ){ + return false; + } + } + if( esp_aes_crypt_ecb( &ctx, ESP_AES_ENCRYPT, _cryptBuffer, _cryptBuffer ) ){ //use ESP_AES_ENCRYPT to decrypt flash code + return false; + } + for(int i=0; i < ENCRYPTED_BLOCK_SIZE; i++) _buffer[i + done] = _cryptBuffer[(ENCRYPTED_BLOCK_SIZE - 1) - i]; //reverse order 16 bytes from decrypt + done += ENCRYPTED_BLOCK_SIZE; + } + return true; +} + bool UpdateClass::_writeBuffer(){ + //first bytes of loading image, check to see if loading image needs decrypting + if(!_progress){ + _cryptMode &= U_AES_DECRYPT_MODE_MASK; + if( ( _cryptMode == U_AES_DECRYPT_ON ) + || ((_command == U_FLASH) && (_cryptMode & U_AES_DECRYPT_AUTO) && (_buffer[0] != ESP_IMAGE_HEADER_MAGIC)) + ){ + _cryptMode |= U_AES_IMAGE_DECRYPTING_BIT; //set to decrypt the loading image + log_d("Decrypting OTA Image"); + } + } + //check if data in buffer needs decrypting + if( _cryptMode & U_AES_IMAGE_DECRYPTING_BIT ){ + if( !_decryptBuffer() ){ + _abort(UPDATE_ERROR_DECRYPT); + return false; + } + } //first bytes of new firmware uint8_t skip = 0; if(!_progress && _command == U_FLASH){ From c21a8cdaa56822b13e6f8259ca5b5b1f7b5d88ae Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Wed, 7 Feb 2024 12:05:58 -0300 Subject: [PATCH 34/34] Server Side Events (#9222) * feat: Server Side Events (SSE) * Update libraries/WiFi/src/WiFiClient.cpp Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> --------- Co-authored-by: Miquel Martin Co-authored-by: Miquel --- libraries/WebServer/src/WebServer.cpp | 9 +++++++++ libraries/WiFi/src/WiFiClient.cpp | 15 +++++++++++++-- libraries/WiFi/src/WiFiClient.h | 3 +++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/libraries/WebServer/src/WebServer.cpp b/libraries/WebServer/src/WebServer.cpp index dd443dbd8e8..e423900ca52 100644 --- a/libraries/WebServer/src/WebServer.cpp +++ b/libraries/WebServer/src/WebServer.cpp @@ -402,6 +402,11 @@ void WebServer::handleClient() { _contentLength = CONTENT_LENGTH_NOT_SET; _handleRequest(); + if (_currentClient.isSSE()) { + _currentStatus = HC_WAIT_CLOSE; + _statusChange = millis(); + keepCurrentClient = true; + } // Fix for issue with Chrome based browsers: https://github.com/espressif/arduino-esp32/issues/3652 // if (_currentClient.connected()) { // _currentStatus = HC_WAIT_CLOSE; @@ -417,6 +422,10 @@ void WebServer::handleClient() { } break; case HC_WAIT_CLOSE: + if (_currentClient.isSSE()) { + // Never close connection + _statusChange = millis(); + } // Wait for client to close the connection if (millis() - _statusChange <= HTTP_MAX_CLOSE_WAIT) { keepCurrentClient = true; diff --git a/libraries/WiFi/src/WiFiClient.cpp b/libraries/WiFi/src/WiFiClient.cpp index 52aca2f1bd9..96eab3b5602 100644 --- a/libraries/WiFi/src/WiFiClient.cpp +++ b/libraries/WiFi/src/WiFiClient.cpp @@ -187,7 +187,7 @@ class WiFiClientSocketHandle { } }; -WiFiClient::WiFiClient():_rxBuffer(nullptr),_connected(false),_timeout(WIFI_CLIENT_DEF_CONN_TIMEOUT_MS),next(NULL) +WiFiClient::WiFiClient():_rxBuffer(nullptr),_connected(false),_sse(false),_timeout(WIFI_CLIENT_DEF_CONN_TIMEOUT_MS),next(NULL) { } @@ -347,7 +347,7 @@ int WiFiClient::setOption(int option, int *value) int WiFiClient::getOption(int option, int *value) { - socklen_t size = sizeof(int); + socklen_t size = sizeof(int); int res = getsockopt(fd(), IPPROTO_TCP, option, (char *)value, &size); if(res < 0) { log_e("fail on fd %d, errno: %d, \"%s\"", fd(), errno, strerror(errno)); @@ -661,3 +661,14 @@ int WiFiClient::fd() const return clientSocketHandle->fd(); } } + +void WiFiClient::setSSE(bool sse) +{ + _sse = sse; +} + +bool WiFiClient::isSSE() +{ + return _sse; +} + diff --git a/libraries/WiFi/src/WiFiClient.h b/libraries/WiFi/src/WiFiClient.h index d78e00fb19e..5eee16c8070 100644 --- a/libraries/WiFi/src/WiFiClient.h +++ b/libraries/WiFi/src/WiFiClient.h @@ -42,6 +42,7 @@ class WiFiClient : public ESPLwIPClient std::shared_ptr clientSocketHandle; std::shared_ptr _rxBuffer; bool _connected; + bool _sse; int _timeout; int _lastWriteTimeout; int _lastReadTimeout; @@ -66,6 +67,8 @@ class WiFiClient : public ESPLwIPClient void flush(); void stop(); uint8_t connected(); + void setSSE(bool sse); + bool isSSE(); operator bool() {