Adafruit is open and shipping! Let's build back better, together!
0

AVR Studio Newbe help with code
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

AVR Studio Newbe help with code

by Duffman on Thu Apr 03, 2008 11:25 pm

Hi,

I am just getting into the ARV and I bought the book "AVR An Introductory Course" by John Morton. I am trying to run through his exercises in the book using AVR Studio 4 and I am getting the following errors:

C:\Documents and Settings\Owner\Desktop\Led.asm(11): error: Undefined symbol: DDRB
C:\Documents and Settings\Owner\Desktop\Led.asm(12): error: Undefined symbol: DDRD
C:\Documents and Settings\Owner\Desktop\Led.asm(15): error: Undefined symbol: PortB
C:\Documents and Settings\Owner\Desktop\Led.asm(16): error: Undefined symbol: PortD
C:\Documents and Settings\Owner\Desktop\Led.asm(18): error: Undefined symbol: PortB

Here is my code:
.device at90s1200

; Declarations :

.def temp =r16

; Start of Program

rjmp Init ;
Init: ser temp ;
out DDRB, temp ;
out DDRD, temp ;

clr temp ;
out PortB, temp ;
out PortD, temp ;
Start:
sbi PortB,0 ;
rjmp Start ;

*********************************************
What am I doing wrong, this is pretty much code copied from the book with the comments cut out. Any help is appreciated.
Duffman
 
Posts: 2
Joined: Thu Apr 03, 2008 11:17 pm

by Duffman on Sat Apr 05, 2008 12:47 am

I figured it out.
I assumed AVR Suite would know where its "look-up file" would be without me specifying, I was wrong.
Duffman
 
Posts: 2
Joined: Thu Apr 03, 2008 11:17 pm

Please be positive and constructive with your questions and comments.