소스 검색

bootloader: Disables unnecessary warning logs when invalid magic byte

KonstantinKondrashov 5 년 전
부모
커밋
87aeef65a8
1개의 변경된 파일1개의 추가작업 그리고 12개의 파일을 삭제
  1. 1 12
      components/bootloader_support/src/esp_image_format.c

+ 1 - 12
components/bootloader_support/src/esp_image_format.c

@@ -354,21 +354,10 @@ static esp_err_t verify_image_header(uint32_t src_addr, const esp_image_header_t
 
     if (image->magic != ESP_IMAGE_HEADER_MAGIC) {
         if (!silent) {
-            ESP_LOGE(TAG, "image at 0x%x has invalid magic byte", src_addr);
+            ESP_LOGE(TAG, "image at 0x%x has invalid magic byte (nothing flashed here?)", src_addr);
         }
         err = ESP_ERR_IMAGE_INVALID;
     }
-    if (!silent) {
-        if (image->spi_mode > ESP_IMAGE_SPI_MODE_SLOW_READ) {
-            ESP_LOGW(TAG, "image at 0x%x has invalid SPI mode %d", src_addr, image->spi_mode);
-        }
-        if (image->spi_speed > ESP_IMAGE_SPI_SPEED_80M) {
-            ESP_LOGW(TAG, "image at 0x%x has invalid SPI speed %d", src_addr, image->spi_speed);
-        }
-        if (image->spi_size > ESP_IMAGE_FLASH_SIZE_MAX) {
-            ESP_LOGW(TAG, "image at 0x%x has invalid SPI size %d", src_addr, image->spi_size);
-        }
-    }
 
     if (err == ESP_OK) {
         // Checking the chip revision header *will* print a bunch of other info