kopia lustrzana https://github.com/espressif/esp-idf
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
rodzic
1ac3fc79b7
commit
91d0e016a1
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue