defining .bss section in SDRAM

Moderator
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

A question of your own? This thread is over 17 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.