URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [rtos/] [ucos-ii/] [2.91/] [README] - Rev 630
Go to most recent revision | Compare with Previous | Blame | View Log
OpenRISC 1000 uc/OS-II port
===========================
Port of Micrium's uC/OS-II "real-time" kernel, version 2.91.
Current status of the port is that it can run several tasks and make use of
timer and UART output.
Project is configured so that adding own set of tasks to run is simple.
Setting up the project
======================
First, to set up the project to build, the uC/OS-II kernel source must be
downloaded from the Micrium site (registration required):
http://micrium.com/page/downloads/os-ii_evaluation_download
Once downloaded, extract the contents and copy all C source from the
Micrium/Software/uCOS-II/Source/ path to the ucos/ path in this project. Eg:
cp ~/Downloads/Micrium/Software/uCOS-II/Source/*.c ~/path/to/this/ucos
Tasks
=====
uC/OS-II is a task-oriented kernel, and this project has been set up to allow
easy creation of a simple set of tasks to run on the kernel port.
Each file in tasks/ contains a set of tasks to be run on the kernel. Each time
the entire project code is compiled into a new executable to run on the
simulator or the board, one of these files is chosen (via the TASKS environment
variable at compile time) as the set of tasks to run.
Building and running an example
===============================
1. Build the port (with example set of tasks) with:
make distclean all TASKS=1
2. Run the example application with:
or32-elf-sim -f sim.cfg ucos-tasks1.or32
The simulator should then open a new terminal window. Press enter and a simple
application showing multi-tasking and console output. Press 'q' and then enter
and wait for the simulation to exit gracefully.
Adding own tasks
================
1. Add new file to tasks/ directory, named tasksX.c, where X is an alphanumeric
string or just a number.
Note: When compiling X will be passed via the TASKS environment variable to
indicate that this tasks file, tasksX.c, is the source to be compiled and
included in the application. At least one example, tasks1.c is included
in this project, and is compiled with "make all TASKS=1".
2. Make sure the file contains at least the function TaskStartCreateTasks(void)
which will be called from the main task launcher, TaskStart() in
common/main.c and is the main entry point for all custom tasks.
See the file tasks/tasks1.c for an example of the contents of this function.
3. Once the tasksX.c is finished, compile with the following in the main
folder:
make all TASKS=X
4. Run the resulting executable in or1ksim:
or32-elf-sim -f sim.cfg ucos-tasksX.or32
Authors:
Tim Oliver, timtimoliver@yahoo.co.uk
http://www3.ntu.edu.sg/home5/p014082819/index.html
Julius Baxter, julius@opencores.org
Go to most recent revision | Compare with Previous | Blame | View Log