Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch.embedded > #31025
| From | kegs@provalid.com (Kent Dickey) |
|---|---|
| Newsgroups | comp.arch.embedded |
| Subject | Re: gcc: NOLOAD and .noinit |
| Date | 2022-03-21 04:43 +0000 |
| Organization | provalid.com |
| Message-ID | <t18vq5$ff3$1@dont-email.me> (permalink) |
| References | <t13v61$b72$1@dont-email.me> |
In article <t13v61$b72$1@dont-email.me>, pozz <pozzugno@gmail.com> wrote: >I usually don't touch linker script of my development system, sincerely >I can't read every details of a linker script, so I'm in trouble now. > >As explained in my previous post, I need to avoid zeroing a static big >variable, because it is allocated in SDRAM and SDRAM isn't available >when zeroing of bss sections (and initialization of data sections) occurs. > >My development system allows me to use .noinit section, so I'm studying >how it works. I suspect you can come up with a linker-based solution, but I think you may want to look at your problem differently. In C/C++, you can form a pointer to any location you want. So if your SDRAM is at 0x2000_0000, just do: char *sdram_ptr = (char *)0x20000000; (For 64-bit systems, this will need to be 0x20000000L or something similar). And then just use sdram_ptr[offset] to access whatever SDRAM location you want--after SDRAM has been initialized. Kent
Back to comp.arch.embedded | Previous | Next — Previous in thread | Find similar | Unroll thread
gcc: NOLOAD and .noinit pozz <pozzugno@gmail.com> - 2022-03-19 08:02 +0100
Re: gcc: NOLOAD and .noinit David Brown <david.brown@hesbynett.no> - 2022-03-19 11:33 +0100
Re: gcc: NOLOAD and .noinit pozz <pozzugno@gmail.com> - 2022-03-19 16:20 +0100
Re: gcc: NOLOAD and .noinit David Brown <david.brown@hesbynett.no> - 2022-03-19 16:49 +0100
Re: gcc: NOLOAD and .noinit Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2022-03-19 12:46 +0100
Re: gcc: NOLOAD and .noinit pozz <pozzugno@gmail.com> - 2022-03-19 16:27 +0100
Re: gcc: NOLOAD and .noinit Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2022-03-19 18:57 +0200
Re: gcc: NOLOAD and .noinit kegs@provalid.com (Kent Dickey) - 2022-03-21 04:43 +0000
csiph-web