Themen / Inhaltsliste / Deutsch

AVR Studio with Plugin AVRGCC

Content (automatic)

How to use AVR Studio with Plugin AVRGCC to compile some of the cpp files from HOME\CC\...

Installation

Download gnuavr from (File: [WinAVR-20060125-install.exe]) from sf.net http://winavr.sourceforge.net
Download Atmel AVR Studio 4 (File : [aStudio4.12SP1b462.exe]) from the Atmel home page http://www.atmel.com
Download  (File: PONYPROGV206F) from teh lancos homepage http://www.lancos.com/

First install winavr, which installs as well sh, and other tools to C:\WinAVR\bin its help is installed in C:\WinAVR\doc ...,
C:\WinAVR\doc\avr-libc\avr-libc-user-manual-1.4.3.pdf -
C:\WinAVR\doc\gcc\cpp.pdf -
C:\WinAVR\doc\gcc\gcc.pdf -
C:\WinAVR\doc\simulavr-0.1.2.1\simulavr.pdf -

Then install and start the Atmel AVR Studio.

Invocation

[Start] [Programs] [Atmel AVR Tools] [AVR STudio 4]

Project preparation

[Project] [New Project]
Project Type : AVR GCC
Location : C:\HOME\CC\QQ\AVR
[ ] Create initial file (untick this option - you will use one of the files in the directory C:\HOME\CC\QQ)
Project name: QQTRAFF
-- Next >> --
Select Platform AVR Simulator, Device AT90S2323 or 8535, whatever

Now you see the AVR Studio with an empty project.
  QQTRAFF (default)
   +- Source Files
   +- Header Files
   +- External Dependencies
   +- Other Files


Right Click [Source Files],  Add existing source files qqtraff.cpp

[Project] [Configuration Options]
Select left, "Include Directories" [Add...] C:\HOME\CC\INCLUDE

Now leave the AVR studio and edit the Makefile: copy the makfeile e.g.from C:\HOME\CC\QQ\AVR\QQTSHAR\Makefile to the new project directory (e.g. to C:\HOME\CC\UTIL\AVR\explname\Makefile and edit it: Replace the projects and main programs name, and add more library files.

Add a line which tells to make the creation of an object file, depend on a CPP file:
.o.cpp:
Us an external Makefile, Use the Makefile from HOME\CC\QQ\AVR\QQTRAFF as

Errors:
Problem with "Microsoft Visual C++ Runtime Library".
(Problem occures sometimes - so save the workspace from time to time)

Problem when continune the same directory
Message: Mapped files at 'C:\HOME\cc\qq\AVR\QQTSHAR\' to 'C:\HOME\cc\qq\AVR\QQTSHAR\'.

In the source files use #if !defined AVR to have code to be compiled for usage with the AVR only.

Certified Projects, (which did compile)

Project Build OK Simulation o.k. target o.k. Comment to the status
qqmain




qqtraff 2006-05-21


Needs to simulate faster. Needs to check to burn in a hardware
qqtshar
2006-05-23
2006-05-23
You will not see it runs
may be optimized / programmed again in assembler
qqtstraf



should blink, but uses the tshar to create the time slices
qqtsser
2006-08-08


perform a simple dialog, using tshar to create the time slices and tsser to access the serial IO

Crashes with WinAVR Version 4.12 Service Pack 4 Build 498

AVR Studio        4.12.498  Service Pack 4
GUI Version        4, 12, 0, 491
AVR Simulator        1, 0, 1, 8
ATmega8535        213

Operating System
Major            5
Minor            1
PlatformID        2
Build            2600
Service Pack 2

Plugins:

AvrLcdPlugin        1, 0, 0, 13
AvrPluginAvrAsmObject    1, 0, 0, 43
AvrPluginavrgccplugin    1, 0, 0, 6
Stk500Dll            1, 0, 1, 0


Disassembler:

Have a project in Debug simulation ATMEGA8535, a WinAVR Project with external makefile
View Disassembler
Use the mouse wheel to roll up and down

See also

linavr.htm - Usage in Linux
winavr.htm - Usage of WinAVR in Windows (2000) XP

www