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: 
Highlighted
Explorer
Explorer
1,523 Views
Registered: ‎07-03-2014

FreeRTOS default BSP configuration

Jump to solution

Hi,

I'm developing my application using a FreeRTOS BSP; FreeRTOS can be customized by editing "FreeRTOSConfig.h", although it can be done using "Board Support Package Settings" menu in SDK. For my project, I set my own heap size, hook functions, interrupt priorities and so on, which are different from default values.

The problem is those values are returned to default each time BSP is re-build and, unfortunately, during developing phase a new hardware platform is created in a weekly basis, so we must set all FreeRTOS parameters again each week. This is error prone and a bit annoying.

Is there some way to make my parameters be the default ones? Or maybe is there some way to avoid those parameteres returning to default when re-building BSP?

Thanks!

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
1,476 Views
Registered: ‎10-06-2016

Re: FreeRTOS default BSP configuration

Jump to solution

Hi @alexmoya

The FreeRTOS source files are placed within the folders you already mention (we always keep several releases of drivers/bsps just in case) but as you noticed the FreeRTOSConfig.h file is missing. That is because we generate the file as part of the BSP generation process through the script included within the driver/bsp. Take a look to it in the github repo.

For your use case:

  1. Create a folder hierarchy called repo/bsp anywhere and copy "freertos901_xilinx_v1_1" within it.
  2. Modify one of the .c/.h files to ensure that the tool is taking your custom copy
  3. Point to repo folder in the repository configuration
  4. Create a new FreeRTOS based application and check your custom source files has been used
  5. Modify the freertos10_xilinx.tcl script to populate the FreeRTOSConfig.h file as desired (You can eventually also just copy an existing one).

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
8 Replies
Moderator
Moderator
1,486 Views
Registered: ‎10-06-2016

Re: FreeRTOS default BSP configuration

Jump to solution

Hi @alexmoya,

If you need to modify parameters or code within the FreeRTOS BSP that are not available through the BSP configuration menu you can use a custom FreeRTOS BSP using the repository feature.

Just copy the freeRTOS folder within the SDK installation folder into a custom location and modify the code you need. Then use the repository configuration to point to the location (ensure the directory structure follows the guildelines repo/bsp/freertosXXX_VY_Z) and the tool will take you custom BSP as it has preference to the default one.

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Explorer
Explorer
1,480 Views
Registered: ‎07-03-2014

Re: FreeRTOS default BSP configuration

Jump to solution

Hi @ibaie

Thanks for your quick answer, but I can't do as you explain because I can't find FreeRTOS source files in SDK installation folder. I'm using Vivado 2017.4 and I was looking for source code in path

C:\Xilinx\SDK\2017.4\data\embeddedsw\ThirdParty\bsp

Inside that folder there are 3 versions of FreeRTOS:

freertos823_xilinx_v1_3

freertos901_xilinx_v1_0

freertos901_xilinx_v1_1

But none of them holds the source files; I've been looking for "FreeRTOSConfig.h" and I was unable to found it.

Anyway, I could get all source code from path

%MY_WORSKPACE%\FreeRTOS_bsp\microblaze_0\include

where all FreeRTOS files are present, but then... Where should I copy them? Is there any specific or default the path for the repository? Or should I copy those file into "C:\Xilinx\SDK\2017.4\data\embeddedsw\ThirdParty\bsp"?

 

Thanks!

 

0 Kudos
Moderator
Moderator
1,477 Views
Registered: ‎10-06-2016

Re: FreeRTOS default BSP configuration

Jump to solution

Hi @alexmoya

The FreeRTOS source files are placed within the folders you already mention (we always keep several releases of drivers/bsps just in case) but as you noticed the FreeRTOSConfig.h file is missing. That is because we generate the file as part of the BSP generation process through the script included within the driver/bsp. Take a look to it in the github repo.

For your use case:

  1. Create a folder hierarchy called repo/bsp anywhere and copy "freertos901_xilinx_v1_1" within it.
  2. Modify one of the .c/.h files to ensure that the tool is taking your custom copy
  3. Point to repo folder in the repository configuration
  4. Create a new FreeRTOS based application and check your custom source files has been used
  5. Modify the freertos10_xilinx.tcl script to populate the FreeRTOSConfig.h file as desired (You can eventually also just copy an existing one).

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Explorer
Explorer
1,461 Views
Registered: ‎07-03-2014

Re: FreeRTOS default BSP configuration

Jump to solution

Sorry for my ignorance, but... how can I do step 3?

3. Point to repo folder in the repository configuration


I did the others steps, but don't know how to point to my repo folder: I copied "freertos901_xilinx_v1_1" into "C:\Xilinx\SDK\2017.4\data\embeddedsw\ThirdParty\bsp\freertos901_custom_v1_0".

 

Thanks!

0 Kudos
Moderator
Moderator
1,454 Views
Registered: ‎10-06-2016

Re: FreeRTOS default BSP configuration

Jump to solution

Hi @alexmoya,

I would suggest you to not place the custom BSP within the default installation folder, the whole idea here is to have a custom repository folder having precedence to the default one.

So for example create the custom repository in C and point it in the repository configuration.

image.png

image.png

So when I create the new application my BSP makes use of my customized FreeRTOS source files:

image.png

 

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Explorer
Explorer
1,446 Views
Registered: ‎07-03-2014

Re: FreeRTOS default BSP configuration

Jump to solution

Hi @ibaie

I had to point to "C:\custom_repo\bsp" because nothing changed if I added the path to "C:\custom_repo", but it finally worked!!

 

Thank you very much!

0 Kudos
Explorer
Explorer
1,424 Views
Registered: ‎07-03-2014

Re: FreeRTOS default BSP configuration

Jump to solution

Some more information about this: to change defaults, I had to edit file "freertos901_xilinx.mld" to set "tick_rate" and "total_heap_size" to my customized values.

To add new defines to "FreeRTOSConfig.h", I had to edit file "freertos901_xilinx.tcl".

 

Regards!

0 Kudos
Visitor tom.wilson
Visitor
384 Views
Registered: ‎12-10-2018

Re: FreeRTOS default BSP configuration

Jump to solution

Hi Ibai,

I Have followed these steps to link to a custom freeRTOS repo. However, the BSP is still generating another version of freeRTOSConfig.h. Is there a way to prevent this from being built by the BSP? Or are you suggesting that a standalone BSP is generated, with the freeRTOS OS being included as a local repo? 

Many Thanks, 

Tom

0 Kudos