Hi
I am using the OLIMEX LPC-E2294 board with external ram fitted. The
development tools I am using are ECLIPSE and GNU tool chain and the IAR
Kick Start compiler. I would like to locate and map some but all the
ram variables to the external ram as I am running out of internal ram
space(16K). What do I do to the linker files to achieve this. I know
that I need initialise the external memory access on the 2294 at start
up. But what do I need to do to tell the code to access the external ram
after that
Regards
Jean-Jacques
Using external memory with LPC-2294
Started by ●September 9, 2007
Reply by ●September 9, 20072007-09-09
You're using the IAR compiler within Eclipse ?
You should really try to use gcc, I think it would really ease up a lot of
things for you.
Sorry for the kinda off topic but I really mean it.
Alex Garcia
On 9/9/07, jdauchot wrote:
>
> Hi
>
> I am using the OLIMEX LPC-E2294 board with external ram fitted. The
> development tools I am using are ECLIPSE and GNU tool chain and the IAR
> Kick Start compiler. I would like to locate and map some but all the
> ram variables to the external ram as I am running out of internal ram
> space(16K). What do I do to the linker files to achieve this. I know
> that I need initialise the external memory access on the 2294 at start
> up. But what do I need to do to tell the code to access the external ram
> after that
>
> Regards
>
> Jean-Jacques
>
>
>
You should really try to use gcc, I think it would really ease up a lot of
things for you.
Sorry for the kinda off topic but I really mean it.
Alex Garcia
On 9/9/07, jdauchot wrote:
>
> Hi
>
> I am using the OLIMEX LPC-E2294 board with external ram fitted. The
> development tools I am using are ECLIPSE and GNU tool chain and the IAR
> Kick Start compiler. I would like to locate and map some but all the
> ram variables to the external ram as I am running out of internal ram
> space(16K). What do I do to the linker files to achieve this. I know
> that I need initialise the external memory access on the 2294 at start
> up. But what do I need to do to tell the code to access the external ram
> after that
>
> Regards
>
> Jean-Jacques
>
>
>
Reply by ●September 9, 20072007-09-09
No I use Eclipse with gcc AND iar kick start separatly.
I am using IAR as most examples are using IAR and porting them to gcc.
I will use Eclipse once I pass the 32K size.
I still need to know how to map these variables to external ram.
I can set and use a pointer variable to external ram, but would like
the linker to do it for me
Regards
Jean-Jacques
--- In l..., Alexandre wrote:
>
> You're using the IAR compiler within Eclipse ?
> You should really try to use gcc, I think it would really ease up a
lot of
> things for you.
> Sorry for the kinda off topic but I really mean it.
>
> Alex Garcia
>
> On 9/9/07, jdauchot wrote:
> >
> > Hi
> >
> > I am using the OLIMEX LPC-E2294 board with external ram fitted.
The
> > development tools I am using are ECLIPSE and GNU tool chain and
the IAR
> > Kick Start compiler. I would like to locate and map some but all
the
> > ram variables to the external ram as I am running out of internal
ram
> > space(16K). What do I do to the linker files to achieve this. I
know
> > that I need initialise the external memory access on the 2294 at
start
> > up. But what do I need to do to tell the code to access the
external ram
> > after that
> >
> > Regards
> >
> > Jean-Jacques
> >
> >
> >
>
>
I am using IAR as most examples are using IAR and porting them to gcc.
I will use Eclipse once I pass the 32K size.
I still need to know how to map these variables to external ram.
I can set and use a pointer variable to external ram, but would like
the linker to do it for me
Regards
Jean-Jacques
--- In l..., Alexandre wrote:
>
> You're using the IAR compiler within Eclipse ?
> You should really try to use gcc, I think it would really ease up a
lot of
> things for you.
> Sorry for the kinda off topic but I really mean it.
>
> Alex Garcia
>
> On 9/9/07, jdauchot wrote:
> >
> > Hi
> >
> > I am using the OLIMEX LPC-E2294 board with external ram fitted.
The
> > development tools I am using are ECLIPSE and GNU tool chain and
the IAR
> > Kick Start compiler. I would like to locate and map some but all
the
> > ram variables to the external ram as I am running out of internal
ram
> > space(16K). What do I do to the linker files to achieve this. I
know
> > that I need initialise the external memory access on the 2294 at
start
> > up. But what do I need to do to tell the code to access the
external ram
> > after that
> >
> > Regards
> >
> > Jean-Jacques
> >
> >
> >
>
>
Reply by ●September 9, 20072007-09-09
>
> I still need to know how to map these variables to external ram.
> I can set and use a pointer variable to external ram, but would like
> the linker to do it for me
>
> Regards
>
> Jean-Jacques
By default, initialized variables are allocated in the .data section
and uninitialized variables are allocated in the .bss section. FWIW,
code is usually allocated in the .text section.
These sections are, in turn, placed in certain areas of memory by the
linker script. Code is placed in flash, initialized data is placed in
flash and copied to ram by the startup code while unitialized data is
simply placed in ram and initialized to 0 by the startup code.
You can create new sections and name them almost anything you want
while placing them at any desired address. It would probably be a
mistake if the sections overlapped.
You have complete control over defining variables in any named section
just as you can control the location of code. But, to do it, you have
to read the gcc and ld manuals (assuming you are using the GNU
toolchain). See page 224 of the GCC manual or just search for
"section" until you get to the part where it describes putting objects
in sections. Chapter 3 of the 'ld' manual discusses the linker script
and spends a lot of time on SECTIONS.
If you are using something other than the GNU toolchain, you will have
to find the proper documentation.
Richard
> I still need to know how to map these variables to external ram.
> I can set and use a pointer variable to external ram, but would like
> the linker to do it for me
>
> Regards
>
> Jean-Jacques
By default, initialized variables are allocated in the .data section
and uninitialized variables are allocated in the .bss section. FWIW,
code is usually allocated in the .text section.
These sections are, in turn, placed in certain areas of memory by the
linker script. Code is placed in flash, initialized data is placed in
flash and copied to ram by the startup code while unitialized data is
simply placed in ram and initialized to 0 by the startup code.
You can create new sections and name them almost anything you want
while placing them at any desired address. It would probably be a
mistake if the sections overlapped.
You have complete control over defining variables in any named section
just as you can control the location of code. But, to do it, you have
to read the gcc and ld manuals (assuming you are using the GNU
toolchain). See page 224 of the GCC manual or just search for
"section" until you get to the part where it describes putting objects
in sections. Chapter 3 of the 'ld' manual discusses the linker script
and spends a lot of time on SECTIONS.
If you are using something other than the GNU toolchain, you will have
to find the proper documentation.
Richard
Reply by ●September 9, 20072007-09-09
Hi Richard
Thanks for your reply
Where can I find the right manuals and documantations relavent to the
GCC compilers tool chain ?
Regards
Jean-Jacques
--- In l..., "rtstofer" wrote:
>
> >
> > I still need to know how to map these variables to external ram.
> > I can set and use a pointer variable to external ram, but would
like
> > the linker to do it for me
> >
> > Regards
> >
> > Jean-Jacques
>
> By default, initialized variables are allocated in the .data section
> and uninitialized variables are allocated in the .bss section.
FWIW,
> code is usually allocated in the .text section.
>
> These sections are, in turn, placed in certain areas of memory by
the
> linker script. Code is placed in flash, initialized data is placed
in
> flash and copied to ram by the startup code while unitialized data
is
> simply placed in ram and initialized to 0 by the startup code.
>
> You can create new sections and name them almost anything you want
> while placing them at any desired address. It would probably be a
> mistake if the sections overlapped.
>
> You have complete control over defining variables in any named
section
> just as you can control the location of code. But, to do it, you
have
> to read the gcc and ld manuals (assuming you are using the GNU
> toolchain). See page 224 of the GCC manual or just search for
> "section" until you get to the part where it describes putting
objects
> in sections. Chapter 3 of the 'ld' manual discusses the linker
script
> and spends a lot of time on SECTIONS.
>
> If you are using something other than the GNU toolchain, you will
have
> to find the proper documentation.
>
> Richard
>
Thanks for your reply
Where can I find the right manuals and documantations relavent to the
GCC compilers tool chain ?
Regards
Jean-Jacques
--- In l..., "rtstofer" wrote:
>
> >
> > I still need to know how to map these variables to external ram.
> > I can set and use a pointer variable to external ram, but would
like
> > the linker to do it for me
> >
> > Regards
> >
> > Jean-Jacques
>
> By default, initialized variables are allocated in the .data section
> and uninitialized variables are allocated in the .bss section.
FWIW,
> code is usually allocated in the .text section.
>
> These sections are, in turn, placed in certain areas of memory by
the
> linker script. Code is placed in flash, initialized data is placed
in
> flash and copied to ram by the startup code while unitialized data
is
> simply placed in ram and initialized to 0 by the startup code.
>
> You can create new sections and name them almost anything you want
> while placing them at any desired address. It would probably be a
> mistake if the sections overlapped.
>
> You have complete control over defining variables in any named
section
> just as you can control the location of code. But, to do it, you
have
> to read the gcc and ld manuals (assuming you are using the GNU
> toolchain). See page 224 of the GCC manual or just search for
> "section" until you get to the part where it describes putting
objects
> in sections. Chapter 3 of the 'ld' manual discusses the linker
script
> and spends a lot of time on SECTIONS.
>
> If you are using something other than the GNU toolchain, you will
have
> to find the proper documentation.
>
> Richard
>
Reply by ●September 9, 20072007-09-09
--- In l..., "jdauchot" wrote:
>
> Hi Richard
>
> Thanks for your reply
>
> Where can I find the right manuals and documantations relavent to the
> GCC compilers tool chain ?
>
> Regards
>
> Jean-Jacques
http://www.gnu.org/manual/manual.html
Study the linker script you have and you will see the various sections
and how they are allocated. You will also see symbols defined in the
linker script and referenced in the startup code. All this stuff ties
together.
Ignore your code for the moment and just study the startup code and
the linker script.
Richard
>
> Hi Richard
>
> Thanks for your reply
>
> Where can I find the right manuals and documantations relavent to the
> GCC compilers tool chain ?
>
> Regards
>
> Jean-Jacques
http://www.gnu.org/manual/manual.html
Study the linker script you have and you will see the various sections
and how they are allocated. You will also see symbols defined in the
linker script and referenced in the startup code. All this stuff ties
together.
Ignore your code for the moment and just study the startup code and
the linker script.
Richard