Skip to content

Commit

Permalink
NOTES.md: reflect the current implementation
Browse files Browse the repository at this point in the history
- update README and modules.json
  • Loading branch information
ilg-ul committed Jun 1, 2016
1 parent f2b9438 commit 38e7205
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 28 deletions.
1 change: 1 addition & 0 deletions .yotta_ignore
Expand Up @@ -8,6 +8,7 @@ NOTICE.md
Release/
Thumbs.db
build/
doxygen/html/
test-*/
upload.tar.gz
yotta_modules/
Expand Down
41 changes: 29 additions & 12 deletions NOTES.md
@@ -1,11 +1,17 @@
## Purpose

The CMSIS++ package is a proposal for a future CMSIS version, intended for C++ embedded applications, but with complete support for C.
The CMSIS++ package is a proposal for a future CMSIS version, intended for C++ embedded applications, but with very good support for C.

The specifications are currently work in progress, and any contributions are highly appreciated.
The specifications are more or less complete for CMSIS++ RTOS, and work in progress for the other components, so any contributions are highly appreciated.

CMSIS++ is currently used by µOS++ III, but has no dependencies on it, and can be used in any other C++ embedded project.

## CMSIS++ or POSIX++?

The first attempt was to design the C++ API based on the ARM CMSIS RTOS v1.x C API, but the ARM API had too many [shortcommings](https://github.com/ARM-software/CMSIS/issues/64), and the idea was abandonned.

The second attempt tried to stay as close as possible to the POSIX requirements, and now CMSIS++ RTOS is more or less a C++ rewrite of the POSIX pthread library, so it might very well be called **POSIX++**.

## Project highlights

The project highlights are:
Expand All @@ -14,17 +20,15 @@ The project highlights are:

- exactly the same functionality is provided in C, with a C wrapper, for those who prefer to use plain C; the C API is defined in [<cmsis-plus/rtos/os-c-api.h>](https://github.com/micro-os-plus/cmsis-plus/blob/xpack/include/cmsis-plus/rtos/os-c-api.h)

- the actual CMSIS API is also implemented in the C wrapper; it is defined in [<cmsis_os.h>](https://github.com/micro-os-plus/cmsis-plus/blob/xpack/include/cmsis-plus/legacy/cmsis_os.h) (functional, just passed the CMSIS RTOS validation, using the [FreeRTOS port](https://github.com/xpacks/freertos/blob/xpack/cmsis-plus/include/cmsis-plus/rtos/port/os-inlines.h))
- the actual ARM CMSIS API v1.x is also implemented in the C wrapper; it is defined in [<cmsis_os.h>](https://github.com/micro-os-plus/cmsis-plus/blob/xpack/include/cmsis-plus/legacy/cmsis_os.h) (functional, just passed the CMSIS RTOS validation, using the [FreeRTOS port](https://github.com/xpacks/freertos/blob/xpack/cmsis-plus/include/cmsis-plus/rtos/port/os-inlines.h))

- on top of the core C++ API, the ISO standard thread library is fully implemented, and this is the recommended API for future applications; the definitions are available form [<cmsis-plus/iso/*>](https://github.com/micro-os-plus/cmsis-plus/tree/xpack/include/cmsis-plus/iso)

- all RTOS objects are based on the core C++ objects, and objects created in C++ can be used in C and similarly objects created in C can be used in C++ (there is no mystery here, they represent exactly the same objects)

- the C++ API was originally derived from the original CMSIS RTOS C API, but was adjusted to match the POSIX requirements as close as possible, so now it is generally a C++ version of the POSIX pthread library
- the CMSIS++ RTOS specification go one step further then the original CMSIS, it also suggest a portable scheduler API, and a set of portable synchronisation primitives, calling the portable scheduler; the portable synchronisation objects can be considered a 'reference implementation', however CMSIS++ does not mandate the use of these objects, as it is quite easy to forward all calls to the underlaying implementation (a fully functional version running on top of FreeRTOS is available)

- the CMSIS++ RTOS specification will go one step further then the original CMSIS, it will also suggest a portable scheduler API, and a set of portable synchronisation primitives, calling the portable scheduler; the portable synchronisation objects can be considered a 'reference implementation', however CMSIS++ does not mandate the use of these objects, it is quite easy to forward all calls to the underlaying implementation, as the current version using FreeRTOS does (partly implemented, to be completed soon)

- there will also be a reference scheduler implementation (called µOS++ III), that will also be highly portable; it will run in 32-bits and 64-bits environments but will be specifically tailored for Cortex-M cores; it'll also run on synthetic POSIX platforms, for example as a user mode POSIX process, on OS X and GNU/Linux, possibly on Windows if MinGW-w64 will allow an easy port. (will be based on prior µOS++ versions, which are fully functional)
- there is also a reference scheduler (called µOS++ III); the implementation is highly portable, it runs in 32-bits and 64-bits environments but is specifically tailored for Cortex-M cores; it also runs on synthetic POSIX platforms, for example as a user mode POSIX process, on OS X and GNU/Linux.

- CMSIS++ also includes a POSIX IO interface (namespace os::posix), bringing together access to terminal devices, files and sockets, via a unified and standard API (functional in a separate project, will be updated and moved here shortly)

Expand All @@ -34,18 +38,31 @@ The project highlights are:

## Documentation

TODO: create a CMSIS++ Doxygen site and add link here.

For reference, the original ARM CMSIS documentation is available form
[keil.com](http://www.keil.com/pack/doc/CMSIS/General/html/index.html).
* [CMSIS++ / µOS++ IIIe](http://micro-os-plus.github.io)
* [CMSIS++ reference](http://micro-os-plus.github.io/reference/cmsis-plus/)
* the original ARM CMSIS documentation is available form
[keil.com](http://www.keil.com/pack/doc/CMSIS/General/html/index.html)

## License

CMSIS++ is provided free of charge under the terms of the [MIT License](https://opensource.org/licenses/MIT).

## Related projects

The current CMSIS++ code tries to be as portable as possible.

Specific implementations are available from separate projects:

- the Cortex-M port of the scheduler is packed with [µOS++ IIIe xPack](https://github.com/micro-os-plus/micro-os-plus-iii)
- the synthetic POSIX port of the scheduler is packed with [POSIX arch xPack](https://github.com/micro-os-plus/posix-arch)

## Tests

* tests/rtos - simple test to exercise the CMSIS++ RTOS C++ API, the C API and the ISO C++ API
* tests/mutex-stress - a stress test with 10 threads fighting for a mutex
* tests/sema-stress - a stress test posting to a semaphore from a high frequency interrupt.
* tests/gcc - compile test with host GCC compiler
* tests/eabi-gcc - cross compile test with arm-none-eabi-gcc

The ARM CMSIS RTOS validator is available from a [separate project](https://github.com/xpacks/arm-cmsis-rtos-validator).


49 changes: 37 additions & 12 deletions README.md
@@ -1,6 +1,6 @@
# CMSIS++

An xPack with CMSIS++, a C++ version of CMSIS.
An xPack with CMSIS++, a proposal for a future CMSIS, written in C++ and POSIX compliant.

## Package

Expand Down Expand Up @@ -44,6 +44,10 @@ An xPack with CMSIS++, a C++ version of CMSIS.
* cmsis
* cortex
* c++
* rtos
* drivers
* scheduler
* posix

## License

Expand All @@ -52,12 +56,18 @@ An xPack with CMSIS++, a C++ version of CMSIS.
---
## Purpose

The CMSIS++ package is a proposal for a future CMSIS version, intended for C++ embedded applications, but with complete support for C.
The CMSIS++ package is a proposal for a future CMSIS version, intended for C++ embedded applications, but with very good support for C.

The specifications are currently work in progress, and any contributions are highly appreciated.
The specifications are more or less complete for CMSIS++ RTOS, and work in progress for the other components, so any contributions are highly appreciated.

CMSIS++ is currently used by µOS++ III, but has no dependencies on it, and can be used in any other C++ embedded project.

## CMSIS++ or POSIX++?

The first attempt was to design the C++ API based on the ARM CMSIS RTOS v1.x C API, but the ARM API had too many [shortcommings](https://github.com/ARM-software/CMSIS/issues/64), and the idea was abandonned.

The second attempt tried to stay as close as possible to the POSIX requirements, and now CMSIS++ RTOS is more or less a C++ rewrite of the POSIX pthread library, so it might very well be called **POSIX++**.

## Project highlights

The project highlights are:
Expand All @@ -66,17 +76,15 @@ The project highlights are:

- exactly the same functionality is provided in C, with a C wrapper, for those who prefer to use plain C; the C API is defined in [<cmsis-plus/rtos/os-c-api.h>](https://github.com/micro-os-plus/cmsis-plus/blob/xpack/include/cmsis-plus/rtos/os-c-api.h)

- the actual CMSIS API is also implemented in the C wrapper; it is defined in [<cmsis_os.h>](https://github.com/micro-os-plus/cmsis-plus/blob/xpack/include/cmsis-plus/legacy/cmsis_os.h) (functional, just passed the CMSIS RTOS validation, using the [FreeRTOS port](https://github.com/xpacks/freertos/blob/xpack/cmsis-plus/include/cmsis-plus/rtos/port/os-inlines.h))
- the actual ARM CMSIS API v1.x is also implemented in the C wrapper; it is defined in [<cmsis_os.h>](https://github.com/micro-os-plus/cmsis-plus/blob/xpack/include/cmsis-plus/legacy/cmsis_os.h) (functional, just passed the CMSIS RTOS validation, using the [FreeRTOS port](https://github.com/xpacks/freertos/blob/xpack/cmsis-plus/include/cmsis-plus/rtos/port/os-inlines.h))

- on top of the core C++ API, the ISO standard thread library is fully implemented, and this is the recommended API for future applications; the definitions are available form [<cmsis-plus/iso/*>](https://github.com/micro-os-plus/cmsis-plus/tree/xpack/include/cmsis-plus/iso)

- all RTOS objects are based on the core C++ objects, and objects created in C++ can be used in C and similarly objects created in C can be used in C++ (there is no mystery here, they represent exactly the same objects)

- the C++ API was originally derived from the original CMSIS RTOS C API, but was adjusted to match the POSIX requirements as close as possible, so now it is generally a C++ version of the POSIX pthread library
- the CMSIS++ RTOS specification go one step further then the original CMSIS, it also suggest a portable scheduler API, and a set of portable synchronisation primitives, calling the portable scheduler; the portable synchronisation objects can be considered a 'reference implementation', however CMSIS++ does not mandate the use of these objects, as it is quite easy to forward all calls to the underlaying implementation (a fully functional version running on top of FreeRTOS is available)

- the CMSIS++ RTOS specification will go one step further then the original CMSIS, it will also suggest a portable scheduler API, and a set of portable synchronisation primitives, calling the portable scheduler; the portable synchronisation objects can be considered a 'reference implementation', however CMSIS++ does not mandate the use of these objects, it is quite easy to forward all calls to the underlaying implementation, as the current version using FreeRTOS does (partly implemented, to be completed soon)

- there will also be a reference scheduler implementation (called µOS++ III), that will also be highly portable; it will run in 32-bits and 64-bits environments but will be specifically tailored for Cortex-M cores; it'll also run on synthetic POSIX platforms, for example as a user mode POSIX process, on OS X and GNU/Linux, possibly on Windows if MinGW-w64 will allow an easy port. (will be based on prior µOS++ versions, which are fully functional)
- there is also a reference scheduler (called µOS++ III); the implementation is highly portable, it runs in 32-bits and 64-bits environments but is specifically tailored for Cortex-M cores; it also runs on synthetic POSIX platforms, for example as a user mode POSIX process, on OS X and GNU/Linux.

- CMSIS++ also includes a POSIX IO interface (namespace os::posix), bringing together access to terminal devices, files and sockets, via a unified and standard API (functional in a separate project, will be updated and moved here shortly)

Expand All @@ -86,15 +94,32 @@ The project highlights are:

## Documentation

TODO: create a CMSIS++ Doxygen site and add link here.
* [CMSIS++ / µOS++ IIIe](http://micro-os-plus.github.io)
* [CMSIS++ reference](http://micro-os-plus.github.io/reference/cmsis-plus/)
* the original ARM CMSIS documentation is available form
[keil.com](http://www.keil.com/pack/doc/CMSIS/General/html/index.html)

## License

For reference, the original ARM CMSIS documentation is available form
[keil.com](http://www.keil.com/pack/doc/CMSIS/General/html/index.html).
CMSIS++ is provided free of charge under the terms of the [MIT License](https://opensource.org/licenses/MIT).

## Related projects

The current CMSIS++ code tries to be as portable as possible.

Specific implementations are available from separate projects:

- the Cortex-M port of the scheduler is packed with [µOS++ IIIe xPack](https://github.com/micro-os-plus/micro-os-plus-iii)
- the synthetic POSIX port of the scheduler is packed with [POSIX arch xPack](https://github.com/micro-os-plus/posix-arch)

## Tests

* tests/rtos - simple test to exercise the CMSIS++ RTOS C++ API, the C API and the ISO C++ API
* tests/mutex-stress - a stress test with 10 threads fighting for a mutex
* tests/sema-stress - a stress test posting to a semaphore from a high frequency interrupt.
* tests/gcc - compile test with host GCC compiler
* tests/eabi-gcc - cross compile test with arm-none-eabi-gcc

The ARM CMSIS RTOS validator is available from a [separate project](https://github.com/xpacks/arm-cmsis-rtos-validator).



Expand Down
8 changes: 6 additions & 2 deletions module.json
@@ -1,12 +1,16 @@
{
"name": "ilg-cmsis-plus",
"description": "An xPack with CMSIS++, a C++ version of CMSIS.",
"description": "An xPack with CMSIS++, a proposal for a future CMSIS, written in C++ and POSIX compliant.",
"version": "0.1.1",
"keywords": [
"arm",
"cmsis",
"cortex",
"c++",
"rtos",
"drivers",
"scheduler",
"posix",
"xpack",
"xcdl"
],
Expand All @@ -19,6 +23,6 @@
"bugs": {
"url": "http://www.element14.com/community/groups/gnu-arm-eclipse"
},
"license": "LGPL-3.0",
"license": "MIT",
"dependencies": {}
}
8 changes: 6 additions & 2 deletions xpack.json
Expand Up @@ -2,7 +2,7 @@
"$schema": "http://xcdl.github.io/schemas/xpack-1-1.json",
"name": "ilg-cmsis-plus",
"title": "CMSIS++",
"description": "An xPack with CMSIS++, a C++ version of CMSIS.",
"description": "An xPack with CMSIS++, a proposal for a future CMSIS, written in C++ and POSIX compliant.",
"xcdlFile": ".xcdl.json",
"repository":
{
Expand All @@ -20,7 +20,11 @@
"arm",
"cmsis",
"cortex",
"c++"
"c++",
"rtos",
"drivers",
"scheduler",
"posix"
],

"homepage": "https://github.com/micro-os-plus/cmsis-plus",
Expand Down

0 comments on commit 38e7205

Please sign in to comment.