sdkconfig.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2021 iosabi
3  * SPDX-FileCopyrightText: 2024 Gunar Schorcht
4  * SPDX-License-Identifier: LGPL-2.1-only
5  */
6 
7 #pragma once
8 
28 #ifndef DOXYGEN
29 
30 #include "esp_idf_ver.h"
31 
32 #if defined(CPU_FAM_ESP32)
33 # include "sdkconfig_default_esp32.h"
34 #elif defined(CPU_FAM_ESP32C3)
36 #elif defined(CPU_FAM_ESP32C6)
38 #elif defined(CPU_FAM_ESP32H2)
40 #elif defined(CPU_FAM_ESP32S2)
42 #elif defined(CPU_FAM_ESP32S3)
44 #else
45 # error "ESP32x family implementation missing"
46 #endif
47 
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
54 #define CONFIG_BOOTLOADER_PROJECT_VER 1
55 
56 #if MODULE_ESP_LOG_COLORED
57 # define CONFIG_BOOTLOADER_LOG_COLORS 1
58 #endif
59 
60 #ifndef CONFIG_BOOTLOADER_LOG_LEVEL
61 /*
62  * SDK Log levels:
63  *
64  * 0 = NONE
65  * 1 = ERROR
66  * 2 = WARN
67  * 3 = INFO
68  * 4 = DEBUG
69  * 5 = VERBOSE
70  */
71 # if MODULE_ESP_LOG_STARTUP
72 # define CONFIG_BOOTLOADER_LOG_LEVEL 3 /* INFO */
73 # else
74 # define CONFIG_BOOTLOADER_LOG_LEVEL 0 /* NONE */
75 # endif
76 #endif
77 
81 #if !defined(CONFIG_FLASHMODE_DOUT) && \
82  !defined(CONFIG_FLASHMODE_DIO) && \
83  !defined(CONFIG_FLASHMODE_QOUT) && \
84  !defined(CONFIG_FLASHMODE_QIO)
85 # error "Flash mode not configured"
86 #endif
87 
88 /*
89  * Bootloader output baudrate, defined by the app settings as BAUD or
90  * BOOTLOADER_BAUD.
91  */
92 #define CONFIG_ESP_CONSOLE_UART_BAUDRATE (RIOT_BOOTLOADER_BAUD)
93 
94 /*
95  * If custom TX and RX are defined, use custom UART configuration for 2nd stage
96  * bootloader.
97  */
98 #if defined(CONFIG_CONSOLE_UART_TX) && defined(CONFIG_CONSOLE_UART_RX)
99 # define CONFIG_ESP_CONSOLE_UART_CUSTOM 1
100 # define CONFIG_ESP_CONSOLE_UART_TX_GPIO CONFIG_CONSOLE_UART_TX
101 # define CONFIG_ESP_CONSOLE_UART_RX_GPIO CONFIG_CONSOLE_UART_RX
102 #else
103 # define CONFIG_ESP_CONSOLE_UART_DEFAULT 1
104 #endif
105 
106 #if defined(CONFIG_CONSOLE_UART_NUM)
107 # define CONFIG_ESP_CONSOLE_UART_NUM CONFIG_CONSOLE_UART_NUM
108 #else
109 # define CONFIG_ESP_CONSOLE_UART_NUM 0
110 #endif
111 
112 #define CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM CONFIG_ESP_CONSOLE_UART_NUM
113 
114 #define CONFIG_LOG_TAG_LEVEL_IMPL_CACHE_AND_LINKED_LIST 1
115 
116 #ifdef __cplusplus
117 }
118 #endif
119 
120 #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.