Merge pull request #12979 from LDong-Arm/stack_size_expectation_from_config

stack_size_unification test: set expected stack sizes from config
pull/13069/head
Martin Kojtal 2020-06-04 14:39:08 +02:00 committed by GitHub
commit ab439624ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 15 deletions

View File

@ -31,19 +31,11 @@ extern osThreadAttr_t _main_thread_attr;
#endif
extern uint32_t mbed_stack_isr_size;
#if !defined(MBED_CONF_RTOS_PRESENT)
#define EXPECTED_ISR_STACK_SIZE (4096)
#else
#define EXPECTED_ISR_STACK_SIZE (1024)
#endif
#define EXPECTED_ISR_STACK_SIZE (MBED_CONF_TARGET_BOOT_STACK_SIZE)
#if defined(TARGET_NUCLEO_F070RB) || defined(TARGET_STM32F072RB) || defined(TARGET_TMPM46B) || defined(TARGET_TMPM066)
#define EXPECTED_MAIN_THREAD_STACK_SIZE (3072)
#else
#define EXPECTED_MAIN_THREAD_STACK_SIZE (4096)
#endif
#define EXPECTED_MAIN_THREAD_STACK_SIZE (MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE)
#define EXPECTED_USER_THREAD_DEFAULT_STACK_SIZE (4096)
#define EXPECTED_USER_THREAD_DEFAULT_STACK_SIZE (MBED_CONF_RTOS_THREAD_STACK_SIZE)
#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

View File

@ -76,6 +76,9 @@
"STM32F072RB": {
"main-thread-stack-size": 3072
},
"TMPM46B": {
"main-thread-stack-size": 3072
},
"NUVOTON": {
"idle-thread-stack-size-debug-extra": 512
}

View File

@ -25,10 +25,6 @@
#ifndef INITIAL_SP
#define INITIAL_SP (0x20080000UL)
#endif
#ifdef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE
#undef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE
#endif
#define MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE 3072
#endif