Skip to content

Latest commit

 

History

History
78 lines (54 loc) · 3.86 KB

HOWTO_windows.md

File metadata and controls

78 lines (54 loc) · 3.86 KB

How to use AVR template on Windows

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

  2. Download and install Git. During installation choose the default editor used by Git as Use Visual Studio Code as Git's default editor.

  3. Download and run MinGW Installation Manager. During installation keep installation directory as C:\MinGW.

    In MinGW Installation Manager, mark mingw32-base-bin package for installation and apply changes in menu Installation > Apply Changes.

    Add C:\MinGW\bin to your Path environment variable: This PC > Properties > Advanced system settings > Environment Variables...

  4. Download the latest version of Avrdude, such as avrdude-6.3-mingw32.zip and extract avrdude.conf and avrdude.exe files to C:\Appz\Avr (Do NOT use any space in filepath). Copy libusb0.dll dynamic link library to C:\Appz\Avr. You can find the dll as part of Arduino IDE as well.

  5. Download and install PuTTy client for serial communication between Arduino Uno board and your computer.

  6. Download and install Saleae logic for analyzing digital and analog signals.

  7. Download the latest toolchain AVR 8-bit Toolchain v3.62 - Windows and extract all files to C:\Appz\Avr\avr8-gnu-toolchain-win32_x86.

  8. Download and extract this template to local computer and use it to start your own repository.

  9. Start Visual Studio Code source code editor, open template folder, in Labs/firmware.in file enable and/or modify Windows 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:).

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

    cd Labs
    cd 01-demo
    ls

    Instead of ls command you can try dir.

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

    mingw32-make.exe all
    mingw32-make.exe flash
    mingw32-make.exe size
    mingw32-make.exe list
    mingw32-make.exe clean
  11. 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.

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

    For Windows 10, you can install Windows Subsystem for Linux and then follow the AVR installation notes for Linux.

Tested on operating systems

Name Version Result Note
Windows Windows 10 OK (2019-11-26) Lab SC 6.66
Windows Windows 7 OK (2019-05-17) Lab SC 6.61