An implementation of the CMSIS‑RTOS2 API on a POSIX platform for testing and mocking embedded code.
🔗 Project Website (GitHub Pages)
CMSIS‑POSIX allows you to build and test CMSIS‑RTOS2‑based applications on a POSIX system (e.g., Ubuntu Linux) by mapping RTOS2 threads and mutexes to pthreads and related primitives. This is ideal for:
Status: Partial implementation For full function implementation list please refer to implemented.txt
- Thread basics
- Mutex
- Semaphore
- memory pool
- Message queues
Contributions via Issues or Pull Requests are very welcome—please follow the existing coding style (no strict format rules, just be consistent).
make
)gcc
, clang
)Add to your compilation the sources from src folder and the headers from the inc folder
The project supports user-defined overrides via a separate configuration file cmsisPosix_UserConfig.h in case CP_USE_USER_CONFIG is defined, see cmsisPosix_UserConfig_sample.h.
A small test suite is provided under tests/config1/
. To run:
cd tests/config1 make run
This is a community-driven effort—if you need a specific feature, please open an Issue or submit a PR!
PRs are highly welcome.
Please try to match the existing formatting and naming conventions. No strict convention.
If you find CMSIS‑POSIX useful, please give this repo a ★ on GitHub — it helps me know you’re interested and motivates further development!
This project is licensed under the Apache License 2.0. See the LICENSE file for details.