Main stack size is automatically increased to 4kB when a test suite is compiled

This commit is contained in:
Silvano Seva 2021-02-04 13:46:09 +01:00 committed by Niccolò Izzo
parent a0814fd5d1
commit 6578422c9d
2 changed files with 9 additions and 1 deletions

View File

@ -28,8 +28,10 @@ openrtx_src = ['openrtx/src/bootstrap.c',
## Replace main executable with platform test
if get_option('test') != ''
openrtx_src += 'tests/platform/'+get_option('test')+'.c'
openrtx_def = {'RUN_TESTSUITE': ''}
else
openrtx_src += 'openrtx/src/main.c'
openrtx_def = {}
endif
openrtx_inc = ['openrtx/include',
@ -86,7 +88,7 @@ inc = openrtx_inc + rtos_inc + minmea_inc
##
## Definitions
##
def = {'DONT_USE_CMSIS_INIT': ''}
def = openrtx_def + {'DONT_USE_CMSIS_INIT': ''}
##
## MCU-dependent sources and includes

View File

@ -29,7 +29,13 @@ int main(int argc, char *argv[]);
/*
* OS startup task, will call main() when all initialisations are done.
*/
#ifdef RUN_TESTSUITE
#define START_TSK_STKSIZE 4096/sizeof(CPU_STK)
#else
#define START_TSK_STKSIZE 512/sizeof(CPU_STK)
#endif
static OS_TCB startTCB;
static CPU_STK startStk[START_TSK_STKSIZE];
static void startTask(void *arg);