chore: checkpoint current IDF 5.5 remediation state

This commit is contained in:
Sebastien L
2026-02-11 20:23:37 +00:00
parent 73bd096f37
commit 71a9c06fe4
197 changed files with 19719 additions and 1015 deletions

View File

@@ -3,14 +3,13 @@ idf_component_register( SRCS
cmd_ota.c
cmd_system.c
cmd_wifi.c
platform_console.c
platform_console.c
cmd_config.c
INCLUDE_DIRS .
REQUIRES nvs_flash
REQUIRES nvs_flash driver esp_wifi
PRIV_REQUIRES console app_update tools services spi_flash tools platform_config vfs pthread wifi-manager newlib telnet display squeezelite metrics)
set_source_files_properties(cmd_config.c
PROPERTIES COMPILE_FLAGS
-Wno-unused-function
)

View File

@@ -1,6 +1,6 @@
idf_component_register( SRC_DIRS .
INCLUDE_DIRS .
PRIV_REQUIRES bootloader_support json
PRIV_REQUIRES bootloader_support esp_app_format json
)
target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,--undefined=esp_app_desc")

View File

@@ -3,6 +3,7 @@
#include "application_name.h"
#include "esp_err.h"
#include "esp_app_format.h"
#include "esp_app_desc.h"
#include "cJSON.h"
#include "stdbool.h"
extern esp_err_t process_recovery_ota(const char * bin_url, char * bin_buffer, uint32_t length);

View File

@@ -120,7 +120,7 @@ bool is_i2c_started(i2c_port_t port) {
ret = i2c_master_stop(cmd);
}
if (ret == ESP_OK) {
ret = i2c_master_cmd_begin(port, cmd, 50 / portTICK_RATE_MS);
ret = i2c_master_cmd_begin(port, cmd, 50 / portTICK_PERIOD_MS);
}
i2c_cmd_link_delete(cmd);
ESP_LOGD(TAG, "i2c is %s. %s", ret != ESP_ERR_INVALID_STATE ? "started" : "not started",
@@ -658,7 +658,7 @@ static int do_i2cdump_cmd(int argc, char** argv) {
}
i2c_master_read_byte(cmd, data + size - 1, NACK_VAL);
i2c_master_stop(cmd);
esp_err_t ret = i2c_master_cmd_begin(loc_i2c_port, cmd, 50 / portTICK_RATE_MS);
esp_err_t ret = i2c_master_cmd_begin(loc_i2c_port, cmd, 50 / portTICK_PERIOD_MS);
i2c_cmd_link_delete(cmd);
if (ret == ESP_OK) {
for (int k = 0; k < size; k++) {
@@ -729,7 +729,7 @@ static int do_i2cset_cmd(int argc, char** argv) {
i2c_master_write_byte(cmd, i2cset_args.data->ival[i], ACK_CHECK_EN);
}
i2c_master_stop(cmd);
esp_err_t ret = i2c_master_cmd_begin(loc_i2c_port, cmd, 1000 / portTICK_RATE_MS);
esp_err_t ret = i2c_master_cmd_begin(loc_i2c_port, cmd, 1000 / portTICK_PERIOD_MS);
i2c_cmd_link_delete(cmd);
if (ret == ESP_OK) {
cmd_send_messaging(argv[0], MESSAGING_INFO, "i2c Write OK\n");
@@ -786,7 +786,7 @@ static int do_i2cget_cmd(int argc, char** argv) {
}
i2c_master_read_byte(cmd, data + len - 1, NACK_VAL);
i2c_master_stop(cmd);
esp_err_t ret = i2c_master_cmd_begin(loc_i2c_port, cmd, 1000 / portTICK_RATE_MS);
esp_err_t ret = i2c_master_cmd_begin(loc_i2c_port, cmd, 1000 / portTICK_PERIOD_MS);
i2c_cmd_link_delete(cmd);
if (ret == ESP_OK) {
for (int i = 0; i < len; i++) {
@@ -861,7 +861,7 @@ esp_err_t cmd_i2ctools_scan_bus(FILE* f, int sda, int scl) {
i2c_master_start(cmd);
i2c_master_write_byte(cmd, (i << 1) | WRITE_BIT, ACK_CHECK_EN);
i2c_master_stop(cmd);
ret = i2c_master_cmd_begin(i2c_port, cmd, 50 / portTICK_RATE_MS);
ret = i2c_master_cmd_begin(i2c_port, cmd, 50 / portTICK_PERIOD_MS);
i2c_cmd_link_delete(cmd);
if (ret == ESP_OK) {
#ifndef CONFIG_WITH_CONFIG_UI
@@ -931,7 +931,7 @@ static int do_i2cdetect_cmd(int argc, char** argv) {
i2c_master_start(cmd);
i2c_master_write_byte(cmd, (address << 1) | WRITE_BIT, ACK_CHECK_EN);
i2c_master_stop(cmd);
ret = i2c_master_cmd_begin(loc_i2c_port, cmd, 50 / portTICK_RATE_MS);
ret = i2c_master_cmd_begin(loc_i2c_port, cmd, 50 / portTICK_PERIOD_MS);
i2c_cmd_link_delete(cmd);
if (ret == ESP_OK) {
fprintf(f, "%02x ", address);

View File

@@ -14,11 +14,13 @@
#include "driver/rtc_io.h"
#include "driver/uart.h"
#include "esp_console.h"
#include "esp_chip_info.h"
#include "esp_log.h"
#include "esp_ota_ops.h"
#include "esp_partition.h"
#include "esp_rom_uart.h"
#include "esp_sleep.h"
#include "esp_flash.h"
#include "esp_spi_flash.h"
#include "esp_system.h"
#include "freertos/FreeRTOS.h"
@@ -121,7 +123,9 @@ FILE* system_open_memstream(const char* cmdname, char** buf, size_t* buf_size) {
/* 'version' command */
static int get_version(int argc, char** argv) {
esp_chip_info_t info;
uint32_t flash_size = 0;
esp_chip_info(&info);
esp_flash_get_size(NULL, &flash_size);
cmd_send_messaging(argv[0], MESSAGING_INFO,
"IDF Version:%s\r\n"
"Chip info:\r\n"
@@ -134,7 +138,7 @@ static int get_version(int argc, char** argv) {
info.features & CHIP_FEATURE_BLE ? "/BLE" : "",
info.features & CHIP_FEATURE_BT ? "/BT" : "",
info.features & CHIP_FEATURE_EMB_FLASH ? "/Embedded-Flash:" : "/External-Flash:",
spi_flash_get_chip_size() / (1024 * 1024), " MB", info.revision);
flash_size / (1024 * 1024), " MB", info.revision);
return 0;
}
@@ -989,4 +993,4 @@ void register_system() {
register_deep_sleep();
register_light_sleep();
#endif
}
}

View File

@@ -87,8 +87,9 @@ static void initialise_wifi(void)
led_blink(LED_GREEN, 250, 250);
}
static void wifi_join(void *arg)
static void wifi_join(TimerHandle_t timer)
{
(void)timer;
const char *ssid = join_args.ssid->sval[0];
const char *pass = join_args.password->sval[0];
int timeout_ms = join_args.timeout->ival[0];