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 
9 #pragma once
10 
24 #if !defined(__ASSEMBLER__)
25 #include <stdint.h>
26 #endif
27 
33 #ifdef MODULE_NEWLIB_NANO
34 #define THREAD_EXTRA_STACKSIZE (0)
35 #else
36 #define THREAD_EXTRA_STACKSIZE (512)
37 #endif
38 
40 #define THREAD_EXTRA_STACKSIZE_PRINTF (1536)
41 
42 #ifndef THREAD_STACKSIZE_DEFAULT
44 #define THREAD_STACKSIZE_DEFAULT (2048)
45 #endif
46 
47 #ifndef THREAD_STACKSIZE_IDLE
49 #define THREAD_STACKSIZE_IDLE (2048)
50 #endif
51 
52 #ifndef ESP_WIFI_STACKSIZE
54 #define ESP_WIFI_STACKSIZE (THREAD_STACKSIZE_DEFAULT + THREAD_EXTRA_STACKSIZE)
55 #endif
59 #define PRINTF_BUFSIZ 256
60 
64 #define PUF_SRAM_ATTRIBUTES __attribute__((used, section(".noinit")))
65 
74 #define CPU_HAS_UNALIGNED_ACCESS 1
75 
80 #if !DOXYGEN && !defined(__ASSEMBLER__)
81 /* start address of flash pages in CPU address space as determined by the linker */
82 extern uint8_t _fp_mmu_start;
83 #endif
84 
85 #define FLASHPAGE_SIZE (4096U)
86 #define FLASHPAGE_WRITE_BLOCK_SIZE (4U)
87 #define FLASHPAGE_WRITE_BLOCK_ALIGNMENT (4U)
92 #define FLASHPAGE_NUMOF (CONFIG_ESP_FLASHPAGE_CAPACITY / FLASHPAGE_SIZE)
93 
97 #define CPU_FLASH_BASE ((uint32_t)&_fp_mmu_start)
98 
101 /* include ESP32x SoC specific compile time configurations */
102 #if defined(CPU_FAM_ESP32)
103 #include "cpu_conf_esp32.h"
104 #elif defined(CPU_FAM_ESP32C3)
105 #include "cpu_conf_esp32c3.h"
106 #elif defined(CPU_FAM_ESP32S2)
107 #include "cpu_conf_esp32s2.h"
108 #elif defined(CPU_FAM_ESP32S3)
109 #include "cpu_conf_esp32s3.h"
110 #else
111 #error "ESP32x family implementation missing"
112 #endif
113 
114 #ifdef __cplusplus
115 extern "C" {
116 #endif
117 
118 #ifdef __cplusplus
119 }
120 #endif
121 
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.