shell; call console_init() from shell task context instead of app main.
diff --git a/apps/bletest/src/main.c b/apps/bletest/src/main.c
index 6c59532..dbfa053 100755
--- a/apps/bletest/src/main.c
+++ b/apps/bletest/src/main.c
@@ -1105,10 +1105,6 @@
g_led_pin = LED_BLINK_PIN;
hal_gpio_init_out(g_led_pin, 1);
- /* Init the console */
- rc = console_init(shell_console_rx_cb);
- assert(rc == 0);
-
#if 0
rc = hal_flash_init();
assert(rc == 0);
diff --git a/apps/bletiny/src/main.c b/apps/bletiny/src/main.c
index f5c57ba..733f8d1 100755
--- a/apps/bletiny/src/main.c
+++ b/apps/bletiny/src/main.c
@@ -1661,10 +1661,6 @@
rc = os_msys_register(&default_mbuf_pool);
assert(rc == 0);
- /* Initialize the console (for shell and logging). */
- rc = console_init(shell_console_rx_cb);
- assert(rc == 0);
-
/* Create the shell task. */
rc = shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE,
SHELL_MAX_INPUT_LEN);
diff --git a/apps/blinky/src/main.c b/apps/blinky/src/main.c
index 24d0311..4d797b3 100755
--- a/apps/blinky/src/main.c
+++ b/apps/blinky/src/main.c
@@ -178,8 +178,6 @@
shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE,
SHELL_MAX_INPUT_LEN);
- (void) console_init(shell_console_rx_cb);
-
stats_module_init();
rc = init_tasks();
diff --git a/apps/luatest/src/main.c b/apps/luatest/src/main.c
index 76dd13f..9cd3d5a 100755
--- a/apps/luatest/src/main.c
+++ b/apps/luatest/src/main.c
@@ -88,7 +88,6 @@
/* Init tasks */
shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE,
SHELL_MAX_INPUT_LEN);
- console_init(shell_console_rx_cb);
nffs_init();
diff --git a/apps/slinky/src/main.c b/apps/slinky/src/main.c
index f57657f..d9dd29a 100755
--- a/apps/slinky/src/main.c
+++ b/apps/slinky/src/main.c
@@ -58,7 +58,7 @@
int init_tasks(void);
/* Task 1 */
-#define TASK1_PRIO (1)
+#define TASK1_PRIO (8)
#define TASK1_STACK_SIZE OS_STACK_ALIGN(128)
#define MAX_CBMEM_BUF 600
struct os_task task1;
@@ -66,7 +66,7 @@
static volatile int g_task1_loops;
/* Task 2 */
-#define TASK2_PRIO (2)
+#define TASK2_PRIO (9)
#define TASK2_STACK_SIZE OS_STACK_ALIGN(128)
struct os_task task2;
os_stack_t stack2[TASK2_STACK_SIZE];
@@ -395,8 +395,6 @@
shell_task_init(SHELL_TASK_PRIO, shell_stack, SHELL_TASK_STACK_SIZE,
SHELL_MAX_INPUT_LEN);
- (void) console_init(shell_console_rx_cb);
-
nmgr_task_init(NEWTMGR_TASK_PRIO, newtmgr_stack, NEWTMGR_TASK_STACK_SIZE);
imgmgr_module_init();
bootutil_cfg_register();
diff --git a/libs/shell/src/shell.c b/libs/shell/src/shell.c
index 95ddcb0..4b95a2b 100644
--- a/libs/shell/src/shell.c
+++ b/libs/shell/src/shell.c
@@ -454,6 +454,7 @@
struct os_event *ev;
console_rdy_ev.ev_type = OS_EVENT_T_CONSOLE_RDY;
+ console_init(shell_console_rx_cb);
while (1) {
ev = os_eventq_get(&shell_evq);