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;
45
45
46
46
#define EXPECTED_USER_THREAD_DEFAULT_STACK_SIZE (4096 )
47
47
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
+
48
53
/* Test sizes of ISR stack, main thread stack, default user thread stack.
49
54
*
50
55
* 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 23
23
24
24
using namespace utest ::v1;
25
25
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
-
31
26
#define TEST_BLOCK_SIZE 128
32
27
#define TEST_BLOCK_DEVICE_SIZE 32 *TEST_BLOCK_SIZE
33
28
#define TEST_BLOCK_COUNT 10
34
29
#define TEST_ERROR_MASK 16
35
30
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
+
36
35
const struct {
37
36
const char *name;
38
37
bd_size_t (BlockDevice::*method)() const ;
Original file line number Diff line number Diff line change 24
24
25
25
using namespace utest ::v1;
26
26
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
-
32
27
#define BLOCK_COUNT 16
33
28
#define BLOCK_SIZE 512
34
29
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
+
35
34
HeapBlockDevice bd (BLOCK_COUNT *BLOCK_SIZE, BLOCK_SIZE);
36
35
37
36
// Testing formatting of master boot record
Original file line number Diff line number Diff line change 26
26
27
27
using namespace utest ::v1;
28
28
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
-
34
29
#define BLOCK_COUNT 16
35
30
#define BLOCK_SIZE 512
36
31
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
+
37
36
38
37
// Simple test which read/writes blocks on a sliced block device
39
38
void test_slicing ()
You can’t perform that action at this time.
0 commit comments