Merge remote-tracking branch 'dius/dev-esp32-idf5.3.1' into esp32c5

This commit is contained in:
Philip Gladstone 2024-12-13 02:21:18 +00:00
commit 88b25a8e16
8 changed files with 35 additions and 8 deletions

View File

@ -31,7 +31,10 @@ jobs:
shell: bash
- name: Prepare default sdkconfig
run: |
# Compose sdkconfig manually rather than overwrite checked in files
cp sdkconfig.defaults sdkconfig
[ -e "sdkconfig.defaults.${{ matrix.target }}" ] && cat "sdkconfig.defaults.${{ matrix.target }}" >> sdkconfig || true
[ -e "sdkconfig.ci.${{ matrix.target }}" ] && cat "sdkconfig.ci.${{ matrix.target }}" >> sdkconfig || true
shell: bash
- name: Update config for Lua 5.1
if: ${{ matrix.lua_ver == '5.1' }}
@ -54,6 +57,10 @@ jobs:
echo CONFIG_LUA_NUMBER_INT64=y >> sdkconfig
echo CONFIG_LUA_NUMBER_DOUBLE=y >> sdkconfig
shell: bash
- name: Show resulting sdkconfig
shell: bash
run: |
cat sdkconfig
- name: Build firmware
run: |
make IDF_TARGET=${{ matrix.target }}

2
.gitignore vendored
View File

@ -1,6 +1,5 @@
sdk/
cache/
user_config.h
server-ca.crt
sdkconfig
sdkconfig.old*
@ -13,6 +12,7 @@ bin
version.txt
managed_components/
dependencies.lock
.idf_tools_installed
#ignore Eclipse project files
.cproject

View File

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

View File

@ -15,6 +15,11 @@
#include "esp_system.h"
#include "esp_event.h"
#include "esp_netif.h"
#include "esp_vfs_dev.h"
#include "esp_vfs_cdcacm.h"
#include "esp_vfs_usb_serial_jtag.h"
#include "driver/uart_vfs.h"
#include "driver/usb_serial_jtag.h"
#include "nvs_flash.h"
#include "task/task.h"

View File

@ -114,6 +114,7 @@ idf_component_register(
"esp_http_client"
"esp_http_server"
"esp_hw_support"
"esp_vfs_console"
"fatfs"
"libsodium"
"lua"

View File

@ -9,6 +9,7 @@
//#include "esp_vfs_cdcacm.h"
#include "esp_vfs_usb_serial_jtag.h"
#include "driver/usb_serial_jtag.h"
#include "driver/usb_serial_jtag_vfs.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
@ -111,9 +112,9 @@ static void console_init(void)
#if CONFIG_ESP_CONSOLE_UART_DEFAULT || CONFIG_ESP_CONSOLE_UART_CUSTOM
/* 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);
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);
/* Configure UART. Note that REF_TICK is used so that the baud rate remains
@ -135,20 +136,20 @@ static void console_init(void)
uart_param_config(CONFIG_ESP_CONSOLE_UART_NUM, &uart_config);
/* 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
/* Based on @pjsg's work */
esp_vfs_dev_usb_serial_jtag_set_rx_line_endings(RX_LINE_ENDINGS_CFG);
esp_vfs_dev_usb_serial_jtag_set_tx_line_endings(TX_LINE_ENDINGS_CFG);
usb_serial_jtag_vfs_set_rx_line_endings(RX_LINE_ENDINGS_CFG);
usb_serial_jtag_vfs_set_tx_line_endings(TX_LINE_ENDINGS_CFG);
usb_serial_jtag_driver_config_t usb_serial_jtag_config =
USB_SERIAL_JTAG_DRIVER_CONFIG_DEFAULT();
/* Install USB-SERIAL-JTAG driver for interrupt-driven reads and write */
usb_serial_jtag_driver_install(&usb_serial_jtag_config);
esp_vfs_usb_serial_jtag_use_driver();
usb_serial_jtag_vfs_use_driver();
#elif CONFIG_ESP_CONSOLE_USB_CDC
/* Based on console/advanced_usb_cdc */

7
sdkconfig.ci.esp32c3 Normal file
View File

@ -0,0 +1,7 @@
CONFIG_USJ_ENABLE_USB_SERIAL_JTAG=y
# CONFIG_ESP_CONSOLE_UART_DEFAULT is not set
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y
# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set
# CONFIG_ESP_CONSOLE_NONE is not set
CONFIG_ESP_CONSOLE_SECONDARY_NONE=y
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG_ENABLED=y

6
sdkconfig.ci.esp32s2 Normal file
View File

@ -0,0 +1,6 @@
# CONFIG_ESP_CONSOLE_UART_DEFAULT is not set
CONFIG_ESP_CONSOLE_USB_CDC=y
# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set
# CONFIG_ESP_CONSOLE_NONE is not set
CONFIG_ESP_CONSOLE_USB_CDC_RX_BUF_SIZE=512