This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Constant at a defined address


Phildale <Pdale@activer.com> writes:

> In other compilers this works
> 
> #define Address
> 
> const u8 Var[] @ Address = {
>     1,2,3
> }
> 
> so Var is alway at address, how can i do this with teh GCC compiler?

You can't.

You can do something along these lines using the linker.  Read about
linker scripts in the linker manual.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]