This is my Senior Project on Embedded system
This is a Python-based utility designed to interact with a custom RTOS running on an ATMega328P microcontroller. It supports both serial communication (UART) and the compilation of C-based task files into RTOS-compatible binaries. The tool is intended for embedded developers looking to upload, manage, and monitor tasks on the RTOS system from a PC.
- Auto-detects available COM ports (FTDI232, USB-UART, etc.)
- Sends structured UART commands to the RTOS:
<LIST>
— List all stored tasks<DEBUG>
— Dump raw EEPROM task content<DELETE:x>
— Delete specific task by ID<DELETE>
— Remove all stored tasks
- Reads and logs UART responses from the RTOS
- Compatible with Arduino Serial Monitor protocol
- Upload
.bin
task files wrapped inside<TASK:...>
markers - Format includes:
- Task Header (ID, Type, Priority, Size)
- Task Binary Payload
- Currently fire-and-forget — will support checksums, retries, and confirmation in future updates
- COM port selector
- Terminal output log with timestamps
- Task manager panel (planned)
- Memory visualization (planned)
The utility will eventually compile custom user-defined AVR task code:
- Accepts AVR C source files (e.g., toggle LED, sensor read)
- Compiles using
avr-gcc
targetingATmega328P
- Wraps output into a TaskHeader structure
- Sends combined binary via UART to the RTOS
.
├── .github/workflows/ # GitHub Actions (CI setup)
├── .gitignore # Standard Python ignore list
├── compiler.py # Main CLI script (serial & task upload)
├── requirement.txt # Python dependencies
└── README.md # You're here!
- Clone this repository:
git clone https://github.com/Sirapobchon/Senior-Project-PC.git
cd Senior-Project-PC
- Install Python requirements:
pip install -r requirement.txt
- Run the CLI:
python compiler.py
pyserial
- Serial communicationcustomtkinter
- for GUIsubprocess
- Used for invokingavr-gcc
(planned feature)tkinter
- File dialogs and GUI elements
Use PyInstaller to package into .exe
(Windows):
pyinstaller --onefile compiler.py
- Basic UART communication
- Task file upload via
<TASK:...>
- EEPROM debug and task list support
- GUI task manager interface
- Flash memory map visualization
- AVR code compiler with task builder
- CRC and upload verification system
Developed by [Sirapobchon] & [PPPCYD] Part of the ATMega328P RTOS Development Project