mirror of
https://codeberg.org/opentrafficmap/its-g5-receiver-firmware.git
synced 2026-06-14 18:20:31 +00:00
Pull most of sdcard stuff out into sdcard.c; Common SPI init; Enable PSRAM; Start separating SD card stuff from SNIFFER_PCAP_DESTINATION_SD
This commit is contained in:
+1
-1
@@ -5,4 +5,4 @@ cmake_minimum_required(VERSION 3.22)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||
#idf_build_set_property(MINIMAL_BUILD ON)
|
||||
project(simple_sniffer)
|
||||
project(its-g5-receiver-firmware)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
idf_component_register(SRCS "simple_sniffer_example_main.c"
|
||||
"cmd_sniffer.c"
|
||||
"cmd_pcap.c"
|
||||
"sdcard.c"
|
||||
PRIV_REQUIRES console esp_wifi fatfs esp_eth app_trace nvs_flash
|
||||
INCLUDE_DIRS ".")
|
||||
|
||||
|
||||
+11
-3
@@ -2,6 +2,12 @@ menu "Example Configuration"
|
||||
|
||||
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
|
||||
|
||||
config ENABLE_SD
|
||||
bool "Enable SD card"
|
||||
default y
|
||||
help
|
||||
General toggle for enabling/disabling SD card related functionality.
|
||||
|
||||
config SNIFFER_STORE_HISTORY
|
||||
bool "Store command history into flash"
|
||||
default y
|
||||
@@ -17,6 +23,7 @@ menu "Example Configuration"
|
||||
Currently support storing files to SD card or to host via JTAG interface with 'Trace memory' enabled.
|
||||
config SNIFFER_PCAP_DESTINATION_SD
|
||||
bool "SD Card"
|
||||
depends on ENABLE_SD
|
||||
help
|
||||
Store pcap file to SD card.
|
||||
config SNIFFER_PCAP_DESTINATION_JTAG
|
||||
@@ -30,7 +37,7 @@ menu "Example Configuration"
|
||||
Store pcap file to memory.
|
||||
endchoice
|
||||
|
||||
if SNIFFER_PCAP_DESTINATION_SD
|
||||
if ENABLE_SD
|
||||
choice SNIFFER_SD_MODE
|
||||
prompt "Select SD card work mode"
|
||||
default SNIFFER_SD_SDMMC_MODE
|
||||
@@ -38,7 +45,7 @@ menu "Example Configuration"
|
||||
Select which peripheral SD card should use.
|
||||
config SNIFFER_SD_SDMMC_MODE
|
||||
bool "SDMMC"
|
||||
depends on IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3
|
||||
depends on SOC_SDMMC_HOST_SUPPORTED
|
||||
help
|
||||
Use SDMMC mode (Not support on esp32c3).
|
||||
config SNIFFER_SD_SPI_MODE
|
||||
@@ -82,7 +89,8 @@ menu "Example Configuration"
|
||||
default "/sdcard"
|
||||
help
|
||||
Specify the mount point in the VFS (Virtual File System) for SD card.
|
||||
|
||||
endif
|
||||
if SNIFFER_PCAP_DESTINATION_SD
|
||||
config SNIFFER_PCAP_FILE_NAME_MAX_LEN
|
||||
int "Max name length of pcap file"
|
||||
default 32
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
dependencies:
|
||||
pcap: "^1.0.0"
|
||||
espressif/ethernet_init:
|
||||
version: "~1.2.0"
|
||||
version: "~1.3.0"
|
||||
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#if CONFIG_ENABLE_SD
|
||||
#include <string.h>
|
||||
|
||||
#include "esp_console.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_vfs_fat.h"
|
||||
#include "sdmmc_cmd.h"
|
||||
#include "argtable3/argtable3.h"
|
||||
#include "driver/sdmmc_host.h"
|
||||
#include "driver/sdspi_host.h"
|
||||
#include "driver/spi_common.h"
|
||||
|
||||
#include "sdcard.h"
|
||||
|
||||
#if CONFIG_SNIFFER_SD_SPI_MODE
|
||||
#define PIN_NUM_MISO CONFIG_SNIFFER_PIN_MISO
|
||||
#define PIN_NUM_MOSI CONFIG_SNIFFER_PIN_MOSI
|
||||
#define PIN_NUM_CLK CONFIG_SNIFFER_PIN_CLK
|
||||
#define PIN_NUM_CS CONFIG_SNIFFER_PIN_CS
|
||||
#endif // CONFIG_SNIFFER_SD_SPI_MODE
|
||||
|
||||
static const char TAG[] = "SDCARD";
|
||||
|
||||
static struct {
|
||||
struct arg_str *device;
|
||||
struct arg_end *end;
|
||||
} mount_args;
|
||||
|
||||
static sdmmc_card_t *card = NULL;
|
||||
|
||||
/** 'mount' command */
|
||||
static int mount(int argc, char **argv)
|
||||
{
|
||||
esp_err_t ret;
|
||||
|
||||
int nerrors = arg_parse(argc, argv, (void **)&mount_args);
|
||||
if (nerrors != 0) {
|
||||
arg_print_errors(stderr, mount_args.end, argv[0]);
|
||||
return 1;
|
||||
}
|
||||
/* mount sd card */
|
||||
if (!strncmp(mount_args.device->sval[0], "sd", 2)) {
|
||||
ESP_LOGI(TAG, "Initializing SD card");
|
||||
esp_vfs_fat_sdmmc_mount_config_t mount_config = {
|
||||
.format_if_mount_failed = true,
|
||||
.max_files = 4,
|
||||
.allocation_unit_size = 16 * 1024
|
||||
};
|
||||
|
||||
// initialize SD card and mount FAT filesystem.
|
||||
#if CONFIG_SNIFFER_SD_SPI_MODE
|
||||
// This assumes that the SPI host has been initialized elsewhere.
|
||||
ESP_LOGI(TAG, "Using SPI peripheral");
|
||||
sdmmc_host_t host = SDSPI_HOST_DEFAULT();
|
||||
|
||||
// This initializes the slot without card detect (CD) and write protect (WP) signals.
|
||||
// Modify slot_config.gpio_cd and slot_config.gpio_wp if your board has these signals.
|
||||
sdspi_device_config_t slot_config = SDSPI_DEVICE_CONFIG_DEFAULT();
|
||||
slot_config.gpio_cs = PIN_NUM_CS;
|
||||
slot_config.host_id = host.slot;
|
||||
|
||||
ret = esp_vfs_fat_sdspi_mount(CONFIG_SNIFFER_MOUNT_POINT, &host, &slot_config, &mount_config, &card);
|
||||
#else
|
||||
ESP_LOGI(TAG, "Using SDMMC peripheral");
|
||||
sdmmc_host_t host = SDMMC_HOST_DEFAULT();
|
||||
sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
|
||||
|
||||
gpio_set_pull_mode(15, GPIO_PULLUP_ONLY); // CMD, needed in 4- and 1-line modes
|
||||
gpio_set_pull_mode(2, GPIO_PULLUP_ONLY); // D0, needed in 4- and 1-line modes
|
||||
gpio_set_pull_mode(4, GPIO_PULLUP_ONLY); // D1, needed in 4-line mode only
|
||||
gpio_set_pull_mode(12, GPIO_PULLUP_ONLY); // D2, needed in 4-line mode only
|
||||
gpio_set_pull_mode(13, GPIO_PULLUP_ONLY); // D3, needed in 4- and 1-line modes
|
||||
|
||||
ret = esp_vfs_fat_sdmmc_mount(CONFIG_SNIFFER_MOUNT_POINT, &host, &slot_config, &mount_config, &card);
|
||||
#endif
|
||||
|
||||
if (ret != ESP_OK) {
|
||||
if (ret == ESP_FAIL) {
|
||||
ESP_LOGE(TAG, "Failed to mount filesystem. "
|
||||
"If you want the card to be formatted, set format_if_mount_failed = true.");
|
||||
} else {
|
||||
ESP_LOGE(TAG, "Failed to initialize the card (%s). "
|
||||
"Make sure SD card lines have pull-up resistors in place.",
|
||||
esp_err_to_name(ret));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/* print card info if mount successfully */
|
||||
sdmmc_card_print_info(stdout, card);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void register_mount(void)
|
||||
{
|
||||
mount_args.device = arg_str1(NULL, NULL, "<sd>", "choose a proper device to mount/unmount");
|
||||
mount_args.end = arg_end(1);
|
||||
const esp_console_cmd_t cmd = {
|
||||
.command = "mount",
|
||||
.help = "mount the filesystem",
|
||||
.hint = NULL,
|
||||
.func = &mount,
|
||||
.argtable = &mount_args
|
||||
};
|
||||
ESP_ERROR_CHECK(esp_console_cmd_register(&cmd));
|
||||
}
|
||||
|
||||
static int unmount(int argc, char **argv)
|
||||
{
|
||||
int nerrors = arg_parse(argc, argv, (void **)&mount_args);
|
||||
if (nerrors != 0) {
|
||||
arg_print_errors(stderr, mount_args.end, argv[0]);
|
||||
return 1;
|
||||
}
|
||||
/* unmount sd card */
|
||||
if (!strncmp(mount_args.device->sval[0], "sd", 2)) {
|
||||
if (esp_vfs_fat_sdcard_unmount(CONFIG_SNIFFER_MOUNT_POINT, card) != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Card unmount failed");
|
||||
return -1;
|
||||
}
|
||||
card = NULL;
|
||||
ESP_LOGI(TAG, "Card unmounted");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void register_unmount(void)
|
||||
{
|
||||
mount_args.device = arg_str1(NULL, NULL, "<sd>", "choose a proper device to mount/unmount");
|
||||
mount_args.end = arg_end(1);
|
||||
const esp_console_cmd_t cmd = {
|
||||
.command = "unmount",
|
||||
.help = "unmount the filesystem",
|
||||
.hint = NULL,
|
||||
.func = &unmount,
|
||||
.argtable = &mount_args
|
||||
};
|
||||
ESP_ERROR_CHECK(esp_console_cmd_register(&cmd));
|
||||
}
|
||||
#endif // CONFIG_ENABLE_SD
|
||||
@@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
void register_mount(void);
|
||||
void register_unmount(void);
|
||||
@@ -11,7 +11,6 @@
|
||||
#include <stdlib.h>
|
||||
#include "sdkconfig.h"
|
||||
#include "linenoise/linenoise.h"
|
||||
#include "argtable3/argtable3.h"
|
||||
#include "esp_console.h"
|
||||
#include "esp_event.h"
|
||||
#include "esp_vfs_fat.h"
|
||||
@@ -19,28 +18,16 @@
|
||||
#include "ethernet_init.h"
|
||||
#include "esp_err.h"
|
||||
#include "esp_log.h"
|
||||
#if CONFIG_SNIFFER_PCAP_DESTINATION_SD
|
||||
#include "driver/sdmmc_host.h"
|
||||
#include "driver/sdspi_host.h"
|
||||
#include "driver/spi_common.h"
|
||||
#endif
|
||||
#include "nvs_flash.h"
|
||||
#include "sdmmc_cmd.h"
|
||||
#include "cmd_sniffer.h"
|
||||
#include "cmd_pcap.h"
|
||||
#include "sdcard.h"
|
||||
|
||||
#if CONFIG_SNIFFER_STORE_HISTORY
|
||||
#define HISTORY_MOUNT_POINT "/data"
|
||||
#define HISTORY_FILE_PATH HISTORY_MOUNT_POINT "/history.txt"
|
||||
#endif
|
||||
|
||||
#if CONFIG_SNIFFER_SD_SPI_MODE
|
||||
#define PIN_NUM_MISO CONFIG_SNIFFER_PIN_MISO
|
||||
#define PIN_NUM_MOSI CONFIG_SNIFFER_PIN_MOSI
|
||||
#define PIN_NUM_CLK CONFIG_SNIFFER_PIN_CLK
|
||||
#define PIN_NUM_CS CONFIG_SNIFFER_PIN_CS
|
||||
#endif // CONFIG_SNIFFER_SD_SPI_MODE
|
||||
|
||||
static const char *TAG = "example";
|
||||
|
||||
#if CONFIG_SNIFFER_STORE_HISTORY
|
||||
@@ -132,142 +119,42 @@ static void initialize_eth(void)
|
||||
}
|
||||
}
|
||||
|
||||
#if CONFIG_SNIFFER_PCAP_DESTINATION_SD
|
||||
static struct {
|
||||
struct arg_str *device;
|
||||
struct arg_end *end;
|
||||
} mount_args;
|
||||
|
||||
static sdmmc_card_t *card = NULL;
|
||||
|
||||
/** 'mount' command */
|
||||
static int mount(int argc, char **argv)
|
||||
{
|
||||
esp_err_t ret;
|
||||
|
||||
int nerrors = arg_parse(argc, argv, (void **)&mount_args);
|
||||
if (nerrors != 0) {
|
||||
arg_print_errors(stderr, mount_args.end, argv[0]);
|
||||
return 1;
|
||||
}
|
||||
/* mount sd card */
|
||||
if (!strncmp(mount_args.device->sval[0], "sd", 2)) {
|
||||
ESP_LOGI(TAG, "Initializing SD card");
|
||||
esp_vfs_fat_sdmmc_mount_config_t mount_config = {
|
||||
.format_if_mount_failed = true,
|
||||
.max_files = 4,
|
||||
.allocation_unit_size = 16 * 1024
|
||||
};
|
||||
|
||||
// initialize SD card and mount FAT filesystem.
|
||||
#if CONFIG_SNIFFER_SD_SPI_MODE
|
||||
ESP_LOGI(TAG, "Using SPI peripheral");
|
||||
sdmmc_host_t host = SDSPI_HOST_DEFAULT();
|
||||
spi_bus_config_t bus_cfg = {
|
||||
.mosi_io_num = PIN_NUM_MOSI,
|
||||
.miso_io_num = PIN_NUM_MISO,
|
||||
.sclk_io_num = PIN_NUM_CLK,
|
||||
.quadwp_io_num = -1,
|
||||
.quadhd_io_num = -1,
|
||||
.max_transfer_sz = 4000,
|
||||
};
|
||||
ret = spi_bus_initialize(host.slot, &bus_cfg, SPI_DMA_CH_AUTO);
|
||||
if (ret != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Failed to initialize bus.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// This initializes the slot without card detect (CD) and write protect (WP) signals.
|
||||
// Modify slot_config.gpio_cd and slot_config.gpio_wp if your board has these signals.
|
||||
sdspi_device_config_t slot_config = SDSPI_DEVICE_CONFIG_DEFAULT();
|
||||
slot_config.gpio_cs = PIN_NUM_CS;
|
||||
slot_config.host_id = host.slot;
|
||||
|
||||
ret = esp_vfs_fat_sdspi_mount(CONFIG_SNIFFER_MOUNT_POINT, &host, &slot_config, &mount_config, &card);
|
||||
|
||||
#else
|
||||
ESP_LOGI(TAG, "Using SDMMC peripheral");
|
||||
sdmmc_host_t host = SDMMC_HOST_DEFAULT();
|
||||
sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
|
||||
|
||||
gpio_set_pull_mode(15, GPIO_PULLUP_ONLY); // CMD, needed in 4- and 1-line modes
|
||||
gpio_set_pull_mode(2, GPIO_PULLUP_ONLY); // D0, needed in 4- and 1-line modes
|
||||
gpio_set_pull_mode(4, GPIO_PULLUP_ONLY); // D1, needed in 4-line mode only
|
||||
gpio_set_pull_mode(12, GPIO_PULLUP_ONLY); // D2, needed in 4-line mode only
|
||||
gpio_set_pull_mode(13, GPIO_PULLUP_ONLY); // D3, needed in 4- and 1-line modes
|
||||
|
||||
ret = esp_vfs_fat_sdmmc_mount(CONFIG_SNIFFER_MOUNT_POINT, &host, &slot_config, &mount_config, &card);
|
||||
#ifdef CONFIG_ETHERNET_SPI_SUPPORT
|
||||
#define PIN_NUM_MOSI CONFIG_ETHERNET_SPI_MOSI_GPIO
|
||||
#define PIN_NUM_MISO CONFIG_ETHERNET_SPI_MISO_GPIO
|
||||
#define PIN_NUM_CLK CONFIG_ETHERNET_SPI_SCLK_GPIO
|
||||
#elifdef CONFIG_SNIFFER_SD_SPI_MODE
|
||||
#define PIN_NUM_MISO CONFIG_SNIFFER_PIN_MISO
|
||||
#define PIN_NUM_MOSI CONFIG_SNIFFER_PIN_MOSI
|
||||
#define PIN_NUM_CLK CONFIG_SNIFFER_PIN_CLK
|
||||
#endif
|
||||
|
||||
if (ret != ESP_OK) {
|
||||
if (ret == ESP_FAIL) {
|
||||
ESP_LOGE(TAG, "Failed to mount filesystem. "
|
||||
"If you want the card to be formatted, set format_if_mount_failed = true.");
|
||||
} else {
|
||||
ESP_LOGE(TAG, "Failed to initialize the card (%s). "
|
||||
"Make sure SD card lines have pull-up resistors in place.",
|
||||
esp_err_to_name(ret));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/* print card info if mount successfully */
|
||||
sdmmc_card_print_info(stdout, card);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void register_mount(void)
|
||||
// Initialize SPI bus common to SD card and Ethernet
|
||||
void initialize_spi(void)
|
||||
{
|
||||
mount_args.device = arg_str1(NULL, NULL, "<sd>", "choose a proper device to mount/unmount");
|
||||
mount_args.end = arg_end(1);
|
||||
const esp_console_cmd_t cmd = {
|
||||
.command = "mount",
|
||||
.help = "mount the filesystem",
|
||||
.hint = NULL,
|
||||
.func = &mount,
|
||||
.argtable = &mount_args
|
||||
#if CONFIG_SNIFFER_SD_SPI_MODE || CONFIG_ETHERNET_SPI_SUPPORT
|
||||
spi_bus_config_t bus_cfg = {
|
||||
.mosi_io_num = PIN_NUM_MOSI,
|
||||
.miso_io_num = PIN_NUM_MISO,
|
||||
.sclk_io_num = PIN_NUM_CLK,
|
||||
.quadwp_io_num = -1,
|
||||
.quadhd_io_num = -1,
|
||||
.max_transfer_sz = 4000,
|
||||
};
|
||||
ESP_ERROR_CHECK(esp_console_cmd_register(&cmd));
|
||||
}
|
||||
|
||||
static int unmount(int argc, char **argv)
|
||||
{
|
||||
int nerrors = arg_parse(argc, argv, (void **)&mount_args);
|
||||
if (nerrors != 0) {
|
||||
arg_print_errors(stderr, mount_args.end, argv[0]);
|
||||
return 1;
|
||||
}
|
||||
/* unmount sd card */
|
||||
if (!strncmp(mount_args.device->sval[0], "sd", 2)) {
|
||||
if (esp_vfs_fat_sdcard_unmount(CONFIG_SNIFFER_MOUNT_POINT, card) != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Card unmount failed");
|
||||
return -1;
|
||||
}
|
||||
card = NULL;
|
||||
ESP_LOGI(TAG, "Card unmounted");
|
||||
}
|
||||
return 0;
|
||||
// TODO: maybe make SPI host configurable
|
||||
int ret = spi_bus_initialize(SDSPI_DEFAULT_HOST, &bus_cfg, SPI_DMA_CH_AUTO);
|
||||
if (ret != ESP_OK)
|
||||
ESP_LOGE(TAG, "Failed to initialize bus.");
|
||||
#endif
|
||||
}
|
||||
|
||||
static void register_unmount(void)
|
||||
{
|
||||
mount_args.device = arg_str1(NULL, NULL, "<sd>", "choose a proper device to mount/unmount");
|
||||
mount_args.end = arg_end(1);
|
||||
const esp_console_cmd_t cmd = {
|
||||
.command = "unmount",
|
||||
.help = "unmount the filesystem",
|
||||
.hint = NULL,
|
||||
.func = &unmount,
|
||||
.argtable = &mount_args
|
||||
};
|
||||
ESP_ERROR_CHECK(esp_console_cmd_register(&cmd));
|
||||
}
|
||||
#endif // CONFIG_SNIFFER_PCAP_DESTINATION_SD
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
initialize_nvs();
|
||||
|
||||
initialize_spi();
|
||||
|
||||
/*--- Initialize Network ---*/
|
||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||
/* Initialize WiFi */
|
||||
@@ -297,33 +184,12 @@ void app_main(void)
|
||||
#endif
|
||||
|
||||
/* Register commands */
|
||||
#if CONFIG_SNIFFER_PCAP_DESTINATION_SD
|
||||
#if CONFIG_ENABLE_SD
|
||||
register_mount();
|
||||
register_unmount();
|
||||
#endif
|
||||
register_sniffer_cmd();
|
||||
register_pcap_cmd();
|
||||
#if CONFIG_SNIFFER_PCAP_DESTINATION_SD
|
||||
printf("\n =======================================================\n");
|
||||
printf(" | Steps to sniff network packets |\n");
|
||||
printf(" | |\n");
|
||||
printf(" | 1. Enter 'help' to check all commands usage |\n");
|
||||
printf(" | 2. Enter 'mount <device>' to mount filesystem |\n");
|
||||
printf(" | 3. Enter 'pcap' to create pcap file |\n");
|
||||
printf(" | 4. Enter 'sniffer' to start capture packets |\n");
|
||||
printf(" | 5. Enter 'unmount <device>' to unmount filesystem |\n");
|
||||
printf(" | |\n");
|
||||
printf(" =======================================================\n\n");
|
||||
#else
|
||||
printf("\n =======================================================\n");
|
||||
printf(" | Steps to sniff network packets |\n");
|
||||
printf(" | |\n");
|
||||
printf(" | 1. Enter 'help' to check all commands' usage |\n");
|
||||
printf(" | 2. Enter 'pcap' to create pcap file |\n");
|
||||
printf(" | 3. Enter 'sniffer' to start capture packets |\n");
|
||||
printf(" | |\n");
|
||||
printf(" =======================================================\n\n");
|
||||
#endif
|
||||
|
||||
// start console REPL
|
||||
ESP_ERROR_CHECK(esp_console_start_repl(repl));
|
||||
|
||||
@@ -1083,13 +1083,9 @@ CONFIG_SECURE_TEE_LOG_LEVEL=0
|
||||
#
|
||||
# default:
|
||||
# CONFIG_ESPTOOLPY_NO_STUB is not set
|
||||
# default:
|
||||
# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set
|
||||
# default:
|
||||
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
|
||||
# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set
|
||||
# default:
|
||||
CONFIG_ESPTOOLPY_FLASHMODE_DIO=y
|
||||
# default:
|
||||
# CONFIG_ESPTOOLPY_FLASHMODE_DIO is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set
|
||||
# default:
|
||||
CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y
|
||||
@@ -1107,14 +1103,14 @@ CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ="80m"
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set
|
||||
# default:
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE="8MB"
|
||||
# default:
|
||||
# CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE is not set
|
||||
# default:
|
||||
@@ -1167,11 +1163,28 @@ CONFIG_ENV_GPIO_IN_RANGE_MAX=30
|
||||
# default:
|
||||
CONFIG_ENV_GPIO_OUT_RANGE_MAX=30
|
||||
# default:
|
||||
CONFIG_ENABLE_SD=y
|
||||
# default:
|
||||
CONFIG_SNIFFER_STORE_HISTORY=y
|
||||
# CONFIG_SNIFFER_PCAP_DESTINATION_SD is not set
|
||||
CONFIG_SNIFFER_PCAP_DESTINATION_JTAG=y
|
||||
# CONFIG_SNIFFER_PCAP_DESTINATION_MEMORY is not set
|
||||
# default:
|
||||
CONFIG_SNIFFER_SD_SPI_MODE=y
|
||||
|
||||
#
|
||||
# SD card pin configuration (SPI)
|
||||
#
|
||||
CONFIG_SNIFFER_PIN_MOSI=7
|
||||
# default:
|
||||
CONFIG_SNIFFER_PIN_MISO=2
|
||||
CONFIG_SNIFFER_PIN_CLK=6
|
||||
CONFIG_SNIFFER_PIN_CS=10
|
||||
# end of SD card pin configuration (SPI)
|
||||
|
||||
# default:
|
||||
CONFIG_SNIFFER_MOUNT_POINT="/sdcard"
|
||||
# default:
|
||||
CONFIG_SNIFFER_WORK_QUEUE_LEN=128
|
||||
# default:
|
||||
CONFIG_SNIFFER_TASK_STACK_SIZE=4096
|
||||
@@ -1187,7 +1200,7 @@ CONFIG_ETHERNET_SPI_USE_DM9051=0
|
||||
# default:
|
||||
CONFIG_ETHERNET_SPI_USE_KSZ8851SNL=0
|
||||
# default:
|
||||
CONFIG_ETHERNET_SPI_USE_W5500=0
|
||||
CONFIG_ETHERNET_SPI_USE_W5500=1
|
||||
# default:
|
||||
CONFIG_ETHERNET_SPI_USE_CH390=0
|
||||
# default:
|
||||
@@ -1206,9 +1219,70 @@ CONFIG_ETHERNET_PHY_USE_DP83848=0
|
||||
CONFIG_ETHERNET_PHY_USE_KSZ80XX=0
|
||||
# default:
|
||||
CONFIG_ETHERNET_PHY_USE_RTL8201=0
|
||||
# CONFIG_ETHERNET_SPI_SUPPORT is not set
|
||||
CONFIG_ETHERNET_SPI_SUPPORT=y
|
||||
# default:
|
||||
# CONFIG_ETHERNET_OPENETH_SUPPORT is not set
|
||||
# CONFIG_ETHERNET_SPI_DEV0_DM9051 is not set
|
||||
# default:
|
||||
# CONFIG_ETHERNET_SPI_DEV0_KSZ8851SNL is not set
|
||||
# default:
|
||||
CONFIG_ETHERNET_SPI_DEV0_W5500=y
|
||||
# default:
|
||||
# CONFIG_ETHERNET_SPI_DEV0_CH390 is not set
|
||||
# default:
|
||||
# CONFIG_ETHERNET_SPI_DEV0_ENC28J60 is not set
|
||||
# default:
|
||||
# CONFIG_ETHERNET_SPI_DEV0_LAN865X is not set
|
||||
# default:
|
||||
CONFIG_ETHERNET_SPI_DEV1_NONE=y
|
||||
# default:
|
||||
# CONFIG_ETHERNET_SPI_DEV1_DM9051 is not set
|
||||
# default:
|
||||
# CONFIG_ETHERNET_SPI_DEV1_KSZ8851SNL is not set
|
||||
# default:
|
||||
# CONFIG_ETHERNET_SPI_DEV1_W5500 is not set
|
||||
# default:
|
||||
# CONFIG_ETHERNET_SPI_DEV1_CH390 is not set
|
||||
# default:
|
||||
# CONFIG_ETHERNET_SPI_DEV1_ENC28J60 is not set
|
||||
# default:
|
||||
# CONFIG_ETHERNET_SPI_DEV1_LAN865X is not set
|
||||
# default:
|
||||
CONFIG_ETHERNET_SPI_DEV0_ID=2
|
||||
# default:
|
||||
CONFIG_ETHERNET_SPI_HOST=1
|
||||
CONFIG_ETHERNET_SPI_SCLK_GPIO=6
|
||||
CONFIG_ETHERNET_SPI_MOSI_GPIO=7
|
||||
CONFIG_ETHERNET_SPI_MISO_GPIO=2
|
||||
# default:
|
||||
CONFIG_ETHERNET_SPI_CLOCK_MHZ=16
|
||||
CONFIG_ETHERNET_SPI_CS0_GPIO=27
|
||||
CONFIG_ETHERNET_SPI_INT0_GPIO=9
|
||||
# default:
|
||||
CONFIG_ETHERNET_SPI_PHY_RST0_GPIO=-1
|
||||
# default:
|
||||
CONFIG_ETHERNET_SPI_PHY_ADDR0=1
|
||||
# default:
|
||||
CONFIG_ETHERNET_SPI_AUTOCONFIG_MAC_ADDR0=y
|
||||
# default:
|
||||
CONFIG_ETHERNET_SPI_POLLING0_MS=0
|
||||
|
||||
#
|
||||
# Rx Task Configuration
|
||||
#
|
||||
# default:
|
||||
CONFIG_ETHERNET_RX_TASK_STACK_SIZE=2048
|
||||
# default:
|
||||
CONFIG_ETHERNET_RX_TASK_PRIO=-1
|
||||
# end of Rx Task Configuration
|
||||
|
||||
# default:
|
||||
CONFIG_ETHERNET_DEFAULT_EVENT_HANDLER=y
|
||||
# default:
|
||||
CONFIG_ETHERNET_BOARD_SPECIFIC_INIT_NONE=y
|
||||
# default:
|
||||
# CONFIG_ETHERNET_BOARD_SPECIFIC_INIT_DEFAULT is not set
|
||||
# default:
|
||||
# CONFIG_ETHERNET_BOARD_SPECIFIC_INIT_WEAK is not set
|
||||
# end of Ethernet Configuration
|
||||
|
||||
#
|
||||
@@ -1666,6 +1740,8 @@ CONFIG_ESP_EVENT_POST_FROM_ISR=y
|
||||
CONFIG_ESP_EVENT_POST_FROM_ISR_SIZE=4
|
||||
# default:
|
||||
CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y
|
||||
# default:
|
||||
# CONFIG_ESP_EVENT_LOOP_IN_EXT_RAM is not set
|
||||
# end of Event Loop Library
|
||||
|
||||
#
|
||||
@@ -1822,10 +1898,10 @@ CONFIG_ESP32C5_UNIVERSAL_MAC_ADDRESSES=4
|
||||
# Sleep Config
|
||||
#
|
||||
# default:
|
||||
# CONFIG_ESP_SLEEP_POWER_DOWN_FLASH is not set
|
||||
# default:
|
||||
CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND=y
|
||||
# default:
|
||||
CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND=y
|
||||
# default:
|
||||
# CONFIG_ESP_SLEEP_MSPI_NEED_ALL_IO_PU is not set
|
||||
# default:
|
||||
CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND=y
|
||||
@@ -2086,8 +2162,49 @@ CONFIG_PM_WORKAROUND_FREQ_LIMIT_ENABLED=y
|
||||
#
|
||||
# ESP PSRAM
|
||||
#
|
||||
CONFIG_SPIRAM=y
|
||||
|
||||
#
|
||||
# SPI RAM config
|
||||
#
|
||||
# default:
|
||||
# CONFIG_SPIRAM is not set
|
||||
CONFIG_SPIRAM_MODE_QUAD=y
|
||||
# CONFIG_SPIRAM_SPEED_120M is not set
|
||||
CONFIG_SPIRAM_SPEED_80M=y
|
||||
# CONFIG_SPIRAM_SPEED_40M is not set
|
||||
# default:
|
||||
CONFIG_SPIRAM_SPEED=80
|
||||
# default:
|
||||
# CONFIG_SPIRAM_XIP_FROM_PSRAM is not set
|
||||
# default:
|
||||
# CONFIG_SPIRAM_ECC_ENABLE is not set
|
||||
# default:
|
||||
CONFIG_SPIRAM_BOOT_HW_INIT=y
|
||||
# default:
|
||||
CONFIG_SPIRAM_BOOT_INIT=y
|
||||
# default:
|
||||
CONFIG_SPIRAM_PRE_CONFIGURE_MEMORY_PROTECTION=y
|
||||
# default:
|
||||
# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set
|
||||
# default:
|
||||
# CONFIG_SPIRAM_USE_MEMMAP is not set
|
||||
# default:
|
||||
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
|
||||
# default:
|
||||
CONFIG_SPIRAM_USE_MALLOC=y
|
||||
# default:
|
||||
CONFIG_SPIRAM_MEMTEST=y
|
||||
# default:
|
||||
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=16384
|
||||
# default:
|
||||
# CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP is not set
|
||||
# default:
|
||||
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=32768
|
||||
# default:
|
||||
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set
|
||||
# default:
|
||||
# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set
|
||||
# end of SPI RAM config
|
||||
# end of ESP PSRAM
|
||||
|
||||
#
|
||||
@@ -2534,6 +2651,8 @@ CONFIG_FATFS_TIMEOUT_MS=10000
|
||||
# default:
|
||||
CONFIG_FATFS_PER_FILE_CACHE=y
|
||||
# default:
|
||||
CONFIG_FATFS_ALLOC_PREFER_EXTRAM=y
|
||||
# default:
|
||||
# CONFIG_FATFS_USE_FASTSEEK is not set
|
||||
# default:
|
||||
CONFIG_FATFS_USE_STRFUNC_NONE=y
|
||||
@@ -2661,6 +2780,8 @@ CONFIG_FREERTOS_SYSTICK_USES_SYSTIMER=y
|
||||
#
|
||||
# Extra
|
||||
#
|
||||
# default:
|
||||
CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM=y
|
||||
# end of Extra
|
||||
|
||||
# default:
|
||||
@@ -3196,6 +3317,8 @@ CONFIG_MBEDTLS_HAVE_TIME=y
|
||||
# default:
|
||||
CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
|
||||
# default:
|
||||
# CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC is not set
|
||||
# default:
|
||||
# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set
|
||||
# default:
|
||||
# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set
|
||||
@@ -3549,6 +3672,8 @@ CONFIG_MBEDTLS_PKCS1_V21=y
|
||||
# default:
|
||||
# CONFIG_NVS_LEGACY_DUP_KEYS_COMPATIBILITY is not set
|
||||
# default:
|
||||
# CONFIG_NVS_ALLOCATE_CACHE_IN_SPIRAM is not set
|
||||
# default:
|
||||
# CONFIG_NVS_BDL_STACK is not set
|
||||
# default:
|
||||
# CONFIG_NVS_FLASH_VERIFY_ERASE is not set
|
||||
@@ -3879,9 +4004,9 @@ CONFIG_LOG_BOOTLOADER_LEVEL_WARN=y
|
||||
# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL=2
|
||||
# CONFIG_FLASH_ENCRYPTION_ENABLED is not set
|
||||
# CONFIG_FLASHMODE_QIO is not set
|
||||
CONFIG_FLASHMODE_QIO=y
|
||||
# CONFIG_FLASHMODE_QOUT is not set
|
||||
CONFIG_FLASHMODE_DIO=y
|
||||
# CONFIG_FLASHMODE_DIO is not set
|
||||
# CONFIG_FLASHMODE_DOUT is not set
|
||||
CONFIG_MONITOR_BAUD=115200
|
||||
CONFIG_OPTIMIZATION_LEVEL_DEBUG=y
|
||||
@@ -3913,7 +4038,6 @@ CONFIG_POST_EVENTS_FROM_IRAM_ISR=y
|
||||
CONFIG_GDBSTUB_SUPPORT_TASKS=y
|
||||
CONFIG_GDBSTUB_MAX_TASKS=32
|
||||
# CONFIG_OTA_ALLOW_HTTP is not set
|
||||
# CONFIG_ESP_SYSTEM_PD_FLASH is not set
|
||||
CONFIG_PERIPH_CTRL_FUNC_IN_IRAM=y
|
||||
CONFIG_BROWNOUT_DET=y
|
||||
CONFIG_BROWNOUT_DET_LVL_SEL_7=y
|
||||
@@ -4008,6 +4132,7 @@ CONFIG_TIMER_TASK_PRIORITY=1
|
||||
CONFIG_TIMER_TASK_STACK_DEPTH=2048
|
||||
CONFIG_TIMER_QUEUE_LENGTH=10
|
||||
# CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set
|
||||
CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY=y
|
||||
# CONFIG_HAL_ASSERTION_SILIENT is not set
|
||||
# CONFIG_L2_TO_L3_COPY is not set
|
||||
CONFIG_ESP_GRATUITOUS_ARP=y
|
||||
|
||||
Reference in New Issue
Block a user