Loading...
Searching...
No Matches
cpu_conf.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 Gunar Schorcht
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
22#ifndef CPU_CONF_H
23#define CPU_CONF_H
24
25#if !defined(__ASSEMBLER__)
26#include <stdint.h>
27#endif
28
34#ifdef MODULE_NEWLIB_NANO
35#define THREAD_EXTRA_STACKSIZE (0)
36#else
37#define THREAD_EXTRA_STACKSIZE (512)
38#endif
39
41#define THREAD_EXTRA_STACKSIZE_PRINTF (1536)
42
43#ifndef THREAD_STACKSIZE_DEFAULT
45#define THREAD_STACKSIZE_DEFAULT (2048)
46#endif
47
48#ifndef THREAD_STACKSIZE_IDLE
50#define THREAD_STACKSIZE_IDLE (2048)
51#endif
52
53#ifndef ESP_WIFI_STACKSIZE
55#define ESP_WIFI_STACKSIZE (THREAD_STACKSIZE_DEFAULT + THREAD_EXTRA_STACKSIZE)
56#endif
60#define PRINTF_BUFSIZ 256
61
65#define PUF_SRAM_ATTRIBUTES __attribute__((used, section(".noinit")))
66
75#define CPU_HAS_UNALIGNED_ACCESS 1
76
81#if !DOXYGEN && !defined(__ASSEMBLER__)
82/* start address of flash pages in CPU address space as determined by the linker */
83extern uint8_t _fp_mem_start;
84#endif
85
86#define FLASHPAGE_SIZE (4096U)
87#define FLASHPAGE_WRITE_BLOCK_SIZE (4U)
88#define FLASHPAGE_WRITE_BLOCK_ALIGNMENT (4U)
93#define FLASHPAGE_NUMOF (CONFIG_ESP_FLASHPAGE_CAPACITY / FLASHPAGE_SIZE)
94
98#define CPU_FLASH_BASE ((uint32_t)&_fp_mem_start)
99
102/* include ESP32x SoC specific compile time configurations */
103#if defined(CPU_FAM_ESP32)
104#include "cpu_conf_esp32.h"
105#elif defined(CPU_FAM_ESP32C3)
106#include "cpu_conf_esp32c3.h"
107#elif defined(CPU_FAM_ESP32S2)
108#include "cpu_conf_esp32s2.h"
109#elif defined(CPU_FAM_ESP32S3)
110#include "cpu_conf_esp32s3.h"
111#else
112#error "ESP32x family implementation missing"
113#endif
114
115#ifdef __cplusplus
116extern "C" {
117#endif
118
119#ifdef __cplusplus
120}
121#endif
122
123#endif /* CPU_CONF_H */
Compile-time configuration macros for ESP32 SoCs.
Compile-time configuration macros for ESP32-C3 SoCs.
Compile-time configuration macros for ESP32-S2 SoCs.
Compile-time configuration macros for ESP32-S3 SoCs.