include files

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, I'm reading a guide about AVR assembly, which says you should include the include file for the MPU at the beggining of your code, which defines the pointer registers and hardware specific port adresses etc... for the particular MPU.

The tutorial says these are of the form "xxxxdef.inc", but all I found on atmels software page (under "AVR IBIS - mega files") were a bunch of files of the form "xxxx.ibs".

I'm using AVR studio and the ATmega8, so for example in the "mega8" folder I had 9 files of the form "m8xxxx.ibs". Are these the files I'm looking for, and if so do I need to copy them into some folder of AVR studio or something?

Also how do I know which one of these 9 files to include? Is there some format to the files refering to the particular MPU and package?

Cheers

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AVRStudio Help => Atmel Tools Online Help => AVRStudio => Getting Started => Getting Started with IDE Development:

Quote:
...If you develop for a specific device in mind you should include the *.def.inc file for the part. Each part has it's own *.inc file that defines all internal registers, bits and a lot of other stuff that makes it simpler for you to write code for the part. In addition the *.inc file sets the device directive for the assembler, letting the assembler know which part you are developing for.

The part files are found in the \Program Files\Atmel\AVRTools\AVRAssembler\Àppnotes folder on your computer. A include file for ATmega8 will typically be named "m8def.inc". You do not have to give a path with the *.inc file as long as it is found in the default directory.

...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks!