avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Calling function with hard coded address


From: Simon Han
Subject: [avr-gcc-list] Calling function with hard coded address
Date: Tue, 31 Oct 2006 21:30:54 -0800

Hi all,

        I am trying to call functions with hard coded address as follow.

typedef void (*func_type)( void );

((func_type) 0x1D400)();

The problem is that the generated code is slightly different... (shown below)

ff 95 00 ea     call    0x7fd400

Compare to standard function call (shown below)

0e 94 00 ea   call   0x1d400

What happened was that the upper 8 bits (bit16 to bit23 of address bits) are set to 1's instead of 0's.

My questions are following.

1. Is this a bug?

2. is there a way to get around this?

I am using avr-gcc 3.4.3 and binutil 2.15.

Thank you for any suggestion,
Simon







reply via email to

[Prev in Thread] Current Thread [Next in Thread]