UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Adam Taylor’s MicroZed Chronicles MicroZed Part 42: MicroZed Operating Systems Part 4

by Xilinx Employee ‎07-21-2014 10:22 AM - edited ‎07-21-2014 10:23 AM (13,194 Views)

By Adam Taylor

 

 

The last few blog posts in the MicroZed Chronicles have looked at RTOS concepts. Having introduced these fundamentals, it’s time to implement our first OS on the Zynq-based MicroZed. That’s going to be Micrium’s uC/OS-III RTOS. (Note: Micrium’s uC/OS-II RTOS is in the Mars Curiosity Rover running one its analytical labs.) This blog will show you how to get the demo up and running.

 

 

Obviously, the first thing step is to download uC/OS-III from Micrium’s Web site. It is available here. Once you have downloaded this installation, you just need to extract a few zip files into the correct directories under your Xilinx installation on your computer.

 

 

Extract the zip file marked Zynq-7000-ucosiii-bsp.zip into your directory <Xilinx>\14.X\ISE_DS\EDK\sw\lib\bsp\. You will notice a number of other operating systems under this directory, for example the standalone and xilkernel.

 

 

Next, extract the zip file marked Zynq-7000-ucosiii-demo.zip into the directory <Xilinx>\14.X\ISE_DS\EDK\sw\lib\sw_apps\. Again you will see a number of other application demos within this directory.

 

 

 Image 1.png

 

 

Having installed the two sets of files, we are now ready to begin creating our new project within SDK. To do this, I will be using the same base hardware that we’ve been working with in previous posts. However, we need a new application and a BSP (board support package) for the operating system.

 

Within SDK, close all open projects except your base hardware design and select the option file -> new -> application project. Give the new project a name and select the operating system. In this case that’s uC/Os-III.

 

 

 

 Image 2.png

 

 

 

Click on next and select the uC/OS-III demo application. This will import all the files needed to use this operating system.

 

 

Image 3.png 

 

 

 

Click on Finish and the application and BSP will be created within SDK. If you have the auto build option selected, you may see reports of a few errors. These errors tell you that not all of the references are correct yet. To set things right, we need to import demo settings. These can be found under Project -> Src -> Settings.

 

Right click on this XML file and view the file properties. Copy the location of this file as shown below.

 

 

 Image 4.png

 

 

 

Once you have copied this location, right click on the project and select properties. Under C/C++ General, select the paths and symbol options. Then select import settings and paste in the location of the settings file that you copied earlier.

 

 

It is also important to ensure that the repositories are correctly pointing to the new libraries you added earlier. You can check these by setting Xilinx Tools -> Repositories, which should show the location where you installed the uC/Os-III BSP previously. 

 

 

We need the UART to output the status of the demo, to show us when the initialization is complete, and to show us the running tasks, so you may need to set the stdin and stdout to the UART under the BSP settings.

 

 

Once you’ve performed these actions, you should be able to build the project. However, there will still be a few warnings and if you tried to run this project as it is right now on your Microzed, it would not perform as the demo states it should. This is because of a warning over undeclared functions. Including

 

 

#include "xil_cache.h

 

 

within bsp.c should correct this issue.

 

 

Once I added this include header file, the project built and ran as expected on the MicroZed board producing the following video.

 

 

 

 

 

 

 

Please see the previous entries in this MicroZed series by Adam Taylor:

 

Adam Taylor’s MicroZed Chronicles MicroZed Part 41: MicroZed Operating Systems Part 3

 

Adam Taylor’s MicroZed Chronicles MicroZed Part 40: MicroZed Operating Systems Part Two

 

Adam Taylor’s MicroZed Chronicles MicroZed Part 39: MicroZed Operating Systems Part One

 

Adam Taylor’s MicroZed Chronicles MicroZed Part 38 – Answering a question on Interrupts

 

Adam Taylor’s MicroZed Chronicles Part 37: Driving Adafruit RGB NeoPixel LED arrays with MicroZed Part 8

 

Adam Taylor’s MicroZed Chronicles Part 36: Driving Adafruit RGB NeoPixel LED arrays with MicroZed Part 7

 

Adam Taylor’s MicroZed Chronicles Part 35: Driving Adafruit RGB NeoPixel LED arrays with MicroZed Part 6

 

Adam Taylor’s MicroZed Chronicles Part 34: Driving Adafruit RGB NeoPixel LED arrays with MicroZed Part 5

 

Adam Taylor’s MicroZed Chronicles Part 33: Driving Adafruit RGB NeoPixel LED arrays with the Zynq SoC

 

Adam Taylor’s MicroZed Chronicles Part 32: Driving Adafruit RGB NeoPixel LED arrays

 

Adam Taylor’s MicroZed Chronicles Part 31: Systems of Modules, Driving RGB NeoPixel LED arrays

 

 Adam Taylor’s MicroZed Chronicles Part 30: The MicroZed I/O Carrier Card

 

Zynq DMA Part Two – Adam Taylor’s MicroZed Chronicles Part 29

 

The Zynq PS/PL, Part Eight: Zynq DMA – Adam Taylor’s MicroZed Chronicles Part 28  

 

The Zynq PS/PL, Part Seven: Adam Taylor’s MicroZed Chronicles Part 27

 

The Zynq PS/PL, Part Six: Adam Taylor’s MicroZed Chronicles Part 26

 

The Zynq PS/PL, Part Five: Adam Taylor’s MicroZed Chronicles Part 25

 

The Zynq PS/PL, Part Four: Adam Taylor’s MicroZed Chronicles Part 24

 

The Zynq PS/PL, Part Three: Adam Taylor’s MicroZed Chronicles Part 23

 

The Zynq PS/PL, Part Two: Adam Taylor’s MicroZed Chronicles Part 22

 

The Zynq PS/PL, Part One: Adam Taylor’s MicroZed Chronicles Part 21

 

Introduction to the Zynq Triple Timer Counter Part Four: Adam Taylor’s MicroZed Chronicles Part 20

 

Introduction to the Zynq Triple Timer Counter Part Three: Adam Taylor’s MicroZed Chronicles Part 19

 

Introduction to the Zynq Triple Timer Counter Part Two: Adam Taylor’s MicroZed Chronicles Part 18

 

Introduction to the Zynq Triple Timer Counter Part One: Adam Taylor’s MicroZed Chronicles Part 17

 

The Zynq SoC’s Private Watchdog: Adam Taylor’s MicroZed Chronicles Part 16

 

Implementing the Zynq SoC’s Private Timer: Adam Taylor’s MicroZed Chronicles Part 15

 

MicroZed Timers, Clocks and Watchdogs: Adam Taylor’s MicroZed Chronicles Part 14

 

More About MicroZed Interrupts: Adam Taylor’s MicroZed Chronicles Part 13

 

MicroZed Interrupts: Adam Taylor’s MicroZed Chronicles Part 12

 

Using the MicroZed Button for Input: Adam Taylor’s MicroZed Chronicles Part 11

 

Driving the Zynq SoC's GPIO: Adam Taylor’s MicroZed Chronicles Part 10

 

Meet the Zynq MIO: Adam Taylor’s MicroZed Chronicles Part 9

 

MicroZed XADC Software: Adam Taylor’s MicroZed Chronicles Part 8

 

Getting the XADC Running on the MicroZed: Adam Taylor’s MicroZed Chronicles Part 7

 

A Boot Loader for MicroZed. Adam Taylor’s MicroZed Chronicles, Part 6 

 

Figuring out the MicroZed Boot Loader – Adam Taylor’s MicroZed Chronicles, Part 5

 

Running your programs on the MicroZed – Adam Taylor’s MicroZed Chronicles, Part 4

 

Zynq and MicroZed say “Hello World”-- Adam Taylor’s MicroZed Chronicles, Part 3

 

Adam Taylor’s MicroZed Chronicles: Setting the SW Scene

 

Bringing up the Avnet MicroZed with Vivado

 

 

 

Labels
About the Author
  • Be sure to join the Xilinx LinkedIn group to get an update for every new Xcell Daily post! ******************** Steve Leibson is the Director of Strategic Marketing and Business Planning at Xilinx. He started as a system design engineer at HP in the early days of desktop computing, then switched to EDA at Cadnetix, and subsequently became a technical editor for EDN Magazine. He's served as Editor in Chief of EDN Magazine, Embedded Developers Journal, and Microprocessor Report. He has extensive experience in computing, microprocessors, microcontrollers, embedded systems design, design IP, EDA, and programmable logic.