PlatformIO Community

ESP-IDF SD-Card problem with long file names

I updated my PlatformIO in the last days with the Espressif 32 1.10.0 update.
Since then the ESP-IDF SD card sample only works with file names which are no longer than 8 characters.

FILE* f = fopen("/sdcard/hello.txt", “w”); works
FILE* f = fopen("/sdcard/hello123.txt", “w”); works
FILE* f = fopen("/sdcard/hello1234.txt", “w”); does not work, error when opening the file

I like to report this as a bug, I am not sure if this is the right place to do that.

Hi @Edgar! Could you please try to add the following lines to your platformio.ini:

build_flags = -DCONFIG_FATFS_MAX_LFN=255

Thanks for the information.
I tried and it does not make a difference.

This is what I see:
␛[0;32mI (375) Test: fileName1: /sdcard/20190926165910.log␛[0m
␛[0;32mI (385) Test: Opening file␛[0m
␛[0;31mE (385) Test: Failed to open file for append␛[0m

This is the code:
ESP_LOGI(TAG, “fileName1: %s”, fileName1);
ESP_LOGI(TAG, “Opening file”);
FILE* f = fopen(fileName1, “a”);
if (f == NULL) {
ESP_LOGE(TAG, “Failed to open file for append”);
return;
}

Please attach here your project.

I don’t see how I can attach anything here.

This is the code. It’s based on the SD-Card example with minor changes.
The code contains the lines with the file name
hello123.txt and hello1234.txt
8.3 works, 9.3 does not work
I tried this on different development boards and with two SD-Card modules.

#include <stdio.h>
#include <string.h>
#include <sys/unistd.h>
#include <sys/stat.h>
#include "esp_err.h"
#include "esp_log.h"                //Log messages
#include "esp_vfs_fat.h"
#include "driver/sdmmc_host.h"
#include "driver/sdspi_host.h"
#include "sdmmc_cmd.h"
#include <inttypes.h>	//Needed for int64_t esp_timer_get_time()

static const char *TAG = "example";

// This example can use SDMMC and SPI peripherals to communicate with SD card.
// By default, SDMMC peripheral is used.
// To enable SPI mode, uncomment the following line:

//#define USE_SPI_MODE

// When testing SD and SPI modes, keep in mind that once the card has been
// initialized in SPI mode, it can not be reinitialized in SD mode without
// toggling power to the card.


void app_main(void)
{
    ESP_LOGI(TAG, "Initializing SD card");
    ESP_LOGI(TAG, "Using SDMMC peripheral");
    sdmmc_host_t host = SDMMC_HOST_DEFAULT();
    
    //Docu  https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/peripherals/sdmmc_host.html
    //Docu  slot: slot number (SDMMC_HOST_SLOT_0 or SDMMC_HOST_SLOT_1) 
    //Docu  Default slot = SDMMC_HOST_SLOT_1 works, SDMMC_HOST_SLOT_0 can't be used because used by flash!

    // To use 1-line SD mode
    host.flags = SDMMC_HOST_FLAG_1BIT;

    // 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.
    sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();

    // GPIOs 15, 2, 4, 12, 13 should have external 10k pull-ups.
    // Internal pull-ups are not sufficient. However, enabling internal pull-ups
    // does make a difference some boards, so we do that here.
    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

    // Options for mounting the filesystem.
    // If format_if_mount_failed is set to true, SD card will be partitioned and
    // formatted in case when mounting fails.
    esp_vfs_fat_sdmmc_mount_config_t mount_config = {
        .format_if_mount_failed = false,
        .max_files = 5
    };

    // Use settings defined above to initialize SD card and mount FAT filesystem.
    // Note: esp_vfs_fat_sdmmc_mount is an all-in-one convenience function.
    sdmmc_card_t* card;
    esp_err_t ret = esp_vfs_fat_sdmmc_mount("/sdcard", &host, &slot_config, &mount_config, &card);

    if (ret != ESP_OK) {
        if (ret == ESP_FAIL) {
            ESP_LOGE(TAG, "Failed to mount filesystem. ");
        } else {
            ESP_LOGE(TAG, "Failed to initialize the card (%d). ", ret);
        }
        return;
    }

    // Card has been initialized, print its properties
    //Sample Output
    //Name: SE16G
    //Type: SDHC/SDXC
    //Speed: 20 MHz
    //Size: 15193MB
    //sdmmc_card_print_info(stdout, card);

    //char *fileName1 = "/sdcard/log20190913170134.txt";  //file name must be like "/sdcard/xxx"
    //char *fileName1 = "/sdcard/Log201909261.txt";  //file name must be like "/sdcard/xxx"
    
    //char *fileName1 = "/sdcard/hello.txt";  //file name must be like "/sdcard/xxx"  //Works
    char *fileName1 = "/sdcard/hello1234.txt";  //file name must be like "/sdcard/xxx"  //Failed to open file for append␛[0m
    //char *fileName1 = "/sdcard/hello123.txt";  //file name must be like "/sdcard/xxx"  //

    ESP_LOGI(TAG, "Opening file");
    FILE* f = fopen(fileName1, "a");
    //FILE* f = fopen(fileName1, "w");
    //FILE* f = fopen("/sdcard/Log201909262.txt", "w");   //No!
    //FILE* f = fopen("/sdcard/hello.txt", "w");
    if (f == NULL) {
        ESP_LOGE(TAG, "Failed to open file for append");
        //ESP_LOGE(TAG, "Failed to open file for write");
        return;
    }
    int64_t t = 0;
    for (unsigned long i = 1; i <= 1090; i++)
    {
        t = esp_timer_get_time();
        fprintf(f, "%010" PRId64, t);
	    fprintf(f, " ");
        fprintf(f, "%10lu\n", i);

        if (0 == i % 100){
            //fflush(f);
            ESP_LOGI(TAG, "Close and Open file");
            fclose(f);
            f = fopen(fileName1, "a");
        }
    }
    //fclose(f);
    ESP_LOGI(TAG, "File written");
    

    // All done, unmount partition and disable SDMMC or SPI peripheral
    esp_vfs_fat_sdmmc_unmount();
    ESP_LOGI(TAG, "Card unmounted");
}

And this is the platformio.ini

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = espidf
monitor_speed = 115200
build_flags = -DCONFIG_FATFS_MAX_LFN=255

Looks like long filenames feature is disabled in the default sdkconfig.h. Could you please try this sdkconfig.h:

/*
 *
 * Espressif IoT Development Framework Configuration
 *
 */
 
#define CONFIG_FATFS_LFN_STACK 1
#define CONFIG_FATFS_MAX_LFN 255
 
#define CONFIG_GATTC_ENABLE 1
#define CONFIG_ESP32_PHY_MAX_TX_POWER 20
#define CONFIG_TRACEMEM_RESERVE_DRAM 0x0
#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 16
#define CONFIG_MQTT_TRANSPORT_SSL 1
#define CONFIG_BLE_SMP_ENABLE 1
#define CONFIG_SDP_INITIAL_TRACE_LEVEL 2
#define CONFIG_MB_SERIAL_TASK_PRIO 10
#define CONFIG_MQTT_PROTOCOL_311 1
#define CONFIG_TCP_RECVMBOX_SIZE 6
#define CONFIG_FATFS_CODEPAGE_437 1
#define CONFIG_BLE_SCAN_DUPLICATE 1
#define CONFIG_AVDT_TRACE_LEVEL_WARNING 1
#define CONFIG_AWS_IOT_SHADOW_MAX_SIMULTANEOUS_ACKS 10
#define CONFIG_TCP_WND_DEFAULT 5744
#define CONFIG_PARTITION_TABLE_OFFSET 0x8000
#define CONFIG_SW_COEXIST_ENABLE 1
#define CONFIG_SPIFFS_USE_MAGIC_LENGTH 1
#define CONFIG_AVCT_INITIAL_TRACE_LEVEL 2
#define CONFIG_IPC_TASK_STACK_SIZE 1024
#define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16
#define CONFIG_FATFS_PER_FILE_CACHE 1
#define CONFIG_ESPTOOLPY_FLASHFREQ "40m"
#define CONFIG_AWS_IOT_SHADOW_MAX_SIZE_OF_THING_NAME 20
#define CONFIG_MBEDTLS_KEY_EXCHANGE_RSA 1
#define CONFIG_UDP_RECVMBOX_SIZE 6
#define CONFIG_SPI_FLASH_YIELD_DURING_ERASE 1
#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0
#define CONFIG_MBEDTLS_AES_C 1
#define CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED 1
#define CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_MBEDTLS_GCM_C 1
#define CONFIG_ESPTOOLPY_FLASHSIZE "2MB"
#define CONFIG_HEAP_POISONING_DISABLED 1
#define CONFIG_SPIFFS_CACHE_WR 1
#define CONFIG_BROWNOUT_DET_LVL_SEL_0 1
#define CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER 1
#define CONFIG_SPIFFS_CACHE 1
#define CONFIG_INT_WDT 1
#define CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN 3
#define CONFIG_MBEDTLS_SSL_PROTO_TLS1 1
#define CONFIG_ESP_GRATUITOUS_ARP 1
#define CONFIG_AWS_IOT_SHADOW_MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES 80
#define CONFIG_MBEDTLS_ECDSA_C 1
#define CONFIG_ESPTOOLPY_FLASHFREQ_40M 1
#define CONFIG_LOG_BOOTLOADER_LEVEL_INFO 1
#define CONFIG_ESPTOOLPY_FLASHSIZE_2MB 1
#define CONFIG_HTTPD_MAX_REQ_HDR_LEN 512
#define CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE 0
#define CONFIG_AWS_IOT_MQTT_PORT 8883
#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1
#define CONFIG_MBEDTLS_ECDH_C 1
#define CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE 1
#define CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_AWS_IOT_MQTT_MAX_RECONNECT_WAIT_INTERVAL 128000
#define CONFIG_MBEDTLS_SSL_ALPN 1
#define CONFIG_BTM_TRACE_LEVEL_WARNING 1
#define CONFIG_MBEDTLS_PEM_WRITE_C 1
#define CONFIG_RFCOMM_TRACE_LEVEL_WARNING 1
#define CONFIG_LOG_DEFAULT_LEVEL_INFO 1
#define CONFIG_BT_RESERVE_DRAM 0xdb5c
#define CONFIG_APP_COMPILE_TIME_DATE 1
#define CONFIG_FATFS_FS_LOCK 0
#define CONFIG_IP_LOST_TIMER_INTERVAL 120
#define CONFIG_SPIFFS_META_LENGTH 4
#define CONFIG_ESP32_PANIC_PRINT_REBOOT 1
#define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE 20
#define CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED 1
#define CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED 1
#define CONFIG_AWS_IOT_MQTT_RX_BUF_LEN 512
#define CONFIG_MB_SERIAL_BUF_SIZE 256
#define CONFIG_CONSOLE_UART_BAUDRATE 115200
#define CONFIG_LWIP_MAX_SOCKETS 10
#define CONFIG_LWIP_NETIF_LOOPBACK 1
#define CONFIG_MCA_TRACE_LEVEL_WARNING 1
#define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT "pthread"
#define CONFIG_EMAC_TASK_PRIORITY 20
#define CONFIG_TIMER_TASK_STACK_DEPTH 2048
#define CONFIG_TCP_MSS 1436
#define CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED 1
#define CONFIG_BTIF_INITIAL_TRACE_LEVEL 2
#define CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF 3
#define CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4 1
#define CONFIG_FATFS_CODEPAGE 437
#define CONFIG_APPL_TRACE_LEVEL_WARNING 1
#define CONFIG_BTC_INITIAL_TRACE_LEVEL 2
#define CONFIG_ESP32_DEFAULT_CPU_FREQ_160 1
#define CONFIG_ULP_COPROC_RESERVE_MEM 0
#define CONFIG_LWIP_MAX_UDP_PCBS 16
#define CONFIG_ESPTOOLPY_BAUD 115200
#define CONFIG_INT_WDT_CHECK_CPU1 1
#define CONFIG_AVRC_INITIAL_TRACE_LEVEL 2
#define CONFIG_ADC_CAL_LUT_ENABLE 1
#define CONFIG_AWS_IOT_MQTT_TX_BUF_LEN 512
#define CONFIG_FLASHMODE_DIO 1
#define CONFIG_ESPTOOLPY_AFTER_RESET 1
#define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED 1
#define CONFIG_LWIP_DHCPS_MAX_STATION_NUM 8
#define CONFIG_TOOLPREFIX "xtensa-esp32-elf-"
#define CONFIG_MBEDTLS_ECP_C 1
#define CONFIG_FREERTOS_IDLE_TASK_STACKSIZE 1536
#define CONFIG_MBEDTLS_RC4_DISABLED 1
#define CONFIG_GAP_TRACE_LEVEL_WARNING 1
#define CONFIG_CONSOLE_UART_NUM 0
#define CONFIG_AWS_IOT_SHADOW_MAX_JSON_TOKEN_EXPECTED 120
#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE 1
#define CONFIG_PTHREAD_STACK_MIN 768
#define CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC 1
#define CONFIG_ESPTOOLPY_BAUD_115200B 1
#define CONFIG_TCP_OVERSIZE_MSS 1
#define CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS 1
#define CONFIG_CONSOLE_UART_DEFAULT 1
#define CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN 16384
#define CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS 4
#define CONFIG_GATT_TRACE_LEVEL_WARNING 1
#define CONFIG_ESPTOOLPY_FLASHSIZE_DETECT 1
#define CONFIG_TIMER_TASK_STACK_SIZE 3584
#define CONFIG_BTIF_TRACE_LEVEL_WARNING 1
#define CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE 1
#define CONFIG_HCI_INITIAL_TRACE_LEVEL 2
#define CONFIG_AVDT_INITIAL_TRACE_LEVEL 2
#define CONFIG_MBEDTLS_X509_CRL_PARSE_C 1
#define CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER 1
#define CONFIG_HTTPD_PURGE_BUF_LEN 32
#define CONFIG_SCAN_DUPLICATE_BY_DEVICE_ADDR 1
#define CONFIG_AWS_IOT_SHADOW_MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME 60
#define CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER 1
#define CONFIG_MB_SERIAL_TASK_STACK_SIZE 2048
#define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO 1
#define CONFIG_LWIP_DHCPS_LEASE_UNIT 60
#define CONFIG_EFUSE_MAX_BLK_LEN 192
#define CONFIG_SPIFFS_USE_MAGIC 1
#define CONFIG_TCPIP_TASK_STACK_SIZE 2048
#define CONFIG_BLUFI_TRACE_LEVEL_WARNING 1
#define CONFIG_BLUEDROID_PINNED_TO_CORE_0 1
#define CONFIG_TASK_WDT 1
#define CONFIG_RFCOMM_INITIAL_TRACE_LEVEL 2
#define CONFIG_MAIN_TASK_STACK_SIZE 3584
#define CONFIG_SPIFFS_PAGE_CHECK 1
#define CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0 1
#define CONFIG_LWIP_MAX_ACTIVE_TCP 16
#define CONFIG_TASK_WDT_TIMEOUT_S 5
#define CONFIG_INT_WDT_TIMEOUT_MS 300
#define CONFIG_ESPTOOLPY_FLASHMODE "dio"
#define CONFIG_BTC_TASK_STACK_SIZE 3072
#define CONFIG_BLUEDROID_ENABLED 1
#define CONFIG_NEWLIB_STDIN_LINE_ENDING_CR 1
#define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA 1
#define CONFIG_ESPTOOLPY_BEFORE "default_reset"
#define CONFIG_ADC2_DISABLE_DAC 1
#define CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_NUM 100
#define CONFIG_ESP32_REV_MIN_0 1
#define CONFIG_LOG_DEFAULT_LEVEL 3
#define CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION 1
#define CONFIG_TIMER_QUEUE_LENGTH 10
#define CONFIG_ESP32_REV_MIN 0
#define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT 1
#define CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE 0
#define CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY 1
#define CONFIG_MAKE_WARN_UNDEFINED_VARIABLES 1
#define CONFIG_FATFS_TIMEOUT_MS 10000
#define CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS 1
#define CONFIG_PAN_INITIAL_TRACE_LEVEL 2
#define CONFIG_MBEDTLS_CCM_C 1
#define CONFIG_SPI_MASTER_ISR_IN_IRAM 1
#define CONFIG_MCA_INITIAL_TRACE_LEVEL 2
#define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER 20
#define CONFIG_A2D_INITIAL_TRACE_LEVEL 2
#define CONFIG_ESP32_RTC_CLK_CAL_CYCLES 1024
#define CONFIG_ESP32_WIFI_TX_BA_WIN 6
#define CONFIG_ESP32_WIFI_NVS_ENABLED 1
#define CONFIG_MDNS_MAX_SERVICES 10
#define CONFIG_IDF_TARGET_ESP32 1
#define CONFIG_EMAC_CHECK_LINK_PERIOD_MS 2000
#define CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED 1
#define CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS 20
#define CONFIG_LIBSODIUM_USE_MBEDTLS_SHA 1
#define CONFIG_AWS_IOT_SDK 1
#define CONFIG_DMA_RX_BUF_NUM 10
#define CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED 1
#define CONFIG_TCP_SYNMAXRTX 6
#define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA 1
#define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF 0
#define CONFIG_PYTHON "python"
#define CONFIG_MBEDTLS_ECP_NIST_OPTIM 1
#define CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1 1
#define CONFIG_ESPTOOLPY_COMPRESSED 1
#define CONFIG_PARTITION_TABLE_FILENAME "partitions_singleapp.csv"
#define CONFIG_MB_CONTROLLER_STACK_SIZE 4096
#define CONFIG_TCP_SND_BUF_DEFAULT 5744
#define CONFIG_GARP_TMR_INTERVAL 60
#define CONFIG_LWIP_DHCP_MAX_NTP_SERVERS 1
#define CONFIG_BNEP_INITIAL_TRACE_LEVEL 2
#define CONFIG_HCI_TRACE_LEVEL_WARNING 1
#define CONFIG_TCP_MSL 60000
#define CONFIG_MBEDTLS_SSL_PROTO_TLS1_1 1
#define CONFIG_LWIP_SO_REUSE_RXTOALL 1
#define CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT 20
#define CONFIG_ESP32_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_PARTITION_TABLE_SINGLE_APP 1
#define CONFIG_UNITY_ENABLE_FLOAT 1
#define CONFIG_ESP32_WIFI_RX_BA_WIN 6
#define CONFIG_MBEDTLS_X509_CSR_PARSE_C 1
#define CONFIG_SPIFFS_USE_MTIME 1
#define CONFIG_BTC_TRACE_LEVEL_WARNING 1
#define CONFIG_EMAC_TASK_STACK_SIZE 3072
#define CONFIG_SMP_TRACE_LEVEL_WARNING 1
#define CONFIG_MB_QUEUE_LENGTH 20
#define CONFIG_SW_COEXIST_PREFERENCE_VALUE 2
#define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA 1
#define CONFIG_LWIP_DHCP_DOES_ARP_CHECK 1
#define CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER 1
#define CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE 2304
#define CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V 1
#define CONFIG_A2D_TRACE_LEVEL_WARNING 1
#define CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY 2000
#define CONFIG_AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS 5
#define CONFIG_BROWNOUT_DET_LVL 0
#define CONFIG_MBEDTLS_PEM_PARSE_C 1
#define CONFIG_SPIFFS_GC_MAX_RUNS 10
#define CONFIG_ESP32_APPTRACE_DEST_NONE 1
#define CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC 1
#define CONFIG_MBEDTLS_SSL_PROTO_TLS1_2 1
#define CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA 1
#define CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_HTTPD_MAX_URI_LEN 512
#define CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED 1
#define CONFIG_AVCT_TRACE_LEVEL_WARNING 1
#define CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED 1
#define CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1 1
#define CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ 160
#define CONFIG_MBEDTLS_HARDWARE_AES 1
#define CONFIG_FREERTOS_HZ 100
#define CONFIG_LOG_COLORS 1
#define CONFIG_OSI_TRACE_LEVEL_WARNING 1
#define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE 1
#define CONFIG_STACK_CHECK_NONE 1
#define CONFIG_ADC_CAL_EFUSE_TP_ENABLE 1
#define CONFIG_BNEP_TRACE_LEVEL_WARNING 1
#define CONFIG_FREERTOS_ASSERT_FAIL_ABORT 1
#define CONFIG_BROWNOUT_DET 1
#define CONFIG_AWS_IOT_SHADOW_MAX_SIMULTANEOUS_THINGNAMES 10
#define CONFIG_ESP32_XTAL_FREQ 40
#define CONFIG_OSI_INITIAL_TRACE_LEVEL 2
#define CONFIG_MONITOR_BAUD_115200B 1
#define CONFIG_LOG_BOOTLOADER_LEVEL 3
#define CONFIG_MBEDTLS_TLS_ENABLED 1
#define CONFIG_LWIP_MAX_RAW_PCBS 16
#define CONFIG_BTU_TASK_STACK_SIZE 4096
#define CONFIG_SMP_ENABLE 1
#define CONFIG_HID_TRACE_LEVEL_WARNING 1
#define CONFIG_AVRC_TRACE_LEVEL_WARNING 1
#define CONFIG_MBEDTLS_SSL_SESSION_TICKETS 1
#define CONFIG_SPIFFS_MAX_PARTITIONS 3
#define CONFIG_ESP_ERR_TO_NAME_LOOKUP 1
#define CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE_0 1
#define CONFIG_MBEDTLS_SSL_RENEGOTIATION 1
#define CONFIG_HID_INITIAL_TRACE_LEVEL 2
#define CONFIG_ESPTOOLPY_BEFORE_RESET 1
#define CONFIG_MB_EVENT_QUEUE_TIMEOUT 20
#define CONFIG_ESPTOOLPY_BAUD_OTHER_VAL 115200
#define CONFIG_SPIFFS_OBJ_NAME_LEN 32
#define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT 5
#define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF 0
#define CONFIG_PARTITION_TABLE_MD5 1
#define CONFIG_TCPIP_RECVMBOX_SIZE 32
#define CONFIG_TCP_MAXRTX 12
#define CONFIG_BTM_INITIAL_TRACE_LEVEL 2
#define CONFIG_ESPTOOLPY_AFTER "hard_reset"
#define CONFIG_TCPIP_TASK_AFFINITY 0x7FFFFFFF
#define CONFIG_LWIP_SO_REUSE 1
#define CONFIG_ESP32_XTAL_FREQ_40 1
#define CONFIG_BTDM_CONTROLLER_MODE_BLE_ONLY 1
#define CONFIG_DMA_TX_BUF_NUM 10
#define CONFIG_LWIP_MAX_LISTENING_TCP 16
#define CONFIG_FREERTOS_INTERRUPT_BACKTRACE 1
#define CONFIG_WL_SECTOR_SIZE 4096
#define CONFIG_ESP32_DEBUG_OCDAWARE 1
#define CONFIG_MQTT_TRANSPORT_WEBSOCKET 1
#define CONFIG_TIMER_TASK_PRIORITY 1
#define CONFIG_MBEDTLS_TLS_CLIENT 1
#define CONFIG_AWS_IOT_MQTT_MIN_RECONNECT_WAIT_INTERVAL 1000
#define CONFIG_BTDM_CONTROLLER_HCI_MODE_VHCI 1
#define CONFIG_BT_ENABLED 1
#define CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY 1
#define CONFIG_SDP_TRACE_LEVEL_WARNING 1
#define CONFIG_SW_COEXIST_PREFERENCE_BALANCE 1
#define CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED 1
#define CONFIG_MONITOR_BAUD 115200
#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT -1
#define CONFIG_ESP32_DEBUG_STUBS_ENABLE 1
#define CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT 30
#define CONFIG_TCPIP_LWIP 1
#define CONFIG_REDUCE_PHY_TX_POWER 1
#define CONFIG_BOOTLOADER_WDT_TIME_MS 9000
#define CONFIG_PAN_TRACE_LEVEL_WARNING 1
#define CONFIG_FREERTOS_CORETIMER_0 1
#define CONFIG_PARTITION_TABLE_CUSTOM_FILENAME "partitions.csv"
#define CONFIG_MBEDTLS_HAVE_TIME 1
#define CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY 1
#define CONFIG_TCP_QUEUE_OOSEQ 1
#define CONFIG_GATTS_ENABLE 1
#define CONFIG_ADC_CAL_EFUSE_VREF_ENABLE 1
#define CONFIG_MBEDTLS_TLS_SERVER 1
#define CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT 1
#define CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_SUPPORTED 1
#define CONFIG_FREERTOS_ISR_STACKSIZE 1536
#define CONFIG_SUPPORT_TERMIOS 1
#define CONFIG_OPENSSL_ASSERT_DO_NOTHING 1
#define CONFIG_IDF_TARGET "esp32"
#define CONFIG_WL_SECTOR_SIZE_4096 1
#define CONFIG_OPTIMIZATION_LEVEL_DEBUG 1
#define CONFIG_GATT_INITIAL_TRACE_LEVEL 2
#define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF
#define CONFIG_AWS_IOT_MQTT_HOST ""
#define CONFIG_L2CAP_TRACE_LEVEL_WARNING 1
#define CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_HTTPD_ERR_RESP_NO_DELAY 1
#define CONFIG_MB_TIMER_INDEX 0
#define CONFIG_SCAN_DUPLICATE_TYPE 0
#define CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED 1
#define CONFIG_APPL_INITIAL_TRACE_LEVEL 2
#define CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED 1
#define CONFIG_SPI_FLASH_ERASE_YIELD_TICKS 1
#define CONFIG_SMP_INITIAL_TRACE_LEVEL 2
#define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA 1
#define CONFIG_SPI_SLAVE_ISR_IN_IRAM 1
#define CONFIG_L2CAP_INITIAL_TRACE_LEVEL 2
#define CONFIG_SYSTEM_EVENT_QUEUE_SIZE 32
#define CONFIG_BT_ACL_CONNECTIONS 4
#define CONFIG_ESP32_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_BOOTLOADER_WDT_ENABLE 1
#define CONFIG_GAP_INITIAL_TRACE_LEVEL 2
#define CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_LWIP_LOOPBACK_MAX_PBUFS 8
#define CONFIG_MB_TIMER_GROUP 0
#define CONFIG_SPI_FLASH_ROM_DRIVER_PATCH 1
#define CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE 1
#define CONFIG_SPIFFS_PAGE_SIZE 256
#define CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED 1
#define CONFIG_ESP32_DPORT_WORKAROUND 1
#define CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0 1
#define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT 3072
#define CONFIG_MB_TIMER_PORT_ENABLED 1
#define CONFIG_DUPLICATE_SCAN_CACHE_SIZE 50
#define CONFIG_MONITOR_BAUD_OTHER_VAL 115200
#define CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF 1
#define CONFIG_ESPTOOLPY_PORT "COM19"
#define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS 1
#define CONFIG_UNITY_ENABLE_DOUBLE 1
#define CONFIG_BLE_ADV_REPORT_DISCARD_THRSHOLD 20
#define CONFIG_BLUEDROID_PINNED_TO_CORE 0
#define CONFIG_ESP32_WIFI_IRAM_OPT 1
#define CONFIG_BLUFI_INITIAL_TRACE_LEVEL 2 

Good news!
I replaced the sdkconfig.h file with your version and now long file names work.
Thanks!

Maybe you can let us know where this entry is in the menuconfig program. That should help in the future for other projects.

1 Like

I just found this page with information about the file name related entries in the sdkconfig.h

CONFIG_FATFS_LFN_STACK
CONFIG_FATFS_MAX_LFN