在安装目录下找到目录:
SDK\2018.1\data\embeddedsw\ThirdParty\bsp\freertos10_xilinx_v1_0\data
然后通过两个步骤来完成配置项的增加。
(1) 编辑文件freertos10_xilinx.mld,为配置界面增加项目
用文本编辑器打开freertos10_xilinx.mld文件,通过手动编辑文件添加配置项
如想添加FreeRTOS的configSUPPORT_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 false if the idle task should always use its entire time slice unless it is preempted.";
PARAM name = max_prioritie

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

1万+

被折叠的 条评论
为什么被折叠?



