<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>RVCT: Define to register (RO, WO) at the same location</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/42932/rvct-define-to-register-ro-wo-at-the-same-location</link><description> 
Hi 

 
When defining to (or more) registers at the same address the
linker return error (memory overlap). How to solve this ? 

 
Ex: 

 
// Read only 
volatile union { U32 REG; struct { U32 MIS : 1; // RD U32 :31; // RD
} BIT; } I2CMMIS __at (0x40020018</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: RVCT: Define to register (RO, WO) at the same location</title><link>https://community.arm.com/thread/98649?ContentTypeID=1</link><pubDate>Fri, 17 Nov 2006 05:51:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2f8b782e-0b2a-471b-bc5a-20ebbce682a3</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;want to use different name to the registers when reading or
writing&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Isn&amp;#39;t that exactly what a union gives you?&lt;/p&gt;

&lt;p&gt;
Why not:&lt;/p&gt;

&lt;pre&gt;
volatile union
{
   // Read-Only
   volatile union
   {
      U32 REG;
      struct { U32 MIS : 1; } BIT;
   } MIS;

   // Write-Only
   union
   {
      U32 REG;
      struct { U32 IC : 1; } BIT;
   } ICR ;

} I2CM  __at (0x40020018);
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RVCT: Define to register (RO, WO) at the same location</title><link>https://community.arm.com/thread/74561?ContentTypeID=1</link><pubDate>Fri, 17 Nov 2006 05:24:14 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:dc41ba3a-b6d4-4223-a288-cb25bf24f6a8</guid><dc:creator>Viktor Bucher</dc:creator><description>&lt;p&gt;&lt;p&gt;
No because want to use different name to the registers when
reading or writing&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RVCT: Define to register (RO, WO) at the same location</title><link>https://community.arm.com/thread/47240?ContentTypeID=1</link><pubDate>Fri, 17 Nov 2006 05:19:31 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0bd59f6c-6c5b-4528-8952-b3fed7aff173</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Have a union encompassing both definitions?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>