https://github.com/aitorvs/ercos
Embedded Operating System (no longer updated)
https://github.com/aitorvs/ercos
Last synced: 20 days ago
JSON representation
Embedded Operating System (no longer updated)
- Host: GitHub
- URL: https://github.com/aitorvs/ercos
- Owner: aitorvs
- Created: 2015-11-26T10:45:11.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-26T13:10:21.000Z (over 10 years ago)
- Last Synced: 2025-11-30T20:32:55.219Z (7 months ago)
- Language: C
- Homepage:
- Size: 361 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ERCOS
ERCOS is a small real-time operating system for embedded platforms. It was
originally developed for the SPARC architecture — specifically the ERC-32
processor used in radiation-hardened spacecraft computers — at the University
of Alcalá, with support for the Motorola 68332 added later.
The project is being modernised: the kernel now has a native macOS port
(`arch/HOST/POSIX/`), an in-tree SPARC V7 instruction simulator
(`tools/ercsim/`), a Docker recipe for cross-compiling to real SPARC with
BCC2, and an in-progress browser-based mission control companion under `web/`.
See `CLAUDE.md` for a detailed snapshot of current state and active work.
If you're here because you want to understand real flight-style RTOS
internals — the original ERCOS source was made public for exactly that — most
of the kernel is platform-independent C under `kernel/` and is the right place
to start reading.
## Quick start (macOS)
```bash
./scripts/setup-macos.sh # install build prerequisites (idempotent)
./scripts/check.sh # build + run the full test suite (15 steps)
./scripts/demo-satellite-host.sh # multi-task satellite mission demo, native Mac
```
## Configuration
ERCOS still uses a Linux Tk-based configuration system (`make xconfig`)
inherited from the kernel's earlier life. On macOS the configuration is
bootstrapped from a defconfig (`config/POSIX/defconfig`) by the test
harness automatically — see `arch/HOST/POSIX/tests/test-e2e.sh` for the
recipe.
Cross-compiling for SPARC on macOS uses the Docker recipe in
`scripts/docker/Dockerfile`, since Gaisler does not ship BCC2 binaries
for macOS:
```bash
./scripts/docker-build.sh # produce image/image.elf for real SPARC
```
## Source code layout
- `arch/` — architecture- and platform-specific code (SPARC ERC-32, LEON,
M68K 68332, and the new HOST/POSIX native port)
- `config/` — kernel configuration files and per-platform defconfigs
- `gdb/` — gdb stub implementations (unused in the macOS port)
- `include/` — kernel header files
- `kernel/` — platform-independent kernel implementation
- `init/` — kernel initialisation, also platform-independent
- `posix/` — POSIX interface implementation, built on top of the native syscalls
- `bpl/` — BPL / EDROOM application framework (C++)
- `sys_tracer/` — offline parser for the kernel trace stream feeding the
[kiwi trace viewer](http://www.gti-ia.upv.es/sma/tools/kiwi/index.php)
- `tools/` — host-side tools, including the SPARC simulator `ercsim/` and the
kiwi viewer binary
- `test_new/` — application-level test programs
- `scripts/` — macOS bootstrap, Docker recipe, demo runners, CI runner
- `web/` — Svelte + Vite + TypeScript browser mission control SPA (work in progress)
## Porting ERCOS to a new platform
The macOS HOST/POSIX port is a recent and reasonably faithful template for
how to add a new platform — see `arch/HOST/POSIX/` and the matching
`config/POSIX/` files. The original porting notes from 2015 are also still
broadly applicable:
1. Edit `config.in` and inside `choice Vendor/Product` add a line of the form
`YOURPLATFORM CONFIG_DEFAULTS_PLATFORM_NEWARCHNAME_NEWPLATFORMNAME \ `,
substituting the architecture and platform names appropriately.
2. Add a `config//` directory with `config.in`, `defconfig`,
and `link_.ld`. Use `config/DUMMY/` as a template.
3. Create `arch///` with a `Makefile`. Use
`arch/NOARCH/` or `arch/HOST/POSIX/` as templates.
## Developed by
Aitor Viana Sánchez — `aitor.viana.sanchez@gmail.com`
- [Twitter / X](https://twitter.com/aitorvs)
- [LinkedIn](https://www.linkedin.com/in/aitorvs)
## License
ERCOS is released under the **GNU General Public License v2** — see the
`COPYING` file at the repo root for the full licence text. Each source
file carries a short GPL v2 notice in its header.
Some third-party components are included under compatible licences:
- `bpl/edroomsl.{cpp,h}` — © 2005 Oscar Rodríguez Polo, GPL v2-or-later
- `include/M68K/cpu/cputypes.h`, `include/M68K/68332/platform.h` —
© 2004–2005 Óscar García Población, GPL v2
- `test_new/Test53.cpp`, `test_new/Test10.cpp` (with Aitor) —
© 2004–2005 César Rodríguez Ortega, GPL v2
- `gdb/setjmp.h` — contains m68k `jmp_buf` definitions from the
GNU C Library, LGPL v2.1