public inbox for gcc-cvs-wwwdocs@sourceware.org
help / color / mirror / Atom feed
* gcc-wwwdocs branch master updated. 2aad86e498b9ce0dd512bd42d35a2d380c53db18
@ 2024-02-13 12:58 Georg-Johann Lay
0 siblings, 0 replies; only message in thread
From: Georg-Johann Lay @ 2024-02-13 12:58 UTC (permalink / raw)
To: gcc-cvs-wwwdocs
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gcc-wwwdocs".
The branch, master has been updated
via 2aad86e498b9ce0dd512bd42d35a2d380c53db18 (commit)
from 34ef454fe986414fdf13731dd438998206e8aa09 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2aad86e498b9ce0dd512bd42d35a2d380c53db18
Author: Georg-Johann Lay <avr@gjlay.de>
Date: Tue Feb 13 13:56:13 2024 +0100
gcc-14: AVR: Add some clarifications.
diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
index 83fdc813..713f5139 100644
--- a/htdocs/gcc-14/changes.html
+++ b/htdocs/gcc-14/changes.html
@@ -363,17 +363,19 @@ a work-in-progress.</p>
memory per default and no more in RAM.
<ul>
<li>Only a 32 KiB block of program memory can be used to store
- .rodata in that way. Which block is used can be selected by
- defining symbol <code>__flmap</code>.
+ and access .rodata in that way. Which block is used can be selected
+ by defining symbol <code>__flmap</code>.
As an alternative, the byte address of the block can be specified
by symbol <code>__RODATA_FLASH_START__</code> which takes
- precedence over <code>__flmap</code>.</li>
+ precedence over <code>__flmap</code>.
+ For example, linking with
+ <nobr><code>-Wl,--defsym,__RODATA_FLASH_START__=32k</code></nobr>
+ choses the second 32 KiB block.</li>
<li>The default uses the last 32 KiB block, which is also the
hardware default for bit-field <code>NVMCTRL_CTRLB.FLMAP</code>.</li>
- <li>When a block other than the last 32 KiB block is used to store
- .rodata, then <code>NVMCTRL_CTRLB.FLMAP</code>
- must be initialized accordingly by hand, or a version of
- AVR-LibC that implements <a
+ <li>When a non-default block is used,
+ then <code>NVMCTRL_CTRLB.FLMAP</code> must be initialized accordingly
+ by hand, or AVR-LibC v2.2 that implements <a
href="https://github.com/avrdudes/avr-libc/issues/931">#931</a>
can be used. The latter initializes <code>NVMCTRL_CTRLB.FLMAP</code>
in the startup code and according to the value
@@ -383,7 +385,11 @@ a work-in-progress.</p>
<code>__flmap_lock</code> to a non-zero value will set bit
<code>NVMCTRL_CTRLB.FLMAPLOCK</code>. This will protect
<code>NVMCTRL_CTRLB.FLMAP</code> from any further changes —
- which would be Undefined Behaviour in C/C++.</li>
+ which would be Undefined Behaviour in C/C++. If you prefer to define
+ the symbol in a C/C++ file, an <code>asm</code> statement
+ can be used:<pre>
+__asm (".global __flmap_lock" "\n\t"
+ "__flmap_lock = 1");</pre></li>
<li>In order to return to the old placement of read-only data in RAM,
the new compiler option <code>-mrodata-in-ram</code> can be used.</li>
<li>Read-only data is located in output section <code>.rodata</code>,
-----------------------------------------------------------------------
Summary of changes:
htdocs/gcc-14/changes.html | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
hooks/post-receive
--
gcc-wwwdocs
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-13 12:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-13 12:58 gcc-wwwdocs branch master updated. 2aad86e498b9ce0dd512bd42d35a2d380c53db18 Georg-Johann Lay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).