#define IDF_PERFORMANCE_MAX_SPI_PER_TRANS_POLLING_NO_DMA 15
/* Due to code size & linker layout differences interacting with cache, VFS
microbenchmark currently runs slower with PSRAM enabled. */
-#define IDF_PERFORMANCE_MAX_VFS_OPEN_WRITE_CLOSE_TIME 50000
-#define IDF_PERFORMANCE_MAX_VFS_OPEN_WRITE_CLOSE_TIME_PSRAM 40000
+#define IDF_PERFORMANCE_MAX_VFS_OPEN_WRITE_CLOSE_TIME 20000
+#define IDF_PERFORMANCE_MAX_VFS_OPEN_WRITE_CLOSE_TIME_PSRAM 25000
// throughput performance by iperf
#define IDF_PERFORMANCE_MIN_TCP_RX_THROUGHPUT 50
#define IDF_PERFORMANCE_MIN_TCP_TX_THROUGHPUT 40
set(COMPONENT_REQUIRES unity test_utils vfs fatfs spiffs)
-register_component()
\ No newline at end of file
+set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
+
+register_component()
COMPONENT_ADD_LDFLAGS = -Wl,--whole-archive -l$(COMPONENT_NAME) -Wl,--no-whole-archive
+
+COMPONENT_ADD_LDFRAGMENTS += linker.lf
--- /dev/null
+[mapping]
+archive: libvfs.a
+entries:
+ vfs:esp_vfs_open (noflash)
+ vfs:esp_vfs_write (noflash)
+ vfs:esp_vfs_close (noflash)
return 1;
}
-int time_test_vfs_write(int fd, const void *data, size_t size)
+static int time_test_vfs_write(int fd, const void *data, size_t size)
{
return size;
}
TEST_ASSERT_NOT_EQUAL(close(fd), -1);
}
+ // esp_vfs_open, esp_vfs_write and esp_vfs_close need to be in IRAM for performance test to pass
+
const int64_t time_diff_us = esp_timer_get_time() - begin;
const int ns_per_iter = (int) (time_diff_us * 1000 / iter_count);
TEST_ESP_OK( esp_vfs_unregister(VFS_PREF1) );