Skip to content

u8g2as7

kraus edited this page Jun 9, 2018 · 15 revisions

U8g2 Install Instructions for Atmel Studio 7

Open Atmel Studio 7

001

Create Solution

  • Create a new gcc c executable project
  • Enter a project "Name"
  • Enter a "Solution Name"

002

Select Target Device

003

Assign main.c

A template main.c will be created as part of the new solution. Replace the content of this main.c with the content from here:

https://github.com/olikraus/u8g2/blob/master/sys/avr/atmega328/main.c

This example code is valid for a SPI display and will implement software emulated SPI.

004

Open Project Properties

Menu "Project", Submenu "u8g2_test Properties"

005

Add Existing Item

Menu "Project", Submenu "Add Existing Item..."

006

Add U8g2

007

Add Include Path

  1. Select the project
  2. Locate Toolchain tab
  3. Select "All Configurations"
  4. Select AVR/GNU C Compiler/Directories
  5. Press the green plus icon
  6. Add ".." as relative include path
  7. Press "OK".

008

Add Include Path

  1. Select the project
  2. Locate Toolchain tab
  3. Select "All Configurations"
  4. Select AVR/GNU C Compiler/Symbols
  5. Press the green plus icon
  6. Add the target frequency of your controller (here: "F_CPU=8000000")
  7. Press "OK".

009

Build

010

Build the complete project: Menu "Build", Submenu "Build Solution"

AVR mkII

On my own Windows 10 environment, it was required to install a different usb driver for the AVRISP mkII.

011

Clone this wiki locally