codevisionavr user manual - arctan2.1.6.4 transferring the compiled program to the avr chip after...

773
CodeVisionAVR VERSION 3.26 User Manual

Upload: dangtram

Post on 05-Feb-2018

227 views

Category:

Documents


2 download

TRANSCRIPT

  • CodeVisionAVR VERSION 3.26

    User Manual

  • CodeVisionAVR

    1998-2016 HP InfoTech S.R.L. Page 1

    CodeVisionAVR V3.26 User Manual Revision 61/03.2016 Copyright 1998-2016 Pavel Haiduc and HP InfoTech S.R.L. All rights reserved. No part of this document may be reproduced in any form except by written permission of the author. All rights of translation reserved.

  • CodeVisionAVR

    1998-2016 HP InfoTech S.R.L. Page 2

    Table of Contents

    1. Introduction...................................................................................................................................... 13

    1.1 Credits ........................................................................................................................................ 14

    2. Using the CodeVisionAVR Extension for Atmel Studio .............................................................. 15

    2.1 Working with Projects and Solutions .......................................................................................... 15

    2.1.1 Creating a New Project using the CodeWizardAVR........................................................... 15

    2.1.2 Creating a New Project without using the CodeWizardAVR .............................................. 19

    2.1.3 Opening an Existing Project or Solution............................................................................. 22

    2.1.4 Importing a CodeVisionAVR V2 Project ............................................................................. 23

    2.1.5 Configuring the Project ....................................................................................................... 25

    2.1.6 Obtaining an Executable Program...................................................................................... 26

    2.1.6.1 Building the Project..................................................................................................... 27

    2.1.6.2 Cleaning Up the Project Output Directories................................................................ 30

    2.1.6.3 Using the Function Call Tree ...................................................................................... 30

    2.1.6.4 Transferring the Compiled Program to the AVR Chip after Build ............................... 31

    2.1.7 Debugging the Executable Program................................................................................... 34

    2.2 The Tools Menu.......................................................................................................................... 35

    2.2.1 The CodeWizardAVR Automatic Program Generator ........................................................ 35

    2.2.2 The Arduino Program Uploader.......................................................................................... 36

    2.2.3 The LCD Vision Font and Image Editor/Converter............................................................. 37

    3. The CodeVisionAVR Integrated Development Environment ...................................................... 38

    3.1 Using the Integrated Development Environment Workspace .................................................... 38

    3.2 Working with Files ...................................................................................................................... 49

    3.2.1 Creating a New File ............................................................................................................ 49

    3.2.2 Opening an Existing File..................................................................................................... 50

    3.2.3 Files History ........................................................................................................................ 50

    3.2.4 Editing a File ....................................................................................................................... 51

  • CodeVisionAVR

    1998-2016 HP InfoTech S.R.L. Page 3

    3.2.4.1 Searching/Replacing Text........................................................................................... 52

    3.2.4.2 Setting Bookmarks...................................................................................................... 52

    3.2.4.3 Jumping to a Symbol Definition or Declaration........................................................... 52

    3.2.4.4 Jumping to a Specific Line Number in the Edited File................................................ 53

    3.2.4.5 Printing a Text Selection............................................................................................. 53

    3.2.4.6 Indenting/Unindenting a Text Selection...................................................................... 53

    3.2.4.7 Commenting/Uncommenting a Text Selection ........................................................... 53

    3.2.4.8 Match Braces.............................................................................................................. 53

    3.2.4.9 Inserting Special Characters in the Text..................................................................... 54

    3.2.4.10 Using the Auto Complete Functions ......................................................................... 55

    3.2.4.11 Using Code Folding .................................................................................................. 56

    3.2.5 Saving a File ....................................................................................................................... 56

    3.2.6 Renaming a File.................................................................................................................. 57

    3.2.7 Printing a File...................................................................................................................... 58

    3.2.8 Closing a File ...................................................................................................................... 58

    3.2.9 Closing Multiple Files.......................................................................................................... 59

    3.2.10 Comparing Files................................................................................................................ 60

    3.2.11 Using the Code Templates ............................................................................................... 62

    3.2.12 Using the Clipboard History.............................................................................................. 63

    3.3 Working with Projects ................................................................................................................. 64

    3.3.1 Creating a New Project....................................................................................................... 64

    3.3.2 Opening an Existing Project ............................................................................................... 68

    3.3.3 Exporting a Project ............................................................................................................. 69

    3.3.4 Exporting a Project to the CodeVisionAVR Extension for Atmel Studio............................. 70

    3.3.5 Adding Notes or Comments to the Project ......................................................................... 70

    3.3.6 Configuring the Project ....................................................................................................... 71

    3.3.6.1 Adding or Removing a File from the Project............................................................... 71

    3.3.6.2 Setting the Project Output Directories ........................................................................ 73

  • CodeVisionAVR

    1998-2016 HP InfoTech S.R.L. Page 4

    3.3.6.3 Setting the C Compiler Options .................................................................................. 74

    3.3.6.4 Setting the 1 Wire Library Options.............................................................................. 89

    3.3.6.5 Setting the Bit-Banged I2C Library Options ................................................................ 90

    3.3.6.6 Setting the MMC/SD/SD HC Card Library Options .................................................... 91

    3.3.6.7 Setting the Alphanumeric LCD Library Options.......................................................... 93

    3.3.6.8 Setting the Graphic Display Library Options............................................................... 94

    3.3.6.9 Setting the Resistive Touchscreen Library Options.................................................... 95

    3.3.6.10 Setting the USB Library Options............................................................................... 96

    3.3.6.11 Executing an User Specified Program before Build ................................................. 97

    3.3.6.12 Transferring the Compiled Program to the AVR Chip after Build ............................. 98

    3.3.6.13 Executing an User Specified Program after Build .................................................. 101

    3.3.7 Obtaining an Executable Program.................................................................................... 103

    3.3.7.1 Checking Syntax....................................................................................................... 104

    3.3.7.2 Compiling the Project................................................................................................ 105

    3.3.7.3 Building the Project................................................................................................... 107

    3.3.7.4 Cleaning Up the Project Output Directories........