EmbDev.net

Forum: ARM programming with GCC/GNU tools defining .bss section in SDRAM


von Amit C. (aseem)


Rate this post
useful
not useful
Hi,

     I'm able to interface SDRAM with lpc2478.But now my .bss section is
too large to fit in SRAM, & trying to locate entire .bss section in
SDRAM.
     Is it right to use SDRAM for storing variables in SDRAM? Will it
affects my code.

Thanks.

von Martin T. (mthomas) (Moderator)


Rate this post
useful
not useful
Amit Chatre wrote:
>      I'm able to interface SDRAM with lpc2478.But now my .bss section is
> too large to fit in SRAM, & trying to locate entire .bss section in
> SDRAM.
Create an additional memory area in the linker-script and assign the
.bss (.bss.*) C-sections to this area. Take the given
section-definitions as templates. Make sure to enable/setup the
memory-interface before writing zeros to bss during startup.

>      Is it right to use SDRAM for storing variables in SDRAM? Will it
> affects my code.
I do not fully understand you question. Maybe the access to the external
SDRAM will be slower than internal SRAM. Check the datasheet and the
RAM-interface setup (wait-states, bus-width etc.).
For performace reasons it might be better keep the "standard" bss in
internal SRAM end use the extra sections for huge arrays in external RAM
(see gcc-manual variable attribute section).

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.