From f3ba34a344999704c3f2139d9ecb5d316f1dd1b7 Mon Sep 17 00:00:00 2001 From: jeromecoutant Date: Thu, 3 Jan 2019 14:29:13 +0100 Subject: [PATCH] DIRS and SEEK SD tests update for small RAM targets Test buffer size can now be specified for each target --- .../TESTS/filesystem/dirs/main.cpp | 8 +------ .../TESTS/filesystem/seek/main.cpp | 8 +------ .../COMPONENT_SD/config/mbed_lib.json | 24 ++++++++++++++++++- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/components/storage/blockdevice/COMPONENT_SD/TESTS/filesystem/dirs/main.cpp b/components/storage/blockdevice/COMPONENT_SD/TESTS/filesystem/dirs/main.cpp index 412a3379df..22a0807ab9 100644 --- a/components/storage/blockdevice/COMPONENT_SD/TESTS/filesystem/dirs/main.cpp +++ b/components/storage/blockdevice/COMPONENT_SD/TESTS/filesystem/dirs/main.cpp @@ -49,10 +49,6 @@ using namespace utest::v1; #define MBED_TEST_DIRS 4 #endif -#ifndef MBED_TEST_BUFFER -#define MBED_TEST_BUFFER 8192 -#endif - #ifndef MBED_TEST_TIMEOUT #define MBED_TEST_TIMEOUT 120 #endif @@ -76,9 +72,7 @@ FILE *fd[MBED_TEST_FILES]; struct dirent ent; struct dirent *ed; size_t size; -uint8_t buffer[MBED_TEST_BUFFER]; -uint8_t rbuffer[MBED_TEST_BUFFER]; -uint8_t wbuffer[MBED_TEST_BUFFER]; +uint8_t buffer[MBED_CONF_SD_TEST_BUFFER]; // tests diff --git a/components/storage/blockdevice/COMPONENT_SD/TESTS/filesystem/seek/main.cpp b/components/storage/blockdevice/COMPONENT_SD/TESTS/filesystem/seek/main.cpp index d5fc8af7c1..999e4a58c8 100644 --- a/components/storage/blockdevice/COMPONENT_SD/TESTS/filesystem/seek/main.cpp +++ b/components/storage/blockdevice/COMPONENT_SD/TESTS/filesystem/seek/main.cpp @@ -49,10 +49,6 @@ using namespace utest::v1; #define MBED_TEST_DIRS 4 #endif -#ifndef MBED_TEST_BUFFER -#define MBED_TEST_BUFFER 8192 -#endif - #ifndef MBED_TEST_TIMEOUT #define MBED_TEST_TIMEOUT 120 #endif @@ -75,9 +71,7 @@ DIR *dd[MBED_TEST_DIRS]; FILE *fd[MBED_TEST_FILES]; struct dirent ent; struct dirent *ed; -uint8_t buffer[MBED_TEST_BUFFER]; -uint8_t rbuffer[MBED_TEST_BUFFER]; -uint8_t wbuffer[MBED_TEST_BUFFER]; +uint8_t buffer[MBED_CONF_SD_TEST_BUFFER]; // tests diff --git a/components/storage/blockdevice/COMPONENT_SD/config/mbed_lib.json b/components/storage/blockdevice/COMPONENT_SD/config/mbed_lib.json index d320f3419a..476f1a17ff 100644 --- a/components/storage/blockdevice/COMPONENT_SD/config/mbed_lib.json +++ b/components/storage/blockdevice/COMPONENT_SD/config/mbed_lib.json @@ -9,9 +9,31 @@ "CMD_TIMEOUT": 10000, "CMD0_IDLE_STATE_RETRIES": 5, "INIT_FREQUENCY": 100000, - "CRC_ENABLED": 1 + "CRC_ENABLED": 1, + "TEST_BUFFER": 8192 }, "target_overrides": { + "NUCLEO_F070RB": { + "TEST_BUFFER": 4096 + }, + "NUCLEO_F072RB": { + "TEST_BUFFER": 4096 + }, + "NUCLEO_F103RB": { + "TEST_BUFFER": 4096 + }, + "NUCLEO_L073RZ": { + "TEST_BUFFER": 4096 + }, + "DISCO_L072CZ_LRWAN1": { + "TEST_BUFFER": 4096 + }, + "NUCLEO_F091RC": { + "TEST_BUFFER": 4096 + }, + "NUCLEO_F410RB": { + "TEST_BUFFER": 4096 + }, "K20D50M": { "SPI_MOSI": "PTD2", "SPI_MISO": "PTD3",