[Top][All Lists]

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

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

From: Jan Waclawek
Subject: Re: [avr-gcc-list] Allocating variables to a fixed address
Date: Tue, 12 May 2009 12:08:11 +0200

>I simply require a way to fix absolutely this jump table in memory.
>Whether I write it in C or assembler seems to me to be irrelevant, as is
>using an array of pointer to functions, because I still have the problem
>of fixing these at absolute addresses.
>If anyone knows a way to do this, I would very much appreciate it.

The attachment illustrates what I mean by jumptable in asm, and its usage (see 
main). Address of .mysection was fixed to 0x00FF by passing it to the linker 
through avr-gcc ("-Wl,--section-start,.mysection=0xFF00"). 

It of course can be a separate asm file, and the individual lines can be 
generated by a handy macro; but those are only unimportant details.

Enjoy! ;-)


reply via email to

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