Loading repository data…
Loading repository data…
dohack / repository
Welcome to the ATMEGA328P Baremetal Project! This repository showcases how to work directly with the ATMEGA328P microcontroller without relying on high-level abstractions or libraries. Perfect for those who want to delve into low-level programming and understand microcontroller architecture at its core.
ATMEGA328P Baremetal project using AVR-GCC, AVRDude, a USBasp programmer, and the ATMEGA328P microcontroller on an Arduino Uno board.
🚀 Introduction
Welcome to the ATMEGA328P Baremetal Project! This repository showcases how to work directly with the ATMEGA328P microcontroller without relying on high-level abstractions or libraries. Perfect for those who want to delve into low-level programming and understand microcontroller architecture at its core.
The ATMEGA328P is a popular AVR microcontroller used in various applications, including the Arduino platform. This project focuses on programming it directly in assembly and C to achieve maximum control and efficiency.
Welcome to the ATMEGA328P Baremetal Project! This project is an exploration into programming the ATMEGA328P microcontroller directly with no high-level libraries or frameworks. Leveraging AVR-GCC, AVRDude, and a USBasp programmer, we will dive deep into the world of bare-metal programming.
Note: This project is designed for those interested in understanding the low-level workings of microcontrollers and hands-on programming without abstractions.
This project uses the ATMEGA328P microcontroller, found on the Arduino Uno, for bare-metal programming. We utilize the AVR-GCC toolchain for compiling code and AVRDude for programming the microcontroller via a USBasp programmer.
AVR-GCC: Install via your package manager or from AVR Toolchain.
sudo apt-get install avr-gcc avr-libc
AVRDude: Install via Arduino software AVRDude.
sudo apt-get install avrdude
USBasp Driver: Make sure you have the appropriate drivers for your USBasp programmer.
Clone the Repository
git clone https://github.com/dohack/ATMEGA328P-Baremetal
cd ATMEGA328P-Baremetal
Compile Your Code
Create a Makefile or use the provided one:
make
Flash the Firmware
Use AVRDude to upload the compiled code to the microcontroller:
make upload
Clean Project Build Use Makefile to delete exisitng build.
make clean
After flashing, your ATMEGA328P will be running the bare-metal firmware you’ve programmed. You can test functionality by connecting peripherals or LEDs as per your code’s requirements.
Contributions are welcome! Please fork the repository, make your changes, and create a pull request. Ensure that your code adheres to the project’s coding standards and includes adequate documentation.
This project is licensed under the MIT License. See the LICENSE file for details.