mirror of https://github.com/ARMmbed/mbed-os.git
[TESTS] Add memory check for RAM constraint device
parent
41435a0807
commit
5a57670121
|
@ -45,6 +45,11 @@ extern uint32_t mbed_stack_isr_size;
|
|||
|
||||
#define EXPECTED_USER_THREAD_DEFAULT_STACK_SIZE (4096)
|
||||
|
||||
#if ((MBED_RAM_SIZE - MBED_BOOT_STACK_SIZE) <= (EXPECTED_MAIN_THREAD_STACK_SIZE + EXPECTED_ISR_STACK_SIZE))
|
||||
#error [NOT_SUPPORTED] Insufficient stack for staci_size_unification tests
|
||||
#endif
|
||||
|
||||
|
||||
/* Test sizes of ISR stack, main thread stack, default user thread stack.
|
||||
*
|
||||
* On some platforms with lower RAM size (e.g. NUCLEO_F070RB - 16 KB RAM) it is impossible
|
||||
|
|
|
@ -23,16 +23,15 @@
|
|||
|
||||
using namespace utest::v1;
|
||||
|
||||
// TODO HACK, replace with available ram/heap property
|
||||
#if defined(TARGET_LPC1114)
|
||||
#error [NOT_SUPPORTED] Insufficient heap for heap block device tests
|
||||
#else
|
||||
|
||||
#define TEST_BLOCK_SIZE 128
|
||||
#define TEST_BLOCK_DEVICE_SIZE 32*TEST_BLOCK_SIZE
|
||||
#define TEST_BLOCK_COUNT 10
|
||||
#define TEST_ERROR_MASK 16
|
||||
|
||||
#if ((MBED_RAM_SIZE - MBED_BOOT_STACK_SIZE) <= TEST_BLOCK_DEVICE_SIZE)
|
||||
#error [NOT_SUPPORTED] Insufficient heap for heap block device tests
|
||||
#endif
|
||||
|
||||
const struct {
|
||||
const char *name;
|
||||
bd_size_t (BlockDevice::*method)() const;
|
||||
|
|
|
@ -24,14 +24,13 @@
|
|||
|
||||
using namespace utest::v1;
|
||||
|
||||
// TODO HACK, replace with available ram/heap property
|
||||
#if defined(TARGET_LPC1114)
|
||||
#error [NOT_SUPPORTED] Insufficient heap for heap block device tests
|
||||
#else
|
||||
|
||||
#define BLOCK_COUNT 16
|
||||
#define BLOCK_SIZE 512
|
||||
|
||||
#if ((MBED_RAM_SIZE - MBED_BOOT_STACK_SIZE) <= (BLOCK_COUNT * BLOCK_SIZE))
|
||||
#error [NOT_SUPPORTED] Insufficient heap for mbr block device tests
|
||||
#endif
|
||||
|
||||
HeapBlockDevice bd(BLOCK_COUNT *BLOCK_SIZE, BLOCK_SIZE);
|
||||
|
||||
// Testing formatting of master boot record
|
||||
|
|
|
@ -26,14 +26,13 @@
|
|||
|
||||
using namespace utest::v1;
|
||||
|
||||
// TODO HACK, replace with available ram/heap property
|
||||
#if defined(TARGET_LPC1114)
|
||||
#error [NOT_SUPPORTED] Insufficient heap for heap block device tests
|
||||
#else
|
||||
|
||||
#define BLOCK_COUNT 16
|
||||
#define BLOCK_SIZE 512
|
||||
|
||||
#if ((MBED_RAM_SIZE - MBED_BOOT_STACK_SIZE) <= (BLOCK_COUNT * BLOCK_SIZE))
|
||||
#error [NOT_SUPPORTED] Insufficient heap for util block device tests
|
||||
#endif
|
||||
|
||||
|
||||
// Simple test which read/writes blocks on a sliced block device
|
||||
void test_slicing()
|
||||
|
|
Loading…
Reference in New Issue