Exercises
For solving the exercises I recommend you create your own folder inside zephyr-rtos-tutorial
which contains the following filetree.
.
└── my-exercises
├── threads
│ ├── thread-start
│ ├── thread-start-define
│ ├── thread-abort
│ ├── thread-sleep
│ ├── thread-suspend
│ └── thread-join
├── gpio
├── scheduling
├── debugging
├── interrupts
├── timers
├── mutexes
├── semaphores
├── logging
└── networking
thread creation: main
- Use
k_thread_create()
to create a thread - Implement the following
- Output the following serial using
printk()
solution: exercises/threads/thread-start
thread creation: define
- Same as previous, but this time using
K_THREAD_DEFINE
to create thread
solution: exercises/threads/thread-start-define
thread abort
- Implement the following
- Output the following serial using
printk()
solution: exercises/threads/thread-abort
thread sleep
- Implement the following
- Output the following serial using
printk()
solution: exercises/threads/thread-sleep
thread suspend
- Implement the following
- Output the following serial using
printk()
solution: exercises/threads/thread-suspend
thread join
- Implement the following
- Output the following serial using
printk()
solution: exercises/threads/thread-join