Skip to content

Commit 3dc3dac

Browse files
authoredDec 18, 2024
Upgrade to IDF 5.3.2 (#3664)
* Upgrade IDF to 5.3.1 * Add chip-specific build defaults to CI To help compile-test the different console options, for starters. * Update IDF to v5.3.2 Having gone through the changelog from 5.3.1, this looks safe enough...
1 parent 7b21778 commit 3dc3dac

File tree

13 files changed

+46
-16
lines changed

13 files changed

+46
-16
lines changed
 

‎.github/workflows/build.yml

+7
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ jobs:
3131
shell: bash
3232
- name: Prepare default sdkconfig
3333
run: |
34+
# Compose sdkconfig manually rather than overwrite checked in files
3435
cp sdkconfig.defaults sdkconfig
36+
[ -e "sdkconfig.defaults.${{ matrix.target }}" ] && cat "sdkconfig.defaults.${{ matrix.target }}" >> sdkconfig || true
37+
[ -e "sdkconfig.ci.${{ matrix.target }}" ] && cat "sdkconfig.ci.${{ matrix.target }}" >> sdkconfig || true
3538
shell: bash
3639
- name: Update config for Lua 5.1
3740
if: ${{ matrix.lua_ver == '5.1' }}
@@ -54,6 +57,10 @@ jobs:
5457
echo CONFIG_LUA_NUMBER_INT64=y >> sdkconfig
5558
echo CONFIG_LUA_NUMBER_DOUBLE=y >> sdkconfig
5659
shell: bash
60+
- name: Show resulting sdkconfig
61+
shell: bash
62+
run: |
63+
cat sdkconfig
5764
- name: Build firmware
5865
run: |
5966
make IDF_TARGET=${{ matrix.target }}

‎.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
sdk/
22
cache/
3-
user_config.h
43
server-ca.crt
54
sdkconfig
65
sdkconfig.old*
@@ -13,6 +12,7 @@ bin
1312
version.txt
1413
managed_components/
1514
dependencies.lock
15+
.idf_tools_installed
1616

1717
#ignore Eclipse project files
1818
.cproject

‎components/base_nodemcu/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ idf_component_register(
22
SRCS "ip_fmt.c" "user_main.c"
33
INCLUDE_DIRS "include"
44
REQUIRES "lua"
5-
PRIV_REQUIRES "nvs_flash" "spiffs" "esp_netif" "driver" "vfs"
5+
PRIV_REQUIRES "nvs_flash" "spiffs" "esp_netif" "driver" "vfs" "esp_vfs_console"
66
LDFRAGMENTS "nodemcu.lf"
77
)

‎components/base_nodemcu/user_main.c

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
#include "esp_event.h"
1717
#include "esp_spiffs.h"
1818
#include "esp_netif.h"
19+
#include "esp_vfs_dev.h"
20+
#include "esp_vfs_cdcacm.h"
21+
#include "esp_vfs_usb_serial_jtag.h"
22+
#include "driver/uart_vfs.h"
23+
#include "driver/usb_serial_jtag.h"
1924
#include "nvs_flash.h"
2025

2126
#include "task/task.h"

‎components/modules/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ idf_component_register(
104104
"esp_http_client"
105105
"esp_http_server"
106106
"esp_hw_support"
107+
"esp_vfs_console"
107108
"fatfs"
108109
"libsodium"
109110
"lua"

‎components/modules/console.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
#include "serial_common.h"
66
#include "task/task.h"
77

8-
#include "esp_vfs_dev.h"
98
#include "esp_vfs_cdcacm.h"
10-
#include "esp_vfs_usb_serial_jtag.h"
9+
#include "driver/uart_vfs.h"
1110
#include "driver/usb_serial_jtag.h"
11+
#include "driver/usb_serial_jtag_vfs.h"
1212
#include "freertos/FreeRTOS.h"
1313
#include "freertos/task.h"
1414

@@ -111,9 +111,9 @@ static void console_init(void)
111111
#if CONFIG_ESP_CONSOLE_UART_DEFAULT || CONFIG_ESP_CONSOLE_UART_CUSTOM
112112
/* Based on console/advanced example */
113113

114-
esp_vfs_dev_uart_port_set_rx_line_endings(
114+
uart_vfs_dev_port_set_rx_line_endings(
115115
CONFIG_ESP_CONSOLE_UART_NUM, RX_LINE_ENDINGS_CFG);
116-
esp_vfs_dev_uart_port_set_tx_line_endings(
116+
uart_vfs_dev_port_set_tx_line_endings(
117117
CONFIG_ESP_CONSOLE_UART_NUM, TX_LINE_ENDINGS_CFG);
118118

119119
/* Configure UART. Note that REF_TICK is used so that the baud rate remains
@@ -135,20 +135,20 @@ static void console_init(void)
135135
uart_param_config(CONFIG_ESP_CONSOLE_UART_NUM, &uart_config);
136136

137137
/* Tell VFS to use UART driver */
138-
esp_vfs_dev_uart_use_driver(CONFIG_ESP_CONSOLE_UART_NUM);
138+
uart_vfs_dev_use_driver(CONFIG_ESP_CONSOLE_UART_NUM);
139139

140140
#elif CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG
141141
/* Based on @pjsg's work */
142142

143-
esp_vfs_dev_usb_serial_jtag_set_rx_line_endings(RX_LINE_ENDINGS_CFG);
144-
esp_vfs_dev_usb_serial_jtag_set_tx_line_endings(TX_LINE_ENDINGS_CFG);
143+
usb_serial_jtag_vfs_set_rx_line_endings(RX_LINE_ENDINGS_CFG);
144+
usb_serial_jtag_vfs_set_tx_line_endings(TX_LINE_ENDINGS_CFG);
145145

146146
usb_serial_jtag_driver_config_t usb_serial_jtag_config =
147147
USB_SERIAL_JTAG_DRIVER_CONFIG_DEFAULT();
148148
/* Install USB-SERIAL-JTAG driver for interrupt-driven reads and write */
149149
usb_serial_jtag_driver_install(&usb_serial_jtag_config);
150150

151-
esp_vfs_usb_serial_jtag_use_driver();
151+
usb_serial_jtag_vfs_use_driver();
152152
#elif CONFIG_ESP_CONSOLE_USB_CDC
153153
/* Based on console/advanced_usb_cdc */
154154

‎components/modules/eth.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ static int leth_init( lua_State *L )
274274

275275
eth_esp32_emac_config_t emac_cfg = ETH_ESP32_EMAC_DEFAULT_CONFIG();
276276

277-
emac_cfg.smi_mdc_gpio_num =
277+
emac_cfg.smi_gpio.mdc_num =
278278
opt_checkint_range( L, "mdc", -1, GPIO_NUM_0, GPIO_NUM_MAX-1 );
279-
emac_cfg.smi_mdio_gpio_num =
279+
emac_cfg.smi_gpio.mdio_num =
280280
opt_checkint_range( L, "mdio", -1, GPIO_NUM_0, GPIO_NUM_MAX-1 );
281281

282282
eth_mac_config_t mac_cfg = ETH_MAC_DEFAULT_CONFIG();

‎components/modules/node.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static int node_bootreason( lua_State *L)
113113
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32C6)
114114
case SDIO_RESET:
115115
#endif
116-
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32H2)
116+
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3)
117117
case GLITCH_RTC_RESET:
118118
#endif
119119
#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)
122122
#if defined(CONFIG_IDF_TARGET_ESP32C6)
123123
case JTAG_RESET:
124124
#endif
125+
#if defined(CONFIG_IDF_TARGET_ESP32H2)
126+
case JTAG_CPU_RESET:
127+
#endif
125128
#if defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32H2)
126129
case USB_UART_CHIP_RESET:
127130
case USB_JTAG_CHIP_RESET:
@@ -131,7 +134,7 @@ static int node_bootreason( lua_State *L)
131134
#endif
132135
case TG0WDT_SYS_RESET:
133136
case TG1WDT_SYS_RESET:
134-
#if !defined(CONFIG_IDF_TARGET_ESP32C6)
137+
#if !defined(CONFIG_IDF_TARGET_ESP32C6) && !defined(CONFIG_IDF_TARGET_ESP32H2)
135138
case INTRUSION_RESET:
136139
#endif
137140
case RTCWDT_BROWN_OUT_RESET:

‎components/platform/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ menu "NodeMCU platform config"
7979
bool
8080
default y if IDF_TARGET_ESP32
8181
default y if IDF_TARGET_ESP32S3
82+
default y if IDF_TARGET_ESP32C6
8283

8384
config NODEMCU_UART_DRIVER_BUF_SIZE_RX0
8485
int "RX buffer size for UART0"

‎components/platform/platform.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ uint32_t platform_uart_setup( unsigned id, uint32_t baud, int databits, int pari
211211
uart_config_t cfg = {
212212
.baud_rate = baud,
213213
.flow_ctrl = flow_control,
214-
.rx_flow_ctrl_thresh = UART_FIFO_LEN - 16,
214+
.rx_flow_ctrl_thresh = UART_HW_FIFO_LEN(id) - 16,
215215
.source_clk = UART_SCLK_DEFAULT,
216216
};
217217

‎sdk/esp32-esp-idf

Submodule esp32-esp-idf updated 10434 files

‎sdkconfig.ci.esp32c3

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CONFIG_USJ_ENABLE_USB_SERIAL_JTAG=y
2+
# CONFIG_ESP_CONSOLE_UART_DEFAULT is not set
3+
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y
4+
# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set
5+
# CONFIG_ESP_CONSOLE_NONE is not set
6+
CONFIG_ESP_CONSOLE_SECONDARY_NONE=y
7+
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG_ENABLED=y

‎sdkconfig.ci.esp32s2

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# CONFIG_ESP_CONSOLE_UART_DEFAULT is not set
2+
CONFIG_ESP_CONSOLE_USB_CDC=y
3+
# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set
4+
# CONFIG_ESP_CONSOLE_NONE is not set
5+
CONFIG_ESP_CONSOLE_USB_CDC_RX_BUF_SIZE=512
6+

0 commit comments

Comments
 (0)
Failed to load comments.