{"id":17478641,"url":"https://github.com/nixpulvis/avrm","last_synced_at":"2025-03-17T12:30:44.877Z","repository":{"id":19445842,"uuid":"22689869","full_name":"nixpulvis/avrm","owner":"nixpulvis","description":"Bare metal AVR library and Makefile.","archived":false,"fork":false,"pushed_at":"2019-05-05T19:00:17.000Z","size":1512,"stargazers_count":10,"open_issues_count":13,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-11T18:49:51.712Z","etag":null,"topics":["arduino","avr","c","library"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nixpulvis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-06T16:29:29.000Z","updated_at":"2023-12-24T01:01:25.000Z","dependencies_parsed_at":"2022-07-27T00:32:10.679Z","dependency_job_id":null,"html_url":"https://github.com/nixpulvis/avrm","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nixpulvis%2Favrm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nixpulvis%2Favrm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nixpulvis%2Favrm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nixpulvis%2Favrm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nixpulvis","download_url":"https://codeload.github.com/nixpulvis/avrm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243864609,"owners_count":20360355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","avr","c","library"],"created_at":"2024-10-18T20:32:06.242Z","updated_at":"2025-03-17T12:30:44.420Z","avatar_url":"https://github.com/nixpulvis.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AVRM (M is for minimal)\n[![Build Status](https://travis-ci.org/nixpulvis/avrm.svg?branch=master)](https://travis-ci.org/nixpulvis/avrm)\n\nThis is a minimal and efficient set of functions for the AVR microcontrollers.\nThe code is all either C99, or AVR assembly. The main goal of this project is\nto write libraries which do not rely on Arduino.\n\n## Usage\n\nIt's important to me to make building things easy. I've made a Makefile which\naims to make compiling and flashing AVRs as easy as possible. It tries to help\nyou out too, for example it will find a `/dev/tty.usb*` device automatically.\n\n```sh\n# Compiles the library.\nmake\n\n# Compiles the library, and installs it on the system.\n# NOTE: You may need to run this command with `sudo` if you don't have\n# write access to /usr/local.\nmake install\n\n# Flash each test program to an AVR.\n# TODO: Validate output #10.\nmake test\n\n# Displays size information for a program.\nmake \u003cprogram\u003e.size\n\n# Compiles and flashes a program to a connected AVR.\nmake \u003cprogram\u003e.flash\n\n# Opens a `screen` session to a connected AVR.\nmake serial\n```\n\n## Getting Started\n\nI'm developing this project on both OS X, and Linux. Windows is simply not on\nmy radar, and I'm uninterested in trying to support it in the build tooling.\n\n**Note:** I've currently stopped development on macOS. If you're interested in\nkeeping support for that platform I'll happily take PRs.\n\n### Installing Dependencies\n\nThese instructions are for installing the needed dependencies on Arch Linux or\nmacOS.\n\n```sh\nsudo pacman -S avr-libc avr-gcc avr-binutils avrdude screen\n```\n\n```sh\nbrew tap osx-cross/avr\nbrew install avr-binutils avr-gcc avr-libc avrdude\n```\n\n### Install AVRM\n\n```sh\n# Install the library. You may need to run this with `sudo`.\nmake install\n```\n\n### Example Firmware.\n\n```sh\n# Flash the uart test program. Remember that the baud rate is different for\n# various AVRs.\nenv AVRDUDE_BAUD=57600 make examples/hello_world.flash\n\n# Open a serial connection to the AVR.\nmake serial\n\n# Remember, `CTRL-a k` to exit screen.\n```\n\n## AVRM STD Libraries\n\nAVRM itself is made up of various C99 headers, and their implementations. Each\n\"library\" is meant to be somewhat self contained, and provide access to some\nunderlying functionality of the AVR. External peripheral support is typically\nprovided by an external library (see below).\n\nAll libraries have their own set of header and source files, with a common name\nin the `/lib` directory.\n\n- [avrm](https://github.com/nixpulvis/avrm/blob/master/lib/avrm.h)\n- [pin](https://github.com/nixpulvis/avrm/blob/master/lib/avrm/pin.h)\n- [i2c](https://github.com/nixpulvis/avrm/blob/master/lib/avrm/i2c.h)\n- [spi](https://github.com/nixpulvis/avrm/blob/master/lib/avrm/spi.h)\n- [uart](https://github.com/nixpulvis/avrm/blob/master/lib/avrm/uart.h)\n- [shift](https://github.com/nixpulvis/avrm/blob/master/lib/avrm/shift.h)\n\nSee the [ROADMAP.txt](ROADMAP.txt) for some insight into what's left to\nimplement, and how things are organized. I generally only get around to writing\nthings as I need thing however, so don't hold your breath. If you would like\nto help, please don't hessitate to open an issue, or jump right in with a PR.\n\n## External Libraries\n\nIn addition to the built-in libraries included in AVRM, there are a few more\nlibraries I've written for specific chips.\n\n- [max7221](https://github.com/nixpulvis/max7221)\n- [ds1307](https://github.com/nixpulvis/ds1307)\n- [nrf24l01](https://github.com/nixpulvis/nrf24l01)\n- [mpu9150](https://github.com/nixpulvis/mpu9150)\n- [ws2812](https://github.com/nixpulvis/ws2812)\n\nWriting external libraries is easy with AVRM, since the `Makefile` was designed\nto be used in an `include` statement in external libraries as well.\n\n```make\n# Describe our custom library.\nLIBRARY = some_fun_chip\nVERSION = 1.33.7\n\n# Target our installed AVRM.\nPREFIX = /usr/local/$(LIBRARY)/$(VERSION)\nAVRM = /usr/local/avrm/0.0.5\nDEPENDENCIES = $(PREFIX) $(AVRM)\n\n# Include the AVRM Makefile, which will use the variables above to work with\n# this library.\ninclude $(AVRM)/Makefile\n```\n\n## Projects\n\nThe main purpose of this library is to facilitate making cool projects of\ncourse! Here's a list of some of mine.\n\n- [clock](https://github.com/nixpulvis/clock)\n- [led-cube](https://github.com/nixpulvis/led-cube)\n- [quadcopter](https://github.com/nixpulvis/quadcopter)\n- [synth](https://github.com/nixpulvis/synth) TODO: Awaiting ws2812 library.\n\nTODO: #4\n\n```make\nAVRM = /usr/local/avrm/0.0.5\nDS1307 = /usr/local/ds1307/0.0.3\nMAX7221 = /usr/local/max7221/0.0.3\nDEPENDENCIES = $(DS1307) $(MAX7221) $(AVRM)\nLDLIBS = -lds1307 -lmax7221 -lavrm\n\ninclude $(AVRM)/Makefile\n```\n\n## Reference\n\n- [avr-libc manual](http://www.nongnu.org/avr-libc/user-manual/pages.html)\n- [avrdude manual](https://www.nongnu.org/avrdude/user-manual/avrdude.html)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnixpulvis%2Favrm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnixpulvis%2Favrm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnixpulvis%2Favrm/lists"}