Ver código fonte

add PKG_FREERTOS_USING_MEMMANG_HEAPx selection

用户可以在Kconfig中选择使用的heap策略
Meco Man 2 anos atrás
pai
commit
a2743edd78
1 arquivos alterados com 11 adições e 1 exclusões
  1. 11 1
      FreeRTOS/SConscript

+ 11 - 1
FreeRTOS/SConscript

@@ -4,10 +4,20 @@ from building import *
 cwd = GetCurrentDir()
 src	= Glob('*.c')
 src += Glob(os.path.join("portable", "rt-thread", "*.c"))
-src += Glob(os.path.join("portable", "MemMang", "heap_3.c"))
 
 CPPPATH = [os.path.join(cwd, "include", "freertos"), os.path.join(cwd, "portable", "rt-thread")]
 
+if GetDepend('PKG_FREERTOS_USING_MEMMANG_HEAP1'):
+    src += [os.path.join("portable", "MemMang", "heap_1.c")]
+elif GetDepend('PKG_FREERTOS_USING_MEMMANG_HEAP2'):
+    src += [os.path.join("portable", "MemMang", "heap_2.c")]
+elif GetDepend('PKG_FREERTOS_USING_MEMMANG_HEAP3'):
+    src += [os.path.join("portable", "MemMang", "heap_3.c")]
+elif GetDepend('PKG_FREERTOS_USING_MEMMANG_HEAP4'):
+    src += [os.path.join("portable", "MemMang", "heap_4.c")]
+elif GetDepend('PKG_FREERTOS_USING_MEMMANG_HEAP5'):
+    src += [os.path.join("portable", "MemMang", "heap_5.c")]
+
 group = DefineGroup('FreeRTOS', src, depend = [''], CPPPATH = CPPPATH)
 
 Return('group')