PC undefined for WINAVR???

Aug 03, 2008 4 Replies

I'm in the process of porting a graphics library downloaded from avrfeaks.net from AVR Assembler to avr-as.



I'm now getting undefined references to PC. Does GAS not have a PC symbol defined? Can anyone point me to something that I'm doing wrong that would keep PC from not being defined? Can anyone suggest a work- around?



Thanks,



K

I know nothing about WINAVR, but PC is normally used to refer to the ProgramCounter. I suggest you read the source and see if this makes sense.

[mail]: Chuck F (cbfalconer at maineline dot net) [page]: Try the download section.

I just went through the user manual and didn't see a reference to PC, this despite a heckuva lot of windows stuff in there. When I read the original post, I was worried that winavr was going to make itself unaware of its own operating system. I think 'PC' is undefined in winavr.

What men value in this world is not rights but privileges. 7 H. L. Mencken

Are there any instructions that allow you to access the PC directly in any case?

Regards, Richard. + http://www.FreeRTOS.org & http://www.FreeRTOS.org/shop 17 official architecture ports, more than 6000 downloads per month. + http://www.SafeRTOS.com Certified by TÜV as meeting the requirements for safety related systems.

The PC (program counter) register is sometimes referred to as IP (instruction pointer). Same thing, different mnemonic traditions --- gas mostly follows the AT&T assembly syntax rather than the Intel assembly syntax, but I think for register names gas tries to follow the chip vendor's conventions, whatever they are for that particular CPU.

But as Richard/FreeRTOS says, is the PC (or IP) register even visible on AVRs? I don't think it is. What's the instruction you're running into trouble with?

Wim Lewis , Seattle, WA, USA. PGP keyID 27F772C1

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required