11-21-2018 12:00 AM - edited 11-21-2018 12:01 AM
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!
11-21-2018 05:37 AM
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:
Regards
11-21-2018 04:04 AM
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
11-21-2018 05:22 AM
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!
11-21-2018 05:37 AM
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:
Regards
11-21-2018 07:40 AM
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!
11-21-2018 08:18 AM
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.
So when I create the new application my BSP makes use of my customized FreeRTOS source files:
Regards
11-21-2018 08:48 AM
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!
11-21-2018 11:36 PM
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!
08-16-2019 02:19 AM
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