Browse Source

Merge pull request #1640 from liangyongxiang/rt-debug-macro

[kernel] add all RT_DEBUG_* options macro to menuconfig
Bernard Xiong 6 years ago
parent
commit
4ca1d03bdf
1 changed files with 97 additions and 29 deletions
  1. 97 29
      src/Kconfig

+ 97 - 29
src/Kconfig

@@ -4,8 +4,8 @@ config RT_NAME_MAX
     int "The maximal size of kernel object name"
     int "The maximal size of kernel object name"
     range 2 32
     range 2 32
     default 8
     default 8
-    help 
-        Each kernel object, such as thread, timer, semaphore etc, has a name, 
+    help
+        Each kernel object, such as thread, timer, semaphore etc, has a name,
         the RT_NAME_MAX is the maximal size of this object name.
         the RT_NAME_MAX is the maximal size of this object name.
 
 
 config RT_ALIGN_SIZE
 config RT_ALIGN_SIZE
@@ -14,7 +14,7 @@ config RT_ALIGN_SIZE
     help
     help
         Alignment size for CPU architecture data access
         Alignment size for CPU architecture data access
 
 
-    choice 
+    choice
         prompt "The maximal level value of priority of thread"
         prompt "The maximal level value of priority of thread"
         default RT_THREAD_PRIORITY_32
         default RT_THREAD_PRIORITY_32
 
 
@@ -41,38 +41,18 @@ config RT_TICK_PER_SECOND
     help
     help
         System's tick frequency, Hz.
         System's tick frequency, Hz.
 
 
-config RT_DEBUG
-    bool "Enable debug features"
-    default y
-
-if RT_DEBUG
-
 config RT_USING_OVERFLOW_CHECK
 config RT_USING_OVERFLOW_CHECK
     bool "Using stack overflow checking"
     bool "Using stack overflow checking"
     default y
     default y
     help
     help
-        Enable thread stack overflow checking. The stack overflow is checking when 
+        Enable thread stack overflow checking. The stack overflow is checking when
         each thread switch.
         each thread switch.
 
 
-config RT_DEBUG_INIT
-    int "Enable system initialization informat print"
-    default 0
-    help
-        print the procedure name of initialization
-
-config RT_DEBUG_THREAD
-    int "Enable thread switch information dump"
-    default 0
-    help
-        print the switch to/from thread name when each thread context switch
-
-endif
-
 config RT_USING_HOOK
 config RT_USING_HOOK
     bool "Enable system hook"
     bool "Enable system hook"
     default y
     default y
     help
     help
-        Enable the hook function when system running, such as idle thread hook, 
+        Enable the hook function when system running, such as idle thread hook,
         thread context switch etc.
         thread context switch etc.
 
 
     if RT_USING_HOOK
     if RT_USING_HOOK
@@ -92,7 +72,7 @@ config RT_USING_TIMER_SOFT
     bool "Enable software timer with a timer thread"
     bool "Enable software timer with a timer thread"
     default n
     default n
     help
     help
-        the timeout function context of soft-timer is under a high priority timer 
+        the timeout function context of soft-timer is under a high priority timer
         thread.
         thread.
 
 
 if RT_USING_TIMER_SOFT
 if RT_USING_TIMER_SOFT
@@ -106,6 +86,94 @@ config RT_TIMER_THREAD_STACK_SIZE
 
 
 endif
 endif
 
 
+menuconfig RT_DEBUG
+    bool "Enable debugging features"
+    default y
+
+if RT_DEBUG
+
+config RT_DEBUG_INIT_CONFIG
+    bool "Enable debugging of components initialization"
+    default n
+
+config RT_DEBUG_INIT
+    int
+    default 1 if RT_DEBUG_INIT_CONFIG
+
+config RT_DEBUG_THREAD_CONFIG
+    bool "Enable debugging of Thread State Changes"
+    default n
+
+config RT_DEBUG_THREAD
+    int
+    default 1 if RT_DEBUG_THREAD_CONFIG
+
+config RT_DEBUG_SCHEDULER_CONFIG
+    bool "Enable debugging of Scheduler"
+    default n
+
+config RT_DEBUG_SCHEDULER
+    int
+    default 1 if RT_DEBUG_SCHEDULER_CONFIG
+
+config RT_DEBUG_IPC_CONFIG
+    bool "Enable debugging of IPC"
+    default n
+
+config RT_DEBUG_IPC
+    int
+    default 1 if RT_DEBUG_IPC_CONFIG
+
+config RT_DEBUG_TIMER_CONFIG
+    bool "Enable debugging of Timer"
+    default n
+
+config RT_DEBUG_TIMER
+    int
+    default 1 if RT_DEBUG_TIMER_CONFIG
+
+config RT_DEBUG_IRQ_CONFIG
+    bool "Enable debugging of IRQ(Interrupt Request)"
+    default n
+
+config RT_DEBUG_IRQ
+    int
+    default 1 if RT_DEBUG_IRQ_CONFIG
+
+config RT_DEBUG_MEM_CONFIG
+    bool "Enable debugging of Small Memory Algorithm"
+    default n
+
+config RT_DEBUG_MEM
+    int
+    default 1 if RT_DEBUG_MEM_CONFIG
+
+config RT_DEBUG_SLAB_CONFIG
+    bool "Enable debugging of SLAB Memory Algorithm"
+    default n
+
+config RT_DEBUG_SLAB
+    int
+    default 1 if RT_DEBUG_SLAB_CONFIG
+
+config RT_DEBUG_MEMHEAP_CONFIG
+    bool "Enable debugging of Memory Heap Algorithm"
+    default n
+
+config RT_DEBUG_MEMHEAP
+    int
+    default 1 if RT_DEBUG_MEMHEAP_CONFIG
+
+config RT_DEBUG_MODULE_CONFIG
+    bool "Enable debugging of Application Module"
+    default n
+
+config RT_DEBUG_MODULE
+    int
+    default 1 if RT_DEBUG_MODULE_CONFIG
+
+endif
+
 menu "Inter-Thread communication"
 menu "Inter-Thread communication"
 
 
 config RT_USING_SEMAPHORE
 config RT_USING_SEMAPHORE
@@ -133,7 +201,7 @@ config RT_USING_SIGNALS
     select RT_USING_MEMPOOL
     select RT_USING_MEMPOOL
     default n
     default n
     help
     help
-        A signal is an asynchronous notification sent to a specific thread 
+        A signal is an asynchronous notification sent to a specific thread
         in order to notify it of an event that occurred.
         in order to notify it of an event that occurred.
 endmenu
 endmenu
 
 
@@ -151,7 +219,7 @@ menu "Memory Management"
         help
         help
             Using memory heap object to manage dynamic memory heap.
             Using memory heap object to manage dynamic memory heap.
 
 
-    choice 
+    choice
         prompt "Dynamic Memory Management"
         prompt "Dynamic Memory Management"
         default RT_USING_SMALL_MEM
         default RT_USING_SMALL_MEM
 
 
@@ -187,7 +255,7 @@ menu "Memory Management"
     endif
     endif
 
 
     config RT_USING_HEAP
     config RT_USING_HEAP
-        bool 
+        bool
         default n if RT_USING_NOHEAP
         default n if RT_USING_NOHEAP
         default y if RT_USING_SMALL_MEM
         default y if RT_USING_SMALL_MEM
         default y if RT_USING_SLAB
         default y if RT_USING_SLAB