Error: Can not find include file

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

Hello all!

First of all I want to apologize for the the below question, because, it may be very elementary, but, in reality I do now know how to solve it.

I have not been using the AVRStudio maybe since six months. Today I wanted to modify a program made last time I used the AVRStudio and I get the following errors:

K:\ARV:ASM\Battery_tester_and_TX\Battery_tester_and_tx.asm(14):error:Cannot find include file c:\Programas\Atmel\AVR Tools\AVRAssembler2\appnotes\tn13def.inc

The include file is in the location where is pointed, but I do not know why is not found.

I have also the folowing errors that I think it is because it doesn't finf the include file:
K:\ARV:K:\ARV:ASM\Battery_tester_and_TX\Battery_tester_and_tx.asm(177):error: YL: Unkown intruction or macro.

K:\ARV:K:\ARV:ASM\Battery_tester_and_TX\Battery_tester_and_tx.asm(177):error:systax error, unexpedted ','

The code I have is the following:

Your help is appreciated.

Manuel

Timer:
	clr		YL                               ;clear register
	clr		YH								 ;clear register
Timer1:
	sbiw	YH:YL,1							; decremente register
	brne	Timer1							;if not zero contiue
	dec		dly_cnt							; decrem. delay cnt
	brne	Timer1							;if not equal zero continue
	ret										;return

Your help is appreciated.

Manuel

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

Can you show the actual .include you are using?

Also you may want to simply things by simply putting a copy of tn13def.inc in C:\ then:

include "C:\tn13def.inc"

However, in reality the way you should be able to use Studio is just using:

include "tn13def.inc"

Studio already knows the directory to look in for XXXdef.inc files so even without giving a path it should find it.

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

Calwson,

Thanks for your answer.

the include line is as follows:

.include "c:\Programas\Atmel\AVR Tools\AVRAssembler2\appnotes\tn13def.inc" 

I am going to try your suggestions. I guess there is some thing in the PC that has changed because it already worked with this include sentence for long a time.

Since last time I used the AVRStudio I already installed some software like Arduino IDE, Skype, etc. so, do you think that some of these programs are causing problems?

Is there (in AVRStudio menu/options) any way where we can redefine the path?

Thanks in advance.
Manuel

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

Quote:

Is there (in AVRStudio menu/options) any way where we can redefine the path?

You don't need to. When AS4 runs the assembler it is in:

\Atmel\AVR Tools\AVRAssembler2

The def.inc files are in:

\Atmel\AVR Tools\AVRAssembler2\Appnotes

(I've always thought it was an odd name - they are not application notes!).

So the assembler just needs to look into ".\Appnotes\" to find XXXdef.inc when you:

.include "XXXdef.inc"

This is why it's not necessary to quote the entire path to the XXXdef.inc file in the .include as you have done.

I suspect that of you simply change your code to:

.include "tn13def.inc"

it will just work.

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

Clawson,

thanks, your sugestion works.

I just change to:

.include "tn13def.inc"

The program compiled without erros.

Thanks,
Manuel

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

Thought it would - whatever made you quote the path in the first place? AFAIK that's never been necessary (or advised).