Skip to content

Latest commit

 

History

History
84 lines (62 loc) · 3.01 KB

HOWTO_linux.md

File metadata and controls

84 lines (62 loc) · 3.01 KB

How to use AVR template on Linux

  1. Download and install Visual Studio Code source code editor.

  2. AVR template requires the following packages to be installed correctly:

    sudo apt-get install git make avrdude putty
  3. Download and install Saleae logic for analyzing digital and analog signals.

  4. Download the latest toolchain AVR 8-bit Toolchain 3.6.2 - Linux 64-bit and extract all files to /opt directory:

    sudo tar -xzvf avr8-gnu-toolchain-3.6.2.1759-linux.any.x86_64.tar.gz -C /opt/
  5. Download and extract this template to local computer and use it to start your own repository.

  6. Start Visual Studio Code source code editor, open template folder, and in Labs/firmware.in file enable and/or modify Linux parameters according to your local settings:

    ## Linux
    PREFIX  = /opt/avr8-gnu-toolchain-linux_x86_64
    AVRDUDE = avrdude
    RM      = rm -f
    # See "dmesg" command output
    USBPORT = /dev/ttyUSB0
    
    ## Windows
    #PREFIX  = C:\Appz\Avr\avr8-gnu-toolchain-win32_x86
    #AVRDUDE = C:\Appz\Avr\avrdude.exe
    #RM      = del
    ## See USB-SERIAL CH340 port in Device Manager
    #USBPORT = COM3

    If USB drivers for AVR boards are missing, download and install Arduino IDE (it includes all drivers:).

  7. Open a new terminal in menu Terminal > New Terminal and change working directory to Labs/01-demo.

    cd Labs/01-demo
    ls

    All processes are done with help of Makefile script file. The following commands allow compilation and programming:

    make all
    make flash
    make size
    make list
    make clean
  8. To create a new project, make a new directory within Labs folder and copy three files main.c, Makefile, and README.md from 01-demo project.

    cd ..
    mkdir name_of_new_project
    cd name_of_new_project
    cp ../01-demo/main.c ../01-demo/Makefile ../01-demo/README.md .

    If your Arduino board (or clone) does not contain any bootloader, follow instructions at Instructables or Arduino webpages.

Tested on operating systems

Name Version Result Note
Linux Mint 18.3, Sylvia OK (2019-06-13) Laptop
Linux Mint 18.2, Sonya OK (2019-05-17) Lab SC 6.61
Ubuntu 18.04.1 LTS, Bionic Beaver OK (2019-05-15) Office
Ubuntu 16.04, Xenial Xerus OK (2018-09-15) Office
# FYI: How to check OS version in Linux
cat /etc/os-release