FreedonStudio freertos 内存分配方式选择
作者:互联网
FreeRTOS提供了5种内存管理实现,具体使用的哪一种,要看编译指定
使用的FreedomStudio 软件
示例freertos_minimal/src/Makefile
Makefile 中export HEAP = 4
在freertos_minimal/FreeRTOS-metal/scripts/FreeRTOS_core_mk 中
ifeq ($(HEAP),1)
override C_SOURCES += $(SOURCE_DIR)/portable/MemMang/heap_1.c
else ifeq ($(HEAP),2)
override C_SOURCES += $(SOURCE_DIR)/portable/MemMang/heap_2.c
else ifeq ($(HEAP),3)
override C_SOURCES += $(SOURCE_DIR)/portable/MemMang/heap_3.c
else ifeq ($(HEAP),4)
override C_SOURCES += $(SOURCE_DIR)/portable/MemMang/heap_4.c
else ifeq ($(HEAP),5)
override C_SOURCES += $(SOURCE_DIR)/portable/MemMang/heap_5.c
else
ERR = $(error No heap management selected)
endif
根据宏值选择编译不同的heap文件
标签:celse,FreedonStudio,MemMang,heap,freertos,内存,HEAP,DIR,portable 来源: https://www.cnblogs.com/yinseyingji/p/14072974.html