mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 11:17:20 +02:00
Optionally disable logs in espcoredump component
Early log strings used by this component are placed in DRAM. Disabling these logs saves ~5KB of internal memory Signed-off-by: Vikram <vikram.dattu@espressif.com>
This commit is contained in:
@ -63,6 +63,14 @@ menu "Core dump"
|
|||||||
help
|
help
|
||||||
Enables/disable core dump module.
|
Enables/disable core dump module.
|
||||||
|
|
||||||
|
config ESP_COREDUMP_LOGS
|
||||||
|
bool "Enable coredump logs for debugging"
|
||||||
|
depends on ESP_COREDUMP_ENABLE
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Enable/disable coredump logs. Logs strings from espcoredump component are
|
||||||
|
placed in DRAM. Disabling these helps to save ~5KB of internal memory.
|
||||||
|
|
||||||
config ESP_COREDUMP_MAX_TASKS_NUM
|
config ESP_COREDUMP_MAX_TASKS_NUM
|
||||||
int "Maximum number of tasks"
|
int "Maximum number of tasks"
|
||||||
depends on ESP_COREDUMP_ENABLE
|
depends on ESP_COREDUMP_ENABLE
|
||||||
|
@ -1,16 +1,9 @@
|
|||||||
// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD
|
/*
|
||||||
//
|
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
*
|
||||||
// you may not use this file except in compliance with the License.
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
// You may obtain a copy of the License at
|
*/
|
||||||
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
#ifndef ESP_CORE_DUMP_PRIV_H_
|
#ifndef ESP_CORE_DUMP_PRIV_H_
|
||||||
#define ESP_CORE_DUMP_PRIV_H_
|
#define ESP_CORE_DUMP_PRIV_H_
|
||||||
|
|
||||||
@ -26,7 +19,12 @@ extern "C" {
|
|||||||
#include "esp_private/panic_internal.h"
|
#include "esp_private/panic_internal.h"
|
||||||
#include "core_dump_checksum.h"
|
#include "core_dump_checksum.h"
|
||||||
|
|
||||||
|
#if CONFIG_ESP_COREDUMP_LOGS
|
||||||
#define ESP_COREDUMP_LOG( level, format, ... ) if (LOG_LOCAL_LEVEL >= level) { esp_rom_printf(DRAM_STR(format), esp_log_early_timestamp(), (const char *)TAG, ##__VA_ARGS__); }
|
#define ESP_COREDUMP_LOG( level, format, ... ) if (LOG_LOCAL_LEVEL >= level) { esp_rom_printf(DRAM_STR(format), esp_log_early_timestamp(), (const char *)TAG, ##__VA_ARGS__); }
|
||||||
|
#else
|
||||||
|
#define ESP_COREDUMP_LOG( level, format, ... ) // dummy define doing nothing
|
||||||
|
#endif
|
||||||
|
|
||||||
#define ESP_COREDUMP_LOGE( format, ... ) ESP_COREDUMP_LOG(ESP_LOG_ERROR, LOG_FORMAT(E, format), ##__VA_ARGS__)
|
#define ESP_COREDUMP_LOGE( format, ... ) ESP_COREDUMP_LOG(ESP_LOG_ERROR, LOG_FORMAT(E, format), ##__VA_ARGS__)
|
||||||
#define ESP_COREDUMP_LOGW( format, ... ) ESP_COREDUMP_LOG(ESP_LOG_WARN, LOG_FORMAT(W, format), ##__VA_ARGS__)
|
#define ESP_COREDUMP_LOGW( format, ... ) ESP_COREDUMP_LOG(ESP_LOG_WARN, LOG_FORMAT(W, format), ##__VA_ARGS__)
|
||||||
#define ESP_COREDUMP_LOGI( format, ... ) ESP_COREDUMP_LOG(ESP_LOG_INFO, LOG_FORMAT(I, format), ##__VA_ARGS__)
|
#define ESP_COREDUMP_LOGI( format, ... ) ESP_COREDUMP_LOG(ESP_LOG_INFO, LOG_FORMAT(I, format), ##__VA_ARGS__)
|
||||||
|
Reference in New Issue
Block a user