spi_flash: fix build for Linux target

CONFIG_MMU_PAGE_SIZE is not defined for the Linux target, add a
fallback definition.
pull/9582/head
Ivan Grokhotkov 2022-08-15 18:12:04 +02:00
rodzic 1ac3fc79b7
commit 91d0e016a1
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 1E050E141B280628
1 zmienionych plików z 8 dodań i 1 usunięć

Wyświetl plik

@ -30,6 +30,13 @@
#include "esp_private/partition_linux.h"
#endif
#ifndef CONFIG_IDF_TARGET_LINUX
#define MMU_PAGE_SIZE CONFIG_MMU_PAGE_SIZE
#else
// No relation to the page size on Linux; assume the same value as on ESP32
#define MMU_PAGE_SIZE 65536
#endif // CONFIG_MMU_PAGE_SIZE
#ifndef NDEBUG
// Enable built-in checks in queue.h in debug builds
#define INVARIANTS
@ -78,7 +85,7 @@ static esp_err_t load_partitions(void)
esp_rom_md5_init(&context);
#endif
uint32_t partition_align_pg_size = (ESP_PARTITION_TABLE_OFFSET) & ~(CONFIG_MMU_PAGE_SIZE - 1);
uint32_t partition_align_pg_size = (ESP_PARTITION_TABLE_OFFSET) & ~(MMU_PAGE_SIZE - 1);
uint32_t partition_pad = ESP_PARTITION_TABLE_OFFSET - partition_align_pg_size;
#if CONFIG_IDF_TARGET_LINUX