kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/fix_mem_map_issue_v4.4' into 'release/v4.4'
fix(mmap): fix esp32s3 mmap test wrong assertion (v4.4) See merge request espressif/esp-idf!26964pull/9151/merge
commit
2bab3b36bc
|
@ -368,7 +368,12 @@ TEST_CASE("phys2cache/cache2phys basic checks", "[spi_flash][mmap]")
|
||||||
uint32_t phys = spi_flash_cache2phys(esp_partition_find);
|
uint32_t phys = spi_flash_cache2phys(esp_partition_find);
|
||||||
TEST_ASSERT_NOT_EQUAL(SPI_FLASH_CACHE2PHYS_FAIL, phys);
|
TEST_ASSERT_NOT_EQUAL(SPI_FLASH_CACHE2PHYS_FAIL, phys);
|
||||||
TEST_ASSERT_EQUAL_PTR(esp_partition_find, spi_flash_phys2cache(phys, SPI_FLASH_MMAP_INST));
|
TEST_ASSERT_EQUAL_PTR(esp_partition_find, spi_flash_phys2cache(phys, SPI_FLASH_MMAP_INST));
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2
|
||||||
|
/**
|
||||||
|
* Only esp32 and esp32s2 is I or D take up a bus exclusively
|
||||||
|
*/
|
||||||
TEST_ASSERT_EQUAL_PTR(NULL, spi_flash_phys2cache(phys, SPI_FLASH_MMAP_DATA));
|
TEST_ASSERT_EQUAL_PTR(NULL, spi_flash_phys2cache(phys, SPI_FLASH_MMAP_DATA));
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Read the flash @ 'phys' and compare it to the data we get via regular cache access */
|
/* Read the flash @ 'phys' and compare it to the data we get via regular cache access */
|
||||||
spi_flash_read_maybe_encrypted(phys, buf, sizeof(buf));
|
spi_flash_read_maybe_encrypted(phys, buf, sizeof(buf));
|
||||||
|
@ -384,7 +389,12 @@ TEST_CASE("phys2cache/cache2phys basic checks", "[spi_flash][mmap]")
|
||||||
TEST_ASSERT_NOT_EQUAL(SPI_FLASH_CACHE2PHYS_FAIL, phys);
|
TEST_ASSERT_NOT_EQUAL(SPI_FLASH_CACHE2PHYS_FAIL, phys);
|
||||||
TEST_ASSERT_EQUAL_PTR(&constant_data,
|
TEST_ASSERT_EQUAL_PTR(&constant_data,
|
||||||
spi_flash_phys2cache(phys, SPI_FLASH_MMAP_DATA));
|
spi_flash_phys2cache(phys, SPI_FLASH_MMAP_DATA));
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2
|
||||||
|
/**
|
||||||
|
* Only esp32 and esp32s2 is I or D take up a bus exclusively
|
||||||
|
*/
|
||||||
TEST_ASSERT_EQUAL_PTR(NULL, spi_flash_phys2cache(phys, SPI_FLASH_MMAP_INST));
|
TEST_ASSERT_EQUAL_PTR(NULL, spi_flash_phys2cache(phys, SPI_FLASH_MMAP_INST));
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Read the flash @ 'phys' and compare it to the data we get via normal cache access */
|
/* Read the flash @ 'phys' and compare it to the data we get via normal cache access */
|
||||||
spi_flash_read_maybe_encrypted(phys, buf, sizeof(constant_data));
|
spi_flash_read_maybe_encrypted(phys, buf, sizeof(constant_data));
|
||||||
|
|
Ładowanie…
Reference in New Issue