Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/10maurycy10/avr
https://github.com/10maurycy10/avr
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/10maurycy10/avr
- Owner: 10maurycy10
- Created: 2022-08-30T15:57:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-10T19:48:09.000Z (over 1 year ago)
- Last Synced: 2024-11-20T21:58:49.089Z (2 months ago)
- Language: C
- Size: 167 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AVR
Some random avr microcontroler code.
## Building
First ``cd`` into a subdirectory and run ``make``.
If you are not building for the ATMEGA328P microcontroler, specify ``TARGET`` to make.
You can find all MCUs by running ``avr-gcc --target-help``
If the clock speed of the microcontroler is not 1MHz, specify ``F_CPU`` to the make.
### Build system
The makefiles in projects call the ``Makefile`` at the root of the repo. If you wish to build out of tree, it must be inlined.
## Flashing
``make flash``
You may have to run it as root.
This will preform an erase cycle
If you are using a different programmer than the avrisp2, specify ``PROGRAMMER`` to make.
### Preserving EEPROM
``make flashkeep``
This backs up the EEPROM to dump.hex, erases and program the chip, and restores EEPROM.
If you plan on doing this often, setting the EESAVE fuse is a better option.
## Requirements
- avr-gcc tool chain
- avrdude programmer controller (if you want to use ``make flash``)
You probably want the actual hardware (an avr microcontroler and programmer)
On Arch linux and Arch based distros, these can be installed like this:
```
pacman -S avr-gcc avr-libc avrdude
```On Debian and Debian based distros:
```
apt install gcc-avr avr-libc avrdude
```