File tree Expand file tree Collapse file tree 4 files changed +17
-15
lines changed
TESTS/mbed_hal/stack_size_unification
features/storage/TESTS/blockdevice Expand file tree Collapse file tree 4 files changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,11 @@ extern uint32_t mbed_stack_isr_size;
4545
4646#define EXPECTED_USER_THREAD_DEFAULT_STACK_SIZE (4096 )
4747
48+ #if ((MBED_RAM_SIZE - MBED_BOOT_STACK_SIZE) <= (EXPECTED_MAIN_THREAD_STACK_SIZE + EXPECTED_ISR_STACK_SIZE))
49+ #error [NOT_SUPPORTED] Insufficient stack for staci_size_unification tests
50+ #endif
51+
52+
4853/* Test sizes of ISR stack, main thread stack, default user thread stack.
4954 *
5055 * On some platforms with lower RAM size (e.g. NUCLEO_F070RB - 16 KB RAM) it is impossible
Original file line number Diff line number Diff line change 2323
2424using namespace utest ::v1;
2525
26- // TODO HACK, replace with available ram/heap property
27- #if defined(TARGET_LPC1114)
28- #error [NOT_SUPPORTED] Insufficient heap for heap block device tests
29- #else
30-
3126#define TEST_BLOCK_SIZE 128
3227#define TEST_BLOCK_DEVICE_SIZE 32 *TEST_BLOCK_SIZE
3328#define TEST_BLOCK_COUNT 10
3429#define TEST_ERROR_MASK 16
3530
31+ #if ((MBED_RAM_SIZE - MBED_BOOT_STACK_SIZE) <= TEST_BLOCK_DEVICE_SIZE)
32+ #error [NOT_SUPPORTED] Insufficient heap for heap block device tests
33+ #endif
34+
3635const struct {
3736 const char *name;
3837 bd_size_t (BlockDevice::*method)() const ;
Original file line number Diff line number Diff line change 2424
2525using namespace utest ::v1;
2626
27- // TODO HACK, replace with available ram/heap property
28- #if defined(TARGET_LPC1114)
29- #error [NOT_SUPPORTED] Insufficient heap for heap block device tests
30- #else
31-
3227#define BLOCK_COUNT 16
3328#define BLOCK_SIZE 512
3429
30+ #if ((MBED_RAM_SIZE - MBED_BOOT_STACK_SIZE) <= (BLOCK_COUNT * BLOCK_SIZE))
31+ #error [NOT_SUPPORTED] Insufficient heap for mbr block device tests
32+ #endif
33+
3534HeapBlockDevice bd (BLOCK_COUNT *BLOCK_SIZE, BLOCK_SIZE);
3635
3736// Testing formatting of master boot record
Original file line number Diff line number Diff line change 2626
2727using namespace utest ::v1;
2828
29- // TODO HACK, replace with available ram/heap property
30- #if defined(TARGET_LPC1114)
31- #error [NOT_SUPPORTED] Insufficient heap for heap block device tests
32- #else
33-
3429#define BLOCK_COUNT 16
3530#define BLOCK_SIZE 512
3631
32+ #if ((MBED_RAM_SIZE - MBED_BOOT_STACK_SIZE) <= (BLOCK_COUNT * BLOCK_SIZE))
33+ #error [NOT_SUPPORTED] Insufficient heap for util block device tests
34+ #endif
35+
3736
3837// Simple test which read/writes blocks on a sliced block device
3938void test_slicing ()
You can’t perform that action at this time.
0 commit comments