- Introduction
- Cortex Overview
- CMSIS
Monday, April 18, 2011
Monday, March 21, 2011
My Cooperation with CooCox
CooCox is an embedded lovers’ family, who:
- Focus on providing free and open embedded development tools to ARM Cortex M3/M0 developers
- Dedicated to sharing free and open available examples and solutions with embedded developers
- Devoted to creating a contributing & sharing communication platform, from where developers can get any resources he wants while developing
CooCox Products
Coocox provides the following tools:
- STM32F103RBT6 Evaluation Board x 1 pcs
- Nuvoton M051 Evaluation Board x 1 pcs
- Nuvoton NUC120 Tiny Board x 2pcs
- Nuvoton M051 Tiny Board x 3 pcs
- CoLinkEx LPC1114 Kit x 1 pcs
Friday, March 18, 2011
VHDL 360, FPGA Programming
- Creating Project
- Importing VHDL Files
- Assigning FPGA Pins
- Creating Programming File
- Configuring the Device
- Selecting the Programming File
- Programming the FPGA
Friday, February 25, 2011
VHDL 360, Post Place and Route Simulation
- Compile Simulation Libraries
- Post PAR Simulation
Running uCOS-III under Microsoft Windows
uCOS-III is Micrium's newest RTOS, designed for developers who need to save time on their current and next embedded sytem projects. In addition to the features inherent in μC/OS-II, μC/OS-III also manages an unlimited number of application tasks, and features an interrupt disable time of near zero. For more details, you can check its data sheet.
uCOS-III Win32 Simulation
Win32 port allows uCOS-III to run under Microsoft Windows. The port relies on Windows' process and thread management features; the uCOS-III 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 are available free of charge as compared to costly embedded system cross-compilers and debuggers. Thus real-time system mechanisms can be studied with uCOS-III 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-III the underlying Windows system.
Figure 1: Application / uCOS-III / Windows Vista RelationshipAs a result of this hierarchy, µC/OS-III 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.h. 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-III application code can utilize various features using traditional documented µC/OS-III function calls.
Since µC/OS-III is an infinite loop by nature, it should be noted that the processor utilization under windows will remain close to 100% while µC/OS-III is running. This is normal operating behavior for infinite loop consol based programs under Windows.uCOS-III Win32 Simulation with Windows
To run this test, you have to install Microsoft Visual C++ 2008 Express. You can get it here.
Once you open the project, it will look as shown in Figure 2.
Figure 2: MS Visual C++ 2008 Express Project StructureThe directories used are:
- uC/CPU: generic and Win32 specific uC/CPU headers
- uC/LIB: compiler independent uC/LIB library functions
- BSP: header files for BSP
- uCOS-III: version 3.01.2 of uCOS-III
- App: example application
Friday, February 18, 2011
VHDL 360, Structural Description
- How to Create Your Generic DU?
- Generic Clause
- Exercise 1: N Input OR Gate
- Exercise 2: N Input AND Gate
- Structural Description
- Structural Modeling
- Component Instantiation
- Exercise 3: Use T-FF to Create a 2-Bit Counter
- Testbench
- Stimulus Generation
- Monitors
- Generate Statement
- Exercise 4: Create N-Bit Shift Register
- VHDL Configurations
Wednesday, February 16, 2011
uCOS-III VS uCOS-II (API Changes)
This is the fifth and the last post about the comparison between uCOS-II and uCOS-III. The whole five posts can serve as a guide for migrating from uCOS-II to uCOS-III.
In this post, I will try to summarize the API changes themselves. I wont go in the details of the APIs' arguments but I will try to hint the differences on a higher level. Changes in APIs were aiming at having more consistent code.
Changes in Critical Sections
Macros defined to control a critical section are redefined and moved to CPU.H.
General Changes in APIs
- Accept APIs are removed. They are now built in Pend APIs.
- Naming APIs are removed. Names are defined during Creation APIs.
- Posting APIs are combined into a single API where all options are built in a single Post API.
- The type OS_EVENT is no longer used. Instead new types were added.
- Query APIS are removed because they are rarely used.
- All object handles should be created by the application prior to its creation. Number of objects are no more defined during compilation.
Changed APIs are OSFlagCreate, OSFlagDel, OSFlagPend, OSFlagPendGetFlagsRdy, and OSFlagPost.
Changes in Message Mailboxes APIs
No direct implementation of message mailboxes APIs. You can view a mailbox as a message queue with a single message. Thus, message queues APIs are used to emulate message mailboxes APIs.
Changes in Memory Management APIs
Changed APIs are OSMemCreate, OSMemGet, and OSMemPut.
Changes in Mutual Exclusion Semaphores APIs
Changed APIs are OSMutexCreate, OSMutexDel, OSMutexPend, and OSFlagPost. OSMutexPendAbort is added in uCOS-III.
Changes in Message Queues APIs
Changed APIs are OSQCreate, OSQDel, OSQPend, OSQPost, and OSQPendAbort.
Changes in Semaphores APIs
Changed APIs are OSSemCreate, OSSemDel, OSSemPend, OSSemPost, OSSemPendAbort, and OSSemSet.
Changes in Task Management APIs
Changed APIs are OSTaskChangePrio, OSTaskCreate, OSTaskDel, OSTaskResume, OSTaskRegGet, OSTaskRegSet, OSTaskSuspend, and OSTaskStkChk.
Removed APIs, others than mentioned above in the general changes section, are OSTaskDelReq, and OSTaskCreateExt.
Added APIs are OSTaskQFlush, OSTaskQPend, OSTaskQPendAbort, OSTaskQPost, OSTaskSemPend, OSTaskSemPendAbort, OSTaskSemPost, OSTaskSemSet, and OSTaskTimeQuantaSet.
Changes in Time Management APIs
All APIs are changed.
Changes in Timer Management APIs
All APIs are changed except for OSTmrSignal is removed.
Changes in Miscellaneous APIs
Changed APIs are OSInit, OSSchedLock, OSSchedUnlock, and OSVersion.
Changed and renamed APIs are OSPendMulti, and OSStatTaskCPUUsageInit.
Added APIs are OSSchedRoundRobinCfg, and OSSchedRoundRobinYield.
Changes in Hook and Port APIs
Changed APIs are OSTaskStkInit, OSTaskCreateHook, and OSTaskDelHook.
Changed and/or renamed APIs are OSInitHook, OSIdleTaskHook, and OSStatTaskHook.
Added APIs are OSGetTS, and OSTaskReturnHook.
Deleted APIs are OSInitHookEnd, and OSTCBInitHook.
