Cortex M, KEIL
embOS for Cortex M was developed for and with the KEIL MDK-ARM and uVision IDE and supports all memory models offered by this platform.
It comes with easy to use start projects for the KEIL uVision IDE. Initilization code for different Cortex M starter boards is included.
embOS for Cortex M is fully CMSIS compliant.
Software development with the uVision debugger with JTAG tools like J-Link ARM is possible.
Resources and performance data
| Memory usage | |
|---|---|
| Kernel size (ROM) | approx. 1700 bytes |
| Kernel RAM usage | 51 bytes |
| RAM usage per task control block | 36 bytes |
| RAM usage per resource semaphore | 16 bytes |
| RAM usage per counting semaphore | 8 bytes |
| RAM usage per mailbox | 24 bytes |
| RAM usage per software timer | 20 bytes |
| RAM usage event | 0 bytes |
| Min. stack-size per task (RAM) | 72 bytes |
| Timing | |
| Context switch time | 4.32 usec |
| Interrupt latency time | zero |
| Kernel CPU usage/TICK | less than .2% of total calculation time at 1000 Interrupts/second (1ms TICK) |
| Basic time unit (TICK) | typ. 1 ms, min. 20 µs (50 kHz interrupt frequency) |
| Features | |
| Max. no. of tasks | Unlimited (by available RAM only) |
| Max. no. of mailboxes | unlimited (by available RAM only) |
| Max. no. of semaphores (resource/binary/counting) | unlimited (by available RAM only) |
| Max. no. of software timers | unlimited (by available RAM only) |
| Max. no. of priorities | 255 |
| Stack size idle task (RAM) | 0(no memory needed) |
| Nested interrupts | permitted |
| Task switches from within ISR | possible |
Absolute values given above were measured with embOS release build on an STM32F10X CPU running at 72MHz.
embOSView offers system analysis during runtime

Available Emulators
- J-Link ARM
- ARM
Additional information
KEIL Web site for additional compiler info / support
Board support packages
embOS comes with lots of ready to go start projects and support packages for various Cortex M CPUs and starterboards.
| CPU | Eval board |
|---|---|
| Cypress PSoC5 | CY8CKIT-001 DevelopmentKit |
| Freescale PK40X256VMD100 (Kinetis 40) | Freescale TWR SCH26547 |
| Freescale PK60N512VMD100 (Kinetis 60) | Freescale TWR-K60N512-KIT |
| NXP LPC1113 | NXP LPC1000 |
| NXP LPC1768 | Keil MCB1700 |
| ST STM32F103 | STM32F10X-128K-EVAL (MB525) |
| ST STM32F103 | STM3210E-EVAL (MB672) |
| ST STM32F103 | IAR STM32-SK |
| ST STM32F207 | IAR STM32F207ZG-SK |
| ST STM32F207 | ST STM3220G-EVAL (MB786) |
| ST STM32F217 | ST STM3221G-EVAL (MB786) |
| ST STM32F40G | ST STM32F40G-Eval |
| Toshiba TMPM369 | Toshiba BMSKTOPASM369 |
Release notes V3.86a for Cortex M and KEIL ARM MDK
- Tool chain used for build
- New features
- Improvements
- Program corrections
- Known problems/limitations
- Release history
- Miscellaneous
Tool chain used for build
The following tools have been used:
Compiler: ARM/Thumb C/C++ Compiler, Armcc.Exe V4.1.0.894
Assembler: ARM/Thumb Macro Assembler, Armasm.Exe V4.1.0.894
Librarian: ARM Archiver, ArmAr.Exe V4.1.0.894
Workbench: KEIL uVision4 Version 4.50
New features
Version 3.86
- Update to latest embOS generic sources V3.86.
- Support for Cortex M4F with floating point unit added.
Version 3.84b
- Update to latest embOS generic sources V3.84b
- New start project for IAR STM32F207ZG-SK evalboard added.
- New start project for ST STM3220G-EVAL evalboard added.
- New start project for Toshiba TMPM369 evalboard added.
Version 3.82v
- embOS Cortex M Keil now also supports Cortex M4.
- Support for Freescale Kinetis added.
The embOS version 3.82s for Keil compiler and Cortex-M now comes with start projects for the Freescale Kinetis K40 and K60 CPUs.
The sample projects run on the Kinetis TWR starter kit boards and can be downloaded into the CPUs Flash using J-Link. - Update to latest embOS generic sources V3.82s
Version 3.82q
- embOS Cortex M Keil now also supports Cortex M0.
- Update to latest embOS generic sources V3.82q
Version 3.82h1
- New start project for CYPRESS PSoC5 added
The start project for the CYPRESS PSoC5 CM3 CPU runs on a PSoC5 evalkit.
Debugging with MiniProg3 and UART for embOSView are supported.
Version 3.82h
- Update to embOS sources 3.82h
- Fully CMSIS compliant projects
All start projects of embOS for Cortex-M3 are now fully CMSIS compliant.
The projects come with new startup code and vector tables which are fully CMSIS compliant.
When CMSIS shall be used for the application, the chip specific CMSIS startup code and vector tables can be used.
CMSIS libraries of the chip vendor are not required to run embOS, embOS can be used as is. - Generic CMSIS project template
embOS for Cortex M3 now comes with a generic CMSIS compatible start project which runs on any Cortex M3 CPU.
To run the project on a specific chip, the startup code and the vector table may be replaced by the chip vendor specific versions of these files.
No modification on any embOS function or file is required. The vendor specific CMSIS files will guarantee that the embOS timer runs at expected rate of 1ms.
Version 3.82e
- Update to embOS sources 3.82e
Version 3.60d
- Update to embOS sources 3.60d
embOS comes with several new features which are explained in the generic release notes and manual. - OS_POWER module implemented.
The OS_POWER module may be used to control different power saving modes when entering idle state.
Individual flags for different peripherals may be set whenever a peripheral needs power or clock, and may be reset, when power is not needed.
The state of the power flags may be examined during OS_Idle by a call of OS_POWER_GetMask().
This allows to switch off all of those peripherals which are not needed during idle times. - BSP for IAR STM-SK Eval board renamed to STM32F103_STM_SK.
BSP is now for IAR STM-SK only instead of IAR STM-SK and ST MB525. - BSP for ST MB525 Eval board added.
Start project and board support package for STM32F103 CPU and ST MB525 eval board added. - BSP for ST MB672 Eval board added.
Start project and board support package for STM32F103 CPU and ST MB672 eval board added.
Version 3.60c
- New generic embOS sources
- Start project for STM32
Version 3.60a
- embOS trial versions may run an unlimited number of tasks.
The embOS trial versions run unlimited as long as only 3 tasks are created.
Since version 3.60a, a time limit is added to the trial version. During the first 15 minutes, an unlimited number of tasks can be created.
If more than three tasks were created during the time limit time, the system stops and calls OS_Error() when the time limit exceeded.
Version 3.60
- OS_AddTickHook() and OS_RemoveTickHook() implemented.
These new functions allow the application to add and remove user function calls (hook functions) to the OS timer tick handler.
Version 3.52c
- OS_SetTaskName() introduced
OS_SetTaskName() allows modification of task names on the fly.
This may be useful if the functionality of a task changes during runtime and the new state should be shown using embOSView or an other task visualisation tool.
Version 3.52
- OS_CallISR() and OS_CallNestableISR() introduced
These new functions are required for some specific CPUs, but may be used in general to call an interrupt handler function without the need of using OS_EnterInterrupt() / OS_LeaveInterrupt() in the handler function.
Version 3.50b
- New library mode XR allows extremely compact applications
The new XR libraries may be used to build extremely compact applications to save space in RAM and ROM and speed up context switching time.
The XR embOS libraries are compiled with round robin scheduling disabled and task names disabled, which results in smaller data structures, smaller code size and faster context switching time.
Version 3.40c
- OS_Yield() may suspend a task unconditionally
When tasks are running on round robin with timeslice, the function OS_Yield() can be used to end the timeslice of the running task immediately and activate an other task with the same priority which is ready for execution. The function has no effect on tasks that are not running on round robin.
Version 3.40
- Task switch time can be measured by application
embOS now comes with sample applications which allow accurate measurement of task switch time in a running application.
Version 3.32o
- Automatic call of OS_INIT_SYS_LOCKS() removed.
During initialization of embOS, OS_INIT_SYS_LOCK() is not called automatically.
As most of the applications do not need thread safe system libraries, an automatic activation of syslocks causes unwanted overhead.
If supported and required, the user may call OS_INIT_SYS_LOCKS() from his own application after normal initialization of embOS.
Version 3.32m
- OS_TimerEx, Extended timer implemented
Extended timers are software timers which call a user defined callback function when the timer expires.
In comparison to normal embOS timers, a parameter is passed to the timer callback function.
The parameter value is initialized during timer creation.
Version 3.32j
- OS_CSemaRequest implemented
May be used to decrement a counting semaphore conditionally, if a signal is available.
The function never blocks the calling task and delivers a result which indicates whether the semaphore was available.
Version 3.32f
- All features of generic 3.32f kernel supported.
Improvements
Version 3.82v
- Retarget.c file added.
The retarget.c file contains functions which allow terminal I/O in a debug session using the uVision and JTAG debugger like J-Link.
Version 3.60c
- OS_ASSERT_INIT_CALLED()
A new assertion is added which checks whether OS_InitKern() was called before tasks are created.
In debug builds, the OS_Error() function will be called, if tasks are created before calling OS_InitKern(). - OS_GetTaskName() modified.
In previous versions, OS_GetTaskName() had to be called with a valid task ID. Now, the NULL pointer may be passed as argument to address the current task.
The function will always return a valid string.
The previous implementation might have returned a NULL pointer, which could cause problems, if the result was not evaluated be the calling function.
Version 3.60b
- OS_ASSERT_ISR_LEVEL()
A new assertion was defined which will call OS_Error() if the CPU runs in interrupt mode but OS_EnterInterrupt() or OS_EnterNestableInterrupt() was not called.
With version 3.60b the assertion is not implemented, it is just defined and usage is prepared. The implementation will be made in future versions of embOS.
Version 3.60
- OS_GetVersion() implemented as function
OS_GetVersion() may be used by the application to retrieve the embOS library version. The result may be used to verify whether the library version matches the embOS header file RTOS.h.
Version 3.52e
- All embOS variables located in one module.
All embOS variables are located in one module now. In previous versions of embOS, some module specific embOS variables were located in the module they were used for.
Version 3.52
- OS_TickHandler() and OS_TickHandler_Ex() removed.
These two functions are obsolete, because they can be replaced by OS_HandleTick() and OS_HandleTick_EX(), if OS_EnterInterrupt() / OS_LeaveInterrupt is used in the interrupt handler.
Version 3.50c
- OS_GetTime32() optimized for 32bit CPUs
For 32bit CPUs, OS_GetTime32() is now automatically replaced by an efficient macro which delivers value of the embOS internal time variable.
In previous versions of embOS, a function was called, when it was not over-written in the CPU specific part of the OS header file.
Version 3.50b
- Internal optimizations
Some internal optimizations were performed to optimize task switching time and interrupt latencies.
Version 3.50b
- Internal optimizations
Some internal optimizations were performed to optimize task switching time and interrupt latencies.
Version 3.50
- Scheduler optimized
The embOS scheduler was optimized to reduce task switching time and interrupt latencies.
Version 3.40d
- OS_Yield() now writes an entry into the trace buffer
When using the debug library with trace capabilities, OS_Yield() writes an entry into the trace buffer which shows the function call and the calling task.
embOSView version 3.40d is required to show this entry.
Version 3.40b
- Queue management improved.
For some CPUs, the buffer start address for Queues has to be aligned. Now embOS automatically corrects the alignment, if required.
Version 3.40a
- Counting semaphores improved.
The counters of counting semaphores are now integer values.
Error handling is also improved. When a counting semaphore overflows, the embOS error handler OS_Error() is called in debug builds.
Version 3.40
- Task switch time improved.
Scheduling optimized to improve task switch time. - Task switch time improved for task events.
Task event handling modified to improve task switch time for tasks waiting on events. - Interrupt latency improved.
During task switch, the time period when interrupts are disabled is reduced. - embOS timer tick handler improved.
The standard timer tick handler run faster now. The embOS internal time variable is incremented by 1 on every timer tick.
When different increments are required, the new timer tick handler OS_HandleTick_Ex(), OS_TickHandler_Ex() or OS_HandleTickDI_Ex() have to be used by application.
Different inctrements may be configured by a call of OS_CONFIG().
Version 3.32i
- Task switch to OS_Idle() modified.
The call of OS_Idle() from OS_ChangeTask can be overwritten (inhibited) by defining the macro OS_IDLE() which is norammly defined as OS_Idle().
This allows task switching via an exception for specific CPU/compiler versions.
Version 3.32g
- Pointer comparison improved for fixed size memory pools (OS_MEMF module).
Some compiler produced wrong pointer comparison code in far memory model.
For specific CPU/compiler versions, the new OS_POINTER_TO_VALUE() function was inroduced to deliver correct results in pointer comparison.
Version 3.32f
- First version. None.
Program corrections
Version 3.86a
- Queue handling corrected.
Version 3.86.1
- Typo in RTOS.h corrected.
The prototype OS_VFP_SaveRegsTemp() had a typo.
Version 3.86
- OS_GetTime_Cycles() in RTOSInit.c in CMSIS projects corrected.
OS_GetTime_Cycles() did not return the cycles correctly.
Version 3.84c
- Update to latest embOS generic sources V3.84c.
OS_Q_Put() was included twice in embOS generic sources V3.84b.
Version 3.52b
- OS_SendString() corrected.
When sending an empty string, the calling task was suspended forever.
The problem existed in all previous embOS versions and is fixed with version 3.52b. - embOSView corrected.
When the update interval of embOSView was set to 200ms or a longer value, the reaction of user input or mouse events was blocked for the same time.
The problem existed since version 3.32 of embOSView and is fixed with version 3.52b.
Version 3.52a
- OS_Terminate() for XR-build corrected.
OS_Terminate() in XR-builds might have failed and the system stuck in an endless loop.
All other library modes were not affected.
Version 3.50a
- System stack check corrected
The system stack check failed in the case the system stack grows from lower addresses to higher addresses.
In this case, the system stack was not correctly filled with the stack check pattern.
The problem existed for embOS for PIC only and is fixed with version 3.50a.
Version 3.40d
- OS_Suspend() corrected
When using the debug library with trace capabilities, a call of OS_Suspend() wrote a wrong trace code into the trace buffer.
Instead of writing the code for task suspension, the code for task termination was written.
The function itself worked correctly, only the data written into the trace buffer was wrong.
The problem existed in all previous embOS versions and is fixed with version 3.40d.
Version 3.32o
- OS_Unuse() corrected
OS_Unuse() must not be called from a task that does not claim the resource semaphore.
According to the documentation, the debug build of embOS should generate a call to OS_Error() if this fault happens.
All previous versions of embOS did not call OS_Error(). Now, OS_Error() will be called in that situation with error code 156: OS_ERR_RESOURCE_OWNER().
Version 3.32l
- OS_EVENT_Delete() corrected
OS_EVENT_Delete() did not work correctly. OS_LeaveRegion() was called inside the function without calling OS_EnterRegion() bfore.
In debug builds of embOS, the error handler OS_Error() was called with error 151 (OS_ERR_LEAVEREGION_BEFORE_ENTERREGION).
In release builds the system was blocked because the underflow of region count inhibts all further task switches, or system crashes, because incrementing the region count the next time allows task switches instead of blocking them. The problem existed in all previous versions and is fixed with version 3.32l. - Round-robin task switching corrected.
Round robin task switching did not work correctly in previous version. A task which was blocked for some reason could be activated. The system crashed during task switch.
The problem existed since version 3.32j and is fixed with version 3.32l.
Version 3.32k
- Handler function _OS_OnTx() for serial communication to embOSView corrected.
The transmission handler for communication with embOSView might have sent incorrect data to embOSView, because internal control state was updated after sending the data.
The problem occured on a new embOS port for a specific CPU only and is fixed with version 3.32k.
Version 3.32h
- OS_Error() was required in release build when resource semaphores were used.
When using release build libraries and resource semaphores, the embOS error handler OS_Error() was required and the file OS_Error.c had to be compiled and linked in a project.
The problem existed since version 3.28i of embOS and is fixed with version 3.32h.
Version 3.32f
- First version. None.
Known problems/limitations
Version 3.32f
- First version. None.
Release history
| Version | Release date | Short explanation |
| V3.86a | 30. Apr 2012 | Queue handling corrected. |
| V3.86.1 | 19. Apr 2012 | Typo in prototype OS_VFP_SaveRegsTemp() corrected. |
| V3.86 | 17. Apr 2012 | Update to latest embOS generic sources V3.86. Support for Cortex M4F with floating point unit added. OS_GetTime_Cycles() in CMSIS projects corrected. |
| V3.84c | 10. Jan 2012 | Update to latest embOS generic sources V3.84c. |
| V3.84b | 21. Dec 2011 | Update to latest embOS generic sources V3.84b. Start projects for IAR STM32F207ZG-SK, ST STM3220G-EVAL and Toshiba TMPM369 added. |
| V3.82v | 15. Jul 2011 | Cortex M4 supported. BSP for Freescale Kinetis K40 and K60 added. Update to latest embOS generic sources V3.82v. Retarget functions added for debugging support. |
| V3.82q | 21. Jan 2011 | Cortex M0 supported. Update to latest embOS generic sources V3.82q |
| V3.82h1 | 28. Jun 2010 | CYPRESS PSoC5 supported. |
| V3.82h | 31. May 2010 | Update to new embOS sources 3.82h. Fully CMSIS compliant projects. |
| V3.82e | 07. February 2010 | Update to new embOS sources 3.82e. |
| V3.60d | 05. June 2008 | Update to new embOS sources 3.60d. OS_POWER module implemented. BSP for IAR STM-SK split up into IAR STM-SK and ST MB525. BSP for ST MB672 eval board added. |
| V3.60c | 30. May 2008 | New generic embOS sources Start project for STM32 |
| V3.40 | 25. May 2007 | Initial version for Cortex M3 Start projects for LM3S6965 and LM3S6965. New embOS sources 3.40. |
| V3.32f | 18. Dec 2006 | First version with release history |
Miscellaneous
This document was first released with version 3.32f of the software.
Software released earlier is documented internally. This information is available at request.
Cortex M, KEIL
