Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrpicklepinosaur/trainos
microkernel developed for playing with trains
https://github.com/mrpicklepinosaur/trainos
c cs452 kernel marklin rtos
Last synced: about 5 hours ago
JSON representation
microkernel developed for playing with trains
- Host: GitHub
- URL: https://github.com/mrpicklepinosaur/trainos
- Owner: MrPicklePinosaur
- License: mit
- Created: 2023-09-17T23:08:19.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-09T04:40:04.000Z (12 months ago)
- Last Synced: 2023-12-10T04:20:37.584Z (12 months ago)
- Topics: c, cs452, kernel, marklin, rtos
- Language: C
- Homepage:
- Size: 5.37 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TrainOSmicrokernel developed for playing with trains
## Features
- Fully functional multitasking kernel with interprocess communication mechanisms
- Custom standard library built from the ground up
- Intelligent train control for the marklin train set
- Stylish terminal user interface for monitoring and sending commands to trains## Running the code
Make a copy of `config.mk.example` called `config.mk`:
```sh
cp config.mk.example config.mk
```
Then, in `config.mk`, replace `/u/cs452/public/xdev` with the location of your toolchain directory.Build the project:
```sh
make
```This should generate a `trainos.img` file. Upload this image file to [https://cs452.student.cs.uwaterloo.ca/](https://cs452.student.cs.uwaterloo.ca/). This should get it onto the Raspberry Pi.
Turn on the Raspberry Pi (or restart it if it's already on). Wait for the TrainOS kernel to boot up.
## Running in simulator
WARNING: currently qemu only supports raspberry pi 3, so there may be
unexpected between the simulator and the actual lab raspberry pis.The kernel can be inside qemu and remotely debugged using gdb. Ensure that you
have the following installed:
- qemu-system-aarch64
- gdb-multiarchFirst build the image with the `QEMU=1`. You can set the value in your
`config.mk` or pass it to make when building:
```sh
make clean; make QEMU=1
```Start qemu with the trainos image:
```sh
./scripts/sim.sh
```
This will start a gdbserver on port 1234. Next start `gdb-multiarch` and run:
```sh
(gdb) target remote :1234
```## Directory Structure
- `kern`: kernel code
- `user`: user programs
- `lib`: library implmentation
- `include`: header files for libraries