3 Commits

Author SHA1 Message Date
d40bb7d52e Version 2.0.0
Added ESP32 - C2/C3/C6/S2/S3 support.
Added ESP-NOW v2.0 support.
Removed zh_network support.
Improved stability of work
2025-01-30 18:18:12 +03:00
7a34b9c25a Version 1.0.3
Changed WiFi protocol.
Added offline message.
Changed task management.
Updated some components.
2024-07-25 11:04:12 +03:00
c8007ade5d Update README.md 2024-07-05 13:48:41 +03:00
20 changed files with 175 additions and 119 deletions

6
.gitmodules vendored
View File

@ -1,9 +1,3 @@
[submodule "components/zh_network"]
path = components/zh_network
url = https://github.com/aZholtikov/zh_network
[submodule "components/zh_vector"]
path = components/zh_vector
url = https://github.com/aZholtikov/zh_vector
[submodule "components/zh_espnow"]
path = components/zh_espnow
url = https://github.com/aZholtikov/zh_espnow

View File

@ -1,27 +1,24 @@
# ESP-NOW led
ESP-NOW based led controller/light for ESP32 ESP-IDF and ESP8266 RTOS SDK. Alternate firmware for Tuya/SmartLife/eWeLink WiFi led controllers/lights.
ESP-NOW based led controller/light for ESP32 ESP-IDF and ESP8266 RTOS_SDK. Alternate firmware for Tuya/SmartLife/eWeLink WiFi led controllers/lights.
## 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 led configuration to Home Assistan via MQTT discovery as a light.
3. Update firmware from HTTPS server via ESP-NOW.
4. 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 Led Configuration". After first boot all settings will be stored in NVS memory for prevente change during OTA firmware update.
4. To restart the led, send the "restart" command to the root topic of the led (example - "homeassistant/espnow_led/24-62-AB-F9-1F-A8").
5. To update the led firmware, send the "update" command to the root topic of the led (example - "homeassistant/espnow_led/70-03-9F-44-BE-F7"). The update path should be like as "https://your_server/zh_espnow_led_esp32.bin" (for ESP32) or "https://your_server/zh_espnow_led_esp8266.app1.bin + https://your_server/zh_espnow_led_esp8266.app2.bin" (for ESP8266). The time and success of the update depends on the load on WiFi channel 1. Average update time is up to five minutes. The online status of the update will be displayed in the root led topic.
6. To change initial settings of the led (except work mode), send the X1,X2,X3,X4,X5,X6 command to the hardware topic of the led (example - "homeassistant/espnow_led/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 led (example - "homeassistant/espnow_led/70-03-9F-44-BE-F7/config").
1. For initial settings use "menuconfig -> ZH ESP-NOW Led Configuration". After first boot all settings will be stored in NVS memory for prevente change during OTA firmware update.
2. To restart the led, send the "restart" command to the root topic of the led (example - "homeassistant/espnow_led/24-62-AB-F9-1F-A8").
3. To update the led firmware, send the "update" command to the root topic of the led (example - "homeassistant/espnow_led/70-03-9F-44-BE-F7"). The update path should be like as "https://your_server/zh_espnow_led_esp32.bin" (for ESP32) or "https://your_server/zh_espnow_led_esp8266.app1.bin + https://your_server/zh_espnow_led_esp8266.app2.bin" (for ESP8266). Average update time is up to one minute. The status of the update will be displayed in the root led topic.
4. To change initial settings of the led (except work mode), send the X1,X2,X3,X4,X5,X6 command to the hardware topic of the led (example - "homeassistant/espnow_led/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 led (example - "homeassistant/espnow_led/70-03-9F-44-BE-F7/config").
MQTT configuration message should filled according to the template "X1,X2,X3,X4,X5,X6". Where:

View File

@ -10,17 +10,6 @@ menu "ZH ESP-NOW Led Configuration"
default 19 if IDF_TARGET_ESP32C3
default 30 if IDF_TARGET_ESP32C6
choice NETWORK_TYPE
prompt "Network type"
help
Network type.
default NETWORK_TYPE_DIRECT
config NETWORK_TYPE_DIRECT
bool "DIRECT"
config NETWORK_TYPE_MESH
bool "MESH"
endchoice
choice LED_TYPE
prompt "Led type"
help

View File

@ -15,19 +15,17 @@ void app_main(void)
wifi_init_config_t wifi_init_config = WIFI_INIT_CONFIG_DEFAULT();
esp_wifi_init(&wifi_init_config);
esp_wifi_set_mode(WIFI_MODE_STA);
esp_wifi_set_protocol(WIFI_IF_STA, WIFI_PROTOCOL_11B);
esp_wifi_start();
#ifdef CONFIG_NETWORK_TYPE_DIRECT
zh_espnow_init_config_t espnow_init_config = ZH_ESPNOW_INIT_CONFIG_DEFAULT();
zh_espnow_init(&espnow_init_config);
#else
zh_network_init_config_t network_init_config = ZH_NETWORK_INIT_CONFIG_DEFAULT();
zh_network_init(&network_init_config);
#endif
xTaskCreatePinnedToCore(&zh_send_led_attributes_message_task, "led_attributes_message_task", ZH_MESSAGE_STACK_SIZE, led_config, ZH_MESSAGE_TASK_PRIORITY, (TaskHandle_t *)&led_config->attributes_message_task, tskNO_AFFINITY);
vTaskSuspend(led_config->attributes_message_task);
xTaskCreatePinnedToCore(&zh_send_led_keep_alive_message_task, "led_keep_alive_message_task", ZH_MESSAGE_STACK_SIZE, led_config, ZH_MESSAGE_TASK_PRIORITY, (TaskHandle_t *)&led_config->keep_alive_message_task, tskNO_AFFINITY);
vTaskSuspend(led_config->keep_alive_message_task);
#ifdef CONFIG_IDF_TARGET_ESP8266
esp_event_handler_register(ZH_EVENT, ESP_EVENT_ANY_ID, &zh_espnow_event_handler, led_config);
esp_event_handler_register(ZH_ESPNOW, ESP_EVENT_ANY_ID, &zh_espnow_event_handler, led_config);
#else
esp_event_handler_instance_register(ZH_EVENT, ESP_EVENT_ANY_ID, &zh_espnow_event_handler, led_config, NULL);
esp_event_handler_instance_register(ZH_ESPNOW, ESP_EVENT_ANY_ID, &zh_espnow_event_handler, led_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);
@ -48,6 +46,7 @@ void zh_load_config(led_config_t *led_config)
{
nvs_set_u8(nvs_handle, "present", 0xFE);
nvs_close(nvs_handle);
SETUP_INITIAL_SETTINGS:
#ifdef CONFIG_LED_TYPE_W
led_config->hardware_config.led_type = HALT_W;
#elif CONFIG_LED_TYPE_WW
@ -89,13 +88,18 @@ void zh_load_config(led_config_t *led_config)
zh_save_config(led_config);
return;
}
nvs_get_u8(nvs_handle, "led_type", (uint8_t *)&led_config->hardware_config.led_type);
nvs_get_u8(nvs_handle, "frs_white_pin", &led_config->hardware_config.first_white_pin);
nvs_get_u8(nvs_handle, "sec_white_pin", &led_config->hardware_config.second_white_pin);
nvs_get_u8(nvs_handle, "red_pin", &led_config->hardware_config.red_pin);
nvs_get_u8(nvs_handle, "green_pin", &led_config->hardware_config.green_pin);
nvs_get_u8(nvs_handle, "blue_pin", &led_config->hardware_config.blue_pin);
esp_err_t err = ESP_OK;
err += nvs_get_u8(nvs_handle, "led_type", (uint8_t *)&led_config->hardware_config.led_type);
err += nvs_get_u8(nvs_handle, "frs_white_pin", &led_config->hardware_config.first_white_pin);
err += nvs_get_u8(nvs_handle, "sec_white_pin", &led_config->hardware_config.second_white_pin);
err += nvs_get_u8(nvs_handle, "red_pin", &led_config->hardware_config.red_pin);
err += nvs_get_u8(nvs_handle, "green_pin", &led_config->hardware_config.green_pin);
err += nvs_get_u8(nvs_handle, "blue_pin", &led_config->hardware_config.blue_pin);
nvs_close(nvs_handle);
if (err != ESP_OK)
{
goto SETUP_INITIAL_SETTINGS;
}
}
void zh_save_config(const led_config_t *led_config)
@ -127,9 +131,7 @@ void zh_load_status(led_config_t *led_config)
}
nvs_get_u8(nvs_handle, "led_state", (uint8_t *)&led_config->status.status);
nvs_get_u8(nvs_handle, "bright_state", &led_config->status.brightness);
uint16_t temperature = 0;
nvs_get_u16(nvs_handle, "temp_state", &temperature); // Just to prevent a compiler warning.
led_config->status.temperature = temperature;
nvs_get_u16(nvs_handle, "temp_state", &led_config->status.temperature);
nvs_get_u8(nvs_handle, "red_state", &led_config->status.red);
nvs_get_u8(nvs_handle, "green_state", &led_config->status.green);
nvs_get_u8(nvs_handle, "blue_state", &led_config->status.blue);
@ -421,7 +423,7 @@ void zh_send_led_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(led_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
zh_espnow_send(led_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
vTaskDelay(ZH_LED_ATTRIBUTES_MESSAGE_FREQUENCY * 1000 / portTICK_PERIOD_MS);
}
vTaskDelete(NULL);
@ -440,7 +442,7 @@ void zh_send_led_config_message(const led_config_t *led_config)
data.payload_data.config_message.led_config_message.optimistic = false;
data.payload_data.config_message.led_config_message.qos = 2;
data.payload_data.config_message.led_config_message.retain = true;
zh_send_message(led_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
zh_espnow_send(led_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
}
void zh_send_led_hardware_config_message(const led_config_t *led_config)
@ -454,7 +456,7 @@ void zh_send_led_hardware_config_message(const led_config_t *led_config)
data.payload_data.config_message.led_hardware_config_message.red_pin = led_config->hardware_config.red_pin;
data.payload_data.config_message.led_hardware_config_message.green_pin = led_config->hardware_config.green_pin;
data.payload_data.config_message.led_hardware_config_message.blue_pin = led_config->hardware_config.blue_pin;
zh_send_message(led_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
zh_espnow_send(led_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
}
void zh_send_led_keep_alive_message_task(void *pvParameter)
@ -467,7 +469,7 @@ void zh_send_led_keep_alive_message_task(void *pvParameter)
data.payload_data.keep_alive_message.message_frequency = ZH_LED_KEEP_ALIVE_MESSAGE_FREQUENCY;
for (;;)
{
zh_send_message(led_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
zh_espnow_send(led_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
vTaskDelay(ZH_LED_KEEP_ALIVE_MESSAGE_FREQUENCY * 1000 / portTICK_PERIOD_MS);
}
vTaskDelete(NULL);
@ -485,7 +487,7 @@ void zh_send_led_status_message(const led_config_t *led_config)
data.payload_data.status_message.led_status_message.green = led_config->status.green;
data.payload_data.status_message.led_status_message.blue = led_config->status.blue;
data.payload_data.status_message.led_status_message.effect = led_config->status.effect;
zh_send_message(led_config->gateway_mac, (uint8_t *)&data, sizeof(zh_espnow_data_t));
zh_espnow_send(led_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)
@ -493,21 +495,12 @@ void zh_espnow_event_handler(void *arg, esp_event_base_t event_base, int32_t eve
led_config_t *led_config = arg;
switch (event_id)
{
#ifdef CONFIG_NETWORK_TYPE_DIRECT
case ZH_ESPNOW_ON_RECV_EVENT:;
zh_espnow_event_on_recv_t *recv_data = event_data;
if (recv_data->data_len != sizeof(zh_espnow_data_t))
{
goto ZH_ESPNOW_EVENT_HANDLER_EXIT;
}
#else
case ZH_NETWORK_ON_RECV_EVENT:;
zh_network_event_on_recv_t *recv_data = event_data;
if (recv_data->data_len != sizeof(zh_espnow_data_t))
{
goto ZH_NETWORK_EVENT_HANDLER_EXIT;
}
#endif
zh_espnow_data_t *data = (zh_espnow_data_t *)recv_data->data;
switch (data->device_type)
{
@ -517,31 +510,22 @@ 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(led_config->gateway_mac, recv_data->mac_addr, 6);
if (led_config->gateway_is_available == false)
{
led_config->gateway_is_available = true;
memcpy(led_config->gateway_mac, recv_data->mac_addr, 6);
zh_send_led_hardware_config_message(led_config);
if (led_config->hardware_config.led_type != HALT_NONE)
{
zh_send_led_config_message(led_config);
zh_send_led_status_message(led_config);
xTaskCreatePinnedToCore(&zh_send_led_attributes_message_task, "NULL", ZH_MESSAGE_STACK_SIZE, led_config, ZH_MESSAGE_TASK_PRIORITY, (TaskHandle_t *)&led_config->attributes_message_task, tskNO_AFFINITY);
xTaskCreatePinnedToCore(&zh_send_led_keep_alive_message_task, "NULL", ZH_MESSAGE_STACK_SIZE, led_config, ZH_MESSAGE_TASK_PRIORITY, (TaskHandle_t *)&led_config->keep_alive_message_task, tskNO_AFFINITY);
}
zh_send_led_config_message(led_config);
zh_send_led_status_message(led_config);
vTaskResume(led_config->attributes_message_task);
vTaskResume(led_config->keep_alive_message_task);
}
}
else
{
if (led_config->gateway_is_available == true)
{
led_config->gateway_is_available = false;
if (led_config->hardware_config.led_type != HALT_NONE)
{
vTaskDelete(led_config->attributes_message_task);
vTaskDelete(led_config->keep_alive_message_task);
}
}
led_config->gateway_is_available = false;
vTaskSuspend(led_config->attributes_message_task);
vTaskSuspend(led_config->keep_alive_message_task);
}
break;
case ZHPT_SET:
@ -593,9 +577,8 @@ void zh_espnow_event_handler(void *arg, esp_event_base_t event_base, int32_t eve
#else
strcpy(data->payload_data.ota_message.espnow_ota_data.app_name, app_info->project_name);
#endif
data->device_type = ZHDT_LED;
data->payload_type = ZHPT_UPDATE;
zh_send_message(led_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
zh_espnow_send(led_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
break;
case ZHPT_UPDATE_BEGIN:
#ifdef CONFIG_IDF_TARGET_ESP8266
@ -606,7 +589,7 @@ void zh_espnow_event_handler(void *arg, esp_event_base_t event_base, int32_t eve
led_config->ota_message_part_number = 1;
data->device_type = ZHDT_LED;
data->payload_type = ZHPT_UPDATE_PROGRESS;
zh_send_message(led_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
zh_espnow_send(led_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
break;
case ZHPT_UPDATE_PROGRESS:
if (led_config->ota_message_part_number == data->payload_data.ota_message.espnow_ota_message.part)
@ -616,7 +599,7 @@ void zh_espnow_event_handler(void *arg, esp_event_base_t event_base, int32_t eve
}
data->device_type = ZHDT_LED;
data->payload_type = ZHPT_UPDATE_PROGRESS;
zh_send_message(led_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
zh_espnow_send(led_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
break;
case ZHPT_UPDATE_ERROR:
esp_ota_end(led_config->update_handle);
@ -626,13 +609,13 @@ void zh_espnow_event_handler(void *arg, esp_event_base_t event_base, int32_t eve
{
data->device_type = ZHDT_LED;
data->payload_type = ZHPT_UPDATE_FAIL;
zh_send_message(led_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
zh_espnow_send(led_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
break;
}
esp_ota_set_boot_partition(led_config->update_partition);
data->device_type = ZHDT_LED;
data->payload_type = ZHPT_UPDATE_SUCCESS;
zh_send_message(led_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
zh_espnow_send(led_config->gateway_mac, (uint8_t *)data, sizeof(zh_espnow_data_t));
vTaskDelay(1000 / portTICK_PERIOD_MS);
esp_restart();
break;
@ -646,7 +629,6 @@ void zh_espnow_event_handler(void *arg, esp_event_base_t event_base, int32_t eve
default:
break;
}
#ifdef CONFIG_NETWORK_TYPE_DIRECT
ZH_ESPNOW_EVENT_HANDLER_EXIT:
heap_caps_free(recv_data->data);
break;
@ -655,30 +637,10 @@ void zh_espnow_event_handler(void *arg, esp_event_base_t event_base, int32_t eve
if (send_data->status == ZH_ESPNOW_SEND_FAIL && led_config->gateway_is_available == true)
{
led_config->gateway_is_available = false;
if (led_config->hardware_config.led_type != HALT_NONE)
{
vTaskDelete(led_config->attributes_message_task);
vTaskDelete(led_config->keep_alive_message_task);
}
vTaskSuspend(led_config->attributes_message_task);
vTaskSuspend(led_config->keep_alive_message_task);
}
break;
#else
ZH_NETWORK_EVENT_HANDLER_EXIT:
heap_caps_free(recv_data->data);
break;
case ZH_NETWORK_ON_SEND_EVENT:;
zh_network_event_on_send_t *send_data = event_data;
if (send_data->status == ZH_NETWORK_SEND_FAIL && led_config->gateway_is_available == true)
{
led_config->gateway_is_available = false;
if (led_config->hardware_config.led_type != HALT_NONE)
{
vTaskDelete(led_config->attributes_message_task);
vTaskDelete(led_config->keep_alive_message_task);
}
}
break;
#endif
default:
break;
}

View File

@ -9,17 +9,8 @@
#include "driver/ledc.h"
#include "esp_timer.h"
#include "esp_ota_ops.h"
#include "zh_config.h"
#ifdef CONFIG_NETWORK_TYPE_DIRECT
#include "zh_espnow.h"
#define zh_send_message(a, b, c) zh_espnow_send(a, b, c)
#define ZH_EVENT ZH_ESPNOW
#else
#include "zh_network.h"
#define zh_send_message(a, b, c) zh_network_send(a, b, c)
#define ZH_EVENT ZH_NETWORK
#endif
#include "zh_config.h"
#ifdef CONFIG_IDF_TARGET_ESP8266
#define ZH_CHIP_TYPE HACHT_ESP8266
@ -48,7 +39,7 @@
#define ZH_LED_KEEP_ALIVE_MESSAGE_FREQUENCY 10 // Frequency of sending a led keep alive message to the gateway (in seconds).
#define ZH_LED_ATTRIBUTES_MESSAGE_FREQUENCY 60 // Frequency of sending a led attributes message to the gateway (in seconds).
#define ZH_MESSAGE_TASK_PRIORITY 2 // Prioritize the task of sending messages to the gateway.
#define ZH_MESSAGE_TASK_PRIORITY 5 // Prioritize the task of sending messages to the gateway.
#define ZH_MESSAGE_STACK_SIZE 2048 // The stack size of the task of sending messages to the gateway.
typedef struct // Structure of data exchange between tasks, functions and event handlers.

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.2
2.0.0