2018-10-08 12:20:49 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2018 Gunar Schorcht
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2019-01-14 11:44:29 +01:00
|
|
|
* @defgroup cpu_esp32_conf ESP32 compile configurations
|
2018-10-08 12:20:49 +02:00
|
|
|
* @ingroup cpu_esp32
|
2019-01-14 11:44:29 +01:00
|
|
|
* @ingroup config
|
|
|
|
* @brief Compile-time configuration macros for ESP32 modules
|
2018-10-08 12:20:49 +02:00
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief CPU specific configuration options
|
|
|
|
*
|
|
|
|
* @author Gunar Schorcht <gunar@schorcht.net>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CPU_CONF_H
|
|
|
|
#define CPU_CONF_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2020-02-29 12:02:11 +01:00
|
|
|
|
|
|
|
#include "cpu_conf_common.h"
|
2018-10-08 12:20:49 +02:00
|
|
|
#include "esp_common_log.h"
|
|
|
|
#include "xtensa_conf.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
2019-01-14 11:44:29 +01:00
|
|
|
* @name Stack size configuration
|
2018-10-08 12:20:49 +02:00
|
|
|
* @{
|
|
|
|
*/
|
2022-02-01 22:10:42 +01:00
|
|
|
/** Extra thread stack size required if newlib-nano is not used */
|
|
|
|
#ifdef CONFIG_NEWLIB_NANO_FORMAT
|
|
|
|
#define THREAD_EXTRA_STACKSIZE (0)
|
|
|
|
#else
|
|
|
|
#define THREAD_EXTRA_STACKSIZE (512)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/** Extra thread stack size if `printf` is used */
|
|
|
|
#define THREAD_EXTRA_STACKSIZE_PRINTF (1536)
|
|
|
|
|
2019-01-10 11:10:08 +01:00
|
|
|
#ifndef THREAD_STACKSIZE_DEFAULT
|
2022-02-01 22:10:42 +01:00
|
|
|
/** Default thread stack size */
|
|
|
|
#define THREAD_STACKSIZE_DEFAULT (2048)
|
2019-01-10 11:10:08 +01:00
|
|
|
#endif
|
2022-02-01 22:10:42 +01:00
|
|
|
|
2019-01-10 11:10:08 +01:00
|
|
|
#ifndef THREAD_STACKSIZE_IDLE
|
2022-02-01 22:10:42 +01:00
|
|
|
/** Stack size for the idle thread */
|
|
|
|
#define THREAD_STACKSIZE_IDLE (2048)
|
2019-01-10 11:10:08 +01:00
|
|
|
#endif
|
2022-02-01 22:10:42 +01:00
|
|
|
|
|
|
|
#ifndef ESP_WIFI_STACKSIZE
|
|
|
|
/** Stack size for the WiFi thread */
|
|
|
|
#define ESP_WIFI_STACKSIZE (THREAD_STACKSIZE_DEFAULT + THREAD_EXTRA_STACKSIZE)
|
|
|
|
#endif
|
|
|
|
|
2018-10-08 12:20:49 +02:00
|
|
|
/** @} */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Buffer size used for printf functions (maximum length of formatted output).
|
|
|
|
*/
|
|
|
|
#define PRINTF_BUFSIZ 256
|
|
|
|
|
2020-07-10 08:42:01 +02:00
|
|
|
/**
|
|
|
|
* @brief Remaining parts of the various DRAM sections can be used as heap.
|
|
|
|
*/
|
|
|
|
#define NUM_HEAPS (4)
|
|
|
|
|
2022-02-17 11:08:11 +01:00
|
|
|
/**
|
|
|
|
* @brief Attribute for memory sections required by SRAM PUF
|
|
|
|
*/
|
|
|
|
#define PUF_SRAM_ATTRIBUTES __attribute__((used, section(".noinit")))
|
|
|
|
|
2018-10-08 12:20:49 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
2020-04-03 11:27:36 +02:00
|
|
|
#endif
|
2018-10-08 12:20:49 +02:00
|
|
|
|
|
|
|
#endif /* CPU_CONF_H */
|
|
|
|
/** @} */
|