Program to benchmark the speed of the different file system options versus placing data directly into arrays.
Dependencies: DMBasicGUI DMSupport
This program is used to measure the performance of the different file system options on the LPC4088 Display Module.
The performance wiki page and more specifically the software part describes this program and the output.
As the program doesn't use the display at all it can be used on both the 4.3" and 5" display modules.
Revision 6:47b4bed9fa13, committed 2019-11-05
- Comitter:
- embeddedartists
- Date:
- Tue Nov 05 06:44:07 2019 +0000
- Parent:
- 5:788710a95951
- Commit message:
- Updates related to mbed OS 5
Changed in this revision
--- a/DMBasicGUI.lib Thu Mar 26 16:02:38 2015 +0000 +++ b/DMBasicGUI.lib Tue Nov 05 06:44:07 2019 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/teams/Embedded-Artists/code/DMBasicGUI/#6e2abf107800 +http://developer.mbed.org/teams/Embedded-Artists/code/DMBasicGUI/#f0d00f29bfeb
--- a/DMSupport.lib Thu Mar 26 16:02:38 2015 +0000 +++ b/DMSupport.lib Tue Nov 05 06:44:07 2019 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/teams/Embedded-Artists/code/DMSupport/#92193dc72995 +http://developer.mbed.org/teams/Embedded-Artists/code/DMSupport/#bbfe299d4a0c
--- a/main.cpp Thu Mar 26 16:02:38 2015 +0000 +++ b/main.cpp Tue Nov 05 06:44:07 2019 +0000 @@ -264,6 +264,7 @@ }; static MCIFileSystem* mcifs; +static FATFileSystem* mciFatFs; static QSPIFileSystem* qspifs; static USBHostMSD* usbmsd; @@ -355,7 +356,9 @@ RtosLog* log = DMBoard::instance().logger(); bool ok = false; - mcifs = new MCIFileSystem("mci", P4_16); + mcifs = new MCIFileSystem(P4_16); + mciFatFs = new FATFileSystem("mci"); + mciFatFs->mount(mcifs); if (mcifs->cardInserted()) { log->printf("uSD card detected\n"); @@ -387,10 +390,11 @@ usbmsd = new USBHostMSD("usb"); USBHost* host = USBHost::getHostInst(); - host->signalOnConnections(Thread::gettid(), USBH_CONNECTION_EVENT); + EventFlags connectionEvent; + host->signalOnConnections(&connectionEvent, USBH_CONNECTION_EVENT); log->printf("waiting for connect/disconnect message from USBHost...\n"); - Thread::signal_wait(USBH_CONNECTION_EVENT); + connectionEvent.wait_any(USBH_CONNECTION_EVENT); if (usbmsd->connect()) { log->printf("USB MemoryStick detected\n"); @@ -953,7 +957,7 @@ break; } - log->printf("\n\nBenchmarking. (Built "__DATE__" at "__TIME__")\n\n"); + log->printf("\n\nBenchmarking. (Built " __DATE__ " at " __TIME__ ")\n\n"); log->printf("Preparing file systems for benchmarking\n"); if (!prepare()) { @@ -964,13 +968,13 @@ runReadBenchmarks(); runImageBenchmarks(); - Thread::wait(1000); + ThisThread::sleep_for(1000); log->printf("Press the USER button to run WRITE tests!\n"); while(!board->buttonPressed()) { - Thread::wait(20); + ThisThread::sleep_for(20); } while(board->buttonPressed()) { - Thread::wait(20); + ThisThread::sleep_for(20); } runWriteBenchmarks(); @@ -982,7 +986,7 @@ } while(true) { - Thread::wait(1000); + ThisThread::sleep_for(1000); } }