mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-03 02:20:57 +02:00
feat(log): Adds ESP_LOG_ATTR macro to control section placement
This commit is contained in:
@@ -15,9 +15,11 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ESP_LOG_MODE_BINARY_EN
|
#if ESP_LOG_MODE_BINARY_EN
|
||||||
|
#define ESP_LOG_ATTR NOLOAD_ATTR
|
||||||
#define ESP_LOG_ATTR_STR(str) (__builtin_constant_p(str) ? ESP_LOG_NOLOAD_STR(str) : str)
|
#define ESP_LOG_ATTR_STR(str) (__builtin_constant_p(str) ? ESP_LOG_NOLOAD_STR(str) : str)
|
||||||
#define ESP_LOG_ATTR_DRAM_STR(str) ESP_LOG_NOLOAD_STR(str)
|
#define ESP_LOG_ATTR_DRAM_STR(str) ESP_LOG_NOLOAD_STR(str)
|
||||||
#else
|
#else
|
||||||
|
#define ESP_LOG_ATTR
|
||||||
#define ESP_LOG_ATTR_STR(str) (str)
|
#define ESP_LOG_ATTR_STR(str) (str)
|
||||||
#define ESP_LOG_ATTR_DRAM_STR(str) DRAM_STR(str)
|
#define ESP_LOG_ATTR_DRAM_STR(str) DRAM_STR(str)
|
||||||
#endif
|
#endif
|
||||||
|
@@ -134,7 +134,9 @@ void spi_flash_dump_counters(void)
|
|||||||
|
|
||||||
#define IO_STR_LEN 10
|
#define IO_STR_LEN 10
|
||||||
|
|
||||||
static const char io_mode_str[][IO_STR_LEN] = {
|
// Used only for logging, do not use for other purposes or remove ESP_LOG_ATTR.
|
||||||
|
// (this can be placed in noload section for bin logging mode).
|
||||||
|
static ESP_LOG_ATTR const char io_mode_str[][IO_STR_LEN] = {
|
||||||
"slowrd",
|
"slowrd",
|
||||||
"fastrd",
|
"fastrd",
|
||||||
"dout",
|
"dout",
|
||||||
|
Reference in New Issue
Block a user