diff --git a/meson.build b/meson.build index 2c1f1059..e6fe6d5e 100644 --- a/meson.build +++ b/meson.build @@ -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 diff --git a/openrtx/src/bootstrap.c b/openrtx/src/bootstrap.c index 2cc9c6fe..1d241651 100644 --- a/openrtx/src/bootstrap.c +++ b/openrtx/src/bootstrap.c @@ -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);