|
From: | Tyler Hall |
Subject: | Re: [avr-gcc-list] rcall should be call? |
Date: | Sun, 13 Apr 2003 14:55:02 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.0.2) Gecko/20021216 |
void beefedUpFunc(void); void targetFunc(void); void main(void) { targetFunc(); } void beefedUpFunc(void) { ...lots of bogus code here... } void targetFunc(void) { int i; for (i=0; i<10; i++); }And the goal was to quickly beef up beefedUpFunc() with dummy code. I figured the quickest way (that could also be easily followed in a dissassemble) was to actually use 32-bit instructions in an asm() directive, so I used asm("call 0"::); over and over. And behold, the make failed saying that was invalid with cpu type avr2 (gcc actually made the complaint)! Sure enough, my mistake was that I forgot to specify -mmcu=avr5 in my CFLAGs, even though I had remembered to put -mavr5 in LDFLAGS.
Thanks, Tyler Marek Michalkiewicz wrote:
On Sun, Apr 06, 2003 at 04:04:04PM -0500, Tyler Hall wrote:Hi, I working on a growing project written in C, targetting the mega323. I've hit a strange problem and narrowed it down to this: making a function call from main() to one of my other functions (which gets compiled/linked way past the 2k distance) the thing dies. Looking at the objdump I see that gcc felt it should attempt an rcall to the function even though the opcode operand could never reach the address.Please send me a simple test case, complete with avr-gcc options used. Marek _______________________________________________ avr-gcc-list mailing list address@hidden http://www.avr1.org/mailman/listinfo/avr-gcc-list
[Prev in Thread] | Current Thread | [Next in Thread] |