1# Copyright (c) 2018 Intel Corporation
2# SPDX-License-Identifier: Apache-2.0
3
4config CMSIS_RTOS_V2
5	bool "CMSIS RTOS v2 API"
6	depends on POLL
7	depends on THREAD_NAME
8	depends on THREAD_STACK_INFO
9	depends on THREAD_MONITOR
10	depends on INIT_STACKS
11	depends on NUM_PREEMPT_PRIORITIES >= 56
12	help
13	  This enables CMSIS RTOS v2 API support. This is an OS-integration
14	  layer which allows applications using CMSIS RTOS V2 APIs to build
15	  on Zephyr.
16
17if CMSIS_RTOS_V2
18config CMSIS_V2_THREAD_MAX_COUNT
19	int "Maximum thread count in CMSIS RTOS V2 application with dynamic control blocks"
20	default 15
21	range 0 $(UINT8_MAX)
22	help
23	  Max number of threads in CMSIS RTOS V2 application that can be created with
24		dynamically allocated control block.
25
26config CMSIS_V2_THREAD_DYNAMIC_MAX_COUNT
27	int "Maximum thread count in CMSIS RTOS V2 application with dynamic stack"
28	default 0
29	range 0 $(UINT8_MAX)
30	help
31	  Max number of threads in CMSIS RTOS V2 application that can be created with
32		dynamically allocated stack.
33
34config CMSIS_V2_THREAD_MAX_STACK_SIZE
35	int "Max stack size threads can be allocated in CMSIS RTOS V2 application"
36	default 4096 if COVERAGE_GCOV
37	default 512
38	help
39	  Mention max stack size threads can be allocated in CMSIS RTOS V2 application.
40
41config CMSIS_V2_THREAD_DYNAMIC_STACK_SIZE
42	int "Dynamic stack size threads are allocated in CMSIS RTOS V2 application"
43	default 4096 if COVERAGE_GCOV
44	default 512
45	help
46	  Mention dynamic stack size threads are allocated in CMSIS RTOS V2 application.
47
48config CMSIS_V2_TIMER_MAX_COUNT
49	int "Maximum dynamically-allocated timers in CMSIS RTOS V2 application"
50	default 5
51	range 0 $(UINT8_MAX)
52	help
53	  Mention maximum number of timers in CMSIS RTOS V2 compliant application that can
54		be created with dynamically allocated control block.
55
56config CMSIS_V2_MUTEX_MAX_COUNT
57	int "Maximum dynamically-allocated mutexes in CMSIS RTOS V2 application"
58	default 5
59	range 0 $(UINT8_MAX)
60	help
61	  Mention max number of mutexes in CMSIS RTOS V2 compliant application that can
62		be created with dynamically allocated control block.
63
64config CMSIS_V2_SEMAPHORE_MAX_COUNT
65	int "Maximum dynamically-allocated semaphores in CMSIS RTOS V2 application"
66	default 5
67	range 0 $(UINT8_MAX)
68	help
69	  Mention max number of semaphores in CMSIS RTOS V2 compliant application that can
70		be created with dynamically allocated control block.
71
72config CMSIS_V2_MEM_SLAB_MAX_COUNT
73	int "Maximum dynamically-allocated mempools in CMSIS RTOS V2 application"
74	default 5
75	range 0 $(UINT8_MAX)
76	help
77	  Mention maximum number of memory slabs in CMSIS RTOS V2 compliant application that can
78		be created with dynamically allocated control block.
79
80config CMSIS_V2_MEM_SLAB_MAX_DYNAMIC_SIZE
81	int "Maximum dynamic mem slab/pool size in CMSIS RTOS V2 application"
82	default 0
83	help
84	  Mention maximum dynamic size of memory slabs/pools in CMSIS RTOS V2 compliant application.
85
86config CMSIS_V2_MSGQ_MAX_COUNT
87	int "Maximum dynamically-allocated message queues in CMSIS RTOS V2 application"
88	default 5
89	range 0 $(UINT8_MAX)
90	help
91	  Mention maximum number of message queues in CMSIS RTOS V2 compliant application that can
92		be created with dynamically allocated control block.
93
94config CMSIS_V2_MSGQ_MAX_DYNAMIC_SIZE
95	int "Maximum dynamic message queue size in CMSIS RTOS V2 application"
96	default 0
97	help
98	  Mention maximum dynamic size of message queues in CMSIS RTOS V2 compliant application.
99
100config CMSIS_V2_EVT_FLAGS_MAX_COUNT
101	int "Maximum dynamically-allocated event flags count in CMSIS RTOS V2 application"
102	default 5
103	range 0 $(UINT8_MAX)
104	help
105	  Mention maximum number of event flags in CMSIS RTOS V2 compliant application that can
106		be created with dynamically allocated control block.
107endif
108