avr-vsc-c-demo/readme.md
2020-04-23 21:36:57 +02:00

1.2 KiB

Usage

  1. Prepare & install
    1. brew tap osx-cross/avr
    2. brew install avr-gcc
    3. brew install avrdude
    4. OPTIONAL: GUI for avrdude (to easily read and set fuses):
      1. Install AVRFuses for Mac from http://vonnieda.org/software/avrfuses and open it
      2. Point AVRFuses to your avrdude installation:
        1. Get path via command line $ which avrdude
      3. Connect your USPasp to your Arduino and plug it into your Mac.
      4. Chose the usbasp in the programmer dropdown.
      5. Choose the usb port in AVRFuses. In my case it was just usb. Close Settings window.
      6. Click on „Autodetect“ to verify that everything works as expected. Now you can read and set Fuses.
  2. Setup project in vscode with make
    1. Install c/c++ extension via marketplace
    2. Download https://git.timovolkmann.de/tvolkmann/avr-vsc-c-demo for sample project. Make sure that paths in .vscode/c_cpp_properties.json are correct.
    3. Enter project directory and build with $ make all
    4. Flash to Arduino with $ make flash

Helpful resources