feat(log): Optimize log tag init for bin logging

This commit is contained in:
Konstantin Kondrashov
2025-07-01 13:57:47 +03:00
parent 00e90bea33
commit dcf486359e
331 changed files with 678 additions and 612 deletions

View File

@@ -15,7 +15,7 @@
#include "nvs_flash.h" #include "nvs_flash.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static const char *TAG = "test"; ESP_LOG_ATTR_TAG(TAG, "test");
static uint8_t buffer[SPI_FLASH_SEC_SIZE]; static uint8_t buffer[SPI_FLASH_SEC_SIZE];

View File

@@ -15,7 +15,7 @@
#include "utils_update.h" #include "utils_update.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static const char *TAG = "ota_test"; ESP_LOG_ATTR_TAG(TAG, "ota_test");
/* @brief Checks and prepares the partition so that the factory app is launched after that. /* @brief Checks and prepares the partition so that the factory app is launched after that.

View File

@@ -11,7 +11,7 @@
#include "bootloader_common.h" #include "bootloader_common.h"
#include "bootloader_hooks.h" #include "bootloader_hooks.h"
static const char *TAG = "boot"; ESP_LOG_ATTR_TAG(TAG, "boot");
static int select_partition_number(bootloader_state_t *bs); static int select_partition_number(bootloader_state_t *bs);
static int selected_boot_partition(const bootloader_state_t *bs); static int selected_boot_partition(const bootloader_state_t *bs);

View File

@@ -48,7 +48,7 @@
#if !NON_OS_BUILD #if !NON_OS_BUILD
/* Normal app version maps to spi_flash_mmap.h operations... /* Normal app version maps to spi_flash_mmap.h operations...
*/ */
static const char *TAG = "bootloader_mmap"; ESP_LOG_ATTR_TAG(TAG, "bootloader_mmap");
static spi_flash_mmap_handle_t map; static spi_flash_mmap_handle_t map;
@@ -141,7 +141,7 @@ esp_err_t bootloader_flash_erase_range(uint32_t start_addr, uint32_t size)
extern bool esp_tee_flash_check_paddr_in_active_tee_part(size_t paddr); extern bool esp_tee_flash_check_paddr_in_active_tee_part(size_t paddr);
#endif #endif
static const char *TAG = "bootloader_flash"; ESP_LOG_ATTR_TAG(TAG, "bootloader_flash");
/* /*
* NOTE: Memory mapping strategy * NOTE: Memory mapping strategy

View File

@@ -195,7 +195,7 @@ int bootloader_flash_get_wp_pin(void)
#endif #endif
} }
static const char *TAG = "boot.esp32"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32");
void bootloader_configure_spi_pins(int drv) void bootloader_configure_spi_pins(int drv)
{ {
@@ -296,19 +296,19 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
const char *str; const char *str;
switch (bootloader_hdr->spi_speed) { switch (bootloader_hdr->spi_speed) {
case ESP_IMAGE_SPI_SPEED_DIV_2: case ESP_IMAGE_SPI_SPEED_DIV_2:
str = "40MHz"; str = ESP_LOG_ATTR_STR("40MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_3: case ESP_IMAGE_SPI_SPEED_DIV_3:
str = "26.7MHz"; str = ESP_LOG_ATTR_STR("26.7MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_4: case ESP_IMAGE_SPI_SPEED_DIV_4:
str = "20MHz"; str = ESP_LOG_ATTR_STR("20MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_1: case ESP_IMAGE_SPI_SPEED_DIV_1:
str = "80MHz"; str = ESP_LOG_ATTR_STR("80MHz");
break; break;
default: default:
str = "20MHz"; str = ESP_LOG_ATTR_STR("20MHz");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str); ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str);
@@ -318,53 +318,53 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode(); esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode();
switch (spi_mode) { switch (spi_mode) {
case ESP_ROM_SPIFLASH_QIO_MODE: case ESP_ROM_SPIFLASH_QIO_MODE:
str = "QIO"; str = ESP_LOG_ATTR_STR("QIO");
break; break;
case ESP_ROM_SPIFLASH_QOUT_MODE: case ESP_ROM_SPIFLASH_QOUT_MODE:
str = "QOUT"; str = ESP_LOG_ATTR_STR("QOUT");
break; break;
case ESP_ROM_SPIFLASH_DIO_MODE: case ESP_ROM_SPIFLASH_DIO_MODE:
str = "DIO"; str = ESP_LOG_ATTR_STR("DIO");
break; break;
case ESP_ROM_SPIFLASH_DOUT_MODE: case ESP_ROM_SPIFLASH_DOUT_MODE:
str = "DOUT"; str = ESP_LOG_ATTR_STR("DOUT");
break; break;
case ESP_ROM_SPIFLASH_FASTRD_MODE: case ESP_ROM_SPIFLASH_FASTRD_MODE:
str = "FAST READ"; str = ESP_LOG_ATTR_STR("FAST READ");
break; break;
default: default:
str = "SLOW READ"; str = ESP_LOG_ATTR_STR("SLOW READ");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str); ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str);
switch (bootloader_hdr->spi_size) { switch (bootloader_hdr->spi_size) {
case ESP_IMAGE_FLASH_SIZE_1MB: case ESP_IMAGE_FLASH_SIZE_1MB:
str = "1MB"; str = ESP_LOG_ATTR_STR("1MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_2MB: case ESP_IMAGE_FLASH_SIZE_2MB:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_4MB: case ESP_IMAGE_FLASH_SIZE_4MB:
str = "4MB"; str = ESP_LOG_ATTR_STR("4MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_8MB: case ESP_IMAGE_FLASH_SIZE_8MB:
str = "8MB"; str = ESP_LOG_ATTR_STR("8MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_16MB: case ESP_IMAGE_FLASH_SIZE_16MB:
str = "16MB"; str = ESP_LOG_ATTR_STR("16MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_32MB: case ESP_IMAGE_FLASH_SIZE_32MB:
str = "32MB"; str = ESP_LOG_ATTR_STR("32MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_64MB: case ESP_IMAGE_FLASH_SIZE_64MB:
str = "64MB"; str = ESP_LOG_ATTR_STR("64MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_128MB: case ESP_IMAGE_FLASH_SIZE_128MB:
str = "128MB"; str = ESP_LOG_ATTR_STR("128MB");
break; break;
default: default:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str); ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str);

View File

@@ -81,7 +81,7 @@ void IRAM_ATTR bootloader_flash_dummy_config(const esp_image_header_t *pfhdr)
bootloader_flash_set_dummy_out(); bootloader_flash_set_dummy_out();
} }
static const char *TAG = "boot.esp32c2"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32c2");
void IRAM_ATTR bootloader_configure_spi_pins(int drv) void IRAM_ATTR bootloader_configure_spi_pins(int drv)
@@ -155,19 +155,19 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
const char *str; const char *str;
switch (bootloader_hdr->spi_speed) { switch (bootloader_hdr->spi_speed) {
case ESP_IMAGE_SPI_SPEED_DIV_2: case ESP_IMAGE_SPI_SPEED_DIV_2:
str = "30MHz"; str = ESP_LOG_ATTR_STR("30MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_3: case ESP_IMAGE_SPI_SPEED_DIV_3:
str = "20MHz"; str = ESP_LOG_ATTR_STR("20MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_4: case ESP_IMAGE_SPI_SPEED_DIV_4:
str = "15MHz"; str = ESP_LOG_ATTR_STR("15MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_1: case ESP_IMAGE_SPI_SPEED_DIV_1:
str = "60MHz"; str = ESP_LOG_ATTR_STR("60MHz");
break; break;
default: default:
str = "15MHz"; str = ESP_LOG_ATTR_STR("15MHz");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str); ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str);
@@ -177,53 +177,53 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode(); esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode();
switch (spi_mode) { switch (spi_mode) {
case ESP_ROM_SPIFLASH_QIO_MODE: case ESP_ROM_SPIFLASH_QIO_MODE:
str = "QIO"; str = ESP_LOG_ATTR_STR("QIO");
break; break;
case ESP_ROM_SPIFLASH_QOUT_MODE: case ESP_ROM_SPIFLASH_QOUT_MODE:
str = "QOUT"; str = ESP_LOG_ATTR_STR("QOUT");
break; break;
case ESP_ROM_SPIFLASH_DIO_MODE: case ESP_ROM_SPIFLASH_DIO_MODE:
str = "DIO"; str = ESP_LOG_ATTR_STR("DIO");
break; break;
case ESP_ROM_SPIFLASH_DOUT_MODE: case ESP_ROM_SPIFLASH_DOUT_MODE:
str = "DOUT"; str = ESP_LOG_ATTR_STR("DOUT");
break; break;
case ESP_ROM_SPIFLASH_FASTRD_MODE: case ESP_ROM_SPIFLASH_FASTRD_MODE:
str = "FAST READ"; str = ESP_LOG_ATTR_STR("FAST READ");
break; break;
default: default:
str = "SLOW READ"; str = ESP_LOG_ATTR_STR("SLOW READ");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str); ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str);
switch (bootloader_hdr->spi_size) { switch (bootloader_hdr->spi_size) {
case ESP_IMAGE_FLASH_SIZE_1MB: case ESP_IMAGE_FLASH_SIZE_1MB:
str = "1MB"; str = ESP_LOG_ATTR_STR("1MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_2MB: case ESP_IMAGE_FLASH_SIZE_2MB:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_4MB: case ESP_IMAGE_FLASH_SIZE_4MB:
str = "4MB"; str = ESP_LOG_ATTR_STR("4MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_8MB: case ESP_IMAGE_FLASH_SIZE_8MB:
str = "8MB"; str = ESP_LOG_ATTR_STR("8MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_16MB: case ESP_IMAGE_FLASH_SIZE_16MB:
str = "16MB"; str = ESP_LOG_ATTR_STR("16MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_32MB: case ESP_IMAGE_FLASH_SIZE_32MB:
str = "32MB"; str = ESP_LOG_ATTR_STR("32MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_64MB: case ESP_IMAGE_FLASH_SIZE_64MB:
str = "64MB"; str = ESP_LOG_ATTR_STR("64MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_128MB: case ESP_IMAGE_FLASH_SIZE_128MB:
str = "128MB"; str = ESP_LOG_ATTR_STR("128MB");
break; break;
default: default:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str); ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str);

View File

@@ -85,7 +85,7 @@ void IRAM_ATTR bootloader_flash_dummy_config(const esp_image_header_t *pfhdr)
bootloader_flash_set_dummy_out(); bootloader_flash_set_dummy_out();
} }
static const char *TAG = "boot.esp32c3"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32c3");
void IRAM_ATTR bootloader_configure_spi_pins(int drv) void IRAM_ATTR bootloader_configure_spi_pins(int drv)
@@ -166,19 +166,19 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
const char *str; const char *str;
switch (bootloader_hdr->spi_speed) { switch (bootloader_hdr->spi_speed) {
case ESP_IMAGE_SPI_SPEED_DIV_2: case ESP_IMAGE_SPI_SPEED_DIV_2:
str = "40MHz"; str = ESP_LOG_ATTR_STR("40MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_3: case ESP_IMAGE_SPI_SPEED_DIV_3:
str = "26.7MHz"; str = ESP_LOG_ATTR_STR("26.7MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_4: case ESP_IMAGE_SPI_SPEED_DIV_4:
str = "20MHz"; str = ESP_LOG_ATTR_STR("20MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_1: case ESP_IMAGE_SPI_SPEED_DIV_1:
str = "80MHz"; str = ESP_LOG_ATTR_STR("80MHz");
break; break;
default: default:
str = "20MHz"; str = ESP_LOG_ATTR_STR("20MHz");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str); ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str);
@@ -188,53 +188,53 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode(); esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode();
switch (spi_mode) { switch (spi_mode) {
case ESP_ROM_SPIFLASH_QIO_MODE: case ESP_ROM_SPIFLASH_QIO_MODE:
str = "QIO"; str = ESP_LOG_ATTR_STR("QIO");
break; break;
case ESP_ROM_SPIFLASH_QOUT_MODE: case ESP_ROM_SPIFLASH_QOUT_MODE:
str = "QOUT"; str = ESP_LOG_ATTR_STR("QOUT");
break; break;
case ESP_ROM_SPIFLASH_DIO_MODE: case ESP_ROM_SPIFLASH_DIO_MODE:
str = "DIO"; str = ESP_LOG_ATTR_STR("DIO");
break; break;
case ESP_ROM_SPIFLASH_DOUT_MODE: case ESP_ROM_SPIFLASH_DOUT_MODE:
str = "DOUT"; str = ESP_LOG_ATTR_STR("DOUT");
break; break;
case ESP_ROM_SPIFLASH_FASTRD_MODE: case ESP_ROM_SPIFLASH_FASTRD_MODE:
str = "FAST READ"; str = ESP_LOG_ATTR_STR("FAST READ");
break; break;
default: default:
str = "SLOW READ"; str = ESP_LOG_ATTR_STR("SLOW READ");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str); ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str);
switch (bootloader_hdr->spi_size) { switch (bootloader_hdr->spi_size) {
case ESP_IMAGE_FLASH_SIZE_1MB: case ESP_IMAGE_FLASH_SIZE_1MB:
str = "1MB"; str = ESP_LOG_ATTR_STR("1MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_2MB: case ESP_IMAGE_FLASH_SIZE_2MB:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_4MB: case ESP_IMAGE_FLASH_SIZE_4MB:
str = "4MB"; str = ESP_LOG_ATTR_STR("4MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_8MB: case ESP_IMAGE_FLASH_SIZE_8MB:
str = "8MB"; str = ESP_LOG_ATTR_STR("8MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_16MB: case ESP_IMAGE_FLASH_SIZE_16MB:
str = "16MB"; str = ESP_LOG_ATTR_STR("16MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_32MB: case ESP_IMAGE_FLASH_SIZE_32MB:
str = "32MB"; str = ESP_LOG_ATTR_STR("32MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_64MB: case ESP_IMAGE_FLASH_SIZE_64MB:
str = "64MB"; str = ESP_LOG_ATTR_STR("64MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_128MB: case ESP_IMAGE_FLASH_SIZE_128MB:
str = "128MB"; str = ESP_LOG_ATTR_STR("128MB");
break; break;
default: default:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str); ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str);

View File

@@ -82,7 +82,7 @@ void IRAM_ATTR bootloader_flash_clock_config(const esp_image_header_t *pfhdr)
esp_rom_spiflash_config_clk(spi_clk_div, 0); esp_rom_spiflash_config_clk(spi_clk_div, 0);
} }
static const char *TAG = "boot.esp32c5"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32c5");
void IRAM_ATTR bootloader_configure_spi_pins(int drv) void IRAM_ATTR bootloader_configure_spi_pins(int drv)
{ {
@@ -146,19 +146,19 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
const char *str; const char *str;
switch (bootloader_hdr->spi_speed) { switch (bootloader_hdr->spi_speed) {
case ESP_IMAGE_SPI_SPEED_DIV_2: case ESP_IMAGE_SPI_SPEED_DIV_2:
str = "40MHz"; str = ESP_LOG_ATTR_STR("40MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_3: case ESP_IMAGE_SPI_SPEED_DIV_3:
str = "26.7MHz"; str = ESP_LOG_ATTR_STR("26.7MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_4: case ESP_IMAGE_SPI_SPEED_DIV_4:
str = "20MHz"; str = ESP_LOG_ATTR_STR("20MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_1: case ESP_IMAGE_SPI_SPEED_DIV_1:
str = "80MHz"; str = ESP_LOG_ATTR_STR("80MHz");
break; break;
default: default:
str = "20MHz"; str = ESP_LOG_ATTR_STR("20MHz");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str); ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str);
@@ -168,53 +168,53 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode(); esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode();
switch (spi_mode) { switch (spi_mode) {
case ESP_ROM_SPIFLASH_QIO_MODE: case ESP_ROM_SPIFLASH_QIO_MODE:
str = "QIO"; str = ESP_LOG_ATTR_STR("QIO");
break; break;
case ESP_ROM_SPIFLASH_QOUT_MODE: case ESP_ROM_SPIFLASH_QOUT_MODE:
str = "QOUT"; str = ESP_LOG_ATTR_STR("QOUT");
break; break;
case ESP_ROM_SPIFLASH_DIO_MODE: case ESP_ROM_SPIFLASH_DIO_MODE:
str = "DIO"; str = ESP_LOG_ATTR_STR("DIO");
break; break;
case ESP_ROM_SPIFLASH_DOUT_MODE: case ESP_ROM_SPIFLASH_DOUT_MODE:
str = "DOUT"; str = ESP_LOG_ATTR_STR("DOUT");
break; break;
case ESP_ROM_SPIFLASH_FASTRD_MODE: case ESP_ROM_SPIFLASH_FASTRD_MODE:
str = "FAST READ"; str = ESP_LOG_ATTR_STR("FAST READ");
break; break;
default: default:
str = "SLOW READ"; str = ESP_LOG_ATTR_STR("SLOW READ");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str); ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str);
switch (bootloader_hdr->spi_size) { switch (bootloader_hdr->spi_size) {
case ESP_IMAGE_FLASH_SIZE_1MB: case ESP_IMAGE_FLASH_SIZE_1MB:
str = "1MB"; str = ESP_LOG_ATTR_STR("1MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_2MB: case ESP_IMAGE_FLASH_SIZE_2MB:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_4MB: case ESP_IMAGE_FLASH_SIZE_4MB:
str = "4MB"; str = ESP_LOG_ATTR_STR("4MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_8MB: case ESP_IMAGE_FLASH_SIZE_8MB:
str = "8MB"; str = ESP_LOG_ATTR_STR("8MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_16MB: case ESP_IMAGE_FLASH_SIZE_16MB:
str = "16MB"; str = ESP_LOG_ATTR_STR("16MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_32MB: case ESP_IMAGE_FLASH_SIZE_32MB:
str = "32MB"; str = ESP_LOG_ATTR_STR("32MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_64MB: case ESP_IMAGE_FLASH_SIZE_64MB:
str = "64MB"; str = ESP_LOG_ATTR_STR("64MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_128MB: case ESP_IMAGE_FLASH_SIZE_128MB:
str = "128MB"; str = ESP_LOG_ATTR_STR("128MB");
break; break;
default: default:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str); ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str);

View File

@@ -65,7 +65,7 @@ void IRAM_ATTR bootloader_flash_clock_config(const esp_image_header_t *pfhdr)
esp_rom_spiflash_config_clk(spi_clk_div, 0); esp_rom_spiflash_config_clk(spi_clk_div, 0);
} }
static const char *TAG = "boot.esp32c6"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32c6");
void IRAM_ATTR bootloader_configure_spi_pins(int drv) void IRAM_ATTR bootloader_configure_spi_pins(int drv)
{ {
@@ -129,19 +129,19 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
const char *str; const char *str;
switch (bootloader_hdr->spi_speed) { switch (bootloader_hdr->spi_speed) {
case ESP_IMAGE_SPI_SPEED_DIV_2: case ESP_IMAGE_SPI_SPEED_DIV_2:
str = "40MHz"; str = ESP_LOG_ATTR_STR("40MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_3: case ESP_IMAGE_SPI_SPEED_DIV_3:
str = "26.7MHz"; str = ESP_LOG_ATTR_STR("26.7MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_4: case ESP_IMAGE_SPI_SPEED_DIV_4:
str = "20MHz"; str = ESP_LOG_ATTR_STR("20MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_1: case ESP_IMAGE_SPI_SPEED_DIV_1:
str = "80MHz"; str = ESP_LOG_ATTR_STR("80MHz");
break; break;
default: default:
str = "20MHz"; str = ESP_LOG_ATTR_STR("20MHz");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str); ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str);
@@ -151,53 +151,53 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode(); esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode();
switch (spi_mode) { switch (spi_mode) {
case ESP_ROM_SPIFLASH_QIO_MODE: case ESP_ROM_SPIFLASH_QIO_MODE:
str = "QIO"; str = ESP_LOG_ATTR_STR("QIO");
break; break;
case ESP_ROM_SPIFLASH_QOUT_MODE: case ESP_ROM_SPIFLASH_QOUT_MODE:
str = "QOUT"; str = ESP_LOG_ATTR_STR("QOUT");
break; break;
case ESP_ROM_SPIFLASH_DIO_MODE: case ESP_ROM_SPIFLASH_DIO_MODE:
str = "DIO"; str = ESP_LOG_ATTR_STR("DIO");
break; break;
case ESP_ROM_SPIFLASH_DOUT_MODE: case ESP_ROM_SPIFLASH_DOUT_MODE:
str = "DOUT"; str = ESP_LOG_ATTR_STR("DOUT");
break; break;
case ESP_ROM_SPIFLASH_FASTRD_MODE: case ESP_ROM_SPIFLASH_FASTRD_MODE:
str = "FAST READ"; str = ESP_LOG_ATTR_STR("FAST READ");
break; break;
default: default:
str = "SLOW READ"; str = ESP_LOG_ATTR_STR("SLOW READ");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str); ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str);
switch (bootloader_hdr->spi_size) { switch (bootloader_hdr->spi_size) {
case ESP_IMAGE_FLASH_SIZE_1MB: case ESP_IMAGE_FLASH_SIZE_1MB:
str = "1MB"; str = ESP_LOG_ATTR_STR("1MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_2MB: case ESP_IMAGE_FLASH_SIZE_2MB:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_4MB: case ESP_IMAGE_FLASH_SIZE_4MB:
str = "4MB"; str = ESP_LOG_ATTR_STR("4MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_8MB: case ESP_IMAGE_FLASH_SIZE_8MB:
str = "8MB"; str = ESP_LOG_ATTR_STR("8MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_16MB: case ESP_IMAGE_FLASH_SIZE_16MB:
str = "16MB"; str = ESP_LOG_ATTR_STR("16MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_32MB: case ESP_IMAGE_FLASH_SIZE_32MB:
str = "32MB"; str = ESP_LOG_ATTR_STR("32MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_64MB: case ESP_IMAGE_FLASH_SIZE_64MB:
str = "64MB"; str = ESP_LOG_ATTR_STR("64MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_128MB: case ESP_IMAGE_FLASH_SIZE_128MB:
str = "128MB"; str = ESP_LOG_ATTR_STR("128MB");
break; break;
default: default:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str); ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str);

View File

@@ -142,17 +142,17 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
const char *str; const char *str;
switch (bootloader_hdr->spi_speed) { switch (bootloader_hdr->spi_speed) {
case ESP_IMAGE_SPI_SPEED_DIV_1: case ESP_IMAGE_SPI_SPEED_DIV_1:
str = "80MHz"; str = ESP_LOG_ATTR_STR("80MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_2: case ESP_IMAGE_SPI_SPEED_DIV_2:
str = "40MHz"; str = ESP_LOG_ATTR_STR("40MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_3: case ESP_IMAGE_SPI_SPEED_DIV_3:
str = "26.7MHz"; str = ESP_LOG_ATTR_STR("26.7MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_4: case ESP_IMAGE_SPI_SPEED_DIV_4:
default: default:
str = "20MHz"; str = ESP_LOG_ATTR_STR("20MHz");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str); ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str);
@@ -162,53 +162,53 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode(); esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode();
switch (spi_mode) { switch (spi_mode) {
case ESP_ROM_SPIFLASH_QIO_MODE: case ESP_ROM_SPIFLASH_QIO_MODE:
str = "QIO"; str = ESP_LOG_ATTR_STR("QIO");
break; break;
case ESP_ROM_SPIFLASH_QOUT_MODE: case ESP_ROM_SPIFLASH_QOUT_MODE:
str = "QOUT"; str = ESP_LOG_ATTR_STR("QOUT");
break; break;
case ESP_ROM_SPIFLASH_DIO_MODE: case ESP_ROM_SPIFLASH_DIO_MODE:
str = "DIO"; str = ESP_LOG_ATTR_STR("DIO");
break; break;
case ESP_ROM_SPIFLASH_DOUT_MODE: case ESP_ROM_SPIFLASH_DOUT_MODE:
str = "DOUT"; str = ESP_LOG_ATTR_STR("DOUT");
break; break;
case ESP_ROM_SPIFLASH_FASTRD_MODE: case ESP_ROM_SPIFLASH_FASTRD_MODE:
str = "FAST READ"; str = ESP_LOG_ATTR_STR("FAST READ");
break; break;
default: default:
str = "SLOW READ"; str = ESP_LOG_ATTR_STR("SLOW READ");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str); ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str);
switch (bootloader_hdr->spi_size) { switch (bootloader_hdr->spi_size) {
case ESP_IMAGE_FLASH_SIZE_1MB: case ESP_IMAGE_FLASH_SIZE_1MB:
str = "1MB"; str = ESP_LOG_ATTR_STR("1MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_2MB: case ESP_IMAGE_FLASH_SIZE_2MB:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_4MB: case ESP_IMAGE_FLASH_SIZE_4MB:
str = "4MB"; str = ESP_LOG_ATTR_STR("4MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_8MB: case ESP_IMAGE_FLASH_SIZE_8MB:
str = "8MB"; str = ESP_LOG_ATTR_STR("8MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_16MB: case ESP_IMAGE_FLASH_SIZE_16MB:
str = "16MB"; str = ESP_LOG_ATTR_STR("16MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_32MB: case ESP_IMAGE_FLASH_SIZE_32MB:
str = "32MB"; str = ESP_LOG_ATTR_STR("32MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_64MB: case ESP_IMAGE_FLASH_SIZE_64MB:
str = "64MB"; str = ESP_LOG_ATTR_STR("64MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_128MB: case ESP_IMAGE_FLASH_SIZE_128MB:
str = "128MB"; str = ESP_LOG_ATTR_STR("128MB");
break; break;
default: default:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str); ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str);

View File

@@ -67,7 +67,7 @@ void IRAM_ATTR bootloader_flash_clock_config(const esp_image_header_t *pfhdr)
esp_rom_spiflash_config_clk(spi_clk_div, 0); esp_rom_spiflash_config_clk(spi_clk_div, 0);
} }
static const char *TAG = "boot.esp32h2"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32h2");
void IRAM_ATTR bootloader_configure_spi_pins(int drv) void IRAM_ATTR bootloader_configure_spi_pins(int drv)
{ {
@@ -137,19 +137,19 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
const char *str; const char *str;
switch (bootloader_hdr->spi_speed) { switch (bootloader_hdr->spi_speed) {
case ESP_IMAGE_SPI_SPEED_DIV_2: case ESP_IMAGE_SPI_SPEED_DIV_2:
str = "32MHz"; str = ESP_LOG_ATTR_STR("32MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_3: case ESP_IMAGE_SPI_SPEED_DIV_3:
str = "21.3MHz"; str = ESP_LOG_ATTR_STR("21.3MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_4: case ESP_IMAGE_SPI_SPEED_DIV_4:
str = "16MHz"; str = ESP_LOG_ATTR_STR("16MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_1: case ESP_IMAGE_SPI_SPEED_DIV_1:
str = "64MHz"; str = ESP_LOG_ATTR_STR("64MHz");
break; break;
default: default:
str = "16MHz"; str = ESP_LOG_ATTR_STR("16MHz");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str); ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str);
@@ -159,53 +159,53 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode(); esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode();
switch (spi_mode) { switch (spi_mode) {
case ESP_ROM_SPIFLASH_QIO_MODE: case ESP_ROM_SPIFLASH_QIO_MODE:
str = "QIO"; str = ESP_LOG_ATTR_STR("QIO");
break; break;
case ESP_ROM_SPIFLASH_QOUT_MODE: case ESP_ROM_SPIFLASH_QOUT_MODE:
str = "QOUT"; str = ESP_LOG_ATTR_STR("QOUT");
break; break;
case ESP_ROM_SPIFLASH_DIO_MODE: case ESP_ROM_SPIFLASH_DIO_MODE:
str = "DIO"; str = ESP_LOG_ATTR_STR("DIO");
break; break;
case ESP_ROM_SPIFLASH_DOUT_MODE: case ESP_ROM_SPIFLASH_DOUT_MODE:
str = "DOUT"; str = ESP_LOG_ATTR_STR("DOUT");
break; break;
case ESP_ROM_SPIFLASH_FASTRD_MODE: case ESP_ROM_SPIFLASH_FASTRD_MODE:
str = "FAST READ"; str = ESP_LOG_ATTR_STR("FAST READ");
break; break;
default: default:
str = "SLOW READ"; str = ESP_LOG_ATTR_STR("SLOW READ");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str); ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str);
switch (bootloader_hdr->spi_size) { switch (bootloader_hdr->spi_size) {
case ESP_IMAGE_FLASH_SIZE_1MB: case ESP_IMAGE_FLASH_SIZE_1MB:
str = "1MB"; str = ESP_LOG_ATTR_STR("1MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_2MB: case ESP_IMAGE_FLASH_SIZE_2MB:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_4MB: case ESP_IMAGE_FLASH_SIZE_4MB:
str = "4MB"; str = ESP_LOG_ATTR_STR("4MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_8MB: case ESP_IMAGE_FLASH_SIZE_8MB:
str = "8MB"; str = ESP_LOG_ATTR_STR("8MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_16MB: case ESP_IMAGE_FLASH_SIZE_16MB:
str = "16MB"; str = ESP_LOG_ATTR_STR("16MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_32MB: case ESP_IMAGE_FLASH_SIZE_32MB:
str = "32MB"; str = ESP_LOG_ATTR_STR("32MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_64MB: case ESP_IMAGE_FLASH_SIZE_64MB:
str = "64MB"; str = ESP_LOG_ATTR_STR("64MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_128MB: case ESP_IMAGE_FLASH_SIZE_128MB:
str = "128MB"; str = ESP_LOG_ATTR_STR("128MB");
break; break;
default: default:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str); ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str);

View File

@@ -21,7 +21,7 @@
#include "hal/clk_tree_ll.h" #include "hal/clk_tree_ll.h"
#include "soc/pcr_reg.h" #include "soc/pcr_reg.h"
static const char *TAG = "boot.esp32h21"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32h21");
void bootloader_flash_update_id() void bootloader_flash_update_id()
{ {
@@ -134,13 +134,13 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
const char *str; const char *str;
switch (bootloader_hdr->spi_speed) { switch (bootloader_hdr->spi_speed) {
case ESP_IMAGE_SPI_SPEED_DIV_2: case ESP_IMAGE_SPI_SPEED_DIV_2:
str = "24MHz"; str = ESP_LOG_ATTR_STR("24MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_1: case ESP_IMAGE_SPI_SPEED_DIV_1:
str = "48MHz"; str = ESP_LOG_ATTR_STR("48MHz");
break; break;
default: default:
str = "16MHz"; str = ESP_LOG_ATTR_STR("16MHz");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str); ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str);
@@ -150,53 +150,53 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode(); esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode();
switch (spi_mode) { switch (spi_mode) {
case ESP_ROM_SPIFLASH_QIO_MODE: case ESP_ROM_SPIFLASH_QIO_MODE:
str = "QIO"; str = ESP_LOG_ATTR_STR("QIO");
break; break;
case ESP_ROM_SPIFLASH_QOUT_MODE: case ESP_ROM_SPIFLASH_QOUT_MODE:
str = "QOUT"; str = ESP_LOG_ATTR_STR("QOUT");
break; break;
case ESP_ROM_SPIFLASH_DIO_MODE: case ESP_ROM_SPIFLASH_DIO_MODE:
str = "DIO"; str = ESP_LOG_ATTR_STR("DIO");
break; break;
case ESP_ROM_SPIFLASH_DOUT_MODE: case ESP_ROM_SPIFLASH_DOUT_MODE:
str = "DOUT"; str = ESP_LOG_ATTR_STR("DOUT");
break; break;
case ESP_ROM_SPIFLASH_FASTRD_MODE: case ESP_ROM_SPIFLASH_FASTRD_MODE:
str = "FAST READ"; str = ESP_LOG_ATTR_STR("FAST READ");
break; break;
default: default:
str = "SLOW READ"; str = ESP_LOG_ATTR_STR("SLOW READ");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str); ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str);
switch (bootloader_hdr->spi_size) { switch (bootloader_hdr->spi_size) {
case ESP_IMAGE_FLASH_SIZE_1MB: case ESP_IMAGE_FLASH_SIZE_1MB:
str = "1MB"; str = ESP_LOG_ATTR_STR("1MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_2MB: case ESP_IMAGE_FLASH_SIZE_2MB:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_4MB: case ESP_IMAGE_FLASH_SIZE_4MB:
str = "4MB"; str = ESP_LOG_ATTR_STR("4MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_8MB: case ESP_IMAGE_FLASH_SIZE_8MB:
str = "8MB"; str = ESP_LOG_ATTR_STR("8MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_16MB: case ESP_IMAGE_FLASH_SIZE_16MB:
str = "16MB"; str = ESP_LOG_ATTR_STR("16MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_32MB: case ESP_IMAGE_FLASH_SIZE_32MB:
str = "32MB"; str = ESP_LOG_ATTR_STR("32MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_64MB: case ESP_IMAGE_FLASH_SIZE_64MB:
str = "64MB"; str = ESP_LOG_ATTR_STR("64MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_128MB: case ESP_IMAGE_FLASH_SIZE_128MB:
str = "128MB"; str = ESP_LOG_ATTR_STR("128MB");
break; break;
default: default:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str); ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str);

View File

@@ -27,7 +27,7 @@
#include "hal/cache_ll.h" #include "hal/cache_ll.h"
#include "hal/mspi_ll.h" #include "hal/mspi_ll.h"
static const char *TAG = "boot.esp32h4"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32h4");
void bootloader_flash_update_id() void bootloader_flash_update_id()
{ {
@@ -141,16 +141,16 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
const char *str; const char *str;
switch (bootloader_hdr->spi_speed) { switch (bootloader_hdr->spi_speed) {
case ESP_IMAGE_SPI_SPEED_DIV_2: case ESP_IMAGE_SPI_SPEED_DIV_2:
str = "24MHz"; str = ESP_LOG_ATTR_STR("24MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_4: case ESP_IMAGE_SPI_SPEED_DIV_4:
str = "12MHz"; str = ESP_LOG_ATTR_STR("12MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_1: case ESP_IMAGE_SPI_SPEED_DIV_1:
str = "48MHz"; str = ESP_LOG_ATTR_STR("48MHz");
break; break;
default: default:
str = "12MHz"; str = ESP_LOG_ATTR_STR("12MHz");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str); ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str);
@@ -160,53 +160,53 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode(); esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode();
switch (spi_mode) { switch (spi_mode) {
case ESP_ROM_SPIFLASH_QIO_MODE: case ESP_ROM_SPIFLASH_QIO_MODE:
str = "QIO"; str = ESP_LOG_ATTR_STR("QIO");
break; break;
case ESP_ROM_SPIFLASH_QOUT_MODE: case ESP_ROM_SPIFLASH_QOUT_MODE:
str = "QOUT"; str = ESP_LOG_ATTR_STR("QOUT");
break; break;
case ESP_ROM_SPIFLASH_DIO_MODE: case ESP_ROM_SPIFLASH_DIO_MODE:
str = "DIO"; str = ESP_LOG_ATTR_STR("DIO");
break; break;
case ESP_ROM_SPIFLASH_DOUT_MODE: case ESP_ROM_SPIFLASH_DOUT_MODE:
str = "DOUT"; str = ESP_LOG_ATTR_STR("DOUT");
break; break;
case ESP_ROM_SPIFLASH_FASTRD_MODE: case ESP_ROM_SPIFLASH_FASTRD_MODE:
str = "FAST READ"; str = ESP_LOG_ATTR_STR("FAST READ");
break; break;
default: default:
str = "SLOW READ"; str = ESP_LOG_ATTR_STR("SLOW READ");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str); ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str);
switch (bootloader_hdr->spi_size) { switch (bootloader_hdr->spi_size) {
case ESP_IMAGE_FLASH_SIZE_1MB: case ESP_IMAGE_FLASH_SIZE_1MB:
str = "1MB"; str = ESP_LOG_ATTR_STR("1MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_2MB: case ESP_IMAGE_FLASH_SIZE_2MB:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_4MB: case ESP_IMAGE_FLASH_SIZE_4MB:
str = "4MB"; str = ESP_LOG_ATTR_STR("4MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_8MB: case ESP_IMAGE_FLASH_SIZE_8MB:
str = "8MB"; str = ESP_LOG_ATTR_STR("8MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_16MB: case ESP_IMAGE_FLASH_SIZE_16MB:
str = "16MB"; str = ESP_LOG_ATTR_STR("16MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_32MB: case ESP_IMAGE_FLASH_SIZE_32MB:
str = "32MB"; str = ESP_LOG_ATTR_STR("32MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_64MB: case ESP_IMAGE_FLASH_SIZE_64MB:
str = "64MB"; str = ESP_LOG_ATTR_STR("64MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_128MB: case ESP_IMAGE_FLASH_SIZE_128MB:
str = "128MB"; str = ESP_LOG_ATTR_STR("128MB");
break; break;
default: default:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str); ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str);

View File

@@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@@ -72,7 +72,7 @@ void IRAM_ATTR bootloader_flash_clock_config(const esp_image_header_t *pfhdr)
esp_rom_spiflash_config_clk(spi_clk_div, 0); esp_rom_spiflash_config_clk(spi_clk_div, 0);
} }
static const char *TAG = "boot.esp32p4"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32p4");
void IRAM_ATTR bootloader_configure_spi_pins(int drv) void IRAM_ATTR bootloader_configure_spi_pins(int drv)
{ {
@@ -136,19 +136,19 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
const char *str; const char *str;
switch (bootloader_hdr->spi_speed) { switch (bootloader_hdr->spi_speed) {
case ESP_IMAGE_SPI_SPEED_DIV_2: case ESP_IMAGE_SPI_SPEED_DIV_2:
str = "40MHz"; str = ESP_LOG_ATTR_STR("40MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_3: case ESP_IMAGE_SPI_SPEED_DIV_3:
str = "26.7MHz"; str = ESP_LOG_ATTR_STR("26.7MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_4: case ESP_IMAGE_SPI_SPEED_DIV_4:
str = "20MHz"; str = ESP_LOG_ATTR_STR("20MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_1: case ESP_IMAGE_SPI_SPEED_DIV_1:
str = "80MHz"; str = ESP_LOG_ATTR_STR("80MHz");
break; break;
default: default:
str = "20MHz"; str = ESP_LOG_ATTR_STR("20MHz");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str); ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str);
@@ -158,53 +158,53 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode(); esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode();
switch (spi_mode) { switch (spi_mode) {
case ESP_ROM_SPIFLASH_QIO_MODE: case ESP_ROM_SPIFLASH_QIO_MODE:
str = "QIO"; str = ESP_LOG_ATTR_STR("QIO");
break; break;
case ESP_ROM_SPIFLASH_QOUT_MODE: case ESP_ROM_SPIFLASH_QOUT_MODE:
str = "QOUT"; str = ESP_LOG_ATTR_STR("QOUT");
break; break;
case ESP_ROM_SPIFLASH_DIO_MODE: case ESP_ROM_SPIFLASH_DIO_MODE:
str = "DIO"; str = ESP_LOG_ATTR_STR("DIO");
break; break;
case ESP_ROM_SPIFLASH_DOUT_MODE: case ESP_ROM_SPIFLASH_DOUT_MODE:
str = "DOUT"; str = ESP_LOG_ATTR_STR("DOUT");
break; break;
case ESP_ROM_SPIFLASH_FASTRD_MODE: case ESP_ROM_SPIFLASH_FASTRD_MODE:
str = "FAST READ"; str = ESP_LOG_ATTR_STR("FAST READ");
break; break;
default: default:
str = "SLOW READ"; str = ESP_LOG_ATTR_STR("SLOW READ");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str); ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str);
switch (bootloader_hdr->spi_size) { switch (bootloader_hdr->spi_size) {
case ESP_IMAGE_FLASH_SIZE_1MB: case ESP_IMAGE_FLASH_SIZE_1MB:
str = "1MB"; str = ESP_LOG_ATTR_STR("1MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_2MB: case ESP_IMAGE_FLASH_SIZE_2MB:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_4MB: case ESP_IMAGE_FLASH_SIZE_4MB:
str = "4MB"; str = ESP_LOG_ATTR_STR("4MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_8MB: case ESP_IMAGE_FLASH_SIZE_8MB:
str = "8MB"; str = ESP_LOG_ATTR_STR("8MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_16MB: case ESP_IMAGE_FLASH_SIZE_16MB:
str = "16MB"; str = ESP_LOG_ATTR_STR("16MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_32MB: case ESP_IMAGE_FLASH_SIZE_32MB:
str = "32MB"; str = ESP_LOG_ATTR_STR("32MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_64MB: case ESP_IMAGE_FLASH_SIZE_64MB:
str = "64MB"; str = ESP_LOG_ATTR_STR("64MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_128MB: case ESP_IMAGE_FLASH_SIZE_128MB:
str = "128MB"; str = ESP_LOG_ATTR_STR("128MB");
break; break;
default: default:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str); ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str);

View File

@@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2019-2024 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@@ -88,7 +88,7 @@ void IRAM_ATTR bootloader_flash_dummy_config(const esp_image_header_t* pfhdr)
bootloader_flash_set_dummy_out(); bootloader_flash_set_dummy_out();
} }
static const char *TAG = "boot.esp32s2"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32s2");
void IRAM_ATTR bootloader_configure_spi_pins(int drv) void IRAM_ATTR bootloader_configure_spi_pins(int drv)
{ {
@@ -170,19 +170,19 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
const char *str; const char *str;
switch (bootloader_hdr->spi_speed) { switch (bootloader_hdr->spi_speed) {
case ESP_IMAGE_SPI_SPEED_DIV_2: case ESP_IMAGE_SPI_SPEED_DIV_2:
str = "40MHz"; str = ESP_LOG_ATTR_STR("40MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_3: case ESP_IMAGE_SPI_SPEED_DIV_3:
str = "26.7MHz"; str = ESP_LOG_ATTR_STR("26.7MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_4: case ESP_IMAGE_SPI_SPEED_DIV_4:
str = "20MHz"; str = ESP_LOG_ATTR_STR("20MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_1: case ESP_IMAGE_SPI_SPEED_DIV_1:
str = "80MHz"; str = ESP_LOG_ATTR_STR("80MHz");
break; break;
default: default:
str = "20MHz"; str = ESP_LOG_ATTR_STR("20MHz");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str); ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str);
@@ -192,53 +192,53 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode(); esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode();
switch (spi_mode) { switch (spi_mode) {
case ESP_ROM_SPIFLASH_QIO_MODE: case ESP_ROM_SPIFLASH_QIO_MODE:
str = "QIO"; str = ESP_LOG_ATTR_STR("QIO");
break; break;
case ESP_ROM_SPIFLASH_QOUT_MODE: case ESP_ROM_SPIFLASH_QOUT_MODE:
str = "QOUT"; str = ESP_LOG_ATTR_STR("QOUT");
break; break;
case ESP_ROM_SPIFLASH_DIO_MODE: case ESP_ROM_SPIFLASH_DIO_MODE:
str = "DIO"; str = ESP_LOG_ATTR_STR("DIO");
break; break;
case ESP_ROM_SPIFLASH_DOUT_MODE: case ESP_ROM_SPIFLASH_DOUT_MODE:
str = "DOUT"; str = ESP_LOG_ATTR_STR("DOUT");
break; break;
case ESP_ROM_SPIFLASH_FASTRD_MODE: case ESP_ROM_SPIFLASH_FASTRD_MODE:
str = "FAST READ"; str = ESP_LOG_ATTR_STR("FAST READ");
break; break;
default: default:
str = "SLOW READ"; str = ESP_LOG_ATTR_STR("SLOW READ");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str); ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str);
switch (bootloader_hdr->spi_size) { switch (bootloader_hdr->spi_size) {
case ESP_IMAGE_FLASH_SIZE_1MB: case ESP_IMAGE_FLASH_SIZE_1MB:
str = "1MB"; str = ESP_LOG_ATTR_STR("1MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_2MB: case ESP_IMAGE_FLASH_SIZE_2MB:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_4MB: case ESP_IMAGE_FLASH_SIZE_4MB:
str = "4MB"; str = ESP_LOG_ATTR_STR("4MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_8MB: case ESP_IMAGE_FLASH_SIZE_8MB:
str = "8MB"; str = ESP_LOG_ATTR_STR("8MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_16MB: case ESP_IMAGE_FLASH_SIZE_16MB:
str = "16MB"; str = ESP_LOG_ATTR_STR("16MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_32MB: case ESP_IMAGE_FLASH_SIZE_32MB:
str = "32MB"; str = ESP_LOG_ATTR_STR("32MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_64MB: case ESP_IMAGE_FLASH_SIZE_64MB:
str = "64MB"; str = ESP_LOG_ATTR_STR("64MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_128MB: case ESP_IMAGE_FLASH_SIZE_128MB:
str = "128MB"; str = ESP_LOG_ATTR_STR("128MB");
break; break;
default: default:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str); ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str);

View File

@@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2020-2024 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@@ -99,7 +99,7 @@ void IRAM_ATTR bootloader_flash_dummy_config(const esp_image_header_t *pfhdr)
bootloader_flash_set_dummy_out(); bootloader_flash_set_dummy_out();
} }
static const char *TAG = "boot.esp32s3"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32s3");
void IRAM_ATTR bootloader_configure_spi_pins(int drv) void IRAM_ATTR bootloader_configure_spi_pins(int drv)
{ {
@@ -182,19 +182,19 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
const char *str; const char *str;
switch (bootloader_hdr->spi_speed) { switch (bootloader_hdr->spi_speed) {
case ESP_IMAGE_SPI_SPEED_DIV_2: case ESP_IMAGE_SPI_SPEED_DIV_2:
str = "40MHz"; str = ESP_LOG_ATTR_STR("40MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_3: case ESP_IMAGE_SPI_SPEED_DIV_3:
str = "26.7MHz"; str = ESP_LOG_ATTR_STR("26.7MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_4: case ESP_IMAGE_SPI_SPEED_DIV_4:
str = "20MHz"; str = ESP_LOG_ATTR_STR("20MHz");
break; break;
case ESP_IMAGE_SPI_SPEED_DIV_1: case ESP_IMAGE_SPI_SPEED_DIV_1:
str = "80MHz"; str = ESP_LOG_ATTR_STR("80MHz");
break; break;
default: default:
str = "20MHz"; str = ESP_LOG_ATTR_STR("20MHz");
break; break;
} }
ESP_EARLY_LOGI(TAG, "Boot SPI Speed : %s", str); ESP_EARLY_LOGI(TAG, "Boot SPI Speed : %s", str);
@@ -204,53 +204,53 @@ static void print_flash_info(const esp_image_header_t *bootloader_hdr)
esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode(); esp_rom_spiflash_read_mode_t spi_mode = bootloader_flash_get_spi_mode();
switch (spi_mode) { switch (spi_mode) {
case ESP_ROM_SPIFLASH_QIO_MODE: case ESP_ROM_SPIFLASH_QIO_MODE:
str = "QIO"; str = ESP_LOG_ATTR_STR("QIO");
break; break;
case ESP_ROM_SPIFLASH_QOUT_MODE: case ESP_ROM_SPIFLASH_QOUT_MODE:
str = "QOUT"; str = ESP_LOG_ATTR_STR("QOUT");
break; break;
case ESP_ROM_SPIFLASH_DIO_MODE: case ESP_ROM_SPIFLASH_DIO_MODE:
str = "DIO"; str = ESP_LOG_ATTR_STR("DIO");
break; break;
case ESP_ROM_SPIFLASH_DOUT_MODE: case ESP_ROM_SPIFLASH_DOUT_MODE:
str = "DOUT"; str = ESP_LOG_ATTR_STR("DOUT");
break; break;
case ESP_ROM_SPIFLASH_FASTRD_MODE: case ESP_ROM_SPIFLASH_FASTRD_MODE:
str = "FAST READ"; str = ESP_LOG_ATTR_STR("FAST READ");
break; break;
default: default:
str = "SLOW READ"; str = ESP_LOG_ATTR_STR("SLOW READ");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str); ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str);
switch (bootloader_hdr->spi_size) { switch (bootloader_hdr->spi_size) {
case ESP_IMAGE_FLASH_SIZE_1MB: case ESP_IMAGE_FLASH_SIZE_1MB:
str = "1MB"; str = ESP_LOG_ATTR_STR("1MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_2MB: case ESP_IMAGE_FLASH_SIZE_2MB:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_4MB: case ESP_IMAGE_FLASH_SIZE_4MB:
str = "4MB"; str = ESP_LOG_ATTR_STR("4MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_8MB: case ESP_IMAGE_FLASH_SIZE_8MB:
str = "8MB"; str = ESP_LOG_ATTR_STR("8MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_16MB: case ESP_IMAGE_FLASH_SIZE_16MB:
str = "16MB"; str = ESP_LOG_ATTR_STR("16MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_32MB: case ESP_IMAGE_FLASH_SIZE_32MB:
str = "32MB"; str = ESP_LOG_ATTR_STR("32MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_64MB: case ESP_IMAGE_FLASH_SIZE_64MB:
str = "64MB"; str = ESP_LOG_ATTR_STR("64MB");
break; break;
case ESP_IMAGE_FLASH_SIZE_128MB: case ESP_IMAGE_FLASH_SIZE_128MB:
str = "128MB"; str = ESP_LOG_ATTR_STR("128MB");
break; break;
default: default:
str = "2MB"; str = ESP_LOG_ATTR_STR("2MB");
break; break;
} }
ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str); ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str);

View File

@@ -21,7 +21,7 @@
#include "bootloader_flash_override.h" #include "bootloader_flash_override.h"
static const char *TAG = "qio_mode"; ESP_LOG_ATTR_TAG(TAG, "qio_mode");
/* Array of known flash chips and data to enable Quad I/O mode /* Array of known flash chips and data to enable Quad I/O mode

View File

@@ -27,7 +27,7 @@
#define ESP_PARTITION_HASH_LEN 32 /* SHA-256 digest length */ #define ESP_PARTITION_HASH_LEN 32 /* SHA-256 digest length */
static const char* TAG = "boot_comm"; ESP_LOG_ATTR_TAG(TAG, "boot_comm");
esp_comm_gpio_hold_t bootloader_common_check_long_hold_gpio(uint32_t num_pin, uint32_t delay_sec) esp_comm_gpio_hold_t bootloader_common_check_long_hold_gpio(uint32_t num_pin, uint32_t delay_sec)
{ {

View File

@@ -30,7 +30,7 @@
#define IS_FIELD_SET(rev_full) (((rev_full) != 65535) && ((rev_full) != 0)) #define IS_FIELD_SET(rev_full) (((rev_full) != 65535) && ((rev_full) != 0))
#define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1)) #define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1))
static const char* TAG = "boot_comm"; ESP_LOG_ATTR_TAG(TAG, "boot_comm");
bool bootloader_common_check_chip_revision_validity(const esp_image_header_t *img_hdr, bool check_max_revision) bool bootloader_common_check_chip_revision_validity(const esp_image_header_t *img_hdr, bool check_max_revision)
{ {

View File

@@ -21,7 +21,7 @@
#include "esp_bootloader_desc.h" #include "esp_bootloader_desc.h"
#include "esp_rom_sys.h" #include "esp_rom_sys.h"
static const char *TAG = "boot"; ESP_LOG_ATTR_TAG(TAG, "boot");
#if !CONFIG_APP_BUILD_TYPE_RAM #if !CONFIG_APP_BUILD_TYPE_RAM
esp_image_header_t WORD_ALIGNED_ATTR bootloader_image_hdr; esp_image_header_t WORD_ALIGNED_ATTR bootloader_image_hdr;

View File

@@ -57,7 +57,7 @@
#include "bootloader_utility_tee.h" #include "bootloader_utility_tee.h"
#endif #endif
static const char *TAG = "boot"; ESP_LOG_ATTR_TAG(TAG, "boot");
/* Reduce literal size for some generic string literals */ /* Reduce literal size for some generic string literals */
#define MAP_ERR_MSG "Image contains multiple %s segments. Only the last one will be mapped." #define MAP_ERR_MSG "Image contains multiple %s segments. Only the last one will be mapped."
@@ -168,7 +168,7 @@ bool bootloader_utility_load_partition_table(bootloader_state_t *bs)
const esp_partition_info_t *partition = &partitions[i]; const esp_partition_info_t *partition = &partitions[i];
ESP_LOGD(TAG, "load partition table entry 0x%x", (intptr_t)partition); ESP_LOGD(TAG, "load partition table entry 0x%x", (intptr_t)partition);
ESP_LOGD(TAG, "type=%x subtype=%x", partition->type, partition->subtype); ESP_LOGD(TAG, "type=%x subtype=%x", partition->type, partition->subtype);
partition_usage = "unknown"; partition_usage = ESP_LOG_ATTR_STR("unknown");
/* valid partition table */ /* valid partition table */
switch (partition->type) { switch (partition->type) {
@@ -176,17 +176,17 @@ bool bootloader_utility_load_partition_table(bootloader_state_t *bs)
switch (partition->subtype) { switch (partition->subtype) {
case PART_SUBTYPE_FACTORY: /* factory binary */ case PART_SUBTYPE_FACTORY: /* factory binary */
bs->factory = partition->pos; bs->factory = partition->pos;
partition_usage = "factory app"; partition_usage = ESP_LOG_ATTR_STR("factory app");
break; break;
case PART_SUBTYPE_TEST: /* test binary */ case PART_SUBTYPE_TEST: /* test binary */
bs->test = partition->pos; bs->test = partition->pos;
partition_usage = "test app"; partition_usage = ESP_LOG_ATTR_STR("test app");
break; break;
#if CONFIG_SECURE_ENABLE_TEE #if CONFIG_SECURE_ENABLE_TEE
case PART_SUBTYPE_TEE_0: /* TEE binary */ case PART_SUBTYPE_TEE_0: /* TEE binary */
case PART_SUBTYPE_TEE_1: case PART_SUBTYPE_TEE_1:
bs->tee[partition->subtype & 0x01] = partition->pos; bs->tee[partition->subtype & 0x01] = partition->pos;
partition_usage = "TEE app"; partition_usage = ESP_LOG_ATTR_STR("TEE app");
break; break;
#endif #endif
default: default:
@@ -194,9 +194,9 @@ bool bootloader_utility_load_partition_table(bootloader_state_t *bs)
if ((partition->subtype & ~PART_SUBTYPE_OTA_MASK) == PART_SUBTYPE_OTA_FLAG) { if ((partition->subtype & ~PART_SUBTYPE_OTA_MASK) == PART_SUBTYPE_OTA_FLAG) {
bs->ota[partition->subtype & PART_SUBTYPE_OTA_MASK] = partition->pos; bs->ota[partition->subtype & PART_SUBTYPE_OTA_MASK] = partition->pos;
++bs->app_count; ++bs->app_count;
partition_usage = "OTA app"; partition_usage = ESP_LOG_ATTR_STR("OTA app");
} else { } else {
partition_usage = "Unknown app"; partition_usage = ESP_LOG_ATTR_STR("Unknown app");
} }
break; break;
} }
@@ -205,19 +205,19 @@ bool bootloader_utility_load_partition_table(bootloader_state_t *bs)
switch (partition->subtype) { switch (partition->subtype) {
case PART_SUBTYPE_DATA_OTA: /* ota data */ case PART_SUBTYPE_DATA_OTA: /* ota data */
bs->ota_info = partition->pos; bs->ota_info = partition->pos;
partition_usage = "OTA data"; partition_usage = ESP_LOG_ATTR_STR("OTA data");
break; break;
case PART_SUBTYPE_DATA_RF: case PART_SUBTYPE_DATA_RF:
partition_usage = "RF data"; partition_usage = ESP_LOG_ATTR_STR("RF data");
break; break;
case PART_SUBTYPE_DATA_WIFI: case PART_SUBTYPE_DATA_WIFI:
partition_usage = "WiFi data"; partition_usage = ESP_LOG_ATTR_STR("WiFi data");
break; break;
case PART_SUBTYPE_DATA_NVS_KEYS: case PART_SUBTYPE_DATA_NVS_KEYS:
partition_usage = "NVS keys"; partition_usage = ESP_LOG_ATTR_STR("NVS keys");
break; break;
case PART_SUBTYPE_DATA_EFUSE_EM: case PART_SUBTYPE_DATA_EFUSE_EM:
partition_usage = "efuse"; partition_usage = ESP_LOG_ATTR_STR("efuse");
#ifdef CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH #ifdef CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH
esp_efuse_init_virtual_mode_in_flash(partition->pos.offset, partition->pos.size); esp_efuse_init_virtual_mode_in_flash(partition->pos.offset, partition->pos.size);
#endif #endif
@@ -225,34 +225,34 @@ bool bootloader_utility_load_partition_table(bootloader_state_t *bs)
#if CONFIG_SECURE_ENABLE_TEE #if CONFIG_SECURE_ENABLE_TEE
case PART_SUBTYPE_DATA_TEE_OTA: /* TEE ota data */ case PART_SUBTYPE_DATA_TEE_OTA: /* TEE ota data */
bs->tee_ota_info = partition->pos; bs->tee_ota_info = partition->pos;
partition_usage = "TEE OTA data"; partition_usage = ESP_LOG_ATTR_STR("TEE OTA data");
break; break;
#endif #endif
default: default:
partition_usage = "Unknown data"; partition_usage = ESP_LOG_ATTR_STR("Unknown data");
break; break;
} }
break; /* PARTITION_USAGE_DATA */ break; /* PARTITION_USAGE_DATA */
case PART_TYPE_BOOTLOADER: /* Bootloader partition */ case PART_TYPE_BOOTLOADER: /* Bootloader partition */
switch (partition->subtype) { switch (partition->subtype) {
case PART_SUBTYPE_BOOTLOADER_PRIMARY: case PART_SUBTYPE_BOOTLOADER_PRIMARY:
partition_usage = "primary bootloader"; partition_usage = ESP_LOG_ATTR_STR("primary bootloader");
break; break;
case PART_SUBTYPE_BOOTLOADER_OTA: case PART_SUBTYPE_BOOTLOADER_OTA:
partition_usage = "ota bootloader"; partition_usage = ESP_LOG_ATTR_STR("ota bootloader");
break; break;
case PART_SUBTYPE_BOOTLOADER_RECOVERY: case PART_SUBTYPE_BOOTLOADER_RECOVERY:
partition_usage = "recovery bootloader"; partition_usage = ESP_LOG_ATTR_STR("recovery bootloader");
break; break;
} }
break; /* PART_TYPE_BOOTLOADER */ break; /* PART_TYPE_BOOTLOADER */
case PART_TYPE_PARTITION_TABLE: /* Partition table partition */ case PART_TYPE_PARTITION_TABLE: /* Partition table partition */
switch (partition->subtype) { switch (partition->subtype) {
case PART_SUBTYPE_PARTITION_TABLE_PRIMARY: case PART_SUBTYPE_PARTITION_TABLE_PRIMARY:
partition_usage = "primary partition_table"; partition_usage = ESP_LOG_ATTR_STR("primary partition_table");
break; break;
case PART_SUBTYPE_PARTITION_TABLE_OTA: case PART_SUBTYPE_PARTITION_TABLE_OTA:
partition_usage = "ota partition_table"; partition_usage = ESP_LOG_ATTR_STR("ota partition_table");
break; break;
} }
break; /* PART_TYPE_PARTITION_TABLE */ break; /* PART_TYPE_PARTITION_TABLE */
@@ -293,7 +293,7 @@ static esp_partition_pos_t index_to_partition(const bootloader_state_t *bs, int
static void log_invalid_app_partition(int index) static void log_invalid_app_partition(int index)
{ {
const char *not_bootable = " is not bootable"; /* save a few string literal bytes */ const char *not_bootable = ESP_LOG_ATTR_STR(" is not bootable"); /* save a few string literal bytes */
switch (index) { switch (index) {
case FACTORY_INDEX: case FACTORY_INDEX:
ESP_LOGE(TAG, "Factory app partition%s", not_bootable); ESP_LOGE(TAG, "Factory app partition%s", not_bootable);
@@ -867,9 +867,9 @@ static void unpack_load_app(const esp_image_metadata_t *data)
const esp_image_segment_header_t *header = &data->segments[i]; const esp_image_segment_header_t *header = &data->segments[i];
if (header->load_addr >= SOC_DROM_LOW && header->load_addr < SOC_DROM_HIGH) { if (header->load_addr >= SOC_DROM_LOW && header->load_addr < SOC_DROM_HIGH) {
if (drom_addr != 0) { if (drom_addr != 0) {
ESP_EARLY_LOGE(TAG, MAP_ERR_MSG, "DROM"); ESP_EARLY_LOGE(TAG, MAP_ERR_MSG, ESP_LOG_ATTR_STR("DROM"));
} else { } else {
ESP_EARLY_LOGD(TAG, "Mapping segment %d as %s", i, "DROM"); ESP_EARLY_LOGD(TAG, "Mapping segment %d as %s", i, ESP_LOG_ATTR_STR("DROM"));
} }
drom_addr = data->segment_data[i]; drom_addr = data->segment_data[i];
drom_load_addr = header->load_addr; drom_load_addr = header->load_addr;
@@ -877,9 +877,9 @@ static void unpack_load_app(const esp_image_metadata_t *data)
} }
if (header->load_addr >= SOC_IROM_LOW && header->load_addr < SOC_IROM_HIGH) { if (header->load_addr >= SOC_IROM_LOW && header->load_addr < SOC_IROM_HIGH) {
if (irom_addr != 0) { if (irom_addr != 0) {
ESP_EARLY_LOGE(TAG, MAP_ERR_MSG, "IROM"); ESP_EARLY_LOGE(TAG, MAP_ERR_MSG, ESP_LOG_ATTR_STR("IROM"));
} else { } else {
ESP_EARLY_LOGD(TAG, "Mapping segment %d as %s", i, "IROM"); ESP_EARLY_LOGD(TAG, "Mapping segment %d as %s", i, ESP_LOG_ATTR_STR("IROM"));
} }
irom_addr = data->segment_data[i]; irom_addr = data->segment_data[i];
irom_load_addr = header->load_addr; irom_load_addr = header->load_addr;

View File

@@ -24,7 +24,7 @@
#include "sdkconfig.h" #include "sdkconfig.h"
static const char *TAG = "boot_tee"; ESP_LOG_ATTR_TAG(TAG, "boot_tee");
static esp_err_t write_tee_otadata_sector(esp_tee_ota_select_entry_t *tee_otadata, uint32_t offset) static esp_err_t write_tee_otadata_sector(esp_tee_ota_select_entry_t *tee_otadata, uint32_t offset)
{ {

View File

@@ -37,7 +37,7 @@
#include "esp_rom_spiflash.h" #include "esp_rom_spiflash.h"
#include "esp_efuse.h" #include "esp_efuse.h"
static const char *TAG = "boot.esp32"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32");
#if !CONFIG_APP_BUILD_TYPE_RAM #if !CONFIG_APP_BUILD_TYPE_RAM
static void bootloader_reset_mmu(void) static void bootloader_reset_mmu(void)
@@ -91,7 +91,7 @@ static void wdt_reset_info_dump(int cpu)
{ {
uint32_t inst = 0, pid = 0, stat = 0, data = 0, pc = 0, uint32_t inst = 0, pid = 0, stat = 0, data = 0, pc = 0,
lsstat = 0, lsaddr = 0, lsdata = 0, dstat = 0; lsstat = 0, lsaddr = 0, lsdata = 0, dstat = 0;
const char *cpu_name = cpu ? "APP" : "PRO"; const char *cpu_name = cpu ? ESP_LOG_ATTR_STR("APP") : ESP_LOG_ATTR_STR("PRO");
if (cpu == 0) { if (cpu == 0) {
stat = DPORT_REG_READ(DPORT_PRO_CPU_RECORD_STATUS_REG); stat = DPORT_REG_READ(DPORT_PRO_CPU_RECORD_STATUS_REG);

View File

@@ -12,7 +12,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "flash_encrypt"; ESP_LOG_ATTR_TAG(TAG, "flash_encrypt");
esp_err_t esp_flash_encryption_enable_secure_features(void) esp_err_t esp_flash_encryption_enable_secure_features(void)
{ {

View File

@@ -12,7 +12,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "secure_boot"; ESP_LOG_ATTR_TAG(TAG, "secure_boot");
esp_err_t esp_secure_boot_enable_secure_features(void) esp_err_t esp_secure_boot_enable_secure_features(void)
{ {

View File

@@ -39,7 +39,7 @@
#include "hal/rwdt_ll.h" #include "hal/rwdt_ll.h"
#include "hal/brownout_ll.h" #include "hal/brownout_ll.h"
static const char *TAG = "boot.esp32c2"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32c2");
static void wdt_reset_cpu0_info_enable(void) static void wdt_reset_cpu0_info_enable(void)
{ {

View File

@@ -12,7 +12,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "flash_encrypt"; ESP_LOG_ATTR_TAG(TAG, "flash_encrypt");
esp_err_t esp_flash_encryption_enable_secure_features(void) esp_err_t esp_flash_encryption_enable_secure_features(void)
{ {

View File

@@ -12,7 +12,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "secure_boot"; ESP_LOG_ATTR_TAG(TAG, "secure_boot");
esp_err_t esp_secure_boot_enable_secure_features(void) esp_err_t esp_secure_boot_enable_secure_features(void)
{ {

View File

@@ -44,7 +44,7 @@
#include "hal/rwdt_ll.h" #include "hal/rwdt_ll.h"
#include "hal/brownout_ll.h" #include "hal/brownout_ll.h"
static const char *TAG = "boot.esp32c3"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32c3");
static void wdt_reset_cpu0_info_enable(void) static void wdt_reset_cpu0_info_enable(void)
{ {

View File

@@ -12,7 +12,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "flash_encrypt"; ESP_LOG_ATTR_TAG(TAG, "flash_encrypt");
esp_err_t esp_flash_encryption_enable_secure_features(void) esp_err_t esp_flash_encryption_enable_secure_features(void)
{ {

View File

@@ -12,7 +12,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "secure_boot"; ESP_LOG_ATTR_TAG(TAG, "secure_boot");
esp_err_t esp_secure_boot_enable_secure_features(void) esp_err_t esp_secure_boot_enable_secure_features(void)
{ {

View File

@@ -44,7 +44,7 @@
#include "hal/regi2c_ctrl_ll.h" #include "hal/regi2c_ctrl_ll.h"
#include "hal/brownout_ll.h" #include "hal/brownout_ll.h"
static const char *TAG = "boot.esp32c5"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32c5");
static void wdt_reset_cpu0_info_enable(void) static void wdt_reset_cpu0_info_enable(void)
{ {

View File

@@ -16,7 +16,7 @@
#include "soc/soc_caps.h" #include "soc/soc_caps.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "flash_encrypt"; ESP_LOG_ATTR_TAG(TAG, "flash_encrypt");
esp_err_t esp_flash_encryption_enable_secure_features(void) esp_err_t esp_flash_encryption_enable_secure_features(void)
{ {

View File

@@ -12,7 +12,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "secure_boot"; ESP_LOG_ATTR_TAG(TAG, "secure_boot");
esp_err_t esp_secure_boot_enable_secure_features(void) esp_err_t esp_secure_boot_enable_secure_features(void)
{ {

View File

@@ -46,7 +46,7 @@
#include "hal/regi2c_ctrl_ll.h" #include "hal/regi2c_ctrl_ll.h"
#include "hal/brownout_ll.h" #include "hal/brownout_ll.h"
static const char *TAG = "boot.esp32c6"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32c6");
static void wdt_reset_cpu0_info_enable(void) static void wdt_reset_cpu0_info_enable(void)
{ {

View File

@@ -12,7 +12,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "flash_encrypt"; ESP_LOG_ATTR_TAG(TAG, "flash_encrypt");
esp_err_t esp_flash_encryption_enable_secure_features(void) esp_err_t esp_flash_encryption_enable_secure_features(void)
{ {

View File

@@ -12,7 +12,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "secure_boot"; ESP_LOG_ATTR_TAG(TAG, "secure_boot");
esp_err_t esp_secure_boot_enable_secure_features(void) esp_err_t esp_secure_boot_enable_secure_features(void)
{ {

View File

@@ -45,7 +45,7 @@
#include "hal/regi2c_ctrl_ll.h" #include "hal/regi2c_ctrl_ll.h"
#include "hal/brownout_ll.h" #include "hal/brownout_ll.h"
static const char *TAG = "boot.esp32c61"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32c61");
static void wdt_reset_cpu0_info_enable(void) static void wdt_reset_cpu0_info_enable(void)
{ {

View File

@@ -12,7 +12,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "flash_encrypt"; ESP_LOG_ATTR_TAG(TAG, "flash_encrypt");
esp_err_t esp_flash_encryption_enable_secure_features(void) esp_err_t esp_flash_encryption_enable_secure_features(void)
{ {

View File

@@ -12,7 +12,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "secure_boot"; ESP_LOG_ATTR_TAG(TAG, "secure_boot");
esp_err_t esp_secure_boot_enable_secure_features(void) esp_err_t esp_secure_boot_enable_secure_features(void)
{ {

View File

@@ -45,7 +45,7 @@
#include "hal/regi2c_ctrl_ll.h" #include "hal/regi2c_ctrl_ll.h"
#include "hal/brownout_ll.h" #include "hal/brownout_ll.h"
static const char *TAG = "boot.esp32h2"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32h2");
static void wdt_reset_cpu0_info_enable(void) static void wdt_reset_cpu0_info_enable(void)
{ {

View File

@@ -15,7 +15,7 @@
#include "soc/soc_caps.h" #include "soc/soc_caps.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "flash_encrypt"; ESP_LOG_ATTR_TAG(TAG, "flash_encrypt");
esp_err_t esp_flash_encryption_enable_secure_features(void) esp_err_t esp_flash_encryption_enable_secure_features(void)
{ {

View File

@@ -13,7 +13,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "secure_boot"; ESP_LOG_ATTR_TAG(TAG, "secure_boot");
esp_err_t esp_secure_boot_enable_secure_features(void) esp_err_t esp_secure_boot_enable_secure_features(void)
{ {

View File

@@ -44,7 +44,7 @@
#include "hal/efuse_hal.h" #include "hal/efuse_hal.h"
#include "hal/regi2c_ctrl_ll.h" #include "hal/regi2c_ctrl_ll.h"
static const char *TAG = "boot.esp32h21"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32h21");
static void wdt_reset_cpu0_info_enable(void) static void wdt_reset_cpu0_info_enable(void)
{ {

View File

@@ -12,7 +12,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "flash_encrypt"; ESP_LOG_ATTR_TAG(TAG, "flash_encrypt");
esp_err_t esp_flash_encryption_enable_secure_features(void) esp_err_t esp_flash_encryption_enable_secure_features(void)
{ {

View File

@@ -12,7 +12,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "secure_boot"; ESP_LOG_ATTR_TAG(TAG, "secure_boot");
esp_err_t esp_secure_boot_enable_secure_features(void) esp_err_t esp_secure_boot_enable_secure_features(void)
{ {

View File

@@ -39,7 +39,7 @@
#include "hal/efuse_hal.h" #include "hal/efuse_hal.h"
#include "hal/lpwdt_ll.h" #include "hal/lpwdt_ll.h"
static const char *TAG = "boot.esp32h4"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32h4");
// TODO: [ESP32H4] support core1 bus monitor IDF-12592 // TODO: [ESP32H4] support core1 bus monitor IDF-12592
static void wdt_reset_cpu0_info_enable(void) static void wdt_reset_cpu0_info_enable(void)

View File

@@ -14,7 +14,7 @@
//TODO: [ESP32H4] IDF-12261 //TODO: [ESP32H4] IDF-12261
static __attribute__((unused)) const char *TAG = "flash_encrypt"; ESP_LOG_ATTR_TAG(TAG, "flash_encrypt");
esp_err_t esp_flash_encryption_enable_secure_features(void) esp_err_t esp_flash_encryption_enable_secure_features(void)
{ {

View File

@@ -14,7 +14,7 @@
//TODO: [ESP32H4] IDF-12262 //TODO: [ESP32H4] IDF-12262
static __attribute__((unused)) const char *TAG = "secure_boot"; ESP_LOG_ATTR_TAG(TAG, "secure_boot");
esp_err_t esp_secure_boot_enable_secure_features(void) esp_err_t esp_secure_boot_enable_secure_features(void)
{ {

View File

@@ -52,7 +52,7 @@
#include "hal/regi2c_ctrl_ll.h" #include "hal/regi2c_ctrl_ll.h"
#include "hal/brownout_ll.h" #include "hal/brownout_ll.h"
static const char *TAG = "boot.esp32p4"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32p4");
static void wdt_reset_cpu0_info_enable(void) static void wdt_reset_cpu0_info_enable(void)
{ {

View File

@@ -14,7 +14,7 @@
#include "hal/key_mgr_ll.h" #include "hal/key_mgr_ll.h"
#include "hal/mspi_ll.h" #include "hal/mspi_ll.h"
static __attribute__((unused)) const char *TAG = "flash_encrypt"; ESP_LOG_ATTR_TAG(TAG, "flash_encrypt");
esp_err_t esp_flash_encryption_enable_secure_features(void) esp_err_t esp_flash_encryption_enable_secure_features(void)
{ {

View File

@@ -12,7 +12,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "secure_boot"; ESP_LOG_ATTR_TAG(TAG, "secure_boot");
esp_err_t esp_secure_boot_enable_secure_features(void) esp_err_t esp_secure_boot_enable_secure_features(void)
{ {

View File

@@ -39,7 +39,7 @@
#include "hal/mmu_hal.h" #include "hal/mmu_hal.h"
#include "hal/cache_hal.h" #include "hal/cache_hal.h"
static const char *TAG = "boot.esp32s2"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32s2");
static void wdt_reset_cpu0_info_enable(void) static void wdt_reset_cpu0_info_enable(void)
{ {

View File

@@ -12,7 +12,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "flash_encrypt"; ESP_LOG_ATTR_TAG(TAG, "flash_encrypt");
esp_err_t esp_flash_encryption_enable_secure_features(void) esp_err_t esp_flash_encryption_enable_secure_features(void)
{ {

View File

@@ -12,7 +12,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "secure_boot"; ESP_LOG_ATTR_TAG(TAG, "secure_boot");
esp_err_t esp_secure_boot_enable_secure_features(void) esp_err_t esp_secure_boot_enable_secure_features(void)
{ {

View File

@@ -44,7 +44,7 @@
#include "xt_instr_macros.h" #include "xt_instr_macros.h"
static const char *TAG = "boot.esp32s3"; ESP_LOG_ATTR_TAG(TAG, "boot.esp32s3");
static void wdt_reset_cpu0_info_enable(void) static void wdt_reset_cpu0_info_enable(void)
{ {
@@ -58,7 +58,7 @@ static void wdt_reset_info_dump(int cpu)
{ {
uint32_t inst = 0, pid = 0, stat = 0, data = 0, pc = 0, uint32_t inst = 0, pid = 0, stat = 0, data = 0, pc = 0,
lsstat = 0, lsaddr = 0, lsdata = 0, dstat = 0; lsstat = 0, lsaddr = 0, lsdata = 0, dstat = 0;
const char *cpu_name = cpu ? "APP" : "PRO"; const char *cpu_name = cpu ? ESP_LOG_ATTR_STR("APP") : ESP_LOG_ATTR_STR("PRO");
stat = 0xdeadbeef; stat = 0xdeadbeef;
pid = 0; pid = 0;

View File

@@ -12,7 +12,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "flash_encrypt"; ESP_LOG_ATTR_TAG(TAG, "flash_encrypt");
esp_err_t esp_flash_encryption_enable_secure_features(void) esp_err_t esp_flash_encryption_enable_secure_features(void)
{ {

View File

@@ -12,7 +12,7 @@
#include "esp_log.h" #include "esp_log.h"
#include "sdkconfig.h" #include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "secure_boot"; ESP_LOG_ATTR_TAG(TAG, "secure_boot");
esp_err_t esp_secure_boot_enable_secure_features(void) esp_err_t esp_secure_boot_enable_secure_features(void)
{ {

View File

@@ -45,7 +45,7 @@
#endif #endif
#endif #endif
static const char *TAG = "esp_image"; ESP_LOG_ATTR_TAG(TAG, "esp_image");
#define HASH_LEN ESP_IMAGE_HASH_LEN #define HASH_LEN ESP_IMAGE_HASH_LEN
@@ -412,7 +412,7 @@ static bool verify_load_addresses(int segment_index, intptr_t load_addr, intptr_
intptr_t sp = (intptr_t)esp_cpu_get_sp(); intptr_t sp = (intptr_t)esp_cpu_get_sp();
if (bootloader_util_regions_overlap(sp - STACK_LOAD_HEADROOM, ROM_STACK_START, if (bootloader_util_regions_overlap(sp - STACK_LOAD_HEADROOM, ROM_STACK_START,
load_addr, load_end)) { load_addr, load_end)) {
reason = "overlaps bootloader stack"; reason = ESP_LOG_ATTR_STR("overlaps bootloader stack");
goto invalid; goto invalid;
} }
@@ -421,7 +421,7 @@ static bool verify_load_addresses(int segment_index, intptr_t load_addr, intptr_
(_dram_start.._dram_end includes bss, data, rodata sections in DRAM) (_dram_start.._dram_end includes bss, data, rodata sections in DRAM)
*/ */
if (bootloader_util_regions_overlap((intptr_t)&_dram_start, (intptr_t)&_dram_end, load_addr, load_end)) { if (bootloader_util_regions_overlap((intptr_t)&_dram_start, (intptr_t)&_dram_end, load_addr, load_end)) {
reason = "overlaps bootloader data"; reason = ESP_LOG_ATTR_STR("overlaps bootloader data");
goto invalid; goto invalid;
} }
@@ -459,7 +459,7 @@ static bool verify_load_addresses(int segment_index, intptr_t load_addr, intptr_
/* Check for overlap of 'loader' section of IRAM */ /* Check for overlap of 'loader' section of IRAM */
if (bootloader_util_regions_overlap((intptr_t)&_loader_text_start, (intptr_t)&_loader_text_end, if (bootloader_util_regions_overlap((intptr_t)&_loader_text_start, (intptr_t)&_loader_text_end,
load_addr, load_end)) { load_addr, load_end)) {
reason = "overlaps loader IRAM"; reason = ESP_LOG_ATTR_STR("overlaps loader IRAM");
goto invalid; goto invalid;
} }
@@ -514,7 +514,7 @@ static bool verify_load_addresses(int segment_index, intptr_t load_addr, intptr_
#endif #endif
else { /* Not a DRAM or an IRAM or RTC Fast IRAM, RTC Fast DRAM or RTC Slow address */ else { /* Not a DRAM or an IRAM or RTC Fast IRAM, RTC Fast DRAM or RTC Slow address */
reason = "bad load address range"; reason = ESP_LOG_ATTR_STR("bad load address range");
goto invalid; goto invalid;
} }
return true; return true;
@@ -617,7 +617,7 @@ static esp_err_t process_segment(int index, uint32_t flash_addr, esp_image_segme
ESP_LOGI(TAG, "segment %d: paddr=%08"PRIx32" vaddr=%08x size=%05"PRIx32"h (%6"PRIu32") %s", ESP_LOGI(TAG, "segment %d: paddr=%08"PRIx32" vaddr=%08x size=%05"PRIx32"h (%6"PRIu32") %s",
index, data_addr, load_addr, index, data_addr, load_addr,
data_len, data_len, data_len, data_len,
(do_load) ? "load" : (is_mapping) ? "map" : ""); (do_load) ? ESP_LOG_ATTR_STR("load") : (is_mapping) ? ESP_LOG_ATTR_STR("map") : "");
} }

View File

@@ -24,7 +24,7 @@
#define WR_DIS_CRYPT_CNT ESP_EFUSE_WR_DIS_SPI_BOOT_CRYPT_CNT #define WR_DIS_CRYPT_CNT ESP_EFUSE_WR_DIS_SPI_BOOT_CRYPT_CNT
#endif #endif
static const char *TAG = "flash_encrypt"; ESP_LOG_ATTR_TAG(TAG, "flash_encrypt");
#ifndef BOOTLOADER_BUILD #ifndef BOOTLOADER_BUILD
void esp_flash_encryption_init_checks() void esp_flash_encryption_init_checks()

View File

@@ -39,7 +39,7 @@
* and if required encrypt the partitions in flash memory * and if required encrypt the partitions in flash memory
*/ */
static const char *TAG = "flash_encrypt"; ESP_LOG_ATTR_TAG(TAG, "flash_encrypt");
/* Static functions for stages of flash encryption */ /* Static functions for stages of flash encryption */
static esp_err_t encrypt_bootloader(void); static esp_err_t encrypt_bootloader(void);

View File

@@ -9,7 +9,7 @@
#include "esp_rom_md5.h" #include "esp_rom_md5.h"
#include "esp_rom_spiflash.h" #include "esp_rom_spiflash.h"
static const char *TAG = "flash_parts"; ESP_LOG_ATTR_TAG(TAG, "flash_parts");
esp_err_t esp_partition_table_verify(const esp_partition_info_t *partition_table, bool log_errors, int *num_partitions) esp_err_t esp_partition_table_verify(const esp_partition_info_t *partition_table, bool log_errors, int *num_partitions)
{ {

View File

@@ -17,7 +17,7 @@
#endif #endif
#ifndef BOOTLOADER_BUILD #ifndef BOOTLOADER_BUILD
static __attribute__((unused)) const char *TAG = "secure_boot"; ESP_LOG_ATTR_TAG(TAG, "secure_boot");
#ifdef CONFIG_SECURE_BOOT #ifdef CONFIG_SECURE_BOOT
static void efuse_batch_write_begin(bool *need_fix) static void efuse_batch_write_begin(bool *need_fix)

View File

@@ -31,7 +31,7 @@
*/ */
#ifdef CONFIG_SECURE_BOOT_V1_ENABLED #ifdef CONFIG_SECURE_BOOT_V1_ENABLED
static const char *TAG = "secure_boot_v1"; ESP_LOG_ATTR_TAG(TAG, "secure_boot_v1");
/** /**
* @function : secure_boot_generate * @function : secure_boot_generate
* @description: generate boot digest (aka "abstract") & iv * @description: generate boot digest (aka "abstract") & iv

View File

@@ -21,7 +21,7 @@
#include <sys/param.h> #include <sys/param.h>
#ifdef CONFIG_SECURE_SIGNED_APPS_ECDSA_SCHEME #ifdef CONFIG_SECURE_SIGNED_APPS_ECDSA_SCHEME
static const char *TAG = "secure_boot_v1"; ESP_LOG_ATTR_TAG(TAG, "secure_boot_v1");
extern const uint8_t signature_verification_key_start[] asm("_binary_signature_verification_key_bin_start"); extern const uint8_t signature_verification_key_start[] asm("_binary_signature_verification_key_bin_start");
extern const uint8_t signature_verification_key_end[] asm("_binary_signature_verification_key_bin_end"); extern const uint8_t signature_verification_key_end[] asm("_binary_signature_verification_key_bin_end");

View File

@@ -18,7 +18,7 @@
#include <sys/param.h> #include <sys/param.h>
#include <string.h> #include <string.h>
static const char *TAG = "secure_boot"; ESP_LOG_ATTR_TAG(TAG, "secure_boot");
#ifdef CONFIG_SECURE_SIGNED_APPS_ECDSA_SCHEME #ifdef CONFIG_SECURE_SIGNED_APPS_ECDSA_SCHEME
extern const uint8_t signature_verification_key_start[] asm("_binary_signature_verification_key_bin_start"); extern const uint8_t signature_verification_key_start[] asm("_binary_signature_verification_key_bin_start");

View File

@@ -28,7 +28,7 @@ extern esp_image_metadata_t tee_data;
#endif #endif
#define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1)) #define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1))
static const char *TAG = "secure_boot_v2"; ESP_LOG_ATTR_TAG(TAG, "secure_boot_v2");
/* A signature block is valid when it has correct magic byte, crc and image digest. */ /* A signature block is valid when it has correct magic byte, crc and image digest. */
static esp_err_t validate_signature_block(const ets_secure_boot_sig_block_t *block, int block_num, const uint8_t *image_digest) static esp_err_t validate_signature_block(const ets_secure_boot_sig_block_t *block, int block_num, const uint8_t *image_digest)

View File

@@ -16,7 +16,7 @@
#include "secure_boot_signature_priv.h" #include "secure_boot_signature_priv.h"
static const char *TAG = "secure_boot_v2_ecdsa"; ESP_LOG_ATTR_TAG(TAG, "secure_boot_v2_ecdsa");
#define ECDSA_INTEGER_LEN 32 #define ECDSA_INTEGER_LEN 32

View File

@@ -14,7 +14,7 @@
#include "secure_boot_signature_priv.h" #include "secure_boot_signature_priv.h"
static const char *TAG = "secure_boot_v2_rsa"; ESP_LOG_ATTR_TAG(TAG, "secure_boot_v2_rsa");
esp_err_t verify_rsa_signature_block(const ets_secure_boot_signature_t *sig_block, const uint8_t *image_digest, const ets_secure_boot_sig_block_t *trusted_block) esp_err_t verify_rsa_signature_block(const ets_secure_boot_signature_t *sig_block, const uint8_t *image_digest, const ets_secure_boot_sig_block_t *trusted_block)
{ {

View File

@@ -34,7 +34,7 @@ _Static_assert(SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS == SECURE_BOOT_NUM_BLOCKS,
#if CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME || CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME || CONFIG_SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT #if CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME || CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME || CONFIG_SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
static const char *TAG = "secure_boot_v2"; ESP_LOG_ATTR_TAG(TAG, "secure_boot_v2");
#define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1)) #define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1))
/* A signature block is valid when it has correct magic byte, crc. */ /* A signature block is valid when it has correct magic byte, crc. */

View File

@@ -20,7 +20,7 @@
#if CONFIG_SECURE_BOOT_V2_ENABLED #if CONFIG_SECURE_BOOT_V2_ENABLED
static const char* TAG = "secure_boot_v2"; ESP_LOG_ATTR_TAG(TAG, "secure_boot_v2");
#define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1)) #define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1))

View File

@@ -18,7 +18,7 @@
#include "sys/param.h" #include "sys/param.h"
#include "soc/syscon_reg.h" #include "soc/syscon_reg.h"
const static char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
// Contains functions that provide access to efuse fields which are often used in IDF. // Contains functions that provide access to efuse fields which are often used in IDF.

View File

@@ -13,7 +13,7 @@
#include "sdkconfig.h" #include "sdkconfig.h"
#include <sys/param.h> #include <sys/param.h>
static const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
#ifdef CONFIG_EFUSE_VIRTUAL #ifdef CONFIG_EFUSE_VIRTUAL
extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK]; extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK];
@@ -220,7 +220,7 @@ static void read_r_data(esp_efuse_block_t num_block, uint32_t* buf_r_data)
} }
} }
// This function just checkes that given data for blocks will not rise a coding issue during the burn operation. // This function just checks that given data for blocks will not rise a coding issue during the burn operation.
// Encoded data will be set during the burn operation. // Encoded data will be set during the burn operation.
esp_err_t esp_efuse_utility_apply_new_coding_scheme() esp_err_t esp_efuse_utility_apply_new_coding_scheme()
{ {

View File

@@ -15,7 +15,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "sys/param.h" #include "sys/param.h"
static __attribute__((unused)) const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
// Contains functions that provide access to efuse fields which are often used in IDF. // Contains functions that provide access to efuse fields which are often used in IDF.

View File

@@ -13,7 +13,7 @@
#include "esp_private/esp_clk.h" #include "esp_private/esp_clk.h"
#include "hal/efuse_hal.h" #include "hal/efuse_hal.h"
static const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
#ifdef CONFIG_EFUSE_VIRTUAL #ifdef CONFIG_EFUSE_VIRTUAL
extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK]; extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK];

View File

@@ -15,7 +15,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "sys/param.h" #include "sys/param.h"
static __attribute__((unused)) const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
// Contains functions that provide access to efuse fields which are often used in IDF. // Contains functions that provide access to efuse fields which are often used in IDF.

View File

@@ -12,7 +12,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "hal/efuse_hal.h" #include "hal/efuse_hal.h"
static const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
#ifdef CONFIG_EFUSE_VIRTUAL #ifdef CONFIG_EFUSE_VIRTUAL
extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK]; extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK];

View File

@@ -15,7 +15,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "sys/param.h" #include "sys/param.h"
static __attribute__((unused)) const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
// Contains functions that provide access to efuse fields which are often used in IDF. // Contains functions that provide access to efuse fields which are often used in IDF.

View File

@@ -12,7 +12,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "hal/efuse_hal.h" #include "hal/efuse_hal.h"
static const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
#ifdef CONFIG_EFUSE_VIRTUAL #ifdef CONFIG_EFUSE_VIRTUAL
extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK]; extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK];

View File

@@ -15,7 +15,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "sys/param.h" #include "sys/param.h"
static __attribute__((unused)) const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
// Contains functions that provide access to efuse fields which are often used in IDF. // Contains functions that provide access to efuse fields which are often used in IDF.

View File

@@ -12,7 +12,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "hal/efuse_hal.h" #include "hal/efuse_hal.h"
static const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
#ifdef CONFIG_EFUSE_VIRTUAL #ifdef CONFIG_EFUSE_VIRTUAL
extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK]; extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK];

View File

@@ -15,7 +15,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "sys/param.h" #include "sys/param.h"
static __attribute__((unused)) const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
// Contains functions that provide access to efuse fields which are often used in IDF. // Contains functions that provide access to efuse fields which are often used in IDF.

View File

@@ -12,7 +12,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "hal/efuse_hal.h" #include "hal/efuse_hal.h"
static const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
#ifdef CONFIG_EFUSE_VIRTUAL #ifdef CONFIG_EFUSE_VIRTUAL
extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK]; extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK];

View File

@@ -15,7 +15,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "sys/param.h" #include "sys/param.h"
static __attribute__((unused)) const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
// Contains functions that provide access to efuse fields which are often used in IDF. // Contains functions that provide access to efuse fields which are often used in IDF.

View File

@@ -12,7 +12,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "hal/efuse_hal.h" #include "hal/efuse_hal.h"
static const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
#ifdef CONFIG_EFUSE_VIRTUAL #ifdef CONFIG_EFUSE_VIRTUAL
extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK]; extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK];

View File

@@ -15,7 +15,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "sys/param.h" #include "sys/param.h"
static __attribute__((unused)) const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
// Contains functions that provide access to efuse fields which are often used in IDF. // Contains functions that provide access to efuse fields which are often used in IDF.

View File

@@ -12,7 +12,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "hal/efuse_hal.h" #include "hal/efuse_hal.h"
static const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
#ifdef CONFIG_EFUSE_VIRTUAL #ifdef CONFIG_EFUSE_VIRTUAL
extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK]; extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK];

View File

@@ -15,7 +15,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "sys/param.h" #include "sys/param.h"
static __attribute__((unused)) const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
// Contains functions that provide access to efuse fields which are often used in IDF. // Contains functions that provide access to efuse fields which are often used in IDF.

View File

@@ -12,7 +12,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "hal/efuse_hal.h" #include "hal/efuse_hal.h"
static const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
#ifdef CONFIG_EFUSE_VIRTUAL #ifdef CONFIG_EFUSE_VIRTUAL
extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK]; extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK];

View File

@@ -16,7 +16,7 @@
#include "bootloader_random.h" #include "bootloader_random.h"
#include "sys/param.h" #include "sys/param.h"
static __attribute__((unused)) const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
// Contains functions that provide access to efuse fields which are often used in IDF. // Contains functions that provide access to efuse fields which are often used in IDF.

View File

@@ -12,7 +12,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "hal/efuse_hal.h" #include "hal/efuse_hal.h"
static const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
#ifdef CONFIG_EFUSE_VIRTUAL #ifdef CONFIG_EFUSE_VIRTUAL
extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK]; extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK];

View File

@@ -15,7 +15,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "sys/param.h" #include "sys/param.h"
static __attribute__((unused)) const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
// Contains functions that provide access to efuse fields which are often used in IDF. // Contains functions that provide access to efuse fields which are often used in IDF.

View File

@@ -13,7 +13,7 @@
#include "esp_private/esp_clk.h" #include "esp_private/esp_clk.h"
#include "hal/efuse_hal.h" #include "hal/efuse_hal.h"
static const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
#ifdef CONFIG_EFUSE_VIRTUAL #ifdef CONFIG_EFUSE_VIRTUAL
extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK]; extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK];

View File

@@ -15,7 +15,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "sys/param.h" #include "sys/param.h"
static __attribute__((unused)) const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
// Contains functions that provide access to efuse fields which are often used in IDF. // Contains functions that provide access to efuse fields which are often used in IDF.

View File

@@ -12,7 +12,7 @@
#include "sdkconfig.h" #include "sdkconfig.h"
#include <sys/param.h> #include <sys/param.h>
static const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
#ifdef CONFIG_EFUSE_VIRTUAL #ifdef CONFIG_EFUSE_VIRTUAL
extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK]; extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK];

View File

@@ -15,7 +15,7 @@
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "sys/param.h" #include "sys/param.h"
static __attribute__((unused)) const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
// Contains functions that provide access to efuse fields which are often used in IDF. // Contains functions that provide access to efuse fields which are often used in IDF.

View File

@@ -16,7 +16,7 @@
#error Linux target supports only VIRTUAL eFuses #error Linux target supports only VIRTUAL eFuses
#endif // CONFIG_EFUSE_VIRTUAL #endif // CONFIG_EFUSE_VIRTUAL
static const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK]; extern uint32_t virt_blocks[EFUSE_BLK_MAX][COUNT_EFUSE_REG_PER_BLOCK];

View File

@@ -18,7 +18,7 @@
* This special field is called key_purpose. * This special field is called key_purpose.
*/ */
const static char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
/** /**
* @brief Keys and their attributes are packed into a structure * @brief Keys and their attributes are packed into a structure

View File

@@ -20,7 +20,7 @@
static esp_err_t esp_efuse_set_key_purpose(esp_efuse_block_t block, esp_efuse_purpose_t purpose); static esp_err_t esp_efuse_set_key_purpose(esp_efuse_block_t block, esp_efuse_purpose_t purpose);
static __attribute__((unused)) const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
/** /**
* @brief Keys and their attributes are packed into a structure * @brief Keys and their attributes are packed into a structure

View File

@@ -18,7 +18,7 @@
* There are no eFuse key purpose fields (added only virtual key purposes to support key APIs). * There are no eFuse key purpose fields (added only virtual key purposes to support key APIs).
*/ */
static __attribute__((unused)) const char *TAG = "efuse"; ESP_LOG_ATTR_TAG(TAG, "efuse");
/** /**
* @brief Keys and their attributes are packed into a structure * @brief Keys and their attributes are packed into a structure

Some files were not shown because too many files have changed in this diff Show More