From 5e7a026365f9114710fd588675afadaa68ca2050 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Wed, 9 Sep 2015 13:27:38 +0200 Subject: [PATCH] core: optimized output on kernel-init This PR saves some memory by ommiting redundant output. The printing of "jumpint into first task..." is obsolete, as the thread_create calls are not checked for errors anymore. Further the version print is moved into the main_trampoline. This prevents the STDLIB from using precious stack space on the ISR stack, on which it is running before jumping into main - hence opening the option to decrease the stacksize for the ISR stack. --- core/kernel_init.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/kernel_init.c b/core/kernel_init.c index b5fe967f9..311c7a290 100644 --- a/core/kernel_init.c +++ b/core/kernel_init.c @@ -51,6 +51,8 @@ static void *main_trampoline(void *arg) auto_init(); #endif + LOG_INFO("main(): This is RIOT! (Version: " RIOT_VERSION ")\n"); + main(); return NULL; } @@ -82,7 +84,6 @@ static char idle_stack[THREAD_STACKSIZE_IDLE]; void kernel_init(void) { (void) disableIRQ(); - LOG_INFO("kernel_init(): This is RIOT! (Version: %s)\n", RIOT_VERSION); hwtimer_init(); @@ -96,7 +97,5 @@ void kernel_init(void) CREATE_WOUT_YIELD | CREATE_STACKTEST, main_trampoline, NULL, main_name); - LOG_INFO("kernel_init(): jumping into first task...\n"); - cpu_switch_context_exit(); }