mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-20 00:36:01 -04:00
Merge branch 'bugfix/ESP_PARTITION_TABLE_OFFSET' into 'master'
spi_flash: Fix error unit tests on host See merge request idf/esp-idf!2573
This commit is contained in:
commit
7933b75416
@ -17,11 +17,12 @@
|
||||
#include "esp_err.h"
|
||||
#include "esp_flash_data_types.h"
|
||||
#include <stdbool.h>
|
||||
#include "sdkconfig.h"
|
||||
|
||||
/* Pre-partition table fixed flash offsets */
|
||||
#define ESP_BOOTLOADER_DIGEST_OFFSET 0x0
|
||||
#define ESP_BOOTLOADER_OFFSET 0x1000 /* Offset of bootloader image. Has matching value in bootloader KConfig.projbuild file. */
|
||||
#define ESP_PARTITION_TABLE_OFFSET CONFIG_PARTITION_TABLE_OFFSET /* Offset of partition table. */
|
||||
#define ESP_PARTITION_TABLE_OFFSET CONFIG_PARTITION_TABLE_OFFSET /* Offset of partition table. Backwards-compatible name.*/
|
||||
|
||||
#define ESP_PARTITION_TABLE_MAX_LEN 0xC00 /* Maximum length of partition table data */
|
||||
#define ESP_PARTITION_TABLE_MAX_ENTRIES (ESP_PARTITION_TABLE_MAX_LEN / sizeof(esp_partition_info_t)) /* Maximum length of partition table data, including terminating entry */
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_flash_data_types.h"
|
||||
|
||||
using namespace std;
|
||||
@ -59,7 +60,7 @@ void SpiFlash::init(size_t chip_size, size_t block_size, size_t sector_size, siz
|
||||
|
||||
ifd.read(buffer.data(), size);
|
||||
|
||||
memcpy(&this->memory[ESP_PARTITION_TABLE_ADDR], buffer.data(), buffer.size());
|
||||
memcpy(&this->memory[CONFIG_PARTITION_TABLE_OFFSET], buffer.data(), buffer.size());
|
||||
}
|
||||
|
||||
void SpiFlash::deinit()
|
||||
|
@ -1,2 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#define CONFIG_PARTITION_TABLE_OFFSET 0x8000
|
||||
|
Loading…
Reference in New Issue
Block a user