Skip to content

adriaanm/Arduino-AVR-CMake

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimal blink for attiny85 using avr-gcc and cmake

Compile AVR programs for an attiny85 using CMake. No dependencies on arduino. Based on https://github.com/tttapa/Arduino-AVR-CMake.

Instructions (Mac)

  1. brew install avr-gcc
  2. Install micronucleus
brew install pkg-config libusb libusb-compat libusb-dev
gh repo clone https://github.com/micronucleus/micronucleus
cd micronucleus/commandline
make install
  1. Configure the project using CMake by running the following command:
    cmake -S. -Bbuild \
        -D CMAKE_TOOLCHAIN_FILE=cmake/toolchain/avr.toolchain.cmake \
        -D CMAKE_BUILD_TYPE=MinSizeRel
  2. Finally, build and upload the example “blink” program (using micronucleus):
    cmake --build build -j -t upload-blink
    To compile the program without uploading, you can use
    cmake --build build -j -t blink

VSCode

Some stuff comes preconfigured.

About

Compile Arduino AVR programs using CMake.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CMake 89.9%
  • C 10.1%