Skip to content

Commit a2743ed

Browse files
committed
add PKG_FREERTOS_USING_MEMMANG_HEAPx selection
用户可以在Kconfig中选择使用的heap策略
1 parent b5e20d1 commit a2743ed

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

FreeRTOS/SConscript

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,20 @@ from building import *
44
cwd = GetCurrentDir()
55
src = Glob('*.c')
66
src += Glob(os.path.join("portable", "rt-thread", "*.c"))
7-
src += Glob(os.path.join("portable", "MemMang", "heap_3.c"))
87

98
CPPPATH = [os.path.join(cwd, "include", "freertos"), os.path.join(cwd, "portable", "rt-thread")]
109

10+
if GetDepend('PKG_FREERTOS_USING_MEMMANG_HEAP1'):
11+
src += [os.path.join("portable", "MemMang", "heap_1.c")]
12+
elif GetDepend('PKG_FREERTOS_USING_MEMMANG_HEAP2'):
13+
src += [os.path.join("portable", "MemMang", "heap_2.c")]
14+
elif GetDepend('PKG_FREERTOS_USING_MEMMANG_HEAP3'):
15+
src += [os.path.join("portable", "MemMang", "heap_3.c")]
16+
elif GetDepend('PKG_FREERTOS_USING_MEMMANG_HEAP4'):
17+
src += [os.path.join("portable", "MemMang", "heap_4.c")]
18+
elif GetDepend('PKG_FREERTOS_USING_MEMMANG_HEAP5'):
19+
src += [os.path.join("portable", "MemMang", "heap_5.c")]
20+
1121
group = DefineGroup('FreeRTOS', src, depend = [''], CPPPATH = CPPPATH)
1222

1323
Return('group')

0 commit comments

Comments
 (0)