为SDK2018的FreeRTOS10增加静态内存分配和StreamBuffer的支持

本文介绍了如何在SDK2018的FreeRTOS10中增加静态内存分配和StreamBuffer的支持。通过编辑freertos10_xilinx.mld和freertos10_xilinx.tcl文件,更新配置界面和生成的配置文件。在BSP设置界面看到新选项后,重新生成BSP代码,并在FreeRTOSConfig.h中添加定义。还需将stream_buffer.c添加到BSP源文件,并实现vApplicationGetIdleTaskMemory和vApplicationGetTimerTaskMemory函数以分配静态内存。
摘要由CSDN通过智能技术生成

在安装目录下找到目录:

SDK\2018.1\data\embeddedsw\ThirdParty\bsp\freertos10_xilinx_v1_0\data

 

然后通过两个步骤来完成配置项的增加。

 

(1) 编辑文件freertos10_xilinx.mld,为配置界面增加项目

用文本编辑器打开freertos10_xilinx.mld文件,通过手动编辑文件添加配置项

如想添加FreeRTOSconfigSUPPORT_STATIC_ALLOCATION配置,采取如下步骤:

1. 为这个配置项取一个适当的名字(不冲突),这里取为support_static_allocation

2. 设置好类型,这里为bool,缺省值,描述(随便看得明白即可)等

3. 找一个行当的分组,这里选kernel_behavior类别

BEGIN CATEGORY kernel_behavior

4. 在选中的类别里添加一行,这里为

PARAM name = support_static_allocation, type = bool, default = false, desc = "Support static allocation memory for FreeRTOS objects.";

添加后变成:

BEGIN CATEGORY kernel_behavior

PARAM name = kernel_behavior, type = bool, default = true, desc = "Parameters relating to the kernel behavior", permit = none;

PARAM name = max_api_call_interrupt_priority, type = int, default = 18, desc = "The maximum interrupt priority from which interrupt safe FreeRTOS API calls can be made.";

PARAM name = use_preemption, type = bool, default = true, desc = "Set to true to use the preemptive scheduler, or false to use the cooperative scheduler.";

PARAM name = tick_rate, type = int, default = 100, desc = "Number of RTOS ticks per sec";

PARAM name = idle_yield, type = bool, default = true, desc = "Set to true if the Idle task should yield if another idle priority task is able to run, or fals

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值