Difference between revisions of "Running FreeRTOS on Xilinx Zybo"
|Line 24:||Line 24:|
Revision as of 18:01, 6 December 2017
Tested on Xilinx Vivado/SDK 2017.3, Ubuntu 16.04 LTS. This tutorial assumes you have completed the "Creating example project with AXI4 Lite peripheral in Xilinx Vivado"-tutorial.
Running FreeRTOS on Xilinx Zybo
This tutorial will help in setting up Xilinx Zybo SoC-board to run FreeRTOS with an example project that toggles the LEDs on the board. It assumes that the user has successfully exported the hardware bitstream from the Xilinx Vivado project created in the previous tutorial linked at the top.
Launch Xilinx SDK from the project in Xilinx Vivado: File --> Launch SDK.
Create a new application project with File --> New --> Application Project and name it "FreeRTOS_example_project". Use C as language, standalone as OS. Click next, select "Empty Application", and finish.
Download and extract FreeRTOS available at the FreeRTOS homepage:
- Homepage []
Add FreeRTOS to the project
Open the extracted folder, and copy the following files into the SDK project source folder located at: \axi3_lite_tutorial_project\axi4_lite_tutorial_project.sdk\FreeRTOS_example_project\src\
Your SDK project source folder should now look like this:
Edit the highlighted line to the lscript.id file located in the SDK project source folder:
Comment out "*pxTopOfStack |= portTHUMB_MODE_BIT;" on line 280 in port.c to avoid FreeRTOS to run in thumb-mode:
Setting CPU frequency
Next we should configure the CPU to run at 50MHz in the FreeRTOSConfig.h file by editing the configCPU_CLOCK_HZ parameter:
Write the application
Go back into Xilinx SDK and refresh(F5). All the added files should now be visible in the project explorer.