Loading...
Searching...
No Matches
sdkconfig.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 iosabi
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
27#ifndef SDKCONFIG_H
28#define SDKCONFIG_H
29
30#ifndef DOXYGEN
31
32#include "esp_idf_ver.h"
33
34#if defined(CPU_FAM_ESP32)
36#elif defined(CPU_FAM_ESP32C3)
38#elif defined(CPU_FAM_ESP32S2)
40#elif defined(CPU_FAM_ESP32S3)
42#else
43#error "ESP32x family implementation missing"
44#endif
45
47
48#ifdef __cplusplus
49extern "C" {
50#endif
51
52#if MODULE_ESP_LOG_COLORED
53#define CONFIG_LOG_COLORS 1
54#endif
55
56#ifndef CONFIG_BOOTLOADER_LOG_LEVEL
57/*
58 * SDK Log levels:
59 *
60 * 0 = NONE
61 * 1 = ERROR
62 * 2 = WARN
63 * 3 = INFO
64 * 4 = DEBUG
65 * 5 = VERBOSE
66 */
67#if MODULE_ESP_LOG_STARTUP
68#define CONFIG_BOOTLOADER_LOG_LEVEL 3 /* INFO */
69#else
70#define CONFIG_BOOTLOADER_LOG_LEVEL 0 /* NONE */
71#endif
72#endif
73
77#if !defined(CONFIG_FLASHMODE_DOUT) && \
78 !defined(CONFIG_FLASHMODE_DIO) && \
79 !defined(CONFIG_FLASHMODE_QOUT) && \
80 !defined(CONFIG_FLASHMODE_QIO)
81#error "Flash mode not configured"
82#endif
83
84/*
85 * Bootloader output baudrate, defined by the app settings as BAUD or
86 * BOOTLOADER_BAUD.
87 */
88#define CONFIG_ESP_CONSOLE_UART_BAUDRATE (RIOT_BOOTLOADER_BAUD)
89
90/*
91 * If custom TX and RX are defined, use custom UART configuration for 2nd stage
92 * bootloader.
93 */
94#if defined(CONFIG_CONSOLE_UART_TX) && defined(CONFIG_CONSOLE_UART_RX)
95#define CONFIG_ESP_CONSOLE_UART_CUSTOM 1
96#define CONFIG_ESP_CONSOLE_UART_TX_GPIO CONFIG_CONSOLE_UART_TX
97#define CONFIG_ESP_CONSOLE_UART_RX_GPIO CONFIG_CONSOLE_UART_RX
98#else
99#define CONFIG_ESP_CONSOLE_UART_DEFAULT 1
100#endif
101
102#if defined(CONFIG_CONSOLE_UART_NUM)
103#define CONFIG_ESP_CONSOLE_UART_NUM CONFIG_CONSOLE_UART_NUM
104#else
105#define CONFIG_ESP_CONSOLE_UART_NUM 0
106#endif
107
108#ifdef __cplusplus
109}
110#endif
111
112#endif /* DOXYGEN */
115#endif /* SDKCONFIG_H */
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-S2 SoC bootloader.
Default SDK configuration for the ESP32-S3 SoC bootloader.