{"id":21049884,"url":"https://github.com/mrpicklepinosaur/trainos","last_synced_at":"2026-05-21T18:08:00.193Z","repository":{"id":211160504,"uuid":"692899689","full_name":"MrPicklePinosaur/trainos","owner":"MrPicklePinosaur","description":"microkernel developed for playing with trains","archived":false,"fork":false,"pushed_at":"2023-12-09T04:40:04.000Z","size":5633,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-20T18:25:16.051Z","etag":null,"topics":["c","cs452","kernel","marklin","rtos"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrPicklePinosaur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-17T23:08:19.000Z","updated_at":"2024-05-28T18:12:59.000Z","dependencies_parsed_at":"2023-12-09T04:20:06.951Z","dependency_job_id":null,"html_url":"https://github.com/MrPicklePinosaur/trainos","commit_stats":null,"previous_names":["mrpicklepinosaur/trainos"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrPicklePinosaur%2Ftrainos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrPicklePinosaur%2Ftrainos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrPicklePinosaur%2Ftrainos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrPicklePinosaur%2Ftrainos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrPicklePinosaur","download_url":"https://codeload.github.com/MrPicklePinosaur/trainos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243495497,"owners_count":20299923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","cs452","kernel","marklin","rtos"],"created_at":"2024-11-19T15:16:17.283Z","updated_at":"2025-12-26T18:59:56.431Z","avatar_url":"https://github.com/MrPicklePinosaur.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg width=\"20%\" height=\"auto\" src=\"docs/logo-colored.png\" /\u003e\n  \n# TrainOS\n\nmicrokernel developed for playing with trains\n\n\u003c/div\u003e\n\n## Features\n\n- Fully functional multitasking kernel with interprocess communication mechanisms\n- Custom standard library built from the ground up\n- Intelligent train control for the marklin train set\n- Stylish terminal user interface for monitoring and sending commands to trains\n\n## Running the code\n\nMake a copy of `config.mk.example` called `config.mk`:\n```sh\ncp config.mk.example config.mk\n```\nThen, in `config.mk`, replace `/u/cs452/public/xdev` with the location of your toolchain directory.\n\nBuild the project:\n```sh\nmake\n```\n\nThis 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.\n\nTurn on the Raspberry Pi (or restart it if it's already on). Wait for the TrainOS kernel to boot up.\n\n\u003c!-- Below the TrainOS logo and the UW course gacha, there should be a prompt asking you to `SELECT TASK TO RUN`. Each task is assigned a number; type in the corresponding number to run that task. The RPS test is the task called `K2` while the performance test is the task called `K2Perf`. --\u003e\n\n\u003c!-- You can find the CSV file for the K2 performance test at `docs/K2Perf.csv`. --\u003e\n\n## Running in simulator\n\nWARNING: currently qemu only supports raspberry pi 3, so there may be\nunexpected between the simulator and the actual lab raspberry pis.\n\nThe kernel can be inside qemu and remotely debugged using gdb. Ensure that you\nhave the following installed:\n- qemu-system-aarch64\n- gdb-multiarch\n\nFirst build the image with the `QEMU=1`. You can set the value in your\n`config.mk` or pass it to make when building:\n```sh\nmake clean; make QEMU=1\n```\n\nStart qemu with the trainos image:\n```sh\n./scripts/sim.sh\n```\nThis will start a gdbserver on port 1234. Next start `gdb-multiarch` and run:\n```sh\n(gdb) target remote :1234\n```\n\n## Directory Structure\n\n- `kern`: kernel code\n- `user`: user programs\n- `lib`: library implmentation\n- `include`: header files for libraries\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrpicklepinosaur%2Ftrainos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrpicklepinosaur%2Ftrainos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrpicklepinosaur%2Ftrainos/lists"}