├── LICENSE ├── Makefile ├── README.md ├── main ├── component.mk └── gps_logger.c └── sdkconfig /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Mike Field 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a 3 | # project subdirectory. 4 | # 5 | 6 | PROJECT_NAME := gps_logger 7 | 8 | include $(IDF_PATH)/make/project.mk 9 | 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is a simple serial logger for the ESP32, originally intended 2 | for longterm logging of NMEA sentances from a GPS module with a 3 | LOLIN32 PRO board. 4 | 5 | Data is read from UART2, buffered into larger blocks, and then written 6 | out to the SD card. Because the data is buffered it is possible to 7 | remove the SD card, copy the data to another device, then insert the 8 | SD card again and maintain a continious log of data. 9 | 10 | The length of time that the SD card can be removed depends on the data 11 | rate, but the default allows for buffering of up to 32k of data. 12 | 13 | To avoid data corruption, the LED on 'WARN_GPIO' pin (set to pin 5) 14 | will be on for a few seconds before the data is written - to avoid 15 | data corruption do not insert or remove the SD card while the LED is 16 | on - just wait for a few seconds for it to go out. 17 | 18 | Here are most of the important settings that you may wish to customize: 19 | 20 | /* Parameters for the SD card */ 21 | #define PIN_NUM_MISO 2 22 | #define PIN_NUM_MOSI 15 23 | #define PIN_NUM_CLK 14 24 | #define PIN_NUM_CS 13 25 | 26 | /* Parameters for the data buffers */ 27 | #define N_BUFFERS (4) 28 | #define BUFFER_SIZE (8192) 29 | 30 | /* GPIO for the warning LED - active low*/ 31 | #define WARN_GPIO 5 32 | 33 | /* Which UART is the GPS module on? */ 34 | #define GPS_UART_NUM UART_NUM_2 35 | #define GPS_UART_RX_PIN (22) 36 | #define GPS_UART_TX_PIN (23) 37 | #define GPS_UART_RTS_PIN (21) 38 | #define GPS_UART_CTS_PIN (35) 39 | 40 | The serial port parameters are set using constants for configuring the port: 41 | 42 | uart_config_t uart_config = { 43 | .baud_rate = 9600, 44 | .data_bits = UART_DATA_8_BITS, 45 | .parity = UART_PARITY_DISABLE, 46 | .stop_bits = UART_STOP_BITS_1, 47 | .flow_ctrl = UART_HW_FLOWCTRL_DISABLE 48 | }; 49 | 50 | The file name is set with: 51 | 52 | #define FILENAME "gps_log.txt" 53 | 54 | Hope it may be of some use to you. 55 | -------------------------------------------------------------------------------- /main/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # "main" pseudo-component makefile. 3 | # 4 | # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) 5 | -------------------------------------------------------------------------------- /main/gps_logger.c: -------------------------------------------------------------------------------- 1 | /*************************************** 2 | * gps_logger.c 3 | * 4 | * Author: Mike Field 5 | * 6 | * This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 7 | * CONDITIONS OF ANY KIND, either express or implied. 8 | * 9 | * It is mostly cobbled togeather from ESP-LDF example code 10 | * 11 | */ 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "esp_err.h" 19 | #include "esp_log.h" 20 | #include "esp_vfs_fat.h" 21 | #include "sdmmc_cmd.h" 22 | #include "freertos/FreeRTOS.h" 23 | #include "freertos/task.h" 24 | #include "freertos/queue.h" 25 | #include "driver/uart.h" 26 | #include "driver/gpio.h" 27 | #include "driver/sdmmc_host.h" 28 | #include "driver/sdspi_host.h" 29 | #include "sdkconfig.h" 30 | #include "esp_log.h" 31 | 32 | static const char *TAG = "gps_logger"; 33 | 34 | /* Parameters for the SD card */ 35 | #define PIN_NUM_MISO 2 36 | #define PIN_NUM_MOSI 15 37 | #define PIN_NUM_CLK 14 38 | #define PIN_NUM_CS 13 39 | 40 | /* Parameters for the data buffers */ 41 | #define N_BUFFERS (4) 42 | #define BUFFER_SIZE (8192) 43 | 44 | /* GPIO for the warning LED - active low*/ 45 | #define WARN_GPIO 5 46 | 47 | /* Which UART is the GPS module on? */ 48 | #define GPS_UART_NUM UART_NUM_2 49 | #define GPS_UART_RX_PIN (22) 50 | #define GPS_UART_TX_PIN (23) 51 | #define GPS_UART_RTS_PIN (21) 52 | #define GPS_UART_CTS_PIN (35) 53 | #define UART_BUF_SIZE (128) 54 | 55 | #define FILENAME "gps_log.txt" 56 | 57 | static uint8_t buffers[N_BUFFERS][BUFFER_SIZE]; 58 | volatile static uint8_t current_buffer = 0; 59 | volatile static uint8_t next_buffer_to_write = 0; 60 | volatile static uint8_t seconds_to_write = 0; 61 | volatile static uint32_t used_in_current_buffer = 0; 62 | static QueueHandle_t uart0_queue; 63 | 64 | 65 | void warning_led_set() { 66 | /* Configure the IOMUX register for pad BLINK_GPIO (some pads are 67 | * muxed to GPIO on reset already, but some default to other 68 | * functions and need to be switched to GPIO. Consult the 69 | * Technical Reference for a list of pads and their default 70 | * functions.) 71 | * */ 72 | gpio_pad_select_gpio(WARN_GPIO); 73 | /* Set the GPIO as a push/pull output */ 74 | gpio_set_direction(WARN_GPIO, GPIO_MODE_OUTPUT); 75 | gpio_set_level(WARN_GPIO, 0); 76 | } 77 | 78 | void warning_led_unset() { 79 | gpio_set_level(WARN_GPIO, 1); 80 | gpio_set_direction(WARN_GPIO, GPIO_MODE_INPUT); 81 | } 82 | 83 | int write_out_any_buffers(void) 84 | { 85 | ESP_LOGI(TAG, "Initializing SD card"); 86 | 87 | ESP_LOGI(TAG, "Using SDMMC peripheral"); 88 | sdmmc_host_t host = SDMMC_HOST_DEFAULT(); 89 | sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT(); 90 | gpio_set_pull_mode(15, GPIO_PULLUP_ONLY); // CMD, needed in 4- and 1- line modes 91 | gpio_set_pull_mode( 2, GPIO_PULLUP_ONLY); // D0, needed in 4- and 1-line modes 92 | gpio_set_pull_mode( 4, GPIO_PULLUP_ONLY); // D1, needed in 4-line mode only 93 | gpio_set_pull_mode(12, GPIO_PULLUP_ONLY); // D2, needed in 4-line mode only 94 | gpio_set_pull_mode(13, GPIO_PULLUP_ONLY); // D3, needed in 4- and 1-line modes 95 | 96 | esp_vfs_fat_sdmmc_mount_config_t mount_config = { 97 | .format_if_mount_failed = false, 98 | .max_files = 5, 99 | .allocation_unit_size = 16 * 1024 100 | }; 101 | 102 | sdmmc_card_t* card; 103 | esp_err_t ret = esp_vfs_fat_sdmmc_mount("/sdcard", &host, &slot_config, &mount_config, &card); 104 | 105 | if (ret != ESP_OK) { 106 | if (ret == ESP_FAIL) { 107 | ESP_LOGE(TAG, "Failed to mount filesystem. " 108 | "If you want the card to be formatted, set format_if_mount_failed = true."); 109 | } else { 110 | ESP_LOGE(TAG, "Failed to initialize the card (%s). " 111 | "Make sure SD card lines have pull-up resistors in place.", esp_err_to_name(ret)); 112 | } 113 | return 0; 114 | } 115 | 116 | FILE* f = fopen("/sdcard/" FILENAME, "a"); 117 | if(f == NULL) { 118 | FILE* f = fopen("/sdcard/" FILENAME, "w"); 119 | if (f == NULL) { 120 | ESP_LOGE(TAG, "Failed to open file for writing"); 121 | return 0; 122 | } 123 | ESP_LOGI(TAG, "Created new file"); 124 | } else { 125 | ESP_LOGI(TAG, "Opening file"); 126 | } 127 | /* Attempt to write out any full buffers */ 128 | while(next_buffer_to_write != current_buffer) { 129 | if(fwrite(buffers[next_buffer_to_write], BUFFER_SIZE, 1, f)!=1) { 130 | ESP_LOGI(TAG, "Write error"); 131 | break; 132 | } 133 | next_buffer_to_write++; 134 | if(next_buffer_to_write == N_BUFFERS) { 135 | next_buffer_to_write = 0; 136 | } 137 | } 138 | ESP_LOGI(TAG, "Closing file"); 139 | fclose(f); 140 | 141 | // All done, unmount partition and disable SDMMC or SPI peripheral 142 | esp_vfs_fat_sdmmc_unmount(); 143 | return 1; 144 | } 145 | 146 | static void uart_event_task(void *pvParameters) 147 | { 148 | int left_to_read; 149 | uart_event_t event; 150 | for(;;) { 151 | //Waiting for UART event. 152 | if(xQueueReceive(uart0_queue, (void * )&event, (portTickType)portMAX_DELAY)) { 153 | switch(event.type) { 154 | //Event of UART receving data 155 | /*We'd better handler data event fast, there would be much more data events than 156 | other types of events. If we take too much time on data event, the queue might 157 | be full.*/ 158 | case UART_DATA: 159 | ESP_LOGI(TAG, "[UART DATA]: %d", event.size); 160 | left_to_read = event.size; 161 | while(left_to_read > 0) { 162 | int amount_to_read = BUFFER_SIZE - used_in_current_buffer; 163 | if(amount_to_read > left_to_read) 164 | amount_to_read = left_to_read; 165 | uart_read_bytes(GPS_UART_NUM, buffers[current_buffer]+used_in_current_buffer, amount_to_read, portMAX_DELAY); 166 | left_to_read -= amount_to_read; 167 | 168 | used_in_current_buffer += amount_to_read; 169 | 170 | /* Is the current buffer full */ 171 | if(used_in_current_buffer == BUFFER_SIZE) { 172 | int next_buffer; 173 | /* Move onto next buffer */ 174 | next_buffer = current_buffer; 175 | next_buffer++; 176 | if(next_buffer == N_BUFFERS) 177 | next_buffer = 0; 178 | 179 | if(next_buffer == next_buffer_to_write) { 180 | ESP_LOGI(TAG, "Overrun the buffers - please insert an SD card"); 181 | } else { 182 | current_buffer = next_buffer; 183 | } 184 | used_in_current_buffer = 0; 185 | } 186 | } 187 | break; 188 | //Event of HW FIFO overflow detected 189 | case UART_FIFO_OVF: 190 | ESP_LOGI(TAG, "hw fifo overflow"); 191 | uart_flush_input(GPS_UART_NUM); 192 | xQueueReset(uart0_queue); 193 | break; 194 | //Event of UART ring buffer full 195 | case UART_BUFFER_FULL: 196 | ESP_LOGI(TAG, "ring buffer full"); 197 | uart_flush_input(GPS_UART_NUM); 198 | xQueueReset(uart0_queue); 199 | break; 200 | //Event of UART RX break detected 201 | case UART_BREAK: 202 | ESP_LOGI(TAG, "uart rx break"); 203 | break; 204 | //Event of UART parity check error 205 | case UART_PARITY_ERR: 206 | ESP_LOGI(TAG, "uart parity error"); 207 | break; 208 | //Event of UART frame error 209 | case UART_FRAME_ERR: 210 | ESP_LOGI(TAG, "uart frame error"); 211 | break; 212 | //UART_PATTERN_DET 213 | case UART_PATTERN_DET: 214 | ESP_LOGI(TAG, "[UART PATTERN DETECTED]"); 215 | uart_flush_input(GPS_UART_NUM); 216 | break; 217 | default: 218 | ESP_LOGI(TAG, "uart event type: %d", event.type); 219 | break; 220 | } 221 | } 222 | } 223 | /* Should never get here */ 224 | vTaskDelete(NULL); 225 | } 226 | 227 | static void config_gps_uart(void) { 228 | uart_config_t uart_config = { 229 | .baud_rate = 9600, 230 | .data_bits = UART_DATA_8_BITS, 231 | .parity = UART_PARITY_DISABLE, 232 | .stop_bits = UART_STOP_BITS_1, 233 | .flow_ctrl = UART_HW_FLOWCTRL_DISABLE 234 | }; 235 | uart_param_config(GPS_UART_NUM, &uart_config); 236 | //Set UART pins (using UART0 default pins ie no changes.) 237 | uart_set_pin(GPS_UART_NUM, GPS_UART_RX_PIN, GPS_UART_TX_PIN, GPS_UART_RTS_PIN, GPS_UART_CTS_PIN); 238 | //Install UART driver, and get the queue. 239 | uart_driver_install(GPS_UART_NUM, UART_BUF_SIZE * 2, UART_BUF_SIZE * 2, 20, &uart0_queue, 0); 240 | //Create a task to handler UART event from ISR 241 | xTaskCreate(uart_event_task, "uart_event_task", 2048, NULL, 12, NULL); 242 | } 243 | 244 | void app_main(void) 245 | { 246 | ESP_LOGI(TAG, "Configuring UART"); 247 | config_gps_uart(); 248 | 249 | ESP_LOGI(TAG, "Starting collecting data"); 250 | while(1) { 251 | sleep(1); 252 | /* We use new lines from the GPS to act as a rough timer */ 253 | if(seconds_to_write == 1) { 254 | if(write_out_any_buffers()) { 255 | seconds_to_write = 0; 256 | } else { 257 | seconds_to_write = 20; 258 | } 259 | warning_led_unset(); 260 | } else if(seconds_to_write > 0) { 261 | if(seconds_to_write == 5) 262 | warning_led_set(); 263 | seconds_to_write--; 264 | } 265 | /* Do we need to set up for the next write */ 266 | if(current_buffer != next_buffer_to_write && seconds_to_write == 0) 267 | seconds_to_write = 10; 268 | } 269 | } 270 | 271 | -------------------------------------------------------------------------------- /sdkconfig: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated file; DO NOT EDIT. 3 | # Espressif IoT Development Framework Configuration 4 | # 5 | 6 | # 7 | # SDK tool configuration 8 | # 9 | CONFIG_TOOLPREFIX="xtensa-esp32-elf-" 10 | CONFIG_PYTHON="python" 11 | CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=y 12 | 13 | # 14 | # Bootloader config 15 | # 16 | CONFIG_LOG_BOOTLOADER_LEVEL_NONE= 17 | CONFIG_LOG_BOOTLOADER_LEVEL_ERROR= 18 | CONFIG_LOG_BOOTLOADER_LEVEL_WARN= 19 | CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y 20 | CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG= 21 | CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE= 22 | CONFIG_LOG_BOOTLOADER_LEVEL=3 23 | CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V= 24 | CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y 25 | CONFIG_BOOTLOADER_FACTORY_RESET= 26 | CONFIG_BOOTLOADER_APP_TEST= 27 | 28 | # 29 | # Security features 30 | # 31 | CONFIG_SECURE_BOOT_ENABLED= 32 | CONFIG_FLASH_ENCRYPTION_ENABLED= 33 | 34 | # 35 | # Serial flasher config 36 | # 37 | CONFIG_ESPTOOLPY_PORT="/dev/ttyUSB0" 38 | CONFIG_ESPTOOLPY_BAUD_115200B=y 39 | CONFIG_ESPTOOLPY_BAUD_230400B= 40 | CONFIG_ESPTOOLPY_BAUD_921600B= 41 | CONFIG_ESPTOOLPY_BAUD_2MB= 42 | CONFIG_ESPTOOLPY_BAUD_OTHER= 43 | CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 44 | CONFIG_ESPTOOLPY_BAUD=115200 45 | CONFIG_ESPTOOLPY_COMPRESSED=y 46 | CONFIG_FLASHMODE_QIO= 47 | CONFIG_FLASHMODE_QOUT= 48 | CONFIG_FLASHMODE_DIO=y 49 | CONFIG_FLASHMODE_DOUT= 50 | CONFIG_ESPTOOLPY_FLASHMODE="dio" 51 | CONFIG_ESPTOOLPY_FLASHFREQ_80M= 52 | CONFIG_ESPTOOLPY_FLASHFREQ_40M=y 53 | CONFIG_ESPTOOLPY_FLASHFREQ_26M= 54 | CONFIG_ESPTOOLPY_FLASHFREQ_20M= 55 | CONFIG_ESPTOOLPY_FLASHFREQ="40m" 56 | CONFIG_ESPTOOLPY_FLASHSIZE_1MB= 57 | CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y 58 | CONFIG_ESPTOOLPY_FLASHSIZE_4MB= 59 | CONFIG_ESPTOOLPY_FLASHSIZE_8MB= 60 | CONFIG_ESPTOOLPY_FLASHSIZE_16MB= 61 | CONFIG_ESPTOOLPY_FLASHSIZE="2MB" 62 | CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y 63 | CONFIG_ESPTOOLPY_BEFORE_RESET=y 64 | CONFIG_ESPTOOLPY_BEFORE_NORESET= 65 | CONFIG_ESPTOOLPY_BEFORE="default_reset" 66 | CONFIG_ESPTOOLPY_AFTER_RESET=y 67 | CONFIG_ESPTOOLPY_AFTER_NORESET= 68 | CONFIG_ESPTOOLPY_AFTER="hard_reset" 69 | CONFIG_MONITOR_BAUD_9600B= 70 | CONFIG_MONITOR_BAUD_57600B= 71 | CONFIG_MONITOR_BAUD_115200B=y 72 | CONFIG_MONITOR_BAUD_230400B= 73 | CONFIG_MONITOR_BAUD_921600B= 74 | CONFIG_MONITOR_BAUD_2MB= 75 | CONFIG_MONITOR_BAUD_OTHER= 76 | CONFIG_MONITOR_BAUD_OTHER_VAL=115200 77 | CONFIG_MONITOR_BAUD=115200 78 | 79 | # 80 | # Partition Table 81 | # 82 | CONFIG_PARTITION_TABLE_SINGLE_APP=y 83 | CONFIG_PARTITION_TABLE_TWO_OTA= 84 | CONFIG_PARTITION_TABLE_CUSTOM= 85 | CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" 86 | CONFIG_PARTITION_TABLE_CUSTOM_APP_BIN_OFFSET=0x10000 87 | CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" 88 | CONFIG_APP_OFFSET=0x10000 89 | CONFIG_PARTITION_TABLE_MD5=y 90 | 91 | # 92 | # Compiler options 93 | # 94 | CONFIG_OPTIMIZATION_LEVEL_DEBUG=y 95 | CONFIG_OPTIMIZATION_LEVEL_RELEASE= 96 | CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y 97 | CONFIG_OPTIMIZATION_ASSERTIONS_SILENT= 98 | CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED= 99 | CONFIG_CXX_EXCEPTIONS= 100 | CONFIG_STACK_CHECK_NONE=y 101 | CONFIG_STACK_CHECK_NORM= 102 | CONFIG_STACK_CHECK_STRONG= 103 | CONFIG_STACK_CHECK_ALL= 104 | CONFIG_STACK_CHECK= 105 | CONFIG_WARN_WRITE_STRINGS= 106 | 107 | # 108 | # Component config 109 | # 110 | 111 | # 112 | # Application Level Tracing 113 | # 114 | CONFIG_ESP32_APPTRACE_DEST_TRAX= 115 | CONFIG_ESP32_APPTRACE_DEST_NONE=y 116 | CONFIG_ESP32_APPTRACE_ENABLE= 117 | CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y 118 | CONFIG_AWS_IOT_SDK= 119 | 120 | # 121 | # Bluetooth 122 | # 123 | CONFIG_BT_ENABLED= 124 | CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0 125 | CONFIG_BT_RESERVE_DRAM=0 126 | 127 | # 128 | # ADC configuration 129 | # 130 | CONFIG_ADC_FORCE_XPD_FSM= 131 | CONFIG_ADC2_DISABLE_DAC=y 132 | 133 | # 134 | # ESP32-specific 135 | # 136 | CONFIG_ESP32_DEFAULT_CPU_FREQ_80= 137 | CONFIG_ESP32_DEFAULT_CPU_FREQ_160=y 138 | CONFIG_ESP32_DEFAULT_CPU_FREQ_240= 139 | CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=160 140 | CONFIG_SPIRAM_SUPPORT= 141 | CONFIG_MEMMAP_TRACEMEM= 142 | CONFIG_MEMMAP_TRACEMEM_TWOBANKS= 143 | CONFIG_ESP32_TRAX= 144 | CONFIG_TRACEMEM_RESERVE_DRAM=0x0 145 | CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH= 146 | CONFIG_ESP32_ENABLE_COREDUMP_TO_UART= 147 | CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y 148 | CONFIG_ESP32_ENABLE_COREDUMP= 149 | CONFIG_TWO_UNIVERSAL_MAC_ADDRESS= 150 | CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y 151 | CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 152 | CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 153 | CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 154 | CONFIG_MAIN_TASK_STACK_SIZE=3584 155 | CONFIG_IPC_TASK_STACK_SIZE=1024 156 | CONFIG_TIMER_TASK_STACK_SIZE=3584 157 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y 158 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF= 159 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR= 160 | CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF= 161 | CONFIG_NEWLIB_STDIN_LINE_ENDING_LF= 162 | CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y 163 | CONFIG_NEWLIB_NANO_FORMAT= 164 | CONFIG_CONSOLE_UART_DEFAULT=y 165 | CONFIG_CONSOLE_UART_CUSTOM= 166 | CONFIG_CONSOLE_UART_NONE= 167 | CONFIG_CONSOLE_UART_NUM=0 168 | CONFIG_CONSOLE_UART_BAUDRATE=115200 169 | CONFIG_ULP_COPROC_ENABLED= 170 | CONFIG_ULP_COPROC_RESERVE_MEM=0 171 | CONFIG_ESP32_PANIC_PRINT_HALT= 172 | CONFIG_ESP32_PANIC_PRINT_REBOOT=y 173 | CONFIG_ESP32_PANIC_SILENT_REBOOT= 174 | CONFIG_ESP32_PANIC_GDBSTUB= 175 | CONFIG_ESP32_DEBUG_OCDAWARE=y 176 | CONFIG_ESP32_DEBUG_STUBS_ENABLE=y 177 | CONFIG_INT_WDT=y 178 | CONFIG_INT_WDT_TIMEOUT_MS=300 179 | CONFIG_INT_WDT_CHECK_CPU1=y 180 | CONFIG_TASK_WDT=y 181 | CONFIG_TASK_WDT_PANIC= 182 | CONFIG_TASK_WDT_TIMEOUT_S=5 183 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y 184 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y 185 | CONFIG_BROWNOUT_DET=y 186 | CONFIG_BROWNOUT_DET_LVL_SEL_0=y 187 | CONFIG_BROWNOUT_DET_LVL_SEL_1= 188 | CONFIG_BROWNOUT_DET_LVL_SEL_2= 189 | CONFIG_BROWNOUT_DET_LVL_SEL_3= 190 | CONFIG_BROWNOUT_DET_LVL_SEL_4= 191 | CONFIG_BROWNOUT_DET_LVL_SEL_5= 192 | CONFIG_BROWNOUT_DET_LVL_SEL_6= 193 | CONFIG_BROWNOUT_DET_LVL_SEL_7= 194 | CONFIG_BROWNOUT_DET_LVL=0 195 | CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y 196 | CONFIG_ESP32_TIME_SYSCALL_USE_RTC= 197 | CONFIG_ESP32_TIME_SYSCALL_USE_FRC1= 198 | CONFIG_ESP32_TIME_SYSCALL_USE_NONE= 199 | CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y 200 | CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL= 201 | CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024 202 | CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000 203 | CONFIG_ESP32_XTAL_FREQ_40=y 204 | CONFIG_ESP32_XTAL_FREQ_26= 205 | CONFIG_ESP32_XTAL_FREQ_AUTO= 206 | CONFIG_ESP32_XTAL_FREQ=40 207 | CONFIG_DISABLE_BASIC_ROM_CONSOLE= 208 | CONFIG_NO_BLOBS= 209 | CONFIG_ESP_TIMER_PROFILING= 210 | CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS= 211 | CONFIG_ESP_ERR_TO_NAME_LOOKUP=y 212 | 213 | # 214 | # Wi-Fi 215 | # 216 | CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 217 | CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 218 | CONFIG_ESP32_WIFI_STATIC_TX_BUFFER= 219 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y 220 | CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 221 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32 222 | CONFIG_ESP32_WIFI_CSI_ENABLED= 223 | CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y 224 | CONFIG_ESP32_WIFI_TX_BA_WIN=6 225 | CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y 226 | CONFIG_ESP32_WIFI_RX_BA_WIN=6 227 | CONFIG_ESP32_WIFI_NVS_ENABLED=y 228 | CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y 229 | CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1= 230 | 231 | # 232 | # PHY 233 | # 234 | CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y 235 | CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION= 236 | CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 237 | CONFIG_ESP32_PHY_MAX_TX_POWER=20 238 | 239 | # 240 | # Power Management 241 | # 242 | CONFIG_PM_ENABLE= 243 | 244 | # 245 | # ADC-Calibration 246 | # 247 | CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y 248 | CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y 249 | CONFIG_ADC_CAL_LUT_ENABLE=y 250 | 251 | # 252 | # ESP HTTP client 253 | # 254 | CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y 255 | 256 | # 257 | # Ethernet 258 | # 259 | CONFIG_DMA_RX_BUF_NUM=10 260 | CONFIG_DMA_TX_BUF_NUM=10 261 | CONFIG_EMAC_L2_TO_L3_RX_BUF_MODE= 262 | CONFIG_EMAC_TASK_PRIORITY=20 263 | 264 | # 265 | # FAT Filesystem support 266 | # 267 | CONFIG_FATFS_CODEPAGE_DYNAMIC= 268 | CONFIG_FATFS_CODEPAGE_437=y 269 | CONFIG_FATFS_CODEPAGE_720= 270 | CONFIG_FATFS_CODEPAGE_737= 271 | CONFIG_FATFS_CODEPAGE_771= 272 | CONFIG_FATFS_CODEPAGE_775= 273 | CONFIG_FATFS_CODEPAGE_850= 274 | CONFIG_FATFS_CODEPAGE_852= 275 | CONFIG_FATFS_CODEPAGE_855= 276 | CONFIG_FATFS_CODEPAGE_857= 277 | CONFIG_FATFS_CODEPAGE_860= 278 | CONFIG_FATFS_CODEPAGE_861= 279 | CONFIG_FATFS_CODEPAGE_862= 280 | CONFIG_FATFS_CODEPAGE_863= 281 | CONFIG_FATFS_CODEPAGE_864= 282 | CONFIG_FATFS_CODEPAGE_865= 283 | CONFIG_FATFS_CODEPAGE_866= 284 | CONFIG_FATFS_CODEPAGE_869= 285 | CONFIG_FATFS_CODEPAGE_932= 286 | CONFIG_FATFS_CODEPAGE_936= 287 | CONFIG_FATFS_CODEPAGE_949= 288 | CONFIG_FATFS_CODEPAGE_950= 289 | CONFIG_FATFS_CODEPAGE=437 290 | CONFIG_FATFS_LFN_NONE=y 291 | CONFIG_FATFS_LFN_HEAP= 292 | CONFIG_FATFS_LFN_STACK= 293 | CONFIG_FATFS_FS_LOCK=0 294 | CONFIG_FATFS_TIMEOUT_MS=10000 295 | CONFIG_FATFS_PER_FILE_CACHE=y 296 | 297 | # 298 | # FreeRTOS 299 | # 300 | CONFIG_FREERTOS_UNICORE= 301 | CONFIG_FREERTOS_CORETIMER_0=y 302 | CONFIG_FREERTOS_CORETIMER_1= 303 | CONFIG_FREERTOS_HZ=100 304 | CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y 305 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE= 306 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL= 307 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y 308 | CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK= 309 | CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y 310 | CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 311 | CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y 312 | CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE= 313 | CONFIG_FREERTOS_ASSERT_DISABLE= 314 | CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 315 | CONFIG_FREERTOS_ISR_STACKSIZE=1536 316 | CONFIG_FREERTOS_LEGACY_HOOKS= 317 | CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 318 | CONFIG_SUPPORT_STATIC_ALLOCATION= 319 | CONFIG_TIMER_TASK_PRIORITY=1 320 | CONFIG_TIMER_TASK_STACK_DEPTH=2048 321 | CONFIG_TIMER_QUEUE_LENGTH=10 322 | CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 323 | CONFIG_FREERTOS_USE_TRACE_FACILITY= 324 | CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS= 325 | CONFIG_FREERTOS_DEBUG_INTERNALS= 326 | 327 | # 328 | # Heap memory debugging 329 | # 330 | CONFIG_HEAP_POISONING_DISABLED=y 331 | CONFIG_HEAP_POISONING_LIGHT= 332 | CONFIG_HEAP_POISONING_COMPREHENSIVE= 333 | CONFIG_HEAP_TRACING= 334 | 335 | # 336 | # libsodium 337 | # 338 | CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y 339 | 340 | # 341 | # Log output 342 | # 343 | CONFIG_LOG_DEFAULT_LEVEL_NONE= 344 | CONFIG_LOG_DEFAULT_LEVEL_ERROR= 345 | CONFIG_LOG_DEFAULT_LEVEL_WARN= 346 | CONFIG_LOG_DEFAULT_LEVEL_INFO=y 347 | CONFIG_LOG_DEFAULT_LEVEL_DEBUG= 348 | CONFIG_LOG_DEFAULT_LEVEL_VERBOSE= 349 | CONFIG_LOG_DEFAULT_LEVEL=3 350 | CONFIG_LOG_COLORS=y 351 | 352 | # 353 | # LWIP 354 | # 355 | CONFIG_L2_TO_L3_COPY= 356 | CONFIG_LWIP_IRAM_OPTIMIZATION= 357 | CONFIG_LWIP_MAX_SOCKETS=10 358 | CONFIG_USE_ONLY_LWIP_SELECT= 359 | CONFIG_LWIP_SO_REUSE=y 360 | CONFIG_LWIP_SO_REUSE_RXTOALL=y 361 | CONFIG_LWIP_SO_RCVBUF= 362 | CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 363 | CONFIG_LWIP_IP_FRAG= 364 | CONFIG_LWIP_IP_REASSEMBLY= 365 | CONFIG_LWIP_STATS= 366 | CONFIG_LWIP_ETHARP_TRUST_IP_MAC=y 367 | CONFIG_TCPIP_RECVMBOX_SIZE=32 368 | CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y 369 | 370 | # 371 | # DHCP server 372 | # 373 | CONFIG_LWIP_DHCPS_LEASE_UNIT=60 374 | CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 375 | CONFIG_LWIP_AUTOIP= 376 | CONFIG_LWIP_NETIF_LOOPBACK=y 377 | CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 378 | 379 | # 380 | # TCP 381 | # 382 | CONFIG_LWIP_MAX_ACTIVE_TCP=16 383 | CONFIG_LWIP_MAX_LISTENING_TCP=16 384 | CONFIG_TCP_MAXRTX=12 385 | CONFIG_TCP_SYNMAXRTX=6 386 | CONFIG_TCP_MSS=1436 387 | CONFIG_TCP_MSL=60000 388 | CONFIG_TCP_SND_BUF_DEFAULT=5744 389 | CONFIG_TCP_WND_DEFAULT=5744 390 | CONFIG_TCP_RECVMBOX_SIZE=6 391 | CONFIG_TCP_QUEUE_OOSEQ=y 392 | CONFIG_TCP_OVERSIZE_MSS=y 393 | CONFIG_TCP_OVERSIZE_QUARTER_MSS= 394 | CONFIG_TCP_OVERSIZE_DISABLE= 395 | 396 | # 397 | # UDP 398 | # 399 | CONFIG_LWIP_MAX_UDP_PCBS=16 400 | CONFIG_UDP_RECVMBOX_SIZE=6 401 | CONFIG_TCPIP_TASK_STACK_SIZE=2048 402 | CONFIG_PPP_SUPPORT= 403 | 404 | # 405 | # ICMP 406 | # 407 | CONFIG_LWIP_MULTICAST_PING= 408 | CONFIG_LWIP_BROADCAST_PING= 409 | 410 | # 411 | # LWIP RAW API 412 | # 413 | CONFIG_LWIP_MAX_RAW_PCBS=16 414 | 415 | # 416 | # mbedTLS 417 | # 418 | CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384 419 | CONFIG_MBEDTLS_DEBUG= 420 | CONFIG_MBEDTLS_HARDWARE_AES=y 421 | CONFIG_MBEDTLS_HARDWARE_MPI= 422 | CONFIG_MBEDTLS_HARDWARE_SHA= 423 | CONFIG_MBEDTLS_HAVE_TIME=y 424 | CONFIG_MBEDTLS_HAVE_TIME_DATE= 425 | CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y 426 | CONFIG_MBEDTLS_TLS_SERVER_ONLY= 427 | CONFIG_MBEDTLS_TLS_CLIENT_ONLY= 428 | CONFIG_MBEDTLS_TLS_DISABLED= 429 | CONFIG_MBEDTLS_TLS_SERVER=y 430 | CONFIG_MBEDTLS_TLS_CLIENT=y 431 | CONFIG_MBEDTLS_TLS_ENABLED=y 432 | 433 | # 434 | # TLS Key Exchange Methods 435 | # 436 | CONFIG_MBEDTLS_PSK_MODES= 437 | CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y 438 | CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y 439 | CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y 440 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y 441 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y 442 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y 443 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y 444 | CONFIG_MBEDTLS_SSL_RENEGOTIATION=y 445 | CONFIG_MBEDTLS_SSL_PROTO_SSL3= 446 | CONFIG_MBEDTLS_SSL_PROTO_TLS1=y 447 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y 448 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y 449 | CONFIG_MBEDTLS_SSL_PROTO_DTLS= 450 | CONFIG_MBEDTLS_SSL_ALPN=y 451 | CONFIG_MBEDTLS_SSL_SESSION_TICKETS=y 452 | 453 | # 454 | # Symmetric Ciphers 455 | # 456 | CONFIG_MBEDTLS_AES_C=y 457 | CONFIG_MBEDTLS_CAMELLIA_C= 458 | CONFIG_MBEDTLS_DES_C= 459 | CONFIG_MBEDTLS_RC4_DISABLED=y 460 | CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT= 461 | CONFIG_MBEDTLS_RC4_ENABLED= 462 | CONFIG_MBEDTLS_BLOWFISH_C= 463 | CONFIG_MBEDTLS_XTEA_C= 464 | CONFIG_MBEDTLS_CCM_C=y 465 | CONFIG_MBEDTLS_GCM_C=y 466 | CONFIG_MBEDTLS_RIPEMD160_C= 467 | 468 | # 469 | # Certificates 470 | # 471 | CONFIG_MBEDTLS_PEM_PARSE_C=y 472 | CONFIG_MBEDTLS_PEM_WRITE_C=y 473 | CONFIG_MBEDTLS_X509_CRL_PARSE_C=y 474 | CONFIG_MBEDTLS_X509_CSR_PARSE_C=y 475 | CONFIG_MBEDTLS_ECP_C=y 476 | CONFIG_MBEDTLS_ECDH_C=y 477 | CONFIG_MBEDTLS_ECDSA_C=y 478 | CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y 479 | CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y 480 | CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y 481 | CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y 482 | CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y 483 | CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y 484 | CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y 485 | CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y 486 | CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y 487 | CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y 488 | CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y 489 | CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y 490 | CONFIG_MBEDTLS_ECP_NIST_OPTIM=y 491 | 492 | # 493 | # OpenSSL 494 | # 495 | CONFIG_OPENSSL_DEBUG= 496 | CONFIG_OPENSSL_ASSERT_DO_NOTHING=y 497 | CONFIG_OPENSSL_ASSERT_EXIT= 498 | 499 | # 500 | # PThreads 501 | # 502 | CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 503 | CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 504 | 505 | # 506 | # SPI Flash driver 507 | # 508 | CONFIG_SPI_FLASH_VERIFY_WRITE= 509 | CONFIG_SPI_FLASH_ENABLE_COUNTERS= 510 | CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y 511 | CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y 512 | CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS= 513 | CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED= 514 | 515 | # 516 | # SPIFFS Configuration 517 | # 518 | CONFIG_SPIFFS_MAX_PARTITIONS=3 519 | 520 | # 521 | # SPIFFS Cache Configuration 522 | # 523 | CONFIG_SPIFFS_CACHE=y 524 | CONFIG_SPIFFS_CACHE_WR=y 525 | CONFIG_SPIFFS_CACHE_STATS= 526 | CONFIG_SPIFFS_PAGE_CHECK=y 527 | CONFIG_SPIFFS_GC_MAX_RUNS=10 528 | CONFIG_SPIFFS_GC_STATS= 529 | CONFIG_SPIFFS_PAGE_SIZE=256 530 | CONFIG_SPIFFS_OBJ_NAME_LEN=32 531 | CONFIG_SPIFFS_USE_MAGIC=y 532 | CONFIG_SPIFFS_USE_MAGIC_LENGTH=y 533 | CONFIG_SPIFFS_META_LENGTH=4 534 | CONFIG_SPIFFS_USE_MTIME=y 535 | 536 | # 537 | # Debug Configuration 538 | # 539 | CONFIG_SPIFFS_DBG= 540 | CONFIG_SPIFFS_API_DBG= 541 | CONFIG_SPIFFS_GC_DBG= 542 | CONFIG_SPIFFS_CACHE_DBG= 543 | CONFIG_SPIFFS_CHECK_DBG= 544 | CONFIG_SPIFFS_TEST_VISUALISATION= 545 | 546 | # 547 | # tcpip adapter 548 | # 549 | CONFIG_IP_LOST_TIMER_INTERVAL=120 550 | 551 | # 552 | # Virtual file system 553 | # 554 | CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y 555 | 556 | # 557 | # Wear Levelling 558 | # 559 | CONFIG_WL_SECTOR_SIZE_512= 560 | CONFIG_WL_SECTOR_SIZE_4096=y 561 | CONFIG_WL_SECTOR_SIZE=4096 562 | --------------------------------------------------------------------------------