Upgrade IDF to 5.3.1

This commit is contained in:
Jade Mattsson 2024-10-14 11:57:23 +11:00
parent 6be07fbbf2
commit d483fd94d8
7 changed files with 15 additions and 10 deletions

View File

@ -2,6 +2,6 @@ idf_component_register(
SRCS "ip_fmt.c" "user_main.c" SRCS "ip_fmt.c" "user_main.c"
INCLUDE_DIRS "include" INCLUDE_DIRS "include"
REQUIRES "lua" REQUIRES "lua"
PRIV_REQUIRES "nvs_flash" "spiffs" "esp_netif" "driver" "vfs" PRIV_REQUIRES "nvs_flash" "spiffs" "esp_netif" "driver" "vfs" "esp_vfs_console"
LDFRAGMENTS "nodemcu.lf" LDFRAGMENTS "nodemcu.lf"
) )

View File

@ -22,6 +22,7 @@
#include "esp_vfs_dev.h" #include "esp_vfs_dev.h"
#include "esp_vfs_cdcacm.h" #include "esp_vfs_cdcacm.h"
#include "esp_vfs_usb_serial_jtag.h" #include "esp_vfs_usb_serial_jtag.h"
#include "driver/uart_vfs.h"
#include "driver/usb_serial_jtag.h" #include "driver/usb_serial_jtag.h"
#include "nvs_flash.h" #include "nvs_flash.h"
@ -231,9 +232,9 @@ static void console_init(void)
#if CONFIG_ESP_CONSOLE_UART_DEFAULT || CONFIG_ESP_CONSOLE_UART_CUSTOM #if CONFIG_ESP_CONSOLE_UART_DEFAULT || CONFIG_ESP_CONSOLE_UART_CUSTOM
/* Based on console/advanced example */ /* Based on console/advanced example */
esp_vfs_dev_uart_port_set_rx_line_endings( uart_vfs_dev_port_set_rx_line_endings(
CONFIG_ESP_CONSOLE_UART_NUM, RX_LINE_ENDINGS_CFG); CONFIG_ESP_CONSOLE_UART_NUM, RX_LINE_ENDINGS_CFG);
esp_vfs_dev_uart_port_set_tx_line_endings( uart_vfs_dev_port_set_tx_line_endings(
CONFIG_ESP_CONSOLE_UART_NUM, TX_LINE_ENDINGS_CFG); CONFIG_ESP_CONSOLE_UART_NUM, TX_LINE_ENDINGS_CFG);
/* Configure UART. Note that REF_TICK is used so that the baud rate remains /* Configure UART. Note that REF_TICK is used so that the baud rate remains
@ -255,7 +256,7 @@ static void console_init(void)
uart_param_config(CONFIG_ESP_CONSOLE_UART_NUM, &uart_config); uart_param_config(CONFIG_ESP_CONSOLE_UART_NUM, &uart_config);
/* Tell VFS to use UART driver */ /* Tell VFS to use UART driver */
esp_vfs_dev_uart_use_driver(CONFIG_ESP_CONSOLE_UART_NUM); uart_vfs_dev_use_driver(CONFIG_ESP_CONSOLE_UART_NUM);
#elif CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG #elif CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG
/* Based on @pjsg's work */ /* Based on @pjsg's work */

View File

@ -274,9 +274,9 @@ static int leth_init( lua_State *L )
eth_esp32_emac_config_t emac_cfg = ETH_ESP32_EMAC_DEFAULT_CONFIG(); eth_esp32_emac_config_t emac_cfg = ETH_ESP32_EMAC_DEFAULT_CONFIG();
emac_cfg.smi_mdc_gpio_num = emac_cfg.smi_gpio.mdc_num =
opt_checkint_range( L, "mdc", -1, GPIO_NUM_0, GPIO_NUM_MAX-1 ); opt_checkint_range( L, "mdc", -1, GPIO_NUM_0, GPIO_NUM_MAX-1 );
emac_cfg.smi_mdio_gpio_num = emac_cfg.smi_gpio.mdio_num =
opt_checkint_range( L, "mdio", -1, GPIO_NUM_0, GPIO_NUM_MAX-1 ); opt_checkint_range( L, "mdio", -1, GPIO_NUM_0, GPIO_NUM_MAX-1 );
eth_mac_config_t mac_cfg = ETH_MAC_DEFAULT_CONFIG(); eth_mac_config_t mac_cfg = ETH_MAC_DEFAULT_CONFIG();

View File

@ -113,7 +113,7 @@ static int node_bootreason( lua_State *L)
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32C6) #if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32C6)
case SDIO_RESET: case SDIO_RESET:
#endif #endif
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32H2) #if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3)
case GLITCH_RTC_RESET: case GLITCH_RTC_RESET:
#endif #endif
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32H2) #if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32H2)
@ -122,6 +122,9 @@ static int node_bootreason( lua_State *L)
#if defined(CONFIG_IDF_TARGET_ESP32C6) #if defined(CONFIG_IDF_TARGET_ESP32C6)
case JTAG_RESET: case JTAG_RESET:
#endif #endif
#if defined(CONFIG_IDF_TARGET_ESP32H2)
case JTAG_CPU_RESET:
#endif
#if defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32H2) #if defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32H2)
case USB_UART_CHIP_RESET: case USB_UART_CHIP_RESET:
case USB_JTAG_CHIP_RESET: case USB_JTAG_CHIP_RESET:
@ -131,7 +134,7 @@ static int node_bootreason( lua_State *L)
#endif #endif
case TG0WDT_SYS_RESET: case TG0WDT_SYS_RESET:
case TG1WDT_SYS_RESET: case TG1WDT_SYS_RESET:
#if !defined(CONFIG_IDF_TARGET_ESP32C6) #if !defined(CONFIG_IDF_TARGET_ESP32C6) && !defined(CONFIG_IDF_TARGET_ESP32H2)
case INTRUSION_RESET: case INTRUSION_RESET:
#endif #endif
case RTCWDT_BROWN_OUT_RESET: case RTCWDT_BROWN_OUT_RESET:

View File

@ -79,6 +79,7 @@ menu "NodeMCU platform config"
bool bool
default y if IDF_TARGET_ESP32 default y if IDF_TARGET_ESP32
default y if IDF_TARGET_ESP32S3 default y if IDF_TARGET_ESP32S3
default y if IDF_TARGET_ESP32C6
config NODEMCU_UART_DRIVER_BUF_SIZE_RX0 config NODEMCU_UART_DRIVER_BUF_SIZE_RX0
int "RX buffer size for UART0" int "RX buffer size for UART0"

View File

@ -215,7 +215,7 @@ uint32_t platform_uart_setup( unsigned id, uint32_t baud, int databits, int pari
uart_config_t cfg = { uart_config_t cfg = {
.baud_rate = baud, .baud_rate = baud,
.flow_ctrl = flow_control, .flow_ctrl = flow_control,
.rx_flow_ctrl_thresh = UART_FIFO_LEN - 16, .rx_flow_ctrl_thresh = UART_HW_FIFO_LEN(id) - 16,
.source_clk = UART_SCLK_DEFAULT, .source_clk = UART_SCLK_DEFAULT,
}; };

@ -1 +1 @@
Subproject commit e7771c75bd1dbbfb7b3c5381be7e063b197c9734 Subproject commit c8fc5f643b7a7b0d3b182d3df610844e3dc9bd74