Forum Discussion
4 Replies
- Altera_Forum
Honored Contributor
uC-OS/II is same to MicroC/OS-II. Jean J. Labrosse (uC-OS/II creator) replaced "mu" greek letter to "Micro" word because of issues related to book stores.
- Altera_Forum
Honored Contributor
yes ,i know that.
but i want to know What is the defference between the "Hello UCOS-II" and "MicroC/OS-II tutorial" in the project template of the NIOS II IDE. and why the NIOS II IDE 8.1 don't have the "MicroC/OS-II tutorial" in the project template. thank you. - Altera_Forum
Honored Contributor
Any of two projects should be a good start point to develop your own uC/OS-II application. I don't remember about template included in Nios II IDE 8.1, however in case of Nios II IDE 9.0 project "Hello MicroC/OS" creates two threads:
Why you need specific diferences between two projects?# include <stdio.h> # include "includes.h" /* Definition of Task Stacks */ # define TASK_STACKSIZE 2048 OS_STK task1_stk; OS_STK task2_stk; /* Definition of Task Priorities */ # define TASK1_PRIORITY 1 # define TASK2_PRIORITY 2 /* Prints "Hello World" and sleeps for three seconds */ void task1(void* pdata) { while (1) { printf("Hello from task1\n"); OSTimeDlyHMSM(0, 0, 3, 0); } } /* Prints "Hello World" and sleeps for three seconds */ void task2(void* pdata) { while (1) { printf("Hello from task2\n"); OSTimeDlyHMSM(0, 0, 3, 0); } } /* The main function creates two task and starts multi-tasking */ int main(void) { OSTaskCreateExt(task1, NULL, (void *)&task1_stk, TASK1_PRIORITY, TASK1_PRIORITY, task1_stk, TASK_STACKSIZE, NULL, 0); OSTaskCreateExt(task2, NULL, (void *)&task2_stk, TASK2_PRIORITY, TASK2_PRIORITY, task2_stk, TASK_STACKSIZE, NULL, 0); OSStart(); return 0; } - Altera_Forum
Honored Contributor
thank you very much.