Home
last modified time | relevance | path

Searched refs:part (Results 1 – 25 of 255) sorted by relevance

1234567891011

/hal_espressif-3.6.0/components/spi_flash/test/
Dtest_esp_flash.c127 typedef void (*flash_test_func_t)(const esp_partition_t *part);
424 esp_partition_t part = *test_part; in flash_test_core() local
425 part.flash_chip = chip; in flash_test_core()
427 ESP_LOGI(TAG, "Testing chip %p, address 0x%08X...", part.flash_chip, part.address); in flash_test_core()
428 (*func)(&part); in flash_test_core()
432 part.address = 0x1030000; in flash_test_core()
433 part.size = 0x0010000; in flash_test_core()
434 ESP_LOGI(TAG, "Testing chip %p, address 0x%08X...", part.flash_chip, part.address); in flash_test_core()
435 (*func)(&part); in flash_test_core()
453 static void test_metadata(const esp_partition_t* part) in test_metadata() argument
[all …]
Dtest_partitions.c32 const esp_partition_t *part = get_test_data_partition();
39 ESP_ERROR_CHECK( esp_partition_erase_range(part, 0, part->size) );
47 for (int i = 0; i < part->size; i+= 4096) {
48 ESP_ERROR_CHECK( esp_partition_write(part, i, some_data, strlen(some_data)) );
53 for (int i = 0; i < part->size; i+= 4096) {
55 ESP_ERROR_CHECK( esp_partition_read(part, i, buf, sizeof(buf)) );
60 ESP_ERROR_CHECK( esp_partition_erase_range(part, 0, part->size) );
63 for (int i = 0; i < part->size; i+= 4096) {
65 ESP_ERROR_CHECK( esp_partition_read(part, i, buf, sizeof(buf)) );
72 static bool s_test_nonzero_sha_of_partition(const esp_partition_t *part, bool allow_invalid_image) in s_test_nonzero_sha_of_partition() argument
[all …]
Dtest_large_flash_writes.c63 const esp_partition_t *part = get_test_data_partition(); in test_write_large_buffer() local
64 TEST_ASSERT(part->size > length + 2 + SPI_FLASH_SEC_SIZE); in test_write_large_buffer()
71 …ESP_ERROR_CHECK( spi_flash_erase_range(part->address, (length + SPI_FLASH_SEC_SIZE) & ~(SPI_FLASH_… in test_write_large_buffer()
74 ESP_ERROR_CHECK( spi_flash_write(part->address + 1, source, length) ); in test_write_large_buffer()
76 ESP_ERROR_CHECK( spi_flash_read(part->address + 1, buf, length) ); in test_write_large_buffer()
85 ESP_ERROR_CHECK( spi_flash_read(part->address, ends, sizeof(ends)) ); in test_write_large_buffer()
89 ESP_ERROR_CHECK( spi_flash_read(part->address + length, ends, sizeof(ends)) ); in test_write_large_buffer()
Dtest_spi_flash.c43 const esp_partition_t *part = get_test_data_partition(); in setup_tests() local
44 start = part->address; in setup_tests()
236 static uint32_t measure_erase(const esp_partition_t* part) in measure_erase() argument
242 esp_err_t err = spi_flash_erase_range(part->address, total_len); in measure_erase()
248 static uint32_t measure_write(const char* name, const esp_partition_t* part, const uint8_t* data_to… in measure_write() argument
261 … esp_err_t err = spi_flash_write(part->address + offset, data_to_write + offset, len_write); in measure_write()
271 static uint32_t measure_read(const char* name, const esp_partition_t* part, uint8_t* data_read, int… in measure_read() argument
283 esp_err_t err = spi_flash_read(part->address + offset, data_read + offset, len_read); in measure_read()
293 #define MEAS_WRITE(n) (measure_write("write in "#n"-byte chunks", part, data_to_write, n))
294 #define MEAS_READ(n) (measure_read("read in "#n"-byte chunks", part, data_read, n))
[all …]
Dtest_read_write.c42 const esp_partition_t *part = get_test_data_partition(); in setup_tests() local
43 start = part->address; in setup_tests()
344 const esp_partition_t *part = get_test_data_partition();
345 TEST_ESP_OK(spi_flash_erase_range(part->address, SPI_FLASH_SEC_SIZE));
346 TEST_ESP_OK(spi_flash_write(part->address, buf_ext, SPI_FLASH_SEC_SIZE));
349 TEST_ESP_OK(spi_flash_read(part->address, buf_int, SPI_FLASH_SEC_SIZE));
369 const esp_partition_t *part = get_test_data_partition();
370 TEST_ESP_OK(spi_flash_erase_range(part->address, SPI_FLASH_SEC_SIZE));
371 TEST_ESP_OK(spi_flash_write(part->address, data_8, MIN_BLOCK_SIZE));
372 TEST_ESP_OK(spi_flash_read(part->address, buf_ext_8, MIN_BLOCK_SIZE));
[all …]
/hal_espressif-3.6.0/examples/storage/partition_api/partition_find/main/
Dmain.c51 const esp_partition_t * part = esp_partition_find_first(type, subtype, name); in find_partition() local
53 if (part != NULL) { in find_partition()
54 …AG, "\tfound partition '%s' at offset 0x%x with size 0x%x", part->label, part->address, part->size… in find_partition()
105 const esp_partition_t *part = esp_partition_get(it); in app_main() local
106 …AG, "\tfound partition '%s' at offset 0x%x with size 0x%x", part->label, part->address, part->size… in app_main()
117 const esp_partition_t *part = esp_partition_get(it); in app_main() local
118 …AG, "\tfound partition '%s' at offset 0x%x with size 0x%x", part->label, part->address, part->size… in app_main()
/hal_espressif-3.6.0/components/bootloader_support/src/
Dflash_partitions.c32 const esp_partition_info_t *part = &partition_table[num_parts]; in esp_partition_table_verify() local
34 if (part->magic == ESP_PARTITION_MAGIC) { in esp_partition_table_verify()
35 const esp_partition_pos_t *pos = &part->pos; in esp_partition_table_verify()
43 } else if (part->magic == ESP_PARTITION_MAGIC_MD5) { in esp_partition_table_verify()
57 unsigned char *md5sum = ((unsigned char *) part) + ESP_PARTITION_MD5_OFFSET; in esp_partition_table_verify()
68 } else if (part->magic == 0xFFFF in esp_partition_table_verify()
69 && part->type == PART_TYPE_END in esp_partition_table_verify()
70 && part->subtype == PART_SUBTYPE_END) { in esp_partition_table_verify()
76 ESP_LOGE(TAG, "partition %d invalid magic number 0x%x", num_parts, part->magic); in esp_partition_table_verify()
Desp_image_format.c111 static esp_err_t image_load(esp_image_load_mode_t mode, const esp_partition_pos_t *part, esp_image_… in image_load() argument
138 bool verify_sha = (part->offset != ESP_BOOTLOADER_OFFSET) && do_verify; in image_load()
141 if (data == NULL || part == NULL) { in image_load()
145 if (part->size > SIXTEEN_MB) { in image_load()
147 FAIL_LOAD("partition size 0x%x invalid, larger than 16MB", part->size); in image_load()
151 …CHECK_ERR(process_image_header(data, part->offset, (verify_sha) ? p_sha_handle : NULL, do_verify, … in image_load()
155 CHECK_ERR(process_appended_hash(data, part->size, do_verify, silent)); in image_load()
241 esp_err_t bootloader_load_image(const esp_partition_pos_t *part, esp_image_metadata_t *data) in bootloader_load_image() argument
259 return image_load(mode, part, data); in bootloader_load_image()
263 esp_err_t bootloader_load_image_no_verify(const esp_partition_pos_t *part, esp_image_metadata_t *da… in bootloader_load_image_no_verify() argument
[all …]
Dbootloader_utility.c486 esp_partition_pos_t part; local
500 part = index_to_partition(bs, index);
501 if (part.size == 0) {
504 ESP_LOGD(TAG, TRY_LOG_FORMAT, index, part.offset, part.size);
505 if (check_anti_rollback(&part) && try_load_partition(&part, &image_data)) {
514 part = index_to_partition(bs, index);
515 if (part.size == 0) {
518 ESP_LOGD(TAG, TRY_LOG_FORMAT, index, part.offset, part.size);
519 if (check_anti_rollback(&part) && try_load_partition(&part, &image_data)) {
/hal_espressif-3.6.0/components/nvs_flash/test_nvs_host/
Dtest_nvs.cpp89 CHECK(page.load(&f.part, 0) == ESP_OK);
97 CHECK(page.load(&f.part, 0) == ESP_OK);
113 CHECK(page.load(&f.part, 0) == ESP_OK);
123 CHECK(page.load(&f.part, 0) == ESP_OK);
134 CHECK(page.load(&f.part, 0) == ESP_OK);
165 CHECK(page.load(&f.part, 0) == ESP_OK);
179 CHECK(page.load(&f.part, 0) == ESP_OK);
186 CHECK(page.load(&f.part, 0) == ESP_OK);
197 CHECK(page.load(&f.part, 0) == ESP_OK);
231 TEST_ESP_OK(page.load(&f.part, 0));
[all …]
Dtest_nvs_partition.cpp39 CHECK(fix.part.read(0, foo, sizeof (foo) -1) == ESP_ERR_INVALID_SIZE);
52 CHECK(fix.part.write(0, foo, sizeof (foo) -1) == ESP_ERR_INVALID_SIZE);
53 CHECK(fix.part.write(0, foo, sizeof (foo)) == ESP_OK);
54 CHECK(fix.part.write(0, foo, sizeof (foo) * 2) == ESP_OK);
Dtest_nvs_handle.cpp36 …REQUIRE(NVSPartitionManager::get_instance()->init_custom(&f.part, NVS_FLASH_SECTOR, NVS_FLASH_SECT…
60 …REQUIRE(NVSPartitionManager::get_instance()->init_custom(&f.part, NVS_FLASH_SECTOR, NVS_FLASH_SECT…
99 …CHECK(NVSPartitionManager::get_instance()->init_custom(&f.part, NVS_FLASH_SECTOR, NVS_FLASH_SECTOR…
134 …REQUIRE(NVSPartitionManager::get_instance()->init_custom(&f.part, NVS_FLASH_SECTOR, NVS_FLASH_SECT…
166 …REQUIRE(NVSPartitionManager::get_instance()->init_custom(&f.part, NVS_FLASH_SECTOR, NVS_FLASH_SECT…
199 …REQUIRE(NVSPartitionManager::get_instance()->init_custom(&f.part, NVS_FLASH_SECTOR, NVS_FLASH_SECT…
231 …REQUIRE(NVSPartitionManager::get_instance()->init_custom(&f.part, NVS_FLASH_SECTOR, NVS_FLASH_SECT…
264 …REQUIRE(NVSPartitionManager::get_instance()->init_custom(&f.part, NVS_FLASH_SECTOR, NVS_FLASH_SECT…
Dtest_partition_manager.cpp25 …REQUIRE(NVSPartitionManager::get_instance()->init_custom(&f.part, NVS_FLASH_SECTOR, NVS_FLASH_SECT…
27 …REQUIRE(NVSPartitionManager::get_instance()->deinit_partition(f.part.get_partition_name()) == ESP_…
36 …REQUIRE(NVSPartitionManager::get_instance()->init_custom(&f.part, NVS_FLASH_SECTOR, NVS_FLASH_SECT…
71 …REQUIRE(NVSPartitionManager::get_instance()->init_custom(&f.part, NVS_FLASH_SECTOR, NVS_FLASH_SECT…
86 …REQUIRE(NVSPartitionManager::get_instance()->init_custom(&f.part, NVS_FLASH_SECTOR, NVS_FLASH_SECT…
Dtest_fixtures.hpp119part(&emu, start_sector * SPI_FLASH_SEC_SIZE, sector_size * SPI_FLASH_SEC_SIZE, partition_name) { in PartitionEmulationFixture()
126 PartitionEmulation part; member
135 part(&esp_partition) { in EncryptedPartitionFixture()
139 assert(part.init(cfg) == ESP_OK); in EncryptedPartitionFixture()
148 nvs::NVSEncryptedPartition part; member
Dtest_nvs_cxx_api.cpp37 init_custom(&f.part, NVS_FLASH_SECTOR, NVS_FLASH_SECTOR_COUNT_MIN) == ESP_OK);
70 …REQUIRE(nvs::NVSPartitionManager::get_instance()->init_custom(&f.part, NVS_FLASH_SECTOR, NVS_FLASH…
96 …REQUIRE(nvs::NVSPartitionManager::get_instance()->init_custom(&f.part, NVS_FLASH_SECTOR, NVS_FLASH…
122 …REQUIRE(nvs::NVSPartitionManager::get_instance()->init_custom(&f.part, NVS_FLASH_SECTOR, NVS_FLASH…
145 …REQUIRE(nvs::NVSPartitionManager::get_instance()->init_custom(&f.part, NVS_FLASH_SECTOR, NVS_FLASH…
175 …REQUIRE(nvs::NVSPartitionManager::get_instance()->init_custom(&f.part, NVS_FLASH_SECTOR, NVS_FLASH…
/hal_espressif-3.6.0/components/fatfs/diskio/
Ddiskio_rawflash.c41 const esp_partition_t* part = ff_raw_handles[pdrv]; in ff_raw_read() local
42 assert(part); in ff_raw_read()
43 …esp_err_t err = esp_partition_read(part, sector * SPI_FLASH_SEC_SIZE, buff, count * SPI_FLASH_SEC_… in ff_raw_read()
59 const esp_partition_t* part = ff_raw_handles[pdrv]; in ff_raw_ioctl() local
61 assert(part); in ff_raw_ioctl()
66 *((DWORD *) buff) = part->size / SPI_FLASH_SEC_SIZE; in ff_raw_ioctl()
/hal_espressif-3.6.0/components/fatfs/test/
Dtest_fatfs_spiflash.c52 const esp_partition_t* part = get_test_data_partition();
53 esp_partition_erase_range(part, 0, part->size);
180 const esp_partition_t* part = get_test_data_partition();
181 esp_partition_erase_range(part, 0, part->size);
Dtest_fatfs_rawflash.c43 const esp_partition_t* part = get_test_data_partition(); in test_setup() local
45 TEST_ASSERT(part->size == (fatfs_end - fatfs_start - 1)); in test_setup()
49 …TEST_ESP_OK(esp_partition_mmap(part, 0, part->size, SPI_FLASH_MMAP_DATA, &mmap_ptr, &mmap_handle)); in test_setup()
50 bool content_valid = memcmp(fatfs_start, mmap_ptr, part->size) == 0; in test_setup()
55 esp_partition_erase_range(part, 0, part->size); in test_setup()
56 for (int i = 0; i < part->size; i+= SPI_FLASH_SEC_SIZE) { in test_setup()
57 ESP_ERROR_CHECK( esp_partition_write(part, i, fatfs_start + i, SPI_FLASH_SEC_SIZE) ); in test_setup()
/hal_espressif-3.6.0/components/driver/test/
Dtest_spi_bus_lock.c145 static void write_large_buffer(esp_flash_t *chip, const esp_partition_t *part, const uint8_t *sourc… in write_large_buffer() argument
149 …TEST_ESP_OK(esp_flash_erase_region(chip, part->address, (length + SPI_FLASH_SEC_SIZE) & ~(SPI_FLAS… in write_large_buffer()
153 TEST_ESP_OK(esp_flash_write(chip, source, part->address + 1, length) ); in write_large_buffer()
158 static void read_and_check(esp_flash_t *chip, const esp_partition_t *part, const uint8_t *source, s… in read_and_check() argument
163 TEST_ESP_OK(esp_flash_read(chip, buf, part->address + 1, length) ); in read_and_check()
170 TEST_ESP_OK(esp_flash_read(chip, ends, part->address, sizeof(ends)) ); in read_and_check()
174 TEST_ESP_OK(esp_flash_read(chip, ends, part->address + length, sizeof(ends)) ); in read_and_check()
197 const esp_partition_t *part = get_test_data_partition(); in spi_task4() local
198 TEST_ASSERT(part->size > test_len + 2 + SPI_FLASH_SEC_SIZE); in spi_task4()
200 write_large_buffer(chip, part, source_buf, test_len); in spi_task4()
[all …]
/hal_espressif-3.6.0/components/esp_hw_support/test/
Dtest_spiram_cache_flush.c117 const esp_partition_t* part = get_test_data_partition();
118 assert(part!=NULL);
121 esp_partition_erase_range(part, 0, 64*1024);
130 esp_partition_mmap(part, 0, 512, SPI_FLASH_MMAP_DATA, &out, &handle);
132 esp_partition_write(part, 0, buf, 512);
133 esp_partition_read(part, 0, buf, 512);
/hal_espressif-3.6.0/components/bootloader_support/include/
Desp_image_format.h99 esp_err_t esp_image_verify(esp_image_load_mode_t mode, const esp_partition_pos_t *part, esp_image_m…
113 esp_err_t esp_image_get_metadata(const esp_partition_pos_t *part, esp_image_metadata_t *metadata);
139 esp_err_t bootloader_load_image(const esp_partition_pos_t *part, esp_image_metadata_t *data);
157 esp_err_t bootloader_load_image_no_verify(const esp_partition_pos_t *part, esp_image_metadata_t *da…
/hal_espressif-3.6.0/examples/storage/ext_flash_fatfs/main/
Dext_flash_fatfs_example_main.c152 const esp_partition_t *part = esp_partition_get(it); in example_list_data_partitions() local
154 part->label, part->subtype, part->address, part->size / 1024); in example_list_data_partitions()
/hal_espressif-3.6.0/components/wear_levelling/
Dwear_levelling.cpp68 Partition *part = NULL; in wl_mount() local
107 part = new (part_ptr) Partition(partition); in wl_mount()
142 result = wl_flash->config(&cfg, part); in wl_mount()
164 if (part) { in wl_mount()
165 part->~Partition(); in wl_mount()
166 free(part); in wl_mount()
/hal_espressif-3.6.0/components/spiffs/test/
Dtest_spiffs.c471 const esp_partition_t* part = get_test_data_partition();
472 TEST_ASSERT_NOT_NULL(part);
473 TEST_ESP_OK(esp_partition_erase_range(part, 0, part->size));
485 const esp_partition_t* part = get_test_data_partition();
486 TEST_ASSERT_NOT_NULL(part);
490 esp_spiffs_format(part->label);
500 const esp_partition_t* part = get_test_data_partition();
501 TEST_ASSERT_NOT_NULL(part);
506 esp_spiffs_format(part->label);
/hal_espressif-3.6.0/components/app_update/
Desp_ota_ops.c39 const esp_partition_t *part; member
166 new_entry->part = partition; in esp_ota_begin()
194 …ret = esp_partition_erase_range(it->part, it->wrote_size, ((last_sector - first_sector) + 1) * SPI… in esp_ota_write()
196 …ret = esp_partition_erase_range(it->part, (first_sector + 1) * SPI_FLASH_SEC_SIZE, (last_sector - … in esp_ota_write()
221 ret = esp_partition_write(it->part, it->wrote_size, it->partial_data, 16); in esp_ota_write()
240 ret = esp_partition_write(it->part, it->wrote_size, data_bytes, size); in esp_ota_write()
277 ret = esp_partition_write(it->part, offset, data_bytes, size); in esp_ota_write_with_offset()
332 ret = esp_partition_write(it->part, it->wrote_size, it->partial_data, 16); in esp_ota_end()
343 .offset = it->part->address, in esp_ota_end()
344 .size = it->part->size, in esp_ota_end()

1234567891011