10-22-2014 01:22 AM
We have been developing a FreeRTOS based application on Zynq using SDK 2013. We are also using lwIP (in socket mode) as provided by the BSP drivers. We were using the BSP driver version of FreeRTOS V7.0.2, packaged as an SDK repository, and widely available from Xilinx, e.g. here: http://interactive.freertos.org/entries/21706962-Xilinx-FreeRTOS-Port-for-Zynq
We have now upgraded to SDK 2014.2 and the old port of FreeRTOS no longer works. There seem to be two problems:
1. Xilinx have changed the format of the script files used to import the repository into the SDK.
2. The new version of the lwIP driver (lwip140_v2_1) is calling the FreeRTOS function xSemaphoreTakeFromISR which is not in FreeRTOS V7.0.2 (it was added in V7.2.0 I believe).
Ideally we would really like to upgrade to FreeRTOS V8 as it include many new features.
Where can we get the new Xilinx BSP driver version of FreeRTOS as required by the 2014.2 SDK? I have searched on the Web, contaced my local distributor and tried to open a WebCase but I without any luck.....
Any help gratefully received...
10-22-2014 03:20 AM
Stand alone, rather than built into the BSP, but the latest FreeRTOS version included an upgrade to build with the 2014.2 tools, and it includes lwIP functionality: http://www.freertos.org/RTOS-Xilinx-Zynq.html
10-23-2014 05:59 AM
Thanks Richard. My Xilinx FAE gave me same advice. I'm pleased to say I've got everything working now.
For the benefit of anyone else stuck with this, I can spell out what I've done:
1. Download the full FreeRTOS v8.1.2 distribution from sourceforge.
2. Open the CORTEX_A9_Zynq_ZC702 demo project in SDK 2014.2, build and check the basic stuff runs on my Zedboard.
3. Create a new 'standalone' application project in SDK 2014.2
4. Copy the following source files from the FreeRTOS distribution into my own application project:
FreeRTOS source (FreeRTOSV8.1.2\FreeRTOS\Source)
ARM_CA9 HAL for Zynq (FreeRTOSV8.1.2\FreeRTOS\Source\portable\GCC\ARM_CA9)
lwIP V1.4.0 source (FreeRTOSV8.1.2\FreeRTOS\Demo\Common\ethernet\lwip-1.4.0)
lwIP HAL for Zynq (FreeRTOSV8.1.2\FreeRTOS\Demo\CORTEX_A9_Zynq_ZC702\RTOSDemo\src\lwIP_Demo\lwIP_port)
5. Copy my application source files from my SDK 2013 project into the new project.
6. Configure the OS and IP stack, via the header files FreeRTOSConfig.h, lwipopts.h and lwip\opt.h
7. Update the parts of my application code that initialise the OS and the stack, using the demo as a guide.
8. Build and run.
That's it - the OS and IP stack are now just regular application source files, not drivers, and not in the BSP.
12-19-2014 09:25 AM - edited 12-19-2014 09:28 AM
Thanks for the detailed steps. I am trying to do something similar. Untill now I was working with the old FreeRTOS and lwip which were part of the BSP. I am glad we can do away with BSP's and work independently now.
However I have a small poblem with the Demo application.
I am trying to implement it on the Zedboard just to see if the lwip works okay and I get the following error when I telnet to the board and enter help
incorrect configuration: unknown temac
On debugging a bit I see that in the function xemacif_input (which is called when packets arrive) the switch case statement goes to the default case because the emac->type value is 105. The emac->type must be of case "xemac_type_emacps" for the arm processor which is not the case when I run my demo application. Any idea what causes this ?
The HTTP web server part of the lwip demo works okay.
When I run the default lwip echo server template using the lwip library in the bsp it works okay, so the hardware has no issues.
I know the demo is ment to work out of the box for a ZC702_hw_platform but are there any major changes needed to make it run for the Zedboard apart from chaninging the hardware xml file and regenerating a standalone bsp ?
Since you mentioned in point 2 that you were able to get it to run on the zedboard , it would be help ful to know what you did.
PS : I am using SDK 2014.4
Thanks a lot