<?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>8051 ERROR C146 &amp;#39;P4&amp;#39; invalid base address</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/20330/8051-error-c146-p4-invalid-base-address</link><description> Hi! 
 
I hope you can help me with this. I have a 8051 C146 Error in the uvision keil compiler inside Silicon labs IDE. 
The error is 
*** ERROR C146 IN LINE 320 OF C8051F020.H: &amp;#39;P4&amp;#39; invalid base address 
 
The line of code giving the error is: 
 
sbit</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: 8051 ERROR C146 'P4' invalid base address</title><link>https://community.arm.com/thread/87794?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2006 17:26:14 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6114fefd-71a6-4c50-8477-d07965646d2a</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;It would be helpful if the description of the C146 error message referenced the restriction on bit-addressable SFR addresses:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.keil.com/support/man/docs/c51/c51_c146.htm"&gt;http://www.keil.com/support/man/docs/c51/c51_c146.htm&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 8051 ERROR C146 'P4' invalid base address</title><link>https://community.arm.com/thread/46366?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2006 02:48:12 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4b747223-a906-47d0-9304-63db49377340</guid><dc:creator>Keil Software Support Intl.</dc:creator><description>&lt;p&gt;See also:&lt;br /&gt;
&lt;a href="http://www.keil.com/support/docs/1916.htm"&gt;http://www.keil.com/support/docs/1916.htm&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 8051 ERROR C146 'P4' invalid base address</title><link>https://community.arm.com/thread/123324?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2006 02:44:52 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4da0ee9b-9bd7-4b63-ac31-2680862f3bd7</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;i&gt;&amp;quot;Too bad they can&amp;#39;t/won&amp;#39;t update the 8051.&amp;quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Who is &amp;quot;they&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
What is &amp;quot;&lt;i&gt;the&lt;/i&gt; 8051&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
There must be literally hundreds of manufacturers producing literally thousands of chips based on the 8051 architecture:&lt;br /&gt;
&lt;a href="http://www.keil.com/dd/chips/all/8051.htm"&gt;http://www.keil.com/dd/chips/all/8051.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
If you changed the bit-addressing scheme, you would effectively not have an 8051 any more!&lt;br /&gt;
You would break the compatibility throughout this vast range of products - you would need a whole new toolset!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 8051 ERROR C146 'P4' invalid base address</title><link>https://community.arm.com/thread/112208?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2006 13:02:41 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0a39f9ff-f070-4093-9d9d-9544edc53879</guid><dc:creator>Richard Howes</dc:creator><description>&lt;p&gt;I see. Thanks. I kinda figured that it was the hardware engineers. Too bad they can&amp;#39;t/won&amp;#39;t update the 8051.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 8051 ERROR C146 'P4' invalid base address</title><link>https://community.arm.com/thread/98250?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2006 12:30:32 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0e10cc31-d40c-4417-b0ae-4d269ce29ccb</guid><dc:creator>Drew Davis</dc:creator><description>&lt;p&gt;&lt;i&gt;Non-8 divisible port addresses are not bit assignable. What genious decided that would be a good idea? &lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Goes all the way back to the original 8051 architecture decisions at Intel.&lt;br /&gt;
&lt;br /&gt;
Bit instructions take one byte of address.  Notice that there are 0x10 bytes of bit-addressable memory.  The other addressable bits are in SFRs.  You can practically see the hardware guys tapping off the high bit in their address decoder.  0 -&amp;gt; RAM, 1 -&amp;gt; SFR.&lt;br /&gt;
&lt;br /&gt;
Then, you have to decode the next 7 bits to an actual SFR.  It&amp;#39;s very simple to take bits 6:3 as the SFR address, and use bits 2:0 to select the individual bit from that byte.  That means the bits appear in every eighth SFR address, which is to say the addresses ending in 0 or 8.&lt;br /&gt;
&lt;br /&gt;
Really simple circuit, even at the expense of strangeness at the software level.  That&amp;#39;s classic Intel design philosophy for you.  Save gates where you can and let the programmers deal with it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 8051 ERROR C146 'P4' invalid base address</title><link>https://community.arm.com/thread/123316?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2006 12:08:21 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ee27027b-aece-40ba-9753-21a07ef756cf</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;such as?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 8051 ERROR C146 'P4' invalid base address</title><link>https://community.arm.com/thread/112207?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2006 12:01:19 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:053bbd7b-72bd-4d13-88b4-afb1841d2af0</guid><dc:creator>Richard Howes</dc:creator><description>&lt;p&gt;A genius at &amp;#39;SILabd&amp;#39;/Cygnal could of found a solution that was more &amp;#39;advantageois&amp;#39;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 8051 ERROR C146 'P4' invalid base address</title><link>https://community.arm.com/thread/98248?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2006 11:58:09 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e2a9e396-1d1a-4f3b-9419-2d5c221c005a</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;&lt;i&gt;What genious decided that would be a good idea?&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
the &amp;#39;genius&amp;#39; realized that with only 256 bit addresses available there needed to be some prioritizing.&lt;br /&gt;
&lt;br /&gt;
Now, a &amp;#39;genius&amp;#39; at SILabd (naah, that would be Cygnal) could have decided to locate P4 at a bit addressable address in another page, but I will not even attempt to judge whether that would have been advantageois (a page switch vs using an and)&lt;br /&gt;
&lt;br /&gt;
Erik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 8051 ERROR C146 'P4' invalid base address</title><link>https://community.arm.com/thread/74183?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2006 11:52:11 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e2c0011b-9c61-4967-9513-be0798ba6258</guid><dc:creator>Richard Howes</dc:creator><description>&lt;p&gt;Yeah. I got it. I found other people&amp;#39;s posts. Non-8 divisible port addresses are not bit assignable. What genious decided that would be a good idea?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 8051 ERROR C146 'P4' invalid base address</title><link>https://community.arm.com/thread/46365?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2006 11:48:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6eca5afd-1bb8-4b66-80f6-ce6eed50f904</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;well, how do you propose that the compiler will do something the hardware is incapable of.  The SFR address of P4 is 0x84!&lt;br /&gt;
&lt;br /&gt;
Erik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>