06-13-2016 08:23 AM - edited 06-13-2016 08:23 AM
The OS is independent of the platform. You can select FreeRTOS for zybo as well (I just checked in 2015.4). Do you experience something different? Can you post a screenshot of your new project wizard selection?
06-20-2016 06:01 PM
SDSoC ZC702 and ZC706 platforms include data in the platform XML files to enable FreeRTOS to be selected as a target OS, using the -target-os freertos command line option or using the SDSoC project wizard in the SDSoC environment to select
the target OS. The Zybo platform doesn't have this data, so out of the box the tools don't recognized FreeRTOS.
Since FreeRTOS builds on the standalone BSP, you can create a Zybo standalone application, compile user source files with FreeRTOS header files, compile FreeRTOS source files, create a linker script and link the ELF file.
The information below was tested using SDSoC 2016.1, but if you have a different release, it will be similar.
Method 1 Use FreeRTOS headers and binaries in the SDSoC Installation
SDSoC includes a set of FreeRTOS headers and a library containing FreeRTOS source that has already been built in the SDSoC installation. These can be used to build a Zybo FreeRTOS application using the steps below in the SDSoC environment.
1. Create a ZC702 FreeRTOS application from a template, for example "Matrix Multiplication (FreeRTOS)"
2. Create a Zybo standalone application using the Empty application template
3. Copy the source files from the ZC702 project to the Zybo project
4. Zybo has a smaller Zynq device, so edit mmult_accel.cpp and change the #pragma HLS array_partition variable that sets block factor=16 to block factor=8. This uses fewer resources in the programmable logic so the design will fit.
5. In the SDSoC Project Overview, in the Hardware Functions section click on + to mark the function mmult_accel() for hardware
6. Copy the linker script from <install>/platforms/zc702/freertos/lscript.ld to your Zybo project (you can edit it as required)
7. Right click on the project and select C/C++ Build Settings
8. In the Tool Settings tab for both SDSCC Compiler and SDS++ Compiler, click on Directories and click on + to add the include path <install>/aarch32-none/include/freertos.
9. In the Tool Settings tab for SDS++ LInker, click on Libraries and click on + in Libraries (-l) to add freertos (links in libfreertos.a) and click on + in Library search path (-L) to add <install>/aarch32-none/lib/freertos
9. Click OK to apply the settings and dismiss the C/C++ Settings dialog
10. Build you application using the SDDebug or SDRelease build configurations
Once the build completes, you can copy the BOOT.BIN file in the SDDebug/sd_card folder (for example) to a micro SD card, boot and observe the application running. Alternatively, you can run or debug the application using the SDSoC environment instead of using the micro SD card.
Method 2 Add FreeRTOS headers and source to your Zybo standalone application
SDSoC includes FreeRTOS source in <install>/tps/FreeRTOS/v8.2.3. You can add these to a Zybo standalone application
and build, just as you would if you obtained a FreeRTOS distribution and follow the instructions for using it with Zynq available
from freertos.org. The SDSoC User Guide (UG1027) includes a chapter describing how the FreeRTOS library included with
SDSoC was built, including the memory model used and information about the linker script.
The FreeRTOS API includes many options for configuring the scheduler and additional functionality. The prebuilt FreeRTOS
library included with SDSoC can be used for quickly getting started. You can using the sources and available references to
customize FreeRTOS to suit your application.
The SDSoC performance estimation flow instruments your application to collect runtime data when the software-only
ELF is run on the board, and this is compared with hardware estimates. The application must exit for this flow to create
the required data files containing runtime data.
06-20-2016 06:10 PM
Under Method 1 above, there's one step missing before applying the C/C++ Build Settings (sorry about that).
In the Tool Settings tab for SDS++ LInker, click on Linker Script and Browse to the linker script that you copied in step 6.