[Top][All Lists]

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

Re: [Re: [avr-gcc-list] Allocating variables to a fixed address]

From: Bernard Fouché
Subject: Re: [Re: [avr-gcc-list] Allocating variables to a fixed address]
Date: Wed, 13 May 2009 14:14:11 +0200
User-agent: Thunderbird (Windows/20090302)

Robert von Knobloch wrote:
Curiously I could not use e.g.

asm ("test_pgm_read_byte:        jmp pgm_read_byte");
"undefined reference to 'pgm_read_byte'" although it is defined and in

Where pgm_read_byte is a library function from avr-libc.
I think this is because pgm_read_byte() is a macro.

Now another mechanism could have been setup: using an external interrupt pin to generate a software interrupt, and using that software interrupt to perform calls to functions in a PC BIOS way: in that case the caller need not to know the location of the called functions, the interrupt driver compiled and linked with the main application uses its own jump table which is not exposed to external modules. However the API setup is more complex since you have to pass the 'function id' of the called functions in some register before generating the software interrupt.

reply via email to

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