Simple Makefile Template for 8Bit AVR Projects
- Simply compile all C-Files of a project
- Project configuration within a simple config file
- EEPROM CLI Programming utility functions
- Generates the
.hex
image and extended listing.lss
- Includes some basic utility functions located in
lib/
- Use AVRDUDE to upload the flash image to your target
- Advanced PHP based pre-processing (define your custom pre-processor functions)
The AVR Toolchain can be installed with your package manager, or in case you need a more recent version manually by downloading the Official Toolchain Package
Ubuntu/Debian
apt-get install make avr-libc binutils-avr gcc-avr avrdude
- Use git
- Add AVR.Skelekton-C as submodule:
git submodule add https://github.com/AndiDittrich/AVR.Skeleton-C.git
- Link the makefile to your project root
ln -s AVR.Skeleton-C/makefile makefile
- Copy to makefile.config template
cp AVR.Skeleton-C/config.makefile .
- Customize the project based configuration by editing
config.makefile
to match your MCU-Type and frequency - Compile your project with
make
- Upload the flash image to your device
make install
All build-files are stored in the build/
directorie. The output files are prefixed with _application.
For example, the generated hex file is located in build/_application.hex
To edit linker, compiler flags, MCU-target, frequency you just need to edit the config.makefile
file.
This allows you to easily update the Skeleton-C project without merging the makefile manually!
- 8MHz Clock
- atmega16
# The AVR Device (AVR-GCC/AVRDUDE)
T_DEVICE = atmega16
# Target Clock (F_CPU) in Hz
T_FCPU = 8000000
0x55 0x22 0x10 0x1 0x00 0x01 0x02 0x03
0x22 0x11 0x00 0xff 0xA0
A bunch of easy to use utility functions is included to speed-up your project. For further informations, please take a look into the Documentation
Please open a new issue on GitHub
AVR.Skeleton-C is OpenSource and licensed under the Terms of The MIT License (X11). You're welcome to contribute!