My Pet Project
Tags: rtos, embedded, operatingsystems, robotics
Published: 2018-10-03 06:11:10

---
title: My Pet Project
published: true
description: 
series: AlphaAutomata
tags: rtos, embedded, operating-systems, robotics
---

# The Thing

[Alpha Automata](https://github.com/AlphaAutomata) is my cute name for my side project - a highly-modular command and control stack for robotics and automation. As of right now, I envision it to eventually have the following components:

- A ROS package acting as a gateway for higher-level applications
- A physical-layer-agnostic packet protocol for inter-device communications
- An [RTOS](https://github.com/AlphaAutomata/AlphaRTOS)
- A set of SOC peripheral drivers
- A set of [VHDL AXI peripherals](https://github.com/AlphaAutomata/rtl_devices/tree/master/pwm/hdl)
- A set of [VHDL I/O modules](https://github.com/AlphaAutomata/digital_io)

# The Background

Back in college, I wrote embedded software for [Wisconsin Robotics](https://github.com/WisconsinRobotics) and [Badger Robotic Mining Team](https://github.com/BadgerRoboticMiningTeam). I wrote my first tasks and drivers for Wisconsin Robotics' [FreeRTOS](https://www.freertos.org/) applications, and wrote a [custom RTOS](https://github.com/BadgerRoboticMiningTeam/LaunchPad) for Badger Robotic Mining Team. Through all that development, I found my love for operating systems, hardware-controlling software, and the pillar of good engineering that is abstraction.

My current job revolves around porting a legacy GUI application to a modern desktop OS while documenting the source code. Having found no creative outlet where I can scratch my itch for embedded systems at work, I have decided to re-architect the RTOS I wrote in college and start building an entire framework around it.

# The Goal

I don't see my framework supplanting FreeRTOS or [Zephyr](https://www.zephyrproject.org/). In fact, the Zephyr project does everything I could ever want my own RTOS to do and more, and would be my choice for any serious robotics projects I want to start down the road. I do see the development of my framework, and the writing of my posts here on Dev, honing and expanding my engineering skill set.

A secondary goal of mine is to flush out all the Dev users who are even mildly interested in embedded systems, hardware hacking, IoT, or other such things. As an embedded systems enthusiast, I find it lonely here on a platform seemingly dominated by web developers.

# The State of Alpha

I have barely begun this ambitious side project. As of right now, almost none of the components I listed earlier are in a presentable state:

- A ROS package acting as a gateway for higher-level applications
    - I have never written a single line of code for a ROS package
- A physical-layer-agnostic packet protocol for inter-device communications
    - I have not made an attempt to start this yet
- An [RTOS](https://github.com/AlphaAutomata/AlphaRTOS)
    - I have finished stripping the non-portable code from my college RTOS, and have barely worked out what I think the API should be. I aspire to be even half of what Zephyr is, so I'll probably try to magic the Zephyr API, the CMSIS RTOS API, and the POSIX API together into something mildly usable
- A set of SOC peripheral drivers
    - No attempt to start this, but I am writing drivers for the VHDL AXI peripherals as I go
- A set of [VHDL AXI peripherals](https://github.com/AlphaAutomata/rtl_devices/tree/master/pwm/hdl)
    - I have tested my PWM module, and it works! I have certainly not tried all the edge cases
- A set of [VHDL I/O modules](https://github.com/AlphaAutomata/digital_io)
    - My UART, PWM, and quadrature modules all work in functional simulation. Who knows if they will all work on hardware?

# Onwards and Upwards

I plan on posting my progress here on Dev every Wednesday, and those who are interested can look at my GitHub easily enough.