Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase stack size in malloc test for Cortex-A #3362

Merged
merged 1 commit into from
Dec 9, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/malloc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
#endif

#define NUM_THREADS 5
#if defined(__CORTEX_A9)
#define THREAD_STACK_SIZE DEFAULT_STACK_SIZE
Copy link
Contributor

@0xc0170 0xc0170 Dec 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats the difference between DEFAULT_STACK_SIZE and 256 ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0xc0170

Cortex-A in general will require more stack space than Cortex-M.
Therefore it is necessary to divide the definition by "#ifdef" as same as other test. By using its value CI test sequece is carried out.
For example:
TESTS\mbedmicro-rtos-mbed\basic\main.cpp

In Cortex-A, DEFAULT_STACK_SIZE is 2048 byte. Maybe in Cortex-M, it is 256Byte.

Copy link
Contributor

@0xc0170 0xc0170 Dec 7, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just wondered if that macro should not be DEFAULT_STACK_SIZE for any cortex. Russ, what do you think?

#else
#define THREAD_STACK_SIZE 256
#endif

DigitalOut led1(LED1);
volatile bool should_exit = false;
Expand Down