Xilinx vivado import project vs create new

raymadigan wrote on Tuesday, April 19, 2016:

I am attempting to build a project on the MicroZed board using Vivado and the SDK. The issue for me is that when Vivado launches the SDK it creates the eclipse project based on the hardware definition of the design I just created.

I have the FreeRTOS source tree in /FreeRTOS and I am attempting to take a project that Vivado has created and add the FreeRTOS components but all of the things I have attempted have failed.

my includes are:

#include <stdio.h>
#include <time.h>

// FreeRTOS includes
#include <FreeRTOS.h>
#include "task.h"
#include "timers.h"
#include "queue.h"
#include "semphr.h"

I have 3 directories on the directories list:
/FreeRTOS/Source/include
/FreeRTOS/Source/portable/GCC/ARM_CA9
project/src

I get many errors undefined reference to functions like vAssertCalled. They is defined in FreeRTOSConfig.h and I suspect because where the files are located, the header search will not find this file in my project src directory.

If I add an include for this header before FreeRTOS.h the only error is an unknown type uint32_t which is included by FreeRTOS before FreeRTOSConfig.h is included.

Before I start mangling stuff to get this to work, Has anone figured this out and have a viable solution?

rtel wrote on Tuesday, April 19, 2016:

I get many errors undefined reference to functions like vAssertCalled

I’m assuming your FreeRTOSConfig.h line is defining configASSERT() to
call a function call vAssertCalled(). If this is the case, then you
must also provide a function call vAssertCalled() - it is not part of
FreeRTOS. See FreeRTOS - The Free RTOS configuration constants and configuration options - FREE Open Source RTOS for small real time embedded systems for more
information.

They is defined in FreeRTOSConfig.h and I suspect because where the
files are located, the header search will not find this file in my
project src directory.

You do not need to include FreeRTOSConfig.h directly, just include
FreeRTOS.h, followed by any API headers files such as tasks.h, queue.h,
etc. FreeRTOS.h will include FreeRTOSConfig.h for you and ensure the
ordering of includes is correct.

As regards to the hardware project - FreeRTOS does not use anything
outside of the ARM Cortex-A core itself, so there is really no
dependency on the hardware project other than that.

If you have your own hardware project then first use the SDK to create a
BSP project from the hardware project in the normal Xilinx way, and as
documented by Xilinx, then create your application project to reference
the BSP project.

Alternatively, you can get the SDK to create the FreeRTOS project for
you. There are instructions on how to do this by providing your own
FreeRTOS BSP (there is one in the FreeRTOS download), but you should not
need to do that as it is included in the SDK distribution already - so
you can skip some of the initial set up steps:

raymadigan wrote on Tuesday, April 19, 2016:

Thank you.

I just deleted everything in main except the includes and the two function calls in main, not realizing that several hooks have to be defined. I was following the directions in your new book, Mastering the Free… I will send a comment about this there to make it more clear that several hooks have to be defined or will have linking issues.

sting854 wrote on Sunday, April 24, 2016:

I am using vivado 2016.1 and when I tried to follow the instructions to create a FreeRTOS BSP I was able to select the correct hardware definition, it didn’t really matter because I wasn’t going to really run it. I couldn’t find a FreeRTOS Hello World application.

For some reason I was unable to get a FreeRTOS project running from scratch and thought I would look at one that was automatically generated.

The only demo I was able to get running is the 160112_FreeRTOS_Labs/…/FreeRTOS_PLUS_TCP_and_FAT_Zynq_SDK. I am assuming this project was based from the CORTEX_A9_Zynq_ZC702 project.

rtel wrote on Sunday, April 24, 2016:

I used 2016.1 with the main FreeRTOS example
(http://www.freertos.org/RTOS-Xilinx-Zynq.html) from FreeRTOS V9.0.0rc2
just this week while working on this feature request:
https://sourceforge.net/p/freertos/feature-requests/104/ and didn’t have
any problems.

I have also just tried creating a clean workspace in 2016.1 and used the
“file->new->application project” menu item to create a new project,
select the ZC702 as the hardware and freertos as the OS, and the tool
auto-generated a FreeRTOS hello world application for me, which built
without error.

I have NOT yet tried using the method described on this page
http://www.freertos.org/RTOS-Xilinx-SDK-BSP.html with 2016.1 - it might
be those files need updating to work with 2016.1.

sting854 wrote on Sunday, April 24, 2016:

Don’t put any effort into this on my behalf. I just looked at the board support for the microzed and 2016.1 is not supported for the uZed BSP. I will have to go back to 2015.4 as soon as I find a copy of Windows < 10 that has a license available. I do appreciate your help, thank you.