update.
This commit is contained in:
parent
8413ce1fa9
commit
42420bbd6b
2
.vscode/c_cpp_properties.json
vendored
2
.vscode/c_cpp_properties.json
vendored
@ -2,7 +2,7 @@
|
|||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "ESP-IDF",
|
"name": "ESP-IDF",
|
||||||
"compilerPath": "${config:idf.toolsPathWin}\\tools\\xtensa-esp-elf\\esp-13.2.0_20230928\\xtensa-esp-elf\\bin\\xtensa-esp32-elf-gcc.exe",
|
"compilerPath": "${config:idf.toolsPathWin}\\tools\\xtensa-esp-elf\\esp-14.2.0_20241119\\xtensa-esp-elf\\bin\\xtensa-esp32-elf-gcc.exe",
|
||||||
"compileCommands": "${workspaceFolder}/build/compile_commands.json",
|
"compileCommands": "${workspaceFolder}/build/compile_commands.json",
|
||||||
"includePath": [
|
"includePath": [
|
||||||
"${config:idf.espIdfPath}/components/**",
|
"${config:idf.espIdfPath}/components/**",
|
||||||
|
11
.vscode/settings.json
vendored
11
.vscode/settings.json
vendored
@ -5,14 +5,17 @@
|
|||||||
"idf.customExtraVars": {
|
"idf.customExtraVars": {
|
||||||
"OPENOCD_SCRIPTS": "E:\\Projects\\esp\\.espressif\\tools\\openocd-esp32\\v0.12.0-esp32-20230921/openocd-esp32/share/openocd/scripts",
|
"OPENOCD_SCRIPTS": "E:\\Projects\\esp\\.espressif\\tools\\openocd-esp32\\v0.12.0-esp32-20230921/openocd-esp32/share/openocd/scripts",
|
||||||
"IDF_CCACHE_ENABLE": "1",
|
"IDF_CCACHE_ENABLE": "1",
|
||||||
"ESP_ROM_ELF_DIR": "E:\\Projects\\esp\\.espressif\\tools\\esp-rom-elfs\\20230320/"
|
"ESP_ROM_ELF_DIR": "E:\\Projects\\esp\\.espressif\\tools\\esp-rom-elfs\\20230320/",
|
||||||
|
"IDF_TARGET": "esp32"
|
||||||
},
|
},
|
||||||
"idf.espIdfPathWin": "E:\\Projects\\esp\\v5.2.1\\esp-idf",
|
"idf.espIdfPathWin": "e:\\Projects\\esp\\v5.4.1\\esp-idf",
|
||||||
"idf.openOcdConfigs": [
|
"idf.openOcdConfigs": [
|
||||||
"interface/ftdi/esp32_devkitj_v1.cfg",
|
"interface/ftdi/esp32_devkitj_v1.cfg",
|
||||||
"target/esp32.cfg"
|
"target/esp32.cfg"
|
||||||
],
|
],
|
||||||
"idf.portWin": "COM1",
|
"idf.portWin": "COM5",
|
||||||
"idf.pythonBinPathWin": "E:\\Projects\\esp\\.espressif\\python_env\\idf5.2_py3.11_env\\Scripts\\python.exe",
|
"idf.pythonBinPathWin": "E:\\Projects\\esp\\.espressif\\python_env\\idf5.2_py3.11_env\\Scripts\\python.exe",
|
||||||
"idf.toolsPathWin": "E:\\Projects\\esp\\.espressif"
|
"idf.toolsPathWin": "e:\\Projects\\.espressif",
|
||||||
|
"idf.pythonInstallPath": "e:\\Projects\\.espressif\\tools\\idf-python\\3.11.2\\python.exe",
|
||||||
|
"idf.flashType": "UART"
|
||||||
}
|
}
|
||||||
|
@ -8,12 +8,13 @@
|
|||||||
#include "esp_console.h"
|
#include "esp_console.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
#include "esp_vfs_dev.h"
|
|
||||||
#include "esp_vfs_fat.h"
|
#include "esp_vfs_fat.h"
|
||||||
#include "linenoise/linenoise.h"
|
#include "linenoise/linenoise.h"
|
||||||
#include "nvs.h"
|
#include "nvs.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
|
#include <driver/uart_vfs.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#define PROMPT_STR CONFIG_IDF_TARGET
|
#define PROMPT_STR CONFIG_IDF_TARGET
|
||||||
|
|
||||||
@ -103,8 +104,8 @@ static void initialize_console() {
|
|||||||
|
|
||||||
setvbuf(stdin, NULL, _IONBF, 0);
|
setvbuf(stdin, NULL, _IONBF, 0);
|
||||||
|
|
||||||
esp_vfs_dev_uart_port_set_rx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CR);
|
uart_vfs_dev_port_set_rx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CR);
|
||||||
esp_vfs_dev_uart_port_set_tx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CRLF);
|
uart_vfs_dev_port_set_tx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CRLF);
|
||||||
|
|
||||||
uart_config_t uart_config = {};
|
uart_config_t uart_config = {};
|
||||||
uart_config.baud_rate = CONFIG_ESP_CONSOLE_UART_BAUDRATE;
|
uart_config.baud_rate = CONFIG_ESP_CONSOLE_UART_BAUDRATE;
|
||||||
@ -115,7 +116,7 @@ static void initialize_console() {
|
|||||||
ESP_ERROR_CHECK(uart_driver_install(static_cast<uart_port_t>(CONFIG_ESP_CONSOLE_UART_NUM), 256, 0, 0, NULL, 0));
|
ESP_ERROR_CHECK(uart_driver_install(static_cast<uart_port_t>(CONFIG_ESP_CONSOLE_UART_NUM), 256, 0, 0, NULL, 0));
|
||||||
ESP_ERROR_CHECK(uart_param_config(static_cast<uart_port_t>(CONFIG_ESP_CONSOLE_UART_NUM), &uart_config));
|
ESP_ERROR_CHECK(uart_param_config(static_cast<uart_port_t>(CONFIG_ESP_CONSOLE_UART_NUM), &uart_config));
|
||||||
|
|
||||||
esp_vfs_dev_uart_use_driver(CONFIG_ESP_CONSOLE_UART_NUM);
|
uart_vfs_dev_use_driver(CONFIG_ESP_CONSOLE_UART_NUM);
|
||||||
|
|
||||||
esp_console_config_t console_config = {};
|
esp_console_config_t console_config = {};
|
||||||
console_config.max_cmdline_args = 8;
|
console_config.max_cmdline_args = 8;
|
||||||
|
@ -18,3 +18,4 @@ CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
|
|||||||
|
|
||||||
# On chips with USB serial, disable secondary console which does not make sense when using console component
|
# On chips with USB serial, disable secondary console which does not make sense when using console component
|
||||||
CONFIG_ESP_CONSOLE_SECONDARY_NONE=y
|
CONFIG_ESP_CONSOLE_SECONDARY_NONE=y
|
||||||
|
CONFIG_LOG_COLORS=y
|
||||||
|
Loading…
x
Reference in New Issue
Block a user