Skip to content

Instantly share code, notes, and snippets.

@kaangiray26
Last active September 27, 2023 06:05
Show Gist options
  • Save kaangiray26/8999294e4269e0408ff93215231f827c to your computer and use it in GitHub Desktop.
Save kaangiray26/8999294e4269e0408ff93215231f827c to your computer and use it in GitHub Desktop.
AVR in Arch Linux with Visual Studio Code

Configuring your Arch Linux system to work on AVR with Visual Studio Code

Install vscode

sudo pacman -S code

Install toolchain and GNU compiler

sudo pacman -S avr-gcc

Install the C runtime library for the AVR

sudo pacman -S avr-libc

Install the following extension in vscode

https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools

Configure Microsoft C/C++ Extension

  • Hit Ctrl+Shift+P and write C/C++: EDit Configurations (UI)
  • Select Linux as your Configuration name
  • Set your Compiler Path to /usr/bin/avr-gcc
  • Set your IntelliSense mode to linux-gcc-x86
  • Specify your AVR devices under Compiler arguments:
    -mmcu=atmega644
    
  • Click on Advanced Settings and on the Browse: path section, write the following:
    ${workspaceFolder}
    /usr/avr
    
  • Save the configurations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment