defining .bss section in SDRAM

Moderator #1174480
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).

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now