defining memory addresses

David Korn dkorn@pixelpower.com
Wed Jan 9 10:21:00 GMT 2002


>-----Original Message-----
>From: Jan Van Belle [mailto:Jan.Van_Belle@alcatel.be]
>Sent: 09 January 2002 14:46

>TNX, I downloaded the ld manual
>
>David Korn wrote:
>
>> >Related to this: how can I effectively use the internal RAM?
>> 
>>   That's a strange question, or rather, I don't understand 
>what you mean
>> and why the answer isn't "put programs and variables in it, 
>same as usual."
>> "Internal" ram?  Do you mean some special block of ram built 
>into the CPU
>> itself ?
>
>Yep. Because then I have (guaranteed) a single cycle access to memory.
>For external RAM/ROM/FLASH/whatever this is not necessary the case...
>In fact I'd like to use that RAM as cache, but I guess you can't help me
>with that ;)

  Well, just a little :)  I'd say that the way to use that would be to
declare it as a separate memory block, and only put a special data 
section in there... I see Wolfgang has just given you the same advice
in his reply: use a section and the __attribute__((section ("iram")))
gcc option, then in your MEMORY directive, as well as the ram and rom
regions, you define a third for the internal ram, and in the SECTIONS
directive you need to say

SECTIONS {

  . .... other bits ... 

  .iram : {
        *.<sectionname>
      } > <regionname>

  . .... other bits ... 

}
       DaveK
-- 
Burn your ID card!  http://www.optional-identity.org.uk/
Help support the campaign, copy this into your .sig!


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list