Sunday, January 3, 2010

Running uCOS-II with Microsoft Windows Vista in 1 Hour

uCOS-II the Real-Time Kernel

uCOS-II is a small, yet powerful real-time operating system developed by Jean J. Labrosse and described in his book "MicroC/OS-II - The Real-Time-Kernel", Second Edition, published by CMP Books. The operating system is highly CPU independent and has been ported to numerous microprocessor platforms. The source code as provided together with the book and via the web site may be freely used for non-commercial applications and educational purposes. Licenses for commercial use are available too.

uCOS-II x86 Win32 Simulation

Win32 port allows uCOS-II to run under Microsoft Windows 9x, ME, NT, 2000, and XP. The port relies on Windows' process and thread management features; the uCOS-II Win32 port does not turn Windows into a real-time operating system! It was developed for didactic purposes to teach the basics of real-time operating systems with an insight to OS internal implementation. This approach was chosen, because it is much easier access PCs rather than to proprietary embedded systems. Powerful PC-based development tools like Microsoft Visual Studio or Cygwin's GCC are available free of charge under appropriate university licenses or GPL as compared to costly embedded system cross-compilers and debuggers. Thus real-time system mechanisms can be studied with uCOS-II under Win32 providing a soft real-time-environment on PCs. If the basic functionality of the application is working correctly, the application can be easily ported to an embedded system later in the lab.

Figure 1 shows the relationship between the user application, uCOS-II the underlying Windows system.

Figure 1: Application / uCOS-II / Windows Vista Relationship

As a result of this hierarchy, µC/OS-II tasks are really Windows threads and their stacks are converted to Windows thread stacks. The system ticker is driven by the high resolution multi-media timer if WIN_MM_TICK is defined in os_cpu_c.c. Otherwise it is driven by sleep(), the system coarse timer. A more realistic real-time effect can be achieved by using the multi-media timer since it has finer granularity (1ms) than the system coarse timer.

Critical sections are implemented using the Win32 API.

Fortunately, the underlying architecture is transparent to the application programmer and all µC/OS-II application code can utilize various features using tradiational documented µC/OS-II function calls.

Since µC/OS-II is an infinite loop by nature, it should be noted that the processor utilization under windows will remain close to 100% while µC/OS-II is running. This is normal operating behavior for infinite loop consol based programs under Windows.

uCOS-II Win32 Simulation with Windows Vista

Most of the previous tests of the Win32 ports were never done, until writing this document, with Windows Vista. In this document, I will show how you can run a Win32 port used with Windows XP under Windows Vista.

To build this tutorial on your own, you need to download:

1. uCOS-II source code V2.86 from here

2. uCOS-II Win32 port from here

3. Open Watcom C-C++ 1.8 from here

Steps to Build the Tutorial

1. Install the Open Watcom C-C++ under the C drive

2. Extract uCOS-II source code and Win32 port

3. Build the following directory structure:

C:\Micrium\Software\uCOS-II\Source\os_cfg_r.h

C:\Micrium\Software\uCOS-II\Source\os_core.c

C:\Micrium\Software\uCOS-II\Source\os_dbg_r.c

C:\Micrium\Software\uCOS-II\Source\os_flag.c

C:\Micrium\Software\uCOS-II\Source\os_mbox.c

C:\Micrium\Software\uCOS-II\Source\os_mem.c

C:\Micrium\Software\uCOS-II\Source\os_mutex.c

C:\Micrium\Software\uCOS-II\Source\os_q.c

C:\Micrium\Software\uCOS-II\Source\os_sem.c

C:\Micrium\Software\uCOS-II\Source\os_task.c

C:\Micrium\Software\uCOS-II\Source\os_time.c

C:\Micrium\Software\uCOS-II\Source\os_tmr.c

C:\Micrium\Software\uCOS-II\Source\ucos-ii.c

C:\Micrium\Software\uCOS-II\Source\ucos-ii.h

C:\Micrium\Software\uCOS-II\Ports\Win32\os_cpu.h

C:\Micrium\Software\uCOS-II\Ports\Win32\os_cpu_c.c

C:\Micrium\Software\uCOS-II\Ports\Win32\os_trace.c

C:\Micrium\Software\uCOS-II\Ports\Win32\os_trace.h


C:\Micrium\Software\EvalBoards\Microsoft\WindowsVista\OpenWatcomC-C++1.8\Ex1-OS\app.c

C:\Micrium\Software\EvalBoards\Microsoft\WindowsVista\OpenWatcomC-C++1.8\Ex1-OS\app_cfg.h

C:\Micrium\Software\EvalBoards\Microsoft\WindowsVista\OpenWatcomC-C++1.8\Ex1-OS\includes.h

C:\Micrium\Software\EvalBoards\Microsoft\WindowsVista\OpenWatcomC-C++1.8\Ex1-OS \os_cfg.h

The first 3 file are copied from the application files found in the directories of Visual Studio 6 under Windows XP while the last file is copied from os_cfg_r.h and just renamed.

4. Make the following changes in the source:

a. In os_cfg.h, change OS_TMR_EN to 0

b. In app.c, change OS_IDLE_PRIO and OS_STAT_PRIO to OS_TASK_IDLE_PRIO and OS_TASK_STAT_PRIO respectively

5. Under the EX1-OS, create a new project using the Open Watcom IDE. The target should be a Win32 character mode executable.

6. After the project creation of the project, add the following sources as shown in Figure 2.

Figure 2: Open Watcom C-C++ 1.8 Project Structure

7. Under Options>C Compiler Switches>File Options Switches>Include directories>, modify the text box be "$(%watcom)/h;$(%watcom)/h/nt;.;../../../../../uCOS-II/Source;../../../../../uCOS-II/Ports/WIN32".

8. Under Options>Windows Linking Switches>Import, Export and Library Switches>Libraries>, modify the text box to be "winmm".

9. Click Make All, the tutorial should compile error free.

10. Click Run, you should get the output shown in Figure 3.

Figure 3: uCOS-II for Windows Vista


78 comments:

  1. salam Ali
    this one work under XP?

    ReplyDelete
  2. W3S lukman
    I did not try it on XP but I think it worth trying. Please, try it and feedback me to add your contribution on the blog.
    --
    Amr Ali

    ReplyDelete
  3. ok. I will try 1st and feedback to here. thanks ya

    ReplyDelete
  4. Send me your email and I will post you project files that include examples similar to those explained in uCOS-II book already done to save your time. You will only need to install the OpenWatcom C-C++ 1.8. The link is above in the post body.
    --
    Amr Ali

    ReplyDelete
  5. Hi Guys,
    U guys r good.
    Thank u very much for the great stuff.
    Now I can able to run the RTOS in my PC without any additional hardwre.

    ReplyDelete
  6. Hi Jayraj,
    You are most welcome.
    They are great because of people like you who encourage us.
    --
    Amr Ali

    ReplyDelete
  7. sir,

    i am using XP and i want to implement ucos-2 based rtos code in 89s52 micro .Can i do if can please help me

    ReplyDelete
  8. Hi ajeesh,
    Please check http://embedded-tips.blogspot.com/2010/01/free-ucos-ii-course-m11.html. It is about porting of uCOS-II in general. Check if 89s52 meets uCOS-II requirements or not. If so, I can guide you afterwards.
    --
    Amr Ali

    ReplyDelete
  9. hI im getting some error messages... while installing ucos.. ../source\ucos-ii.h(1490):Error! E1091: "OS_CFG.H,Missing OS_MBOX_PEND_ABORT_EN: include OSMboxPendAbort()"
    Raghu

    ReplyDelete
  10. Please email me @ amraldo@hotmail.com to send you a ucos-ii working code under vista
    --
    Amr Ali

    ReplyDelete
    Replies
    1. Hi Amr Ali, could u sent me your ucos-ii working code to my email (srf.hidayat@gmail.com)

      Thanks Before,

      Delete
  11. I like to have the activity and other uml diagrams for a mini project on µC/OS-II .
    Will any one help me.
    varnant@gmail.com

    ReplyDelete
  12. What is your project?
    UML diagrams and activity diagrams are for your application which we do not know.
    --
    Amr Ali

    ReplyDelete
  13. Hi I been trying to get UCos II running on my vista machine but no luck. This is the error log I get.

    cd C:\Micrium\Software\EvalBoards\Microsoft\WindowsVista\OpenWatcomC-C++1.8\Ex1-OS
    wmake -f "C:\Micrium\Software\EvalBoards\Microsoft\WindowsVista\OpenWatcomC-C++1.8\Ex1-OS\test1.mk" -h -e
    wlink name UCos2 d all SYS nt op m libr "winmm" op maxe=25 op q op symf @UCos2.lk1
    Warning! W1008: cannot open "winmm".lib : No such file or directory
    Error! E2028: __imp__timeGetDevCaps@8 is an undefined reference
    Error! E2028: __imp__timeBeginPeriod@4 is an undefined reference
    Error! E2028: __imp__timeSetEvent@20 is an undefined reference
    Error! E2028: __imp__timeKillEvent@4 is an undefined reference
    Error! E2028: __imp__timeEndPeriod@4 is an undefined reference
    file os_cpu_c.obj(C:\Micrium\Software\uCOS-II\Ports\Win32\os_cpu_c.c): undefined symbol __imp__timeGetDevCaps@8
    file os_cpu_c.obj(C:\Micrium\Software\uCOS-II\Ports\Win32\os_cpu_c.c): undefined symbol __imp__timeBeginPeriod@4
    file os_cpu_c.obj(C:\Micrium\Software\uCOS-II\Ports\Win32\os_cpu_c.c): undefined symbol __imp__timeSetEvent@20
    file os_cpu_c.obj(C:\Micrium\Software\uCOS-II\Ports\Win32\os_cpu_c.c): undefined symbol __imp__timeKillEvent@4
    file os_cpu_c.obj(C:\Micrium\Software\uCOS-II\Ports\Win32\os_cpu_c.c): undefined symbol __imp__timeEndPeriod@4
    Error(E42): Last command making (C:\Micrium\Software\EvalBoards\Microsoft\WindowsVista\OpenWatcomC-C++1.8\Ex1-OS\UCos2.exe) returned a bad status
    Error(E02): Make execution terminated

    Looks like there are some reference which are not linked.
    I suspect it must be from the Winmm.lib file

    Anybody has any clues to solve it?
    Thanks

    ReplyDelete
  14. Sorry Guys the previous posting was a little premature.

    Figure it out. My Watson IDE doesnt not take in just "winmm". needs winmm.lib for some reason.

    ReplyDelete
  15. Really?!!!
    Anyway, is it working now?

    ReplyDelete
  16. Yes it works fine. Thank you

    ReplyDelete
  17. You are most welcome, you can use the chatroll as well to talk to me Adi.

    ReplyDelete
  18. Please note my email id & send project examples (base don Ucos II )
    email ID - amitcharis@gmail.com

    ReplyDelete
  19. Please, follow instructions here to setup the environment of the development. Then email me @ amraldo@hotmail.com to send you windows simulation projects.

    ReplyDelete
  20. Hi Ali
    i just can't find the 3 files:app.c & app_cfg.h &includes.h under my Win7 OS.Can u send them to me?
    my email address:chouclee@gmail.com
    Thank you!

    ReplyDelete
  21. Hi,
    They are in the windows simulation port zip file.

    ReplyDelete
  22. Hi,Ali:
    I followed the instructions in your blog but no luck.I get the error log:

    cd C:\Micrium\UCOS-II\OpenWatcomC-C++_test\EX_OS1
    wmake -f "C:\Micrium\UCOS-II\OpenWatcomC-C++_test\EX_OS1\EX_OS1.mk" -h -e
    wcc386 ..\Port\os_cpu_c.c -i="C:\WATCOM/h;C:\WATCOM/h/nt;.;C:\Micrium\UCOS-II\OpenWatcomC-C++_test\Source;C:\Micrium\UCOS-II\OpenWatcomC-C++_test\Port" -w4 -e25 -zq -od -d2 -6r -bt=nt -fo=.obj -mf
    wcc386 ..\Port\os_trace.c -i="C:\WATCOM/h;C:\WATCOM/h/nt;.;C:\Micrium\UCOS-II\OpenWatcomC-C++_test\Source;C:\Micrium\UCOS-II\OpenWatcomC-C++_test\Port" -w4 -e25 -zq -od -d2 -6r -bt=nt -fo=.obj -mf
    wcc386 ..\Source\os_dbg_r.c -i="C:\WATCOM/h;C:\WATCOM/h/nt;.;C:\Micrium\UCOS-II\OpenWatcomC-C++_test\Source;C:\Micrium\UCOS-II\OpenWatcomC-C++_test\Port" -w4 -e25 -zq -od -d2 -6r -bt=nt -fo=.obj -mf
    wcc386 ..\Source\ucos_ii.c -i="C:\WATCOM/h;C:\WATCOM/h/nt;.;C:\Micrium\UCOS-II\OpenWatcomC-C++_test\Source;C:\Micrium\UCOS-II\OpenWatcomC-C++_test\Port" -w4 -e25 -zq -od -d2 -6r -bt=nt -fo=.obj -mf
    wcc386 app.c -i="C:\WATCOM/h;C:\WATCOM/h/nt;.;C:\Micrium\UCOS-II\OpenWatcomC-C++_test\Source;C:\Micrium\UCOS-II\OpenWatcomC-C++_test\Port" -w4 -e25 -zq -od -d2 -6r -bt=nt -fo=.obj -mf
    app.c(59): Warning! W202: Symbol 'err' has been defined, but not referenced
    wlink name EX_OS1 d all sys nt op m libr winmm op maxe=25 op q op symf @EX_OS1.lk1
    Error! E2028: OSTaskReturnHook_ is an undefined reference
    file ucos_ii.obj(C:\Micrium\UCOS-II\OpenWatcomC-C++_test\Source\ucos_ii.c): undefined symbol OSTaskReturnHook_
    Error(E42): Last command making (C:\Micrium\UCOS-II\OpenWatcomC-C++_test\EX_OS1\EX_OS1.exe) returned a bad status
    Error(E02): Make execution terminated
    Execution complete

    i have no idea which step i was wrong - -!maybe you can help me.

    PS:My OS is Win7.

    ReplyDelete
  23. This is because you are using version 2.91 not 2.86, just check its prototype and define it in the os_cpu.c. No implementation is needed for it. It can be a function with empty body. To avoid warnings, just assign the argument to itself.

    ReplyDelete
  24. Here is some info reg the links in your post.

    Correct download link for Open Watcom C-C++ 1.8 is:
    http://ftp.heanet.ie/mirrors/openwatcom/archive/open-watcom-c-win32-1.8.exe

    Can you help where to find uCOS-II Win32 port? Couldn't find it at http://micrium.com/page/downloads/ports

    ReplyDelete
  25. Hi,
    Thanks for the Open Watcom C-C++ 1.8 correction. They must have changed the link lately.

    Regarding the Win32 Port, it is link is in the post and is working fine.

    ReplyDelete
  26. I have a question, how do you port uC/os-ii to a naked(without DOS or anything at all) x86 pc?

    ReplyDelete
  27. Like porting uCOS-II to any Processor. There is a post at http://embedded-tips.blogspot.com/2010/01/free-ucos-ii-course-m11.html to show you the complete porting steps to any processor.
    --
    Amr

    ReplyDelete
  28. Thanks a lot for the response, However I have a more specific question. How do I load ucos-ii from a hard disk drive of a general purpose PC. Thanks again in adavance.

    ReplyDelete
  29. Well you should make 80x86 port then you can follow the SAN OS. It would be a good thing to look at its source. Homepage is http://www.jbox.dk/sanos/.

    ReplyDelete
  30. cd C:\Micrium\Software\EvalBoards\Microsoft\Windows7\OpenWatcomC-C++1.8\Ex1-OS
    wmake -f "C:\Micrium\Software\EvalBoards\Microsoft\Windows7\OpenWatcomC-C++1.8\Ex1-OS\noname.mk" -h -e
    wlink name noname d all SYS nt op m libr winmm op maxe=25 op q op symf @noname.lk1
    Error! E2028: __CHK is an undefined reference
    Error! E2028: vprintf_ is an undefined reference
    Error! E2028: malloc_ is an undefined reference
    Error! E2028: OSTaskReturnHook_ is an undefined reference
    Warning! W1023: no starting address found, using 00401000
    file os_cpu_c.obj(C:\Micrium\Software\uCOS-II\Ports\Win32\os_cpu_c.c): undefined symbol __CHK
    file os_cpu_c.obj(C:\Micrium\Software\uCOS-II\Ports\Win32\os_cpu_c.c): undefined symbol vprintf_
    file os_trace.obj(C:\Micrium\Software\uCOS-II\Ports\Win32\os_trace.c): undefined symbol __CHK
    file os_trace.obj(C:\Micrium\Software\uCOS-II\Ports\Win32\os_trace.c): undefined symbol malloc_
    file os_dbg_r.obj(C:\Micrium\Software\uCOS-II\Source\os_dbg_r.c): undefined symbol __CHK
    file ucos_ii.obj(C:\Micrium\Software\uCOS-II\Source\ucos_ii.c): undefined symbol __CHK
    file ucos_ii.obj(C:\Micrium\Software\uCOS-II\Source\ucos_ii.c): undefined symbol OSTaskReturnHook_
    Error(E42): Last command making (C:\Micrium\Software\EvalBoards\Microsoft\Windows7\OpenWatcomC-C++1.8\Ex1-OS\noname.exe) returned a bad status
    Error(E02): Make execution terminated
    Execution complete

    i hope someone can tell why i am getting this error...

    i am trying this in windows 7 though

    ReplyDelete
  31. Hi,

    I tried as in this blog. But me getting the following error


    cd D:\ecoscompile\watcom\Micrium\Software\EvalBoards\Microsoft\Windows XP\OpenWatcomC-C++1.8\Ex1-OS
    wmake -f "D:\ecoscompile\watcom\Micrium\Software\EvalBoards\Microsoft\Windows XP\OpenWatcomC-C++1.8\Ex1-OS\ucosproj.mk" -h -e
    Error(E51): CD'ing to (D:\ecoscompile\watcom\Micrium\Software\EvalBoards\Microsoft\Windows): No such file or directory
    Error(E42): Last command making (D:\ecoscompile\watcom\Micrium\Software\EvalBoards\Microsoft\Windows XP\OpenWatcomC-C++1.8\Ex1-OS\os_cpu_c.obj) returned a bad status
    Error(E02): Make execution terminated
    Execution complete

    I am using ucos2.9

    What could be the problem?

    Thanks & Regards

    ReplyDelete
  32. Issue fixed. Issue was path was containing some spaces. When that got removed and added the reference for OSTaskReturnHook in os_cpu_c.c, it started working. Thanks a lot for this blog.

    Have to start trying something myself now

    ReplyDelete
  33. Also possible to compile with Visual Studio? If no, why?

    ReplyDelete
  34. This comment has been removed by the author.

    ReplyDelete
  35. Oh my god thank you for this blog now i can run this on windows 7 it works after a few inserts because im using u-cos II 2.91 i had to add the stub for OSTaskReturnHook, define OS_TASK_TMR_PRIO, and use the directory specified above or modify the include so that it actually includes the specified directories

    ReplyDelete
  36. Hiii.. Mr. Ali..

    thank u so much for ur work so far.

    could u please mail me some of the RTOS source codes and the procedure to run the code in windows 7.

    ReplyDelete
  37. Follow, this tutorial. It has been tested on windows 7 as well.

    ReplyDelete
  38. Hey, great work Amr!
    I want to run uC OS-II on windows XP.. in step 3, you have mentioned that we have to add app.c and header files where to get those in XP?
    can u mail me at sunnn_4@yahoo.com??

    ReplyDelete
  39. found the files but i have a confusion that if i want to run uC OS-II on windows XP, then while installing watcom..what will be the target system and what will be the host system?? both windows??
    Thanks

    ReplyDelete
  40. I added you on my yahoo to talk to you but seems you do not use yahoo messenger.

    You are right, target and host are both windows.

    ReplyDelete
  41. thanks for the reply!
    yeah i don't use any messenger...its just for the mailing purposes.
    one thing more, we have to show our teacher some application running over uC OS..which application should we show and how??
    my friend is presenting android OS and she has got an ipad emulator and so she is running applications on it! what should i do? :S

    ReplyDelete
  42. I'm having the same errors as those encountered by Mr.Ozhivukaalam... he has given a solution to these errors too but i couldn't understand how he added reference for OSTaskReturnHook in os_cpu_c.c?? can u tell me??

    ReplyDelete
  43. and which path he is referring to which has spaces? :S
    Is there any way i could connect with Ozhivukaalam??

    ReplyDelete
  44. In the file you mentioned, he just commented the lines contain OSTaskReturnHook :).

    BY spaces, he is saying that his mistake is that he was using spaces in his pathes. In other words, all folder and file names should not have spaces.

    ReplyDelete
  45. well we have to add OSTaskReturnHook reference to the file os_cpu_c.c as this hook is not defined in the file.
    but i don't know what parameters i have to give to this hook :(

    ReplyDelete
  46. Search for prototype in header files.
    Then use the prototype as follows:
    protoype {
    }

    ReplyDelete
  47. as you said in 4th comment
    "Send me your email and I will post you project files that include examples similar to those explained in uCOS-II book already done to save your time"


    Kindly send me the codes of runnable application for vista which you have checked urself .my email id is uet07_elec@yahoo.com

    ReplyDelete
  48. yeah found the prototype in header file and found parameters there but if i leave the routine empty,i'm still getting the errors :(
    screwed up!!

    ReplyDelete
  49. hey i(uet07_elec) am working on vista and i am getting this error
    "Error! E2028: OSTaskReturnHook_ is an undefined reference"
    i am using version 2.9.
    Same errors were encountered by 'achees23' and he has also provided the solutin bt i am not getting where to add the stub for OSTaskReturnHook and where to define OS_TASK_TMR_PRIO,as he mentioned in his following comment.
    "Oh my god thank you for this blog now i can run this on windows 7 it works after a few inserts because im using u-cos II 2.91 i had to add the stub for OSTaskReturnHook, define OS_TASK_TMR_PRIO, and use the directory specified above or modify the include so that it actually includes the specified directories "

    thanks in advance :)

    ReplyDelete
  50. i added the stub in Ports\WIN32\os_cpu_c.c but you probably could have added it anywhere that also includes ucos_ii.h

    /*
    *********************************************************************************************************
    * OSTaskReturnHook(OS_TCB *ptcb)
    *
    * Description: These functions does nothing just here to compile
    *
    *
    *********************************************************************************************************
    */

    void OSTaskReturnHook(OS_TCB *ptcb)
    {
    ptcb = ptcb;
    }

    the error listed indicates that a prototype for OSTaskReturnHook was declared but no function exist for it. I hope this helps

    ReplyDelete
  51. Sorry for my late reply. I believe you know what is going on in Egypt now. Thanks acheese23 for detailing my answer.

    ReplyDelete
  52. Thanks acheese23
    and hope you are fine Amr

    ReplyDelete
  53. Errie(E 42); Last command making (C:\Micrium\Software\EvalBorards\Microsoft\WindowsXP\OpenWatcomC-C++1.8\Ex1-OS\os_cpu_c.obj)returned a bad status


    my pc has Xp sp-2, i don't have vista.
    Some 1 who run it on Xp help me, please

    ReplyDelete
  54. Use the same instructions with same folder names under windows xp sp2 and it will work

    ReplyDelete
  55. i have followed the same instructions that are given above- downloaded the OS and port files from web site but the os cfg files is not compatible with os as the OS is 2.91 and win 32 port was for 2.7x can any one share the new cfg files of the same.

    ReplyDelete
  56. Hi,
    With every distribution of the source code there is os_cfg_r.h. Take a copy and rename it to os_cfg.h. It should work fine with you.
    Many has used 2.91 with the tutorials here and they are working fine.
    You will only need to modify the port file and add a single empty function.
    Please, read the comments here very well and under Running PC utility post.

    ReplyDelete
  57. Dear Mr. Ali,
    these files:
    C:\Micrium\Software\EvalBoards\Microsoft\WindowsVista\OpenWatcomC-C++1.8\Ex1-OS\app.c

    C:\Micrium\Software\EvalBoards\Microsoft\WindowsVista\OpenWatcomC-C++1.8\Ex1-OS\app_cfg.h

    C:\Micrium\Software\EvalBoards\Microsoft\WindowsVista\OpenWatcomC-C++1.8\Ex1-OS\includes.h

    are just in visual studio 6?

    where could I find visual studio 6?

    ReplyDelete
  58. They are provided in the downloads already

    ReplyDelete
  59. Hello Amr Ali,
    Very Nice tutorial. I am working on AVR Atmega32 microcontroller and want to learn uCOS-II implementation. I am working on Windows XP Environment.Is the Open Watcom C-C++ 1.8 compiler applicable here.
    Please Amr send me all files whatever necessary to learn uCOS-ii. My mail ID is raj_scitm2005@yahoo.co.in

    ReplyDelete
  60. Hi,
    Follow same tutorials, they worked on Windows XP, Vista, and 7.

    All learning materials are on this blog including free training material.

    ReplyDelete
  61. HI i followed instructions but it did not work i get this :

    cd C:\Micrium\Software\EvalBoards\Microsoft\Windows_XP\OpenWatcomC-C++1.8\Ex1-OS
    wmake -f "C:\Micrium\Software\EvalBoards\Microsoft\Windows_XP\OpenWatcomC-C++1.8\Ex1-OS\noname.mk" -h -e
    wcc386 ..\..\..\..\..\uCOS-II\Ports\WIN32\os_cpu_c.c -i="C:\WATCOM/h;C:\WATCOM/h/nt;.;../../../../../uCOS-II/Source;../../../../../uCOS-II/Ports/WIN32" -w4 -e25 -zq -od -d2 -6r -bt=nt -fo=.obj -mf
    ../../../../../uCOS-II/Source\ucos_ii.h(1420): Error! E1091: "OS_CFG.H, Missing OS_FLAG_NAME_EN: Enable flag group names"
    ../../../../../uCOS-II/Source\ucos_ii.h(1446): Error! E1091: "OS_CFG.H, Missing OS_MBOX_PEND_ABORT_EN: Include code for OSMboxPendAbort()"
    ../../../../../uCOS-II/Source\ucos_ii.h(1480): Error! E1091: "OS_CFG.H, Missing OS_MEM_NAME_EN: Enable memory partition names"
    ../../../../../uCOS-II/Source\ucos_ii.h(1540): Error! E1091: "OS_CFG.H, Missing OS_Q_PEND_ABORT_EN: Include code for OSQPendAbort()"
    ../../../../../uCOS-II/Source\ucos_ii.h(1578): Error! E1091: "OS_CFG.H, Missing OS_SEM_PEND_ABORT_EN: Include code for OSSemPendAbort()"
    ../../../../../uCOS-II/Source\ucos_ii.h(1646): Error! E1091: "OS_CFG.H, Missing OS_TASK_NAME_EN: Enable task names"
    ../../../../../uCOS-II/Source\ucos_ii.h(1658): Error! E1091: "OS_CFG.H, Missing OS_TASK_REG_TBL_SIZE: Include code for task specific registers"
    ../../../../../uCOS-II/Source\ucos_ii.h(1694): Error! E1091: "OS_CFG.H, Missing OS_TMR_EN: When (1) enables code generation for Timer Management"
    ../../../../../uCOS-II/Source\ucos_ii.h(1756): Error! E1091: "OS_CFG.H, Missing OS_APP_HOOKS_EN: Application-defined hooks are called from the uC/OS-II hooks"
    ../../../../../uCOS-II/Source\ucos_ii.h(1785): Error! E1091: "OS_CFG.H, Missing OS_EVENT_MULTI_EN: Include code for OSEventPendMulti()"
    Error(E42): Last command making (C:\Micrium\Software\EvalBoards\Microsoft\Windows_XP\OpenWatcomC-C++1.8\Ex1-OS\os_cpu_c.obj) returned a bad status
    Error(E02): Make execution terminated
    Execution complete

    ReplyDelete
  62. Enable the missing flags in os_cfg.h.

    ReplyDelete
  63. I am an RTOS newbie and am adapting this to Windows 7, 64 bit. After a few minor problems the linker says it cannot find such things as vprintf and malloc. I suspect a setup problem. I started a web page here:
    http://www.bkelly.ws/software/rtos_project.html
    and have posted my tutorial here
    http://www.bkelly.ws/software/running_ucos-ii_under_windows_7.pdf
    Thanks for your time.

    ReplyDelete
  64. Please, send me an email to amraldo@hotmail.com. I will send a working example under Windows 7 64-bit. Thanks for your effort.

    ReplyDelete
  65. I am unable to find the pdf file at /software/running_ucos-ii_under_windows_7.pdf

    ReplyDelete
  66. sir i am newbie to ucos2,please tell me how to start with it..also can i run the programs without any external hardware on my pc...my id deepakgupta2186@gmail.com

    ReplyDelete
  67. could u tell me how to rectify this error?

    ../../../../../uCOS-II/Source\ucos_ii.h(1464): Error! E1091: "OS_CFG.H, Missing OS_FLAG_NAME_SIZE: Determines the size of flag group names"
    ../../../../../uCOS-II/Source\ucos_ii.h(1524): Error! E1091: "OS_CFG.H, Missing OS_MEM_NAME_SIZE: Determines the size of memory partition names"
    ../../../../../uCOS-II/Source\ucos_ii.h(1690): Error! E1091: "OS_CFG.H, Missing OS_TASK_NAME_SIZE: Determine the size of task names"

    thanks

    ReplyDelete
  68. most of the time,while compiling i find this error.could u tell me why and how to rectify it

    cd D:\Micrium\Software\EvalBoards\Microsoft\Windows7\OpenWatcomC-C++1.8\Ex1-OS
    wmake -f "D:\Micrium\Software\EvalBoards\Microsoft\Windows7\OpenWatcomC-C++1.8\Ex1-OS\uCos-II.mk" -h -e
    wcc386 ..\..\..\..\..\uCOS-II\Ports\WIN32\os_cpu_c.c -i="D:\WATCOM/h;D:\WATCOM/h/nt;.;../../../../../uCOS-II/Source;../../../../../uCOS-II/Ports/WIN32" -w4 -e25 -zq -od -d2 -6r -bt=nt -fo=.obj -mf
    wcc386 ..\..\..\..\..\uCOS-II\Ports\WIN32\os_trace.c -i="D:\WATCOM/h;D:\WATCOM/h/nt;.;../../../../../uCOS-II/Source;../../../../../uCOS-II/Ports/WIN32" -w4 -e25 -zq -od -d2 -6r -bt=nt -fo=.obj -mf
    wcc386 ..\..\..\..\..\uCOS-II\Source\os_dbg_r.c -i="D:\WATCOM/h;D:\WATCOM/h/nt;.;../../../../../uCOS-II/Source;../../../../../uCOS-II/Ports/WIN32" -w4 -e25 -zq -od -d2 -6r -bt=nt -fo=.obj -mf
    wcc386 ..\..\..\..\..\uCOS-II\Source\ucos_ii.c -i="D:\WATCOM/h;D:\WATCOM/h/nt;.;../../../../../uCOS-II/Source;../../../../../uCOS-II/Ports/WIN32" -w4 -e25 -zq -od -d2 -6r -bt=nt -fo=.obj -mf
    wlink name uCos-II d all SYS nt op m libr winmm.lib op maxe=25 op q op symf @uCos-II.lk1
    Error! E2028: __CHK is an undefined reference
    Error! E2028: vprintf_ is an undefined reference
    Error! E2028: malloc_ is an undefined reference
    Warning! W1023: no starting address found, using 00401000
    file os_cpu_c.obj(D:\Micrium\Software\uCOS-II\Ports\WIN32\os_cpu_c.c): undefined symbol __CHK
    file os_cpu_c.obj(D:\Micrium\Software\uCOS-II\Ports\WIN32\os_cpu_c.c): undefined symbol vprintf_
    file os_trace.obj(D:\Micrium\Software\uCOS-II\Ports\WIN32\os_trace.c): undefined symbol __CHK
    file os_trace.obj(D:\Micrium\Software\uCOS-II\Ports\WIN32\os_trace.c): undefined symbol malloc_
    file os_dbg_r.obj(D:\Micrium\Software\uCOS-II\Source\os_dbg_r.c): undefined symbol __CHK
    file ucos_ii.obj(D:\Micrium\Software\uCOS-II\Source\ucos_ii.c): undefined symbol __CHK
    Error(E42): Last command making (D:\Micrium\Software\EvalBoards\Microsoft\Windows7\OpenWatcomC-C++1.8\Ex1-OS\uCos-II.exe) returned a bad status
    Error(E02): Make execution terminated
    Execution complete

    ReplyDelete
  69. cd C:\Micirum
    wmake -f C:\Micirum\ucos-ii.mk -h -e
    Error(F38): (C:\Micirum\7\Open) does not exist and cannot be made from existing files
    Error(E02): Make execution terminated
    Execution complete

    ReplyDelete
  70. Respected Sir ,

    I am using Windows 7.

    waiting for ur reply ...


    ReplyDelete
  71. I am having problem with undefined references vprintf_, malloc_ and __CHK; the same error has been reported by three others early. How do I resolve this? Thanks.

    ReplyDelete
    Replies
    1. The problem resolved, one of the files app.c was not included in the project, Thanks

      Delete
  72. also is there a way I could build it on OS X-Snow Leopard?
    Did anyone try that?

    ReplyDelete