Merge branch 'test_app/app_update_remove_wno_compile_option' into 'master'

app_update: Remove `Wno-format` compile option for test app

Closes IDF-6788

See merge request espressif/esp-idf!22245
This commit is contained in:
Mahavir Jain
2023-02-08 14:21:05 +08:00
2 changed files with 6 additions and 7 deletions

View File

@@ -2,5 +2,3 @@ idf_component_register(SRC_DIRS "."
PRIV_INCLUDE_DIRS "." PRIV_INCLUDE_DIRS "."
PRIV_REQUIRES cmock test_utils app_update bootloader_support nvs_flash driver spi_flash PRIV_REQUIRES cmock test_utils app_update bootloader_support nvs_flash driver spi_flash
WHOLE_ARCHIVE) WHOLE_ARCHIVE)
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")

View File

@@ -10,6 +10,7 @@
#include <esp_types.h> #include <esp_types.h>
#include <stdio.h> #include <stdio.h>
#include "string.h" #include "string.h"
#include <inttypes.h>
#include "sdkconfig.h" #include "sdkconfig.h"
#include "esp_rom_spiflash.h" #include "esp_rom_spiflash.h"
@@ -126,7 +127,7 @@ static const esp_partition_t * get_next_update_partition(void)
{ {
const esp_partition_t *update_partition = esp_ota_get_next_update_partition(NULL); const esp_partition_t *update_partition = esp_ota_get_next_update_partition(NULL);
TEST_ASSERT_NOT_EQUAL(NULL, update_partition); TEST_ASSERT_NOT_EQUAL(NULL, update_partition);
ESP_LOGI(TAG, "Writing to partition subtype %d at offset 0x%x", update_partition->subtype, update_partition->address); ESP_LOGI(TAG, "Writing to partition subtype %d at offset 0x%"PRIx32, update_partition->subtype, update_partition->address);
return update_partition; return update_partition;
} }
@@ -139,7 +140,7 @@ static void copy_current_app_to_next_part(const esp_partition_t *cur_app_partiti
{ {
esp_ota_get_next_update_partition(NULL); esp_ota_get_next_update_partition(NULL);
TEST_ASSERT_NOT_EQUAL(NULL, next_app_partition); TEST_ASSERT_NOT_EQUAL(NULL, next_app_partition);
ESP_LOGI(TAG, "Writing to partition subtype %d at offset 0x%x", next_app_partition->subtype, next_app_partition->address); ESP_LOGI(TAG, "Writing to partition subtype %d at offset 0x%"PRIx32, next_app_partition->subtype, next_app_partition->address);
esp_ota_handle_t update_handle = 0; esp_ota_handle_t update_handle = 0;
TEST_ESP_OK(esp_ota_begin(next_app_partition, OTA_SIZE_UNKNOWN, &update_handle)); TEST_ESP_OK(esp_ota_begin(next_app_partition, OTA_SIZE_UNKNOWN, &update_handle));
@@ -159,7 +160,7 @@ static void copy_current_app_to_next_part_with_offset(const esp_partition_t *cur
{ {
esp_ota_get_next_update_partition(NULL); esp_ota_get_next_update_partition(NULL);
TEST_ASSERT_NOT_EQUAL(NULL, next_app_partition); TEST_ASSERT_NOT_EQUAL(NULL, next_app_partition);
ESP_LOGI(TAG, "Writing to partition subtype %d at offset 0x%x", next_app_partition->subtype, next_app_partition->address); ESP_LOGI(TAG, "Writing to partition subtype %d at offset 0x%"PRIx32, next_app_partition->subtype, next_app_partition->address);
esp_ota_handle_t update_handle = 0; esp_ota_handle_t update_handle = 0;
TEST_ESP_OK(esp_ota_begin(next_app_partition, OTA_SIZE_UNKNOWN, &update_handle)); TEST_ESP_OK(esp_ota_begin(next_app_partition, OTA_SIZE_UNKNOWN, &update_handle));
@@ -216,9 +217,9 @@ static const esp_partition_t* get_running_firmware(void)
{ {
const esp_partition_t *configured = esp_ota_get_boot_partition(); const esp_partition_t *configured = esp_ota_get_boot_partition();
const esp_partition_t *running = esp_ota_get_running_partition(); const esp_partition_t *running = esp_ota_get_running_partition();
ESP_LOGI(TAG, "Running partition type %d subtype %d (offset 0x%08x)", ESP_LOGI(TAG, "Running partition type %d subtype %d (offset 0x%08"PRIx32")",
running->type, running->subtype, running->address); running->type, running->subtype, running->address);
ESP_LOGI(TAG, "Configured partition type %d subtype %d (offset 0x%08x)", ESP_LOGI(TAG, "Configured partition type %d subtype %d (offset 0x%08"PRIx32")",
configured->type, configured->subtype, configured->address); configured->type, configured->subtype, configured->address);
TEST_ASSERT_NOT_EQUAL(NULL, configured); TEST_ASSERT_NOT_EQUAL(NULL, configured);
TEST_ASSERT_NOT_EQUAL(NULL, running); TEST_ASSERT_NOT_EQUAL(NULL, running);