mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 23:54:33 +02:00
spi_flash: fix build for Linux target
CONFIG_MMU_PAGE_SIZE is not defined for the Linux target, add a fallback definition.
This commit is contained in:
@@ -30,6 +30,13 @@
|
|||||||
#include "esp_private/partition_linux.h"
|
#include "esp_private/partition_linux.h"
|
||||||
#endif
|
#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
|
#ifndef NDEBUG
|
||||||
// Enable built-in checks in queue.h in debug builds
|
// Enable built-in checks in queue.h in debug builds
|
||||||
#define INVARIANTS
|
#define INVARIANTS
|
||||||
@@ -78,7 +85,7 @@ static esp_err_t load_partitions(void)
|
|||||||
esp_rom_md5_init(&context);
|
esp_rom_md5_init(&context);
|
||||||
#endif
|
#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;
|
uint32_t partition_pad = ESP_PARTITION_TABLE_OFFSET - partition_align_pg_size;
|
||||||
|
|
||||||
#if CONFIG_IDF_TARGET_LINUX
|
#if CONFIG_IDF_TARGET_LINUX
|
||||||
|
Reference in New Issue
Block a user