Added ESP32 - C2/C3/C6/S2/S3 support.

Removed zh_network support.
Improved stability of work.
This commit is contained in:
Alexey Zholtikov 2025-01-26 11:00:08 +03:00
parent da52f1e35b
commit 4488fed13b
18 changed files with 172 additions and 108 deletions

View File

@ -1,30 +1,26 @@
# ESP-NOW switch
ESP-NOW based switch for ESP32 ESP-IDF and ESP8266 RTOS SDK. Alternate firmware for Tuya/SmartLife/eWeLink WiFi switches.
ESP-NOW based switch for ESP32 ESP-IDF and ESP8266 RTOS_SDK. Alternate firmware for Tuya/SmartLife/eWeLink WiFi switches.
## Tested on
1. ESP8266 RTOS_SDK v3.4
2. ESP32 ESP-IDF v5.2
2. ESP32 ESP-IDF v5.4
## Features
1. Saves the last state when the power is turned off.
2. Automatically adds switch configuration to Home Assistan via MQTT discovery as a switch.
3. Update firmware from HTTPS server via ESP-NOW.
4. Optional support one external 1-wire sensor (DS18B20/DHT11/DHT22/AM2302/AM2320).
5. Direct or mesh work mode.
## Notes
1. Work mode must be same with [gateway](https://github.com/aZholtikov/zh_gateway) work mode.
2. ESP-NOW mesh network based on the [zh_network](https://github.com/aZholtikov/zh_network).
3. For initial settings use "menuconfig -> ZH ESP-NOW Switch Configuration". After first boot all settings will be stored in NVS memory for prevente change during OTA firmware update.
4. To restart the switch, send the "restart" command to the root topic of the switch (example - "homeassistant/espnow_switch/24-62-AB-F9-1F-A8").
5. To update the switch firmware, send the "update" command to the root topic of the switch (example - "homeassistant/espnow_switch/70-03-9F-44-BE-F7"). The update path should be like as "https://your_server/zh_espnow_switch_esp32.bin" (for ESP32) or "https://your_server/zh_espnow_switch_esp8266.app1.bin + https://your_server/zh_espnow_switch_esp8266.app2.bin" (for ESP8266). Average update time is up to some minutes. The online status of the update will be displayed in the root switch topic.
6. To change initial settings of the switch (except work mode), send the X1,X2,X3,X4,X5,X6,X7,X8,X9,X10,X11 command to the hardware topic of the switch (example - "homeassistant/espnow_switch/70-03-9F-44-BE-F7/hardware"). The configuration will only be accepted if it does not cause errors. The current configuration status is displayed in the configuration topic of the switch (example - "homeassistant/espnow_switch/70-03-9F-44-BE-F7/config").
1. For initial settings use "menuconfig -> ZH ESP-NOW Switch Configuration". After first boot all settings will be stored in NVS memory for prevente change during OTA firmware update.
2. To restart the switch, send the "restart" command to the root topic of the switch (example - "homeassistant/espnow_switch/24-62-AB-F9-1F-A8").
3. To update the switch firmware, send the "update" command to the root topic of the switch (example - "homeassistant/espnow_switch/70-03-9F-44-BE-F7"). The update path should be like as "https://your_server/zh_espnow_switch_esp32.bin" (for ESP32) or "https://your_server/zh_espnow_switch_esp8266.app1.bin + https://your_server/zh_espnow_switch_esp8266.app2.bin" (for ESP8266). Average update time is up to some minutes. The online status of the update will be displayed in the root switch topic.
4. To change initial settings of the switch, send the X1,X2,X3,X4,X5,X6,X7,X8 command to the hardware topic of the switch (example - "homeassistant/espnow_switch/70-03-9F-44-BE-F7/hardware"). The configuration will only be accepted if it does not cause errors. The current configuration status is displayed in the configuration topic of the switch (example - "homeassistant/espnow_switch/70-03-9F-44-BE-F7/config").
MQTT configuration message should filled according to the template "X1,X2,X3,X4,X5,X6,X7,X8,X9,X10". Where:
MQTT configuration message should filled according to the template "X1,X2,X3,X4,X5,X6,X7,X8". Where:
1. X1 - Relay GPIO number. 0 - 48 (according to the module used), 255 if not used.
2. X2 - Relay ON level. 1 for high, 0 for low. Only affected when X1 is used.
@ -34,9 +30,6 @@ MQTT configuration message should filled according to the template "X1,X2,X3,X4,
6. X6 - Internal button trigger level. 1 for high, 0 for low. Only affected when X5 is used.
7. X7 - External button GPIO number. 0 - 48 (according to the module used), 255 if not used.
8. X8 - External button trigger level. 1 for high, 0 for low. Only affected when X7 is used.
9. X9 - Sensor GPIO number. 0 - 48 (according to the module used). 255 if not used.
10. X10 - Sensor type. 1 for DS18B20, 8 for DHT. Only affected when X9 is used.
11. X11 - Sensor measurement frequency. 1 - 65536 seconds. Only affected when X9 is used.
## Build and flash

@ -1 +1 @@
Subproject commit 7608ba0abf53fbebb48251c9f190beb7c6313135
Subproject commit f4ecd08e4521dd1f46df15325304cb596296d42b

View File

@ -14,7 +14,7 @@
Using MQTT:
"12,1,4,0,13,0,255,0,255,0"
"12,1,4,0,13,0,255,0"
```
2. MINI 1CH 16A. Built on Tuya WiFi module WB2S (BK7231T chip). Replacement with ESP-02S (TYWE2S). [Photo](http://git.zh.com.ru/alexey.zholtikov/zh_espnow_switch/src/branch/main/hardware/MINI_1CH_16A).
@ -33,7 +33,7 @@
Using MQTT:
"13,1,4,0,3,0,14,1,255,0"
"13,1,4,0,3,0,14,1"
```
3. LIGHT E27 SOCKET. Built on Tuya WiFi module WA2 (WB2S) (BK7231T chip). Replacement with ESP-02S (TYWE2S). [Photo](http://git.zh.com.ru/alexey.zholtikov/zh_espnow_switch/src/branch/main/hardware/LIGHT_E27_SOCKET).
@ -50,7 +50,7 @@
Using MQTT:
"12,1,4,0,13,0,255,0,255,0"
"12,1,4,0,13,0,255,0"
```
4. TH 1CH 16A + DS18B20. Built on ITEAD WiFi module PSF-B85 (ESP8285 chip). Replacement not required. [Photo](http://git.zh.com.ru/alexey.zholtikov/zh_espnow_switch/src/branch/main/hardware/TH_1CH_16A).
@ -64,10 +64,8 @@
Led ON level LOW
Internal button GPIO number 0
Internal button trigger level LOW
Sensor GPIO number 14
Sensor type DS18B20
Using MQTT:
"12,1,13,0,0,0,255,0,14,1"
"12,1,13,0,0,0,255,0"
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

View File

@ -18,10 +18,14 @@ void app_main(void)
esp_wifi_start();
zh_espnow_init_config_t espnow_init_config = ZH_ESPNOW_INIT_CONFIG_DEFAULT();
zh_espnow_init(&espnow_init_config);
xTaskCreatePinnedToCore(&zh_send_switch_attributes_message_task, "switch_attributes_message_task", ZH_MESSAGE_STACK_SIZE, switch_config, ZH_MESSAGE_TASK_PRIORITY, (TaskHandle_t *)&switch_config->switch_attributes_message_task, tskNO_AFFINITY);
vTaskSuspend(switch_config->switch_attributes_message_task);
xTaskCreatePinnedToCore(&zh_send_switch_keep_alive_message_task, "switch_keep_alive_message_task", ZH_MESSAGE_STACK_SIZE, switch_config, ZH_MESSAGE_TASK_PRIORITY, (TaskHandle_t *)&switch_config->switch_keep_alive_message_task, tskNO_AFFINITY);
vTaskSuspend(switch_config->switch_keep_alive_message_task);
#ifdef CONFIG_IDF_TARGET_ESP8266
esp_event_handler_register(ZH_ESPNOW, ESP_EVENT_ANY_ID, &zh_espnow_event_handler, switch_config);
#else
esp_event_handler_instance_register(ZH_EVENT, ESP_EVENT_ANY_ID, &zh_espnow_event_handler, switch_config, NULL);
esp_event_handler_instance_register(ZH_ESPNOW, ESP_EVENT_ANY_ID, &zh_espnow_event_handler, switch_config, NULL);
const esp_partition_t *running = esp_ota_get_running_partition();
esp_ota_img_states_t ota_state = {0};
esp_ota_get_state_partition(running, &ota_state);
@ -199,7 +203,7 @@ void zh_gpio_init(switch_config_t *switch_config)
if (switch_config->hardware_config.int_button_pin != ZH_NOT_USED || switch_config->hardware_config.ext_button_pin != ZH_NOT_USED)
{
switch_config->button_pushing_semaphore = xSemaphoreCreateBinary();
xTaskCreatePinnedToCore(&zh_gpio_processing_task, "NULL", ZH_GPIO_STACK_SIZE, switch_config, ZH_GPIO_TASK_PRIORITY, NULL, tskNO_AFFINITY);
xTaskCreatePinnedToCore(&zh_gpio_processing_task, "gpio_processing_task", ZH_GPIO_STACK_SIZE, switch_config, ZH_GPIO_TASK_PRIORITY, NULL, tskNO_AFFINITY);
gpio_install_isr_service(0);
if (switch_config->hardware_config.int_button_pin != ZH_NOT_USED)
{
@ -239,7 +243,7 @@ void zh_gpio_set_level(switch_config_t *switch_config)
}
}
void zh_gpio_isr_handler(void *arg)
void IRAM_ATTR zh_gpio_isr_handler(void *arg)
{
switch_config_t *switch_config = arg;
if (switch_config->gpio_processing == false)
@ -286,7 +290,7 @@ void zh_send_switch_attributes_message_task(void *pvParameter)
data.payload_data.attributes_message.heap_size = esp_get_free_heap_size();
data.payload_data.attributes_message.min_heap_size = esp_get_minimum_free_heap_size();
data.payload_data.attributes_message.uptime = esp_timer_get_time() / 1000000;
zh_send_message(switch_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
zh_espnow_send(switch_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
vTaskDelay(ZH_SWITCH_ATTRIBUTES_MESSAGE_FREQUENCY * 1000 / portTICK_PERIOD_MS);
}
vTaskDelete(NULL);
@ -305,7 +309,7 @@ void zh_send_switch_config_message(const switch_config_t *switch_config)
data.payload_data.config_message.switch_config_message.optimistic = false;
data.payload_data.config_message.switch_config_message.qos = 2;
data.payload_data.config_message.switch_config_message.retain = true;
zh_send_message(switch_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
zh_espnow_send(switch_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
}
void zh_send_switch_hardware_config_message(const switch_config_t *switch_config)
@ -321,7 +325,7 @@ void zh_send_switch_hardware_config_message(const switch_config_t *switch_config
data.payload_data.config_message.switch_hardware_config_message.int_button_on_level = switch_config->hardware_config.int_button_on_level;
data.payload_data.config_message.switch_hardware_config_message.ext_button_pin = switch_config->hardware_config.ext_button_pin;
data.payload_data.config_message.switch_hardware_config_message.ext_button_on_level = switch_config->hardware_config.ext_button_on_level;
zh_send_message(switch_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
zh_espnow_send(switch_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
}
void zh_send_switch_keep_alive_message_task(void *pvParameter)
@ -334,7 +338,7 @@ void zh_send_switch_keep_alive_message_task(void *pvParameter)
data.payload_data.keep_alive_message.message_frequency = ZH_SWITCH_KEEP_ALIVE_MESSAGE_FREQUENCY;
for (;;)
{
zh_send_message(switch_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
zh_espnow_send(switch_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
vTaskDelay(ZH_SWITCH_KEEP_ALIVE_MESSAGE_FREQUENCY * 1000 / portTICK_PERIOD_MS);
}
vTaskDelete(NULL);
@ -346,7 +350,7 @@ void zh_send_switch_status_message(const switch_config_t *switch_config)
data.device_type = ZHDT_SWITCH;
data.payload_type = ZHPT_STATE;
data.payload_data.status_message.switch_status_message.status = switch_config->status.status;
zh_send_message(switch_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
zh_espnow_send(switch_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
}
void zh_espnow_event_handler(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data)
@ -369,41 +373,23 @@ void zh_espnow_event_handler(void *arg, esp_event_base_t event_base, int32_t eve
case ZHPT_KEEP_ALIVE:
if (data->payload_data.keep_alive_message.online_status == ZH_ONLINE)
{
memcpy(switch_config->gateway_mac, recv_data->mac_addr, 6);
if (switch_config->gateway_is_available == false)
{
switch_config->gateway_is_available = true;
memcpy(switch_config->gateway_mac, recv_data->mac_addr, 6);
zh_send_switch_hardware_config_message(switch_config);
if (switch_config->hardware_config.relay_pin != ZH_NOT_USED)
{
zh_send_switch_config_message(switch_config);
zh_send_switch_status_message(switch_config);
if (switch_config->is_first_connection == false)
{
xTaskCreatePinnedToCore(&zh_send_switch_attributes_message_task, "NULL", ZH_MESSAGE_STACK_SIZE, switch_config, ZH_MESSAGE_TASK_PRIORITY, (TaskHandle_t *)&switch_config->switch_attributes_message_task, tskNO_AFFINITY);
xTaskCreatePinnedToCore(&zh_send_switch_keep_alive_message_task, "NULL", ZH_MESSAGE_STACK_SIZE, switch_config, ZH_MESSAGE_TASK_PRIORITY, (TaskHandle_t *)&switch_config->switch_keep_alive_message_task, tskNO_AFFINITY);
switch_config->is_first_connection = true;
}
else
{
vTaskResume(switch_config->switch_attributes_message_task);
vTaskResume(switch_config->switch_keep_alive_message_task);
}
}
}
}
else
{
if (switch_config->gateway_is_available == true)
{
switch_config->gateway_is_available = false;
if (switch_config->hardware_config.relay_pin != ZH_NOT_USED)
{
vTaskSuspend(switch_config->switch_attributes_message_task);
vTaskSuspend(switch_config->switch_keep_alive_message_task);
}
}
}
break;
case ZHPT_SET:
switch_config->status.status = data->payload_data.status_message.switch_status_message.status;
@ -421,30 +407,9 @@ void zh_espnow_event_handler(void *arg, esp_event_base_t event_base, int32_t eve
switch_config->hardware_config.ext_button_pin = data->payload_data.config_message.switch_hardware_config_message.ext_button_pin;
switch_config->hardware_config.ext_button_on_level = data->payload_data.config_message.switch_hardware_config_message.ext_button_on_level;
zh_save_config(switch_config);
if (switch_config->hardware_config.relay_pin != ZH_NOT_USED)
{
vTaskDelete(switch_config->switch_attributes_message_task);
vTaskDelete(switch_config->switch_keep_alive_message_task);
}
data->device_type = ZHDT_SWITCH;
data->payload_type = ZHPT_KEEP_ALIVE;
data->payload_data.keep_alive_message.online_status = ZH_OFFLINE;
data->payload_data.keep_alive_message.message_frequency = ZH_SWITCH_KEEP_ALIVE_MESSAGE_FREQUENCY;
zh_send_message(switch_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
vTaskDelay(1000 / portTICK_PERIOD_MS);
esp_restart();
break;
case ZHPT_UPDATE:;
if (switch_config->hardware_config.relay_pin != ZH_NOT_USED)
{
vTaskSuspend(switch_config->switch_attributes_message_task);
vTaskSuspend(switch_config->switch_keep_alive_message_task);
}
data->device_type = ZHDT_SWITCH;
data->payload_type = ZHPT_KEEP_ALIVE;
data->payload_data.keep_alive_message.online_status = ZH_OFFLINE;
data->payload_data.keep_alive_message.message_frequency = ZH_SWITCH_KEEP_ALIVE_MESSAGE_FREQUENCY;
zh_send_message(switch_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
const esp_app_desc_t *app_info = get_app_description();
switch_config->update_partition = esp_ota_get_next_update_partition(NULL);
strcpy(data->payload_data.ota_message.espnow_ota_data.app_version, app_info->version);
@ -458,7 +423,7 @@ void zh_espnow_event_handler(void *arg, esp_event_base_t event_base, int32_t eve
strcpy(data->payload_data.ota_message.espnow_ota_data.app_name, app_info->project_name);
#endif
data->payload_type = ZHPT_UPDATE;
zh_send_message(switch_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
zh_espnow_send(switch_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
break;
case ZHPT_UPDATE_BEGIN:
#ifdef CONFIG_IDF_TARGET_ESP8266
@ -469,7 +434,7 @@ void zh_espnow_event_handler(void *arg, esp_event_base_t event_base, int32_t eve
switch_config->ota_message_part_number = 1;
data->device_type = ZHDT_SWITCH;
data->payload_type = ZHPT_UPDATE_PROGRESS;
zh_send_message(switch_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
zh_espnow_send(switch_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
break;
case ZHPT_UPDATE_PROGRESS:
if (switch_config->ota_message_part_number == data->payload_data.ota_message.espnow_ota_message.part)
@ -479,48 +444,27 @@ void zh_espnow_event_handler(void *arg, esp_event_base_t event_base, int32_t eve
}
data->device_type = ZHDT_SWITCH;
data->payload_type = ZHPT_UPDATE_PROGRESS;
zh_send_message(switch_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
zh_espnow_send(switch_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
break;
case ZHPT_UPDATE_ERROR:
esp_ota_end(switch_config->update_handle);
if (switch_config->hardware_config.relay_pin != ZH_NOT_USED)
{
vTaskResume(switch_config->switch_attributes_message_task);
vTaskResume(switch_config->switch_keep_alive_message_task);
}
break;
case ZHPT_UPDATE_END:
if (esp_ota_end(switch_config->update_handle) != ESP_OK)
{
data->device_type = ZHDT_SWITCH;
data->payload_type = ZHPT_UPDATE_FAIL;
zh_send_message(switch_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
if (switch_config->hardware_config.relay_pin != ZH_NOT_USED)
{
vTaskResume(switch_config->switch_attributes_message_task);
vTaskResume(switch_config->switch_keep_alive_message_task);
}
zh_espnow_send(switch_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
break;
}
esp_ota_set_boot_partition(switch_config->update_partition);
data->device_type = ZHDT_SWITCH;
data->payload_type = ZHPT_UPDATE_SUCCESS;
zh_send_message(switch_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
zh_espnow_send(switch_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
vTaskDelay(1000 / portTICK_PERIOD_MS);
esp_restart();
break;
case ZHPT_RESTART:
if (switch_config->hardware_config.relay_pin != ZH_NOT_USED)
{
vTaskDelete(switch_config->switch_attributes_message_task);
vTaskDelete(switch_config->switch_keep_alive_message_task);
}
data->device_type = ZHDT_SWITCH;
data->payload_type = ZHPT_KEEP_ALIVE;
data->payload_data.keep_alive_message.online_status = ZH_OFFLINE;
data->payload_data.keep_alive_message.message_frequency = ZH_SWITCH_KEEP_ALIVE_MESSAGE_FREQUENCY;
zh_send_message(switch_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
vTaskDelay(1000 / portTICK_PERIOD_MS);
esp_restart();
break;
default:
@ -538,12 +482,9 @@ void zh_espnow_event_handler(void *arg, esp_event_base_t event_base, int32_t eve
if (send_data->status == ZH_ESPNOW_SEND_FAIL && switch_config->gateway_is_available == true)
{
switch_config->gateway_is_available = false;
if (switch_config->hardware_config.relay_pin != ZH_NOT_USED)
{
vTaskSuspend(switch_config->switch_attributes_message_task);
vTaskSuspend(switch_config->switch_keep_alive_message_task);
}
}
break;
default:
break;

View File

@ -13,18 +13,25 @@
#ifdef CONFIG_IDF_TARGET_ESP8266
#define ZH_CHIP_TYPE HACHT_ESP8266
// #define ZH_CPU_FREQUENCY CONFIG_ESP8266_DEFAULT_CPU_FREQ_MHZ;
#elif CONFIG_IDF_TARGET_ESP32
#define ZH_CHIP_TYPE HACHT_ESP32
// #define ZH_CPU_FREQUENCY CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ;
#elif CONFIG_IDF_TARGET_ESP32S2
#define ZH_CHIP_TYPE HACHT_ESP32S2
// #define ZH_CPU_FREQUENCY CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ;
#elif CONFIG_IDF_TARGET_ESP32S3
#define ZH_CHIP_TYPE HACHT_ESP32S3
// #define ZH_CPU_FREQUENCY CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ;
#elif CONFIG_IDF_TARGET_ESP32C2
#define ZH_CHIP_TYPE HACHT_ESP32C2
// #define ZH_CPU_FREQUENCY CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ;
#elif CONFIG_IDF_TARGET_ESP32C3
#define ZH_CHIP_TYPE HACHT_ESP32C3
// #define ZH_CPU_FREQUENCY CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ;
#elif CONFIG_IDF_TARGET_ESP32C6
#define ZH_CHIP_TYPE HACHT_ESP32C6
// #define ZH_CPU_FREQUENCY CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ;
#endif
#ifdef CONFIG_IDF_TARGET_ESP8266

7
partitions_esp32c2.csv Normal file
View File

@ -0,0 +1,7 @@
# Name, Type, SubType, Offset, Size, Flags
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs, data, nvs, , 0x4000,
otadata, data, ota, , 0x2000,
phy_init, data, phy, , 0x1000,
ota_0, app, ota_0, , 900K,
ota_1, app, ota_1, , 900K,
1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
3 nvs, data, nvs, , 0x4000,
4 otadata, data, ota, , 0x2000,
5 phy_init, data, phy, , 0x1000,
6 ota_0, app, ota_0, , 900K,
7 ota_1, app, ota_1, , 900K,

7
partitions_esp32c3.csv Normal file
View File

@ -0,0 +1,7 @@
# Name, Type, SubType, Offset, Size, Flags
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs, data, nvs, , 0x4000,
otadata, data, ota, , 0x2000,
phy_init, data, phy, , 0x1000,
ota_0, app, ota_0, , 1500K,
ota_1, app, ota_1, , 1500K,
1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
3 nvs, data, nvs, , 0x4000,
4 otadata, data, ota, , 0x2000,
5 phy_init, data, phy, , 0x1000,
6 ota_0, app, ota_0, , 1500K,
7 ota_1, app, ota_1, , 1500K,

7
partitions_esp32c6.csv Normal file
View File

@ -0,0 +1,7 @@
# Name, Type, SubType, Offset, Size, Flags
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs, data, nvs, , 0x4000,
otadata, data, ota, , 0x2000,
phy_init, data, phy, , 0x1000,
ota_0, app, ota_0, , 1500K,
ota_1, app, ota_1, , 1500K,
1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
3 nvs, data, nvs, , 0x4000,
4 otadata, data, ota, , 0x2000,
5 phy_init, data, phy, , 0x1000,
6 ota_0, app, ota_0, , 1500K,
7 ota_1, app, ota_1, , 1500K,

7
partitions_esp32s2.csv Normal file
View File

@ -0,0 +1,7 @@
# Name, Type, SubType, Offset, Size, Flags
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs, data, nvs, , 0x4000,
otadata, data, ota, , 0x2000,
phy_init, data, phy, , 0x1000,
ota_0, app, ota_0, , 1500K,
ota_1, app, ota_1, , 1500K,
1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
3 nvs, data, nvs, , 0x4000,
4 otadata, data, ota, , 0x2000,
5 phy_init, data, phy, , 0x1000,
6 ota_0, app, ota_0, , 1500K,
7 ota_1, app, ota_1, , 1500K,

7
partitions_esp32s3.csv Normal file
View File

@ -0,0 +1,7 @@
# Name, Type, SubType, Offset, Size, Flags
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs, data, nvs, , 0x4000,
otadata, data, ota, , 0x2000,
phy_init, data, phy, , 0x1000,
ota_0, app, ota_0, , 1500K,
ota_1, app, ota_1, , 1500K,
1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
3 nvs, data, nvs, , 0x4000,
4 otadata, data, ota, , 0x2000,
5 phy_init, data, phy, , 0x1000,
6 ota_0, app, ota_0, , 1500K,
7 ota_1, app, ota_1, , 1500K,

View File

@ -0,0 +1,18 @@
CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x1000
CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y
CONFIG_BOOTLOADER_LOG_LEVEL=0
CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="2MB"
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_esp32c2.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions_esp32c2.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x8000
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_LOG_DEFAULT_LEVEL_NONE=y
CONFIG_LOG_DEFAULT_LEVEL=0

View File

@ -0,0 +1,18 @@
CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x1000
CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y
CONFIG_BOOTLOADER_LOG_LEVEL=0
CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_esp32c3.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions_esp32c3.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x8000
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_LOG_DEFAULT_LEVEL_NONE=y
CONFIG_LOG_DEFAULT_LEVEL=0

View File

@ -0,0 +1,18 @@
CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x1000
CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y
CONFIG_BOOTLOADER_LOG_LEVEL=0
CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_esp32c6.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions_esp32c6.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x8000
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_LOG_DEFAULT_LEVEL_NONE=y
CONFIG_LOG_DEFAULT_LEVEL=0

View File

@ -0,0 +1,18 @@
CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x1000
CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y
CONFIG_BOOTLOADER_LOG_LEVEL=0
CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_esp32s2.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions_esp32s2.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x8000
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_LOG_DEFAULT_LEVEL_NONE=y
CONFIG_LOG_DEFAULT_LEVEL=0

View File

@ -0,0 +1,18 @@
CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x1000
CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y
CONFIG_BOOTLOADER_LOG_LEVEL=0
CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_esp32s3.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions_esp32s3.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x8000
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_LOG_DEFAULT_LEVEL_NONE=y
CONFIG_LOG_DEFAULT_LEVEL=0

View File

@ -1 +1 @@
1.0.7
2.0.0