sdkconfig.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 iosabi
3  * Copyright (C) 2024 Gunar Schorcht
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
10 #pragma once
11 
31 #ifndef DOXYGEN
32 
33 #include "esp_idf_ver.h"
34 
35 #if defined(CPU_FAM_ESP32)
36 # include "sdkconfig_default_esp32.h"
37 #elif defined(CPU_FAM_ESP32C3)
39 #elif defined(CPU_FAM_ESP32C6)
41 #elif defined(CPU_FAM_ESP32H2)
43 #elif defined(CPU_FAM_ESP32S2)
45 #elif defined(CPU_FAM_ESP32S3)
47 #else
48 # error "ESP32x family implementation missing"
49 #endif
50 
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 #define CONFIG_BOOTLOADER_PROJECT_VER 1
58 
59 #if MODULE_ESP_LOG_COLORED
60 # define CONFIG_BOOTLOADER_LOG_COLORS 1
61 #endif
62 
63 #ifndef CONFIG_BOOTLOADER_LOG_LEVEL
64 /*
65  * SDK Log levels:
66  *
67  * 0 = NONE
68  * 1 = ERROR
69  * 2 = WARN
70  * 3 = INFO
71  * 4 = DEBUG
72  * 5 = VERBOSE
73  */
74 # if MODULE_ESP_LOG_STARTUP
75 # define CONFIG_BOOTLOADER_LOG_LEVEL 3 /* INFO */
76 # else
77 # define CONFIG_BOOTLOADER_LOG_LEVEL 0 /* NONE */
78 # endif
79 #endif
80 
84 #if !defined(CONFIG_FLASHMODE_DOUT) && \
85  !defined(CONFIG_FLASHMODE_DIO) && \
86  !defined(CONFIG_FLASHMODE_QOUT) && \
87  !defined(CONFIG_FLASHMODE_QIO)
88 # error "Flash mode not configured"
89 #endif
90 
91 /*
92  * Bootloader output baudrate, defined by the app settings as BAUD or
93  * BOOTLOADER_BAUD.
94  */
95 #define CONFIG_ESP_CONSOLE_UART_BAUDRATE (RIOT_BOOTLOADER_BAUD)
96 
97 /*
98  * If custom TX and RX are defined, use custom UART configuration for 2nd stage
99  * bootloader.
100  */
101 #if defined(CONFIG_CONSOLE_UART_TX) && defined(CONFIG_CONSOLE_UART_RX)
102 # define CONFIG_ESP_CONSOLE_UART_CUSTOM 1
103 # define CONFIG_ESP_CONSOLE_UART_TX_GPIO CONFIG_CONSOLE_UART_TX
104 # define CONFIG_ESP_CONSOLE_UART_RX_GPIO CONFIG_CONSOLE_UART_RX
105 #else
106 # define CONFIG_ESP_CONSOLE_UART_DEFAULT 1
107 #endif
108 
109 #if defined(CONFIG_CONSOLE_UART_NUM)
110 # define CONFIG_ESP_CONSOLE_UART_NUM CONFIG_CONSOLE_UART_NUM
111 #else
112 # define CONFIG_ESP_CONSOLE_UART_NUM 0
113 #endif
114 
115 #define CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM CONFIG_ESP_CONSOLE_UART_NUM
116 
117 #define CONFIG_LOG_TAG_LEVEL_IMPL_CACHE_AND_LINKED_LIST 1
118 
119 #ifdef __cplusplus
120 }
121 #endif
122 
123 #endif /* DOXYGEN */
Default SDK configuration for all ESP32x SoC bootloaders.
Default SDK configuration for the ESP32 SoC bootloader.
Default SDK configuration for the ESP32-C3 SoC bootloader.
Default SDK configuration for the ESP32-C3 SoC bootloader.
Default SDK configuration for the ESP32-C3 SoC bootloader.
Default SDK configuration for the ESP32-S2 SoC bootloader.
Default SDK configuration for the ESP32-S3 SoC bootloader.