UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Participant mageo17
Participant
1,694 Views
Registered: ‎04-28-2017

freertos901_xilinx - FreeRTOSConfig.h

Hello,

 

I am hoping someone could help me out here, what I want to do is very simple but it just does not seem to want to cooperate. I am using FreeRTOS with lwip, I started with the lwip Echo demo and moved on from there. What I am trying to do is configure the FreeRTOSConfig.h header file, in specifically: #define configSUPPORT_STATIC_ALLOCATION 1.

 

The FreeRTOSConfig.h always comes pre-made when I start my application through SDK and at the top it states

 

* CAUTION: This file is automatically generated by HSI.
* Version:
* DO NOT EDIT.

 

However I need to edit this to use the FreeRTOS properly. So whenever I add or change something and save it, it reverts back to it's default setting. My question is why can I not edit this header file which governs the extent of my program?

 

Any help would be greatly appreciated thank you.

 

Regards,

Mageo17 

0 Kudos
3 Replies
1,277 Views
Registered: ‎05-13-2016

Re: freertos901_xilinx - FreeRTOSConfig.h

Have you gotten any replies on this. I am trying to use the uxTaskGetStackHighWater function and need to modify the FreeRTOSConfig.h file and it keeps reverting, as you described.

 

 

0 Kudos
Moderator
Moderator
1,139 Views
Registered: ‎09-12-2007

Re: freertos901_xilinx - FreeRTOSConfig.h

The  FreeRTOSConfig.h is created dynamically during BSP creation via the freertos901_xilinx_v1_1\data\freertos901_xilinx.tcl

For example:

 

set config_file [xopen_new_include_file "./src/FreeRTOSConfig.h" "FreeRTOS Configuration parameters"]
puts $config_file "\#include \"xparameters.h\" \n"

 

If you guys want to change this file, then you should make a local copy of the freertos, and make the changes here.

 

For example:

Copy the folder here:

SDK\2017.4\data\embeddedsw\ThirdParty\bsp\freertos901_xilinx_v1_1

 

Into a local repo

<local path>/repo/bsp/freertos901_xilinx_v1_1

Note: the hierarchy is needed here

 

Then make your mods to the TCL file, and then in the SDK. Xilinx -> Repositories, select New and point to repo.

 

For example:
puts $config_file "\#include \"xparameters.h\" \n"

puts $config_file "\#include \"blaa blaa.h\" \n"

 

Note: Beware of the TCL syntax. for example, above the \ are used to tell TCL about special characters

 

You may need to regenerate the BSP to detect the changes

0 Kudos
Contributor
Contributor
443 Views
Registered: ‎10-10-2018

Re: freertos901_xilinx - FreeRTOSConfig.h

The steps given for copying FreeRTOS as a local repo were very helpful.  I was trying to achieve the same thing as OP.  I would extend the answer to mention that many of the lines in the *.tcl file to generate FreeRTOSConfig.h have lines like the following:

 

set val [common::get_property CONFIG.use_preemption $os_handle]
if {$val == "false"} {
 xput_define $config_file "configUSE_PREEMPTION" "0"
} else {
 xput_define $config_file "configUSE_PREEMPTION" "1"
}

 

It took me a little while to figure out that these CONFIG.* properties are set in the SDK in the "Board Support Package Settings" dialog.  This can be accessed from menu Xilinx | Board Support Package Settings or by right-click on BSP in project navigator pane.  And it appears that you cannot add new ones into the dialog, so modifying the *.tcl file is the only option that I see.

 

0 Kudos