1 /*
2 * Copyright (c) 2020 BayLibre, SAS
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7 #include <zephyr.h>
8 #include <stdio.h>
9
10 #include "main.h"
11 #include "thread_def.h"
12
main(void)13 void main(void)
14 {
15 printf("Main Thread started; %s\n", CONFIG_BOARD);
16
17 k_thread_create(&supervisor_thread, supervisor_stack, THREAD_STACKSIZE,
18 supervisor_thread_function, NULL, NULL, NULL,
19 -1, K_INHERIT_PERMS, K_NO_WAIT);
20
21 k_sleep(K_MSEC(1000));
22
23 k_thread_create(&user_thread, user_stack, THREAD_STACKSIZE,
24 user_thread_function, NULL, NULL, NULL,
25 -1, K_USER | K_INHERIT_PERMS, K_NO_WAIT);
26 }
27