From 08db5c591794243902be1261b06f156244907d83 Mon Sep 17 00:00:00 2001 From: Alex Mikhalev Date: Thu, 24 Jan 2019 23:00:12 -0800 Subject: [PATCH] fix sdkconfig defaults and more --- components/sx127x_driver/sx127x_pb.c | 6 +- main/u8g2_esp32_hal.c | 17 +- main/u8g2_esp32_hal.h | 2 +- main/ugv_io_mpu.cc | 14 +- main/ugv_main.cc | 19 +- sdkconfig.default | 492 +++++++++++---------------- 6 files changed, 234 insertions(+), 316 deletions(-) diff --git a/components/sx127x_driver/sx127x_pb.c b/components/sx127x_driver/sx127x_pb.c index 0af1535..3c1b87a 100644 --- a/components/sx127x_driver/sx127x_pb.c +++ b/components/sx127x_driver/sx127x_pb.c @@ -13,7 +13,7 @@ esp_err_t sx127x_send_packet_pb(sx127x_hndl hndl, const pb_field_t fields[], "task not running", ESP_ERR_INVALID_STATE); size_t data_len; - bool pb_ret = pb_get_encoded_size(&data_len, fields, src_struct); + bool pb_ret = pb_get_encoded_size(&data_len, fields, src_struct); SX127X_CHECK(pb_ret == true, "pb_get_encoded_size fail", ESP_ERR_INVALID_ARG); SX127X_CHECK(data_len < SX127_MAX_PACKET_LEN, "packet len too long: %d", ESP_ERR_INVALID_ARG, data_len); @@ -26,8 +26,8 @@ esp_err_t sx127x_send_packet_pb(sx127x_hndl hndl, const pb_field_t fields[], ESP_LOGV(SX127X_TAG, "encoded pb message %d bytes", data_len); sx127x_packet_t packet; - packet.data_len = data_len; - packet.data = (char *)data; + packet.data_len = data_len; + packet.data = (uint8_t *)data; BaseType_t pdRet = xQueueSend(hndl->tx_packet_queue, &packet, ticks_to_wait); SX127X_CHECK(pdRet == pdTRUE, "tx queue full", ESP_ERR_TIMEOUT); return ESP_OK; diff --git a/main/u8g2_esp32_hal.c b/main/u8g2_esp32_hal.c index d216484..e3661ca 100644 --- a/main/u8g2_esp32_hal.c +++ b/main/u8g2_esp32_hal.c @@ -16,14 +16,15 @@ static spi_device_handle_t handle_spi; // SPI handle. static i2c_cmd_handle_t handle_i2c; // I2C handle. #undef ESP_ERROR_CHECK -#define ESP_ERROR_CHECK(x) \ - do { \ - esp_err_t _rc = (x); \ - if (_rc != ESP_OK) { \ - const char *_error_name = esp_err_to_name(_rc); \ - ESP_LOGE(TAG, "%s failed: %s (%d)", #x, _error_name, _rc); \ - return 0; \ - } \ +#define ESP_ERROR_CHECK(x) \ + do { \ + esp_err_t _rc = (x); \ + if (_rc != ESP_OK) { \ + const char *_error_name = esp_err_to_name(_rc); \ + ESP_LOGE(TAG, "%s:%d failed: %s (%#x)", __FUNCTION__, __LINE__, \ + _error_name, _rc); \ + return 0; \ + } \ } while (0); /* diff --git a/main/u8g2_esp32_hal.h b/main/u8g2_esp32_hal.h index af42d4e..4c1c654 100644 --- a/main/u8g2_esp32_hal.h +++ b/main/u8g2_esp32_hal.h @@ -21,7 +21,7 @@ extern "C" { #define I2C_MASTER_NUM I2C_NUM_0 // I2C port number for master dev #define I2C_MASTER_TX_BUF_DISABLE 0 // I2C master do not need buffer #define I2C_MASTER_RX_BUF_DISABLE 0 // I2C master do not need buffer -#define I2C_MASTER_FREQ_HZ 400000 // I2C master clock frequency +#define I2C_MASTER_FREQ_HZ 100000 // I2C master clock frequency #define ACK_CHECK_EN 0x1 // I2C master will check ack from slave #define ACK_CHECK_DIS 0x0 // I2C master will not check ack from slave diff --git a/main/ugv_io_mpu.cc b/main/ugv_io_mpu.cc index 0407b32..788c2aa 100644 --- a/main/ugv_io_mpu.cc +++ b/main/ugv_io_mpu.cc @@ -9,8 +9,8 @@ namespace ugv { namespace io { -// static constexpr gpio_num_t MPU_SDA = GPIO_NUM_12; -// static constexpr gpio_num_t MPU_SCL = GPIO_NUM_14; +static constexpr gpio_num_t MPU_SDA = GPIO_NUM_5; +static constexpr gpio_num_t MPU_SCL = GPIO_NUM_4; static constexpr mpud::accel_fs_t MPU_ACCEL_FS = mpud::ACCEL_FS_2G; static constexpr mpud::gyro_fs_t MPU_GYRO_FS = mpud::GYRO_FS_500DPS; static constexpr float MPU_MAG_TO_FLUX = (4912.f) / (32760.f); @@ -32,15 +32,21 @@ void MPU::Init() { mpu_bus_ = &i2c0; // This is shared with the oled, so just use those pins - // mpu_bus_->begin(MPU_SDA, MPU_SCL); + mpu_bus_->begin(MPU_SDA, MPU_SCL); mpu_ = new mpud::MPU(*mpu_bus_); esp_err_t ret; ret = mpu_->testConnection(); if (ret != ESP_OK) { - ESP_LOGE(TAG, "MPU not connected"); + uint8_t wai = mpu_->whoAmI(); + ESP_LOGE(TAG, "MPU not connected (whoAmI: %d)", wai); return; } + ret = mpu_->compassTestConnection(); + if (ret != ESP_OK) { + uint8_t wai = mpu_->compassWhoAmI(); + ESP_LOGW(TAG, "MPU compass not connected (whoAmI: %d)", wai); + } ret = mpu_->initialize(); if (ret != ESP_OK) { ESP_LOGE(TAG, "MPU initialization error"); diff --git a/main/ugv_main.cc b/main/ugv_main.cc index 7688614..d44d4de 100644 --- a/main/ugv_main.cc +++ b/main/ugv_main.cc @@ -26,6 +26,7 @@ struct State { esp_timer_handle_t timer_handle; io::Inputs inputs; io::Outputs outputs; + int64_t last_print; State() { comms = new CommsClass(); @@ -34,11 +35,11 @@ struct State { } void Init() { + esp_timer_init(); + comms->Init(); io->Init(); - display->Init(); - - esp_timer_init(); + // display->Init(); esp_timer_create_args_t timer_args; timer_args.callback = OnTimeout; @@ -47,16 +48,26 @@ struct State { timer_args.name = "ugv_main_loop"; esp_timer_create(&timer_args, &this->timer_handle); esp_timer_start_periodic(timer_handle, LOOP_PERIOD_US); + last_print = 0; } void OnTick() { - ESP_LOGD(TAG, "OnTick"); + ESP_LOGV(TAG, "OnTick"); int64_t time_us = esp_timer_get_time(); float time_s = ((float)time_us) / 1e6; io->ReadInputs(inputs); outputs.left_motor = sinf(time_s * PI); outputs.right_motor = cosf(time_s * PI); io->WriteOutputs(outputs); + if (time_us >= last_print + 1 * 1000 * 1000) { // 1s + ESP_LOGI(TAG, + "inputs: acc=(%f, %f, %f) gyro=(%f, %f, %f) mag=(%f, %f, %f)", + inputs.mpu.accel.x, inputs.mpu.accel.y, inputs.mpu.accel.z, + inputs.mpu.gyro_rate.x, inputs.mpu.gyro_rate.y, + inputs.mpu.gyro_rate.z, inputs.mpu.mag.x, inputs.mpu.mag.y, + inputs.mpu.mag.z); + last_print = time_us; + } } }; diff --git a/sdkconfig.default b/sdkconfig.default index 2facdb6..d9dfa59 100644 --- a/sdkconfig.default +++ b/sdkconfig.default @@ -2,7 +2,6 @@ # Automatically generated file; DO NOT EDIT. # Espressif IoT Development Framework Configuration # -CONFIG_IDF_TARGET="esp32" # # SDK tool configuration @@ -11,20 +10,12 @@ CONFIG_TOOLPREFIX="xtensa-esp32-elf-" CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=y # -# Partition Table -# -CONFIG_PARTITION_TABLE_SINGLE_APP=y -CONFIG_PARTITION_TABLE_TWO_OTA= -CONFIG_PARTITION_TABLE_CUSTOM= -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" -CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" -CONFIG_PARTITION_TABLE_OFFSET=0x8000 -CONFIG_PARTITION_TABLE_MD5=y - -# -# Application manager +# Example Configuration # -CONFIG_APP_COMPILE_TIME_DATE=y +CONFIG_LCD_TYPE_AUTO=y +CONFIG_LCD_TYPE_ST7789V= +CONFIG_LCD_TYPE_ILI9341= +CONFIG_LCD_OVERCLOCK= # # SX127X Driver Configuration @@ -38,12 +29,6 @@ CONFIG_SX127X_SPI_QUEUE_SIZE=8 CONFIG_SX127X_SPI_DMA_CHAN=1 CONFIG_SX127X_USE_NANOPB=y -# -# I2Cbus -# -CONFIG_I2CBUS_LOG_ERRORS=y -CONFIG_I2CBUS_LOG_READWRITES= - # # MPU driver # @@ -52,9 +37,9 @@ CONFIG_MPU6050= CONFIG_MPU6500= CONFIG_MPU6555= CONFIG_MPU9150= -CONFIG_MPU9250=y -CONFIG_MPU9255= -CONFIG_MPU_CHIP_MODEL="MPU9250" +CONFIG_MPU9250= +CONFIG_MPU9255=y +CONFIG_MPU_CHIP_MODEL="MPU9255" CONFIG_MPU_AK8963=y CONFIG_MPU_AK89xx=y CONFIG_MPU_I2C=y @@ -66,36 +51,30 @@ CONFIG_MPU_LOG_LEVEL_ERROR= CONFIG_MPU_LOG_LEVEL_WARN= CONFIG_MPU_LOG_LEVEL_INFO= CONFIG_MPU_LOG_LEVEL_DEBUG= -CONFIG_MPU_LOG_LEVEL_VERBOSE= -CONFIG_MPU_LOG_LEVEL=5 +CONFIG_MPU_LOG_LEVEL=4 CONFIG_MPU_ENABLE_DMP= CONFIG_MPU_LOG_ERROR_TRACES=y # -# Example Configuration +# I2Cbus # -CONFIG_LCD_TYPE_AUTO=y -CONFIG_LCD_TYPE_ST7789V= -CONFIG_LCD_TYPE_ILI9341= -CONFIG_LCD_OVERCLOCK= +CONFIG_I2CBUS_LOG_ERRORS=y +CONFIG_I2CBUS_LOG_READWRITES= # # Bootloader config # CONFIG_LOG_BOOTLOADER_LEVEL_NONE= CONFIG_LOG_BOOTLOADER_LEVEL_ERROR= -CONFIG_LOG_BOOTLOADER_LEVEL_WARN= -CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y +CONFIG_LOG_BOOTLOADER_LEVEL_WARN=y +CONFIG_LOG_BOOTLOADER_LEVEL_INFO= CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG= CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE= -CONFIG_LOG_BOOTLOADER_LEVEL=3 +CONFIG_LOG_BOOTLOADER_LEVEL=2 CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V= CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y CONFIG_BOOTLOADER_FACTORY_RESET= CONFIG_BOOTLOADER_APP_TEST= -CONFIG_BOOTLOADER_WDT_ENABLE=y -CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE= -CONFIG_BOOTLOADER_WDT_TIME_MS=9000 # # Security features @@ -113,17 +92,17 @@ CONFIG_FLASHMODE_QOUT= CONFIG_FLASHMODE_DIO=y CONFIG_FLASHMODE_DOUT= CONFIG_ESPTOOLPY_FLASHMODE="dio" -CONFIG_ESPTOOLPY_FLASHFREQ_80M= -CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +CONFIG_ESPTOOLPY_FLASHFREQ_80M=y +CONFIG_ESPTOOLPY_FLASHFREQ_40M= CONFIG_ESPTOOLPY_FLASHFREQ_26M= CONFIG_ESPTOOLPY_FLASHFREQ_20M= -CONFIG_ESPTOOLPY_FLASHFREQ="40m" +CONFIG_ESPTOOLPY_FLASHFREQ="80m" CONFIG_ESPTOOLPY_FLASHSIZE_1MB= -CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y -CONFIG_ESPTOOLPY_FLASHSIZE_4MB= +CONFIG_ESPTOOLPY_FLASHSIZE_2MB= +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y CONFIG_ESPTOOLPY_FLASHSIZE_8MB= CONFIG_ESPTOOLPY_FLASHSIZE_16MB= -CONFIG_ESPTOOLPY_FLASHSIZE="2MB" +CONFIG_ESPTOOLPY_FLASHSIZE="4MB" CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y CONFIG_ESPTOOLPY_BEFORE_RESET=y CONFIG_ESPTOOLPY_BEFORE_NORESET= @@ -141,6 +120,17 @@ CONFIG_MONITOR_BAUD_OTHER= CONFIG_MONITOR_BAUD_OTHER_VAL=115200 CONFIG_MONITOR_BAUD=115200 +# +# Partition Table +# +CONFIG_PARTITION_TABLE_SINGLE_APP=y +CONFIG_PARTITION_TABLE_TWO_OTA= +CONFIG_PARTITION_TABLE_CUSTOM= +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" +CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" +CONFIG_PARTITION_TABLE_OFFSET=0x8000 +CONFIG_PARTITION_TABLE_MD5=y + # # Compiler options # @@ -156,78 +146,18 @@ CONFIG_STACK_CHECK_STRONG=y CONFIG_STACK_CHECK_ALL= CONFIG_STACK_CHECK=y CONFIG_WARN_WRITE_STRINGS=y -CONFIG_DISABLE_GCC8_WARNINGS= # # Component config # # -# Log output -# -CONFIG_LOG_DEFAULT_LEVEL_NONE= -CONFIG_LOG_DEFAULT_LEVEL_ERROR= -CONFIG_LOG_DEFAULT_LEVEL_WARN= -CONFIG_LOG_DEFAULT_LEVEL_INFO= -CONFIG_LOG_DEFAULT_LEVEL_DEBUG= -CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=y -CONFIG_LOG_DEFAULT_LEVEL=5 -CONFIG_LOG_COLORS=y - -# -# Heap memory debugging -# -CONFIG_HEAP_POISONING_DISABLED= -CONFIG_HEAP_POISONING_LIGHT= -CONFIG_HEAP_POISONING_COMPREHENSIVE=y -CONFIG_HEAP_TRACING= -CONFIG_HEAP_TASK_TRACKING= - -# -# Application Level Tracing -# -CONFIG_ESP32_APPTRACE_DEST_TRAX= -CONFIG_ESP32_APPTRACE_DEST_NONE=y -CONFIG_ESP32_APPTRACE_ENABLE= -CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y - -# -# FreeRTOS +# MPU driver # -CONFIG_FREERTOS_UNICORE= -CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF -CONFIG_FREERTOS_CORETIMER_0=y -CONFIG_FREERTOS_CORETIMER_1= -CONFIG_FREERTOS_HZ=100 -CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y -CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE= -CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL= -CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y -CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK= -CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y -CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 -CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y -CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE= -CONFIG_FREERTOS_ASSERT_DISABLE= -CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 -CONFIG_FREERTOS_ISR_STACKSIZE=1536 -CONFIG_FREERTOS_LEGACY_HOOKS= -CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 -CONFIG_SUPPORT_STATIC_ALLOCATION= -CONFIG_TIMER_TASK_PRIORITY=1 -CONFIG_TIMER_TASK_STACK_DEPTH=2048 -CONFIG_TIMER_QUEUE_LENGTH=10 -CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 -CONFIG_FREERTOS_USE_TRACE_FACILITY= -CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS= -CONFIG_FREERTOS_DEBUG_INTERNALS= -CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y # -# Virtual file system +# I2Cbus # -CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y -CONFIG_SUPPORT_TERMIOS=y # # Driver configurations @@ -240,113 +170,33 @@ CONFIG_ADC_FORCE_XPD_FSM= CONFIG_ADC2_DISABLE_DAC=y # -# SPI configuration +# SPI master configuration # CONFIG_SPI_MASTER_IN_IRAM= CONFIG_SPI_MASTER_ISR_IN_IRAM=y -CONFIG_SPI_SLAVE_IN_IRAM= -CONFIG_SPI_SLAVE_ISR_IN_IRAM=y - -# -# Event Loop Library -# -CONFIG_EVENT_LOOP_PROFILING= - -# -# Ethernet -# -CONFIG_DMA_RX_BUF_NUM=10 -CONFIG_DMA_TX_BUF_NUM=10 -CONFIG_EMAC_L2_TO_L3_RX_BUF_MODE=y -CONFIG_EMAC_CHECK_LINK_PERIOD_MS=2000 -CONFIG_EMAC_TASK_PRIORITY=20 -CONFIG_EMAC_TASK_STACK_SIZE=3072 - -# -# LWIP -# -CONFIG_L2_TO_L3_COPY= -CONFIG_LWIP_IRAM_OPTIMIZATION= -CONFIG_LWIP_MAX_SOCKETS=10 -CONFIG_USE_ONLY_LWIP_SELECT= -CONFIG_LWIP_SO_REUSE=y -CONFIG_LWIP_SO_REUSE_RXTOALL=y -CONFIG_LWIP_SO_RCVBUF= -CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 -CONFIG_LWIP_IP_FRAG= -CONFIG_LWIP_IP_REASSEMBLY= -CONFIG_LWIP_STATS= -CONFIG_LWIP_ETHARP_TRUST_IP_MAC= -CONFIG_ESP_GRATUITOUS_ARP=y -CONFIG_GARP_TMR_INTERVAL=60 -CONFIG_TCPIP_RECVMBOX_SIZE=32 -CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y -CONFIG_LWIP_DHCP_RESTORE_LAST_IP= - -# -# DHCP server -# -CONFIG_LWIP_DHCPS_LEASE_UNIT=60 -CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 -CONFIG_LWIP_AUTOIP= -CONFIG_LWIP_NETIF_LOOPBACK=y -CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 - -# -# TCP -# -CONFIG_LWIP_MAX_ACTIVE_TCP=16 -CONFIG_LWIP_MAX_LISTENING_TCP=16 -CONFIG_TCP_MAXRTX=12 -CONFIG_TCP_SYNMAXRTX=6 -CONFIG_TCP_MSS=1436 -CONFIG_TCP_MSL=60000 -CONFIG_TCP_SND_BUF_DEFAULT=5744 -CONFIG_TCP_WND_DEFAULT=5744 -CONFIG_TCP_RECVMBOX_SIZE=6 -CONFIG_TCP_QUEUE_OOSEQ=y -CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES= -CONFIG_TCP_OVERSIZE_MSS=y -CONFIG_TCP_OVERSIZE_QUARTER_MSS= -CONFIG_TCP_OVERSIZE_DISABLE= - -# -# UDP -# -CONFIG_LWIP_MAX_UDP_PCBS=16 -CONFIG_UDP_RECVMBOX_SIZE=6 -CONFIG_TCPIP_TASK_STACK_SIZE=3072 -CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y -CONFIG_TCPIP_TASK_AFFINITY_CPU0= -CONFIG_TCPIP_TASK_AFFINITY_CPU1= -CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF -CONFIG_PPP_SUPPORT= - -# -# ICMP -# -CONFIG_LWIP_MULTICAST_PING= -CONFIG_LWIP_BROADCAST_PING= # -# LWIP RAW API +# Application Level Tracing # -CONFIG_LWIP_MAX_RAW_PCBS=16 +CONFIG_ESP32_APPTRACE_DEST_TRAX= +CONFIG_ESP32_APPTRACE_DEST_NONE=y +CONFIG_ESP32_APPTRACE_ENABLE= +CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y # -# TCP/IP Adapter +# SPI Flash driver # -CONFIG_IP_LOST_TIMER_INTERVAL=120 -CONFIG_TCPIP_LWIP=y +CONFIG_SPI_FLASH_VERIFY_WRITE= +CONFIG_SPI_FLASH_ENABLE_COUNTERS= +CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y +CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y +CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS= +CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED= # # mbedTLS # -CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y -CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC= -CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC= CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384 -CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN= CONFIG_MBEDTLS_DEBUG= CONFIG_MBEDTLS_HARDWARE_AES=y CONFIG_MBEDTLS_HARDWARE_MPI= @@ -421,48 +271,114 @@ CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y CONFIG_MBEDTLS_ECP_NIST_OPTIM=y # -# SPI Flash driver +# LWIP # -CONFIG_SPI_FLASH_VERIFY_WRITE= -CONFIG_SPI_FLASH_ENABLE_COUNTERS= -CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y -CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y -CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS= -CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED= +CONFIG_L2_TO_L3_COPY= +CONFIG_LWIP_IRAM_OPTIMIZATION= +CONFIG_LWIP_MAX_SOCKETS=10 +CONFIG_USE_ONLY_LWIP_SELECT= +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +CONFIG_LWIP_SO_RCVBUF= +CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 +CONFIG_LWIP_IP_FRAG= +CONFIG_LWIP_IP_REASSEMBLY= +CONFIG_LWIP_STATS= +CONFIG_LWIP_ETHARP_TRUST_IP_MAC= +CONFIG_ESP_GRATUITOUS_ARP=y +CONFIG_GARP_TMR_INTERVAL=60 +CONFIG_TCPIP_RECVMBOX_SIZE=32 +CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y # -# NVS +# DHCP server # +CONFIG_LWIP_DHCPS_LEASE_UNIT=60 +CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 +CONFIG_LWIP_AUTOIP= +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 # -# PThreads +# TCP # -CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 -CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 -CONFIG_PTHREAD_STACK_MIN=768 -CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y -CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0= -CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1= -CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 -CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_TCP_MAXRTX=12 +CONFIG_TCP_SYNMAXRTX=6 +CONFIG_TCP_MSS=1436 +CONFIG_TCP_MSL=60000 +CONFIG_TCP_SND_BUF_DEFAULT=5744 +CONFIG_TCP_WND_DEFAULT=5744 +CONFIG_TCP_RECVMBOX_SIZE=6 +CONFIG_TCP_QUEUE_OOSEQ=y +CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES= +CONFIG_TCP_OVERSIZE_MSS=y +CONFIG_TCP_OVERSIZE_QUARTER_MSS= +CONFIG_TCP_OVERSIZE_DISABLE= + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_UDP_RECVMBOX_SIZE=6 +CONFIG_TCPIP_TASK_STACK_SIZE=2560 +CONFIG_PPP_SUPPORT= + +# +# ICMP +# +CONFIG_LWIP_MULTICAST_PING= +CONFIG_LWIP_BROADCAST_PING= + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 + +# +# Virtual file system +# +CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y + +# +# Ethernet +# +CONFIG_DMA_RX_BUF_NUM=10 +CONFIG_DMA_TX_BUF_NUM=10 +CONFIG_EMAC_L2_TO_L3_RX_BUF_MODE= +CONFIG_EMAC_TASK_PRIORITY=20 + +# +# tcpip adapter +# +CONFIG_IP_LOST_TIMER_INTERVAL=120 +CONFIG_AWS_IOT_SDK= + +# +# Bluetooth +# +CONFIG_BT_ENABLED= +CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0 +CONFIG_BT_RESERVE_DRAM=0 + +# +# NVS +# +CONFIG_MP_BLOB_SUPPORT= # # ESP32-specific # -CONFIG_IDF_TARGET_ESP32=y CONFIG_ESP32_DEFAULT_CPU_FREQ_80= -CONFIG_ESP32_DEFAULT_CPU_FREQ_160=y -CONFIG_ESP32_DEFAULT_CPU_FREQ_240= -CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=160 +CONFIG_ESP32_DEFAULT_CPU_FREQ_160= +CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y +CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240 CONFIG_SPIRAM_SUPPORT= CONFIG_MEMMAP_TRACEMEM= CONFIG_MEMMAP_TRACEMEM_TWOBANKS= CONFIG_ESP32_TRAX= CONFIG_TRACEMEM_RESERVE_DRAM=0x0 - -# -# Core dump -# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH= CONFIG_ESP32_ENABLE_COREDUMP_TO_UART= CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y @@ -513,15 +429,12 @@ CONFIG_BROWNOUT_DET_LVL_SEL_5= CONFIG_BROWNOUT_DET_LVL_SEL_6= CONFIG_BROWNOUT_DET_LVL_SEL_7= CONFIG_BROWNOUT_DET_LVL=0 -CONFIG_REDUCE_PHY_TX_POWER=y CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y CONFIG_ESP32_TIME_SYSCALL_USE_RTC= CONFIG_ESP32_TIME_SYSCALL_USE_FRC1= CONFIG_ESP32_TIME_SYSCALL_USE_NONE= CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL= -CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC= -CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256= CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024 CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000 CONFIG_ESP32_XTAL_FREQ_40=y @@ -552,7 +465,6 @@ CONFIG_ESP32_WIFI_NVS_ENABLED=y CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1= CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 -CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE= # # PHY @@ -568,23 +480,22 @@ CONFIG_ESP32_PHY_MAX_TX_POWER=20 CONFIG_PM_ENABLE= # -# I2Cbus -# - -# -# MPU driver +# Log output # -CONFIG_AWS_IOT_SDK= +CONFIG_LOG_DEFAULT_LEVEL_NONE= +CONFIG_LOG_DEFAULT_LEVEL_ERROR= +CONFIG_LOG_DEFAULT_LEVEL_WARN= +CONFIG_LOG_DEFAULT_LEVEL_INFO= +CONFIG_LOG_DEFAULT_LEVEL_DEBUG=y +CONFIG_LOG_DEFAULT_LEVEL_VERBOSE= +CONFIG_LOG_DEFAULT_LEVEL=4 +CONFIG_LOG_COLORS=y # -# Bluetooth +# PThreads # -CONFIG_BT_ENABLED= -CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=0 -CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=0 -CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0 -CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0 -CONFIG_BT_RESERVE_DRAM=0 +CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 # # ADC-Calibration @@ -598,26 +509,6 @@ CONFIG_ADC_CAL_LUT_ENABLE=y # CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y -# -# HTTP Server -# -CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 -CONFIG_HTTPD_MAX_URI_LEN=512 - -# -# OpenSSL -# -CONFIG_OPENSSL_DEBUG= -CONFIG_OPENSSL_ASSERT_DO_NOTHING=y -CONFIG_OPENSSL_ASSERT_EXIT= - -# -# Wear Levelling -# -CONFIG_WL_SECTOR_SIZE_512= -CONFIG_WL_SECTOR_SIZE_4096=y -CONFIG_WL_SECTOR_SIZE=4096 - # # FAT Filesystem support # @@ -652,44 +543,62 @@ CONFIG_FATFS_TIMEOUT_MS=10000 CONFIG_FATFS_PER_FILE_CACHE=y # -# Modbus configuration +# Wear Levelling # -CONFIG_MB_UART_RXD=22 -CONFIG_MB_UART_TXD=23 -CONFIG_MB_UART_RTS=18 -CONFIG_MB_QUEUE_LENGTH=20 -CONFIG_MB_SERIAL_TASK_STACK_SIZE=2048 -CONFIG_MB_SERIAL_BUF_SIZE=256 -CONFIG_MB_SERIAL_TASK_PRIO=10 -CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT= -CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20 -CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 -CONFIG_MB_CONTROLLER_STACK_SIZE=4096 -CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 -CONFIG_MB_TIMER_PORT_ENABLED=y -CONFIG_MB_TIMER_GROUP=0 -CONFIG_MB_TIMER_INDEX=0 +CONFIG_WL_SECTOR_SIZE_512= +CONFIG_WL_SECTOR_SIZE_4096=y +CONFIG_WL_SECTOR_SIZE=4096 # -# libsodium +# FreeRTOS # -CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y +CONFIG_FREERTOS_UNICORE= +CONFIG_FREERTOS_CORETIMER_0=y +CONFIG_FREERTOS_CORETIMER_1= +CONFIG_FREERTOS_HZ=100 +CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y +CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE= +CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL= +CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y +CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK= +CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y +CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE= +CONFIG_FREERTOS_ASSERT_DISABLE= +CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 +CONFIG_FREERTOS_ISR_STACKSIZE=1536 +CONFIG_FREERTOS_LEGACY_HOOKS= +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 +CONFIG_SUPPORT_STATIC_ALLOCATION= +CONFIG_TIMER_TASK_PRIORITY=1 +CONFIG_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_USE_TRACE_FACILITY= +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS= +CONFIG_FREERTOS_DEBUG_INTERNALS= # -# mDNS +# Heap memory debugging # -CONFIG_MDNS_MAX_SERVICES=10 +CONFIG_HEAP_POISONING_DISABLED= +CONFIG_HEAP_POISONING_LIGHT= +CONFIG_HEAP_POISONING_COMPREHENSIVE=y +CONFIG_HEAP_TRACING= +CONFIG_HEAP_TASK_TRACKING= # -# ESP-MQTT Configurations +# libsodium # -CONFIG_MQTT_PROTOCOL_311=y -CONFIG_MQTT_TRANSPORT_SSL=y -CONFIG_MQTT_TRANSPORT_WEBSOCKET=y -CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y -CONFIG_MQTT_USE_CUSTOM_CONFIG= -CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED= -CONFIG_MQTT_CUSTOM_OUTBOX= +CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y + +# +# OpenSSL +# +CONFIG_OPENSSL_DEBUG= +CONFIG_OPENSSL_ASSERT_DO_NOTHING=y +CONFIG_OPENSSL_ASSERT_EXIT= # # SPIFFS Configuration @@ -721,12 +630,3 @@ CONFIG_SPIFFS_GC_DBG= CONFIG_SPIFFS_CACHE_DBG= CONFIG_SPIFFS_CHECK_DBG= CONFIG_SPIFFS_TEST_VISUALISATION= - -# -# Unity unit testing library -# -CONFIG_UNITY_ENABLE_FLOAT=y -CONFIG_UNITY_ENABLE_DOUBLE=y -CONFIG_UNITY_ENABLE_COLOR= -CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y -CONFIG_UNITY_ENABLE_FIXTURE=