uCOS-II the Real-Time Kernel
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
Critical sections are implemented using the Win32
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.
salam Ali
ReplyDeletethis one work under XP?
W3S lukman
ReplyDeleteI 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
ok. I will try 1st and feedback to here. thanks ya
ReplyDeleteSend 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.
ReplyDelete--
Amr Ali
Hi Guys,
ReplyDeleteU 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.
Hi Jayraj,
ReplyDeleteYou are most welcome.
They are great because of people like you who encourage us.
--
Amr Ali
sir,
ReplyDeletei am using XP and i want to implement ucos-2 based rtos code in 89s52 micro .Can i do if can please help me
Hi ajeesh,
ReplyDeletePlease 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
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()"
ReplyDeleteRaghu
Please email me @ amraldo@hotmail.com to send you a ucos-ii working code under vista
ReplyDelete--
Amr Ali
Hi Amr Ali, could u sent me your ucos-ii working code to my email (srf.hidayat@gmail.com)
DeleteThanks Before,
I like to have the activity and other uml diagrams for a mini project on µC/OS-II .
ReplyDeleteWill any one help me.
varnant@gmail.com
What is your project?
ReplyDeleteUML diagrams and activity diagrams are for your application which we do not know.
--
Amr Ali
Hi I been trying to get UCos II running on my vista machine but no luck. This is the error log I get.
ReplyDeletecd 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
Sorry Guys the previous posting was a little premature.
ReplyDeleteFigure it out. My Watson IDE doesnt not take in just "winmm". needs winmm.lib for some reason.
Really?!!!
ReplyDeleteAnyway, is it working now?
Yes it works fine. Thank you
ReplyDeleteYou are most welcome, you can use the chatroll as well to talk to me Adi.
ReplyDeletePlease note my email id & send project examples (base don Ucos II )
ReplyDeleteemail ID - amitcharis@gmail.com
Please, follow instructions here to setup the environment of the development. Then email me @ amraldo@hotmail.com to send you windows simulation projects.
ReplyDeleteHi Ali
ReplyDeletei 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!
Hi,
ReplyDeleteThey are in the windows simulation port zip file.
Hi,Ali:
ReplyDeleteI 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.
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.
ReplyDeleteHere is some info reg the links in your post.
ReplyDeleteCorrect 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
Hi,
ReplyDeleteThanks 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.
I have a question, how do you port uC/os-ii to a naked(without DOS or anything at all) x86 pc?
ReplyDeleteLike 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.
ReplyDelete--
Amr
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.
ReplyDeleteWell 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/.
ReplyDeletecd C:\Micrium\Software\EvalBoards\Microsoft\Windows7\OpenWatcomC-C++1.8\Ex1-OS
ReplyDeletewmake -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
Hi,
ReplyDeleteI 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
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.
ReplyDeleteHave to start trying something myself now
Also possible to compile with Visual Studio? If no, why?
ReplyDeleteYes
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteOh 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
ReplyDeleteHiii.. Mr. Ali..
ReplyDeletethank 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.
Follow, this tutorial. It has been tested on windows 7 as well.
ReplyDeleteHey, great work Amr!
ReplyDeleteI 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??
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??
ReplyDeleteThanks
I added you on my yahoo to talk to you but seems you do not use yahoo messenger.
ReplyDeleteYou are right, target and host are both windows.
thanks for the reply!
ReplyDeleteyeah 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
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??
ReplyDeleteand which path he is referring to which has spaces? :S
ReplyDeleteIs there any way i could connect with Ozhivukaalam??
In the file you mentioned, he just commented the lines contain OSTaskReturnHook :).
ReplyDeleteBY 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.
well we have to add OSTaskReturnHook reference to the file os_cpu_c.c as this hook is not defined in the file.
ReplyDeletebut i don't know what parameters i have to give to this hook :(
Search for prototype in header files.
ReplyDeleteThen use the prototype as follows:
protoype {
}
as you said in 4th comment
ReplyDelete"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
Done :)
ReplyDeleteyeah found the prototype in header file and found parameters there but if i leave the routine empty,i'm still getting the errors :(
ReplyDeletescrewed up!!
hey i(uet07_elec) am working on vista and i am getting this error
ReplyDelete"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 :)
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
ReplyDelete/*
*********************************************************************************************************
* 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
Sorry for my late reply. I believe you know what is going on in Egypt now. Thanks acheese23 for detailing my answer.
ReplyDeleteThanks acheese23
ReplyDeleteand hope you are fine Amr
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
ReplyDeletemy pc has Xp sp-2, i don't have vista.
Some 1 who run it on Xp help me, please
Use the same instructions with same folder names under windows xp sp2 and it will work
ReplyDeletei 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.
ReplyDeleteHi,
ReplyDeleteWith 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.
Dear Mr. Ali,
ReplyDeletethese 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?
They are provided in the downloads already
ReplyDeleteHello Amr Ali,
ReplyDeleteVery 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
Hi,
ReplyDeleteFollow same tutorials, they worked on Windows XP, Vista, and 7.
All learning materials are on this blog including free training material.
HI i followed instructions but it did not work i get this :
ReplyDeletecd 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
Enable the missing flags in os_cfg.h.
ReplyDeleteI 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:
ReplyDeletehttp://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.
Please, send me an email to amraldo@hotmail.com. I will send a working example under Windows 7 64-bit. Thanks for your effort.
ReplyDeleteI am unable to find the pdf file at /software/running_ucos-ii_under_windows_7.pdf
ReplyDeletesir 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
ReplyDeletecould u tell me how to rectify this error?
ReplyDelete../../../../../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
most of the time,while compiling i find this error.could u tell me why and how to rectify it
ReplyDeletecd 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
cd C:\Micirum
ReplyDeletewmake -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
Respected Sir ,
ReplyDeleteI am using Windows 7.
waiting for ur reply ...
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.
ReplyDeleteThe problem resolved, one of the files app.c was not included in the project, Thanks
DeleteGreat
ReplyDeletedid this work on windows 7?
ReplyDeletealso is there a way I could build it on OS X-Snow Leopard?
ReplyDeleteDid anyone try that?