Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.system > #586

Re: How to create a fixed address for a vaiable ??

Newsgroups comp.os.linux.development.system
Date 2014-01-22 01:05 -0800
References <ecedda60-477b-4732-bca3-70310bd33792@googlegroups.com> <f3pud9hhcq769e316b15r861jkct0on3q0@4ax.com> <ebad653f-3306-4c02-8018-93009779195d@googlegroups.com>
Message-ID <740440d7-f7a7-467d-bf63-ed4b2a0ccc46@googlegroups.com> (permalink)
Subject Re: How to create a fixed address for a vaiable ??
From Hemanth Venkatappa <hemanthvenkatappa@gmail.com>

Show all headers | View raw


On Wednesday, 22 January 2014 10:03:54 UTC+1, Hemanth Venkatappa  wrote:
> On Wednesday, 22 January 2014 07:26:51 UTC+1, Tim Roberts  wrote:
> 
> > hemanthvenkatappa@gmail.com wrote:
> 
> > 
> 
> > 
> 
> > 
> 
> > >Example : int a[30];
> 
> > 
> 
> > >
> 
> > 
> 
> > >If i initialize as above in my c program. How to make that variable to 
> 
> > 
> 
> > >have a fixed address. So that I can use the variable name and addresses
> 
> > 
> 
> > >in the A2l file. 
> 
> > 
> 
> > 
> 
> > 
> 
> > You are trying to solve your problem in the wrong way.  You should let the
> 
> > 
> 
> > address be assigned, then pull the address from the linker map and generate
> 
> > 
> 
> > the A2L file from that.
> 
> > 
> 
> > -- 
> 
> > 
> 
> > Tim Roberts, timr@probo.com
> 
> > 
> 
> > Providenza & Boekelheide, Inc.
> 
> 
> 
> Thank you very much. Could you tell me how to do that ??
> 
> I am using eclipse IDE.

Thank you very much for the reply.
I have created a memory linker script section as below
MEMORY
{
MYMEMORY(rw) : ORIGIN = 0x40000000 , LENGTH = 30
}

.myvarloc (NOLOAD):
{
*(.myvarloc)

} > MYMEMORY



In my C program :
__attribute__ ((section(".myvarloc"))) uint8 measurements [30];


my problem : how to add this linker script to my Eclipse IDE ??
OR How to link with it my C program ???

Could you please help me ?? 

Back to comp.os.linux.development.system | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

How to create a fixed address for a vaiable ?? hemanthvenkatappa@gmail.com - 2014-01-20 16:23 -0800
  Re: How to create a fixed address for a vaiable ?? Lusotec <nomail@nomail.not> - 2014-01-21 10:57 +0000
  Re: How to create a fixed address for a vaiable ?? Tim Roberts <timr@probo.com> - 2014-01-21 22:26 -0800
    Re: How to create a fixed address for a vaiable ?? Hemanth Venkatappa <hemanthvenkatappa@gmail.com> - 2014-01-22 01:03 -0800
      Re: How to create a fixed address for a vaiable ?? Hemanth Venkatappa <hemanthvenkatappa@gmail.com> - 2014-01-22 01:05 -0800
        Re: How to create a fixed address for a vaiable ?? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2014-01-22 15:24 +0000
          Re: How to create a fixed address for a vaiable ?? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2014-01-22 21:16 +0200
            Re: How to create a fixed address for a vaiable ?? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2014-01-22 20:04 +0000
              Re: How to create a fixed address for a vaiable ?? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2014-01-22 22:47 +0200

csiph-web