<?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>DATA to XDATA issue</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/15471/data-to-xdata-issue</link><description> Hi people, 
 
I&amp;#39;ve some troubles with some variables declaration. 
I&amp;#39;m using the old Keil comp&amp;#238;ler C51 V5.50. 
 
When writing : 
 U8 u8CommandIndex=0; with U8 = unsigned char, it&amp;#39;s ok. 
 
Now I want to relocate the variable into the XDATA segment. The</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: DATA to XDATA issue</title><link>https://community.arm.com/thread/121903?ContentTypeID=1</link><pubDate>Mon, 28 Apr 2003 04:20:58 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:33b58080-d168-44e8-934a-7626c129c968</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;i&gt;&amp;quot;The XRAM on the 66x devices is NOT enabled by default. You must turn this memory on before you begin using it.&amp;quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
As I&amp;#39;ve said before:&lt;br /&gt;
&lt;i&gt;the Compiler &amp;amp; Linker setup options (usually) simply &lt;/i&gt;&lt;b&gt;inform&lt;/b&gt;&lt;i&gt; the tools about your target; &lt;b&gt;they do &lt;/b&gt;&lt;/i&gt;not&lt;i&gt; generate any code which may be necessary to configure the hardware - &lt;/i&gt;you have to write that yourself!!&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.keil.com/forum/docs/thread2252.asp"&gt;http://www.keil.com/forum/docs/thread2252.asp&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DATA to XDATA issue</title><link>https://community.arm.com/thread/55002?ContentTypeID=1</link><pubDate>Mon, 28 Apr 2003 04:11:21 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:95f6c30c-9df1-418b-9d59-b3f1ae84ffde</guid><dc:creator>REY Stephane</dc:creator><description>&lt;p&gt;I&amp;#39;ve seen this issue before. I&amp;#39;m going to check.&lt;br /&gt;
Thanks a lot for you comment.&lt;br /&gt;
&lt;br /&gt;
I&amp;#39;ll inform you of the result&lt;br /&gt;
&lt;br /&gt;
Regards&lt;br /&gt;
Stephane&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DATA to XDATA issue</title><link>https://community.arm.com/thread/39736?ContentTypeID=1</link><pubDate>Mon, 28 Apr 2003 01:27:47 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e812b261-7209-4700-83be-1aad779b2cc2</guid><dc:creator>terrance peiris</dc:creator><description>&lt;p&gt;Hi I hope u get the answer, If not the defintion&lt;br /&gt;
U8 xdata not xdata U8&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DATA to XDATA issue</title><link>https://community.arm.com/thread/110216?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2003 14:40:52 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:11ac0463-224b-4f55-9d7e-30d6b57f7e2f</guid><dc:creator>Jon Ward</dc:creator><description>&lt;p&gt;Exactly as Eric suggests!&lt;br /&gt;
&lt;br /&gt;
The XRAM on the 66x devices is NOT enabled by default.  You must turn this memory on before you begin using it.&lt;br /&gt;
&lt;br /&gt;
Refer to the following knowledgebase article:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.keil.com/support/docs/1978.htm"&gt;http://www.keil.com/support/docs/1978.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Jon&lt;/b&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DATA to XDATA issue</title><link>https://community.arm.com/thread/95338?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2003 06:08:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a2a1eab1-2f0e-4d07-b3cf-5481b87f6923</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;You need to modify startup so that the bits in the SFR are set for internal XRAM before the XDATA clear takes place.&lt;br /&gt;
&lt;br /&gt;
Erik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DATA to XDATA issue</title><link>https://community.arm.com/thread/55001?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2003 03:33:21 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:44d36acc-4595-4b1b-8917-6f703e4640a3</guid><dc:creator>REY Stephane</dc:creator><description>&lt;p&gt;yes, I&amp;#39;ve set the end of XDATA as follow :&lt;br /&gt;
&lt;pre&gt;XDATALEN	EQU	0F00H	; the length of XDATA memory in bytes.
				; 8Kb = 1F00H
				; 4Kb = 0F00H&lt;/pre&gt;
&lt;br /&gt;
I&amp;#39;m using p89c664 with 4K of internal RAM.&lt;br /&gt;
&lt;br /&gt;
I don&amp;#39;t understand how it&amp;#39;s possible to have some variable keeping their last value if the XDATA RAM is cleared by Startup.a51 code as follow :&lt;br /&gt;
&lt;pre&gt;IF XDATALEN &amp;lt;&amp;gt; 0
		MOV	DPTR,#XDATASTART
		MOV	R7,#LOW (XDATALEN)
  IF (LOW (XDATALEN)) &amp;lt;&amp;gt; 0
		MOV	R6,#(HIGH XDATALEN) +1
  ELSE
		MOV	R6,#HIGH (XDATALEN)
  ENDIF
		CLR	A
XDATALOOP:	MOVX	@DPTR,A
		INC	DPTR
		DJNZ	R7,XDATALOOP
		DJNZ	R6,XDATALOOP
ENDIF&lt;/pre&gt;
&lt;br /&gt;
Moreover, in my code, why it&amp;#39;s not initialized in XDATA when writting what I&amp;#39;ve described in myprevious post.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Stephane&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DATA to XDATA issue</title><link>https://community.arm.com/thread/39735?ContentTypeID=1</link><pubDate>Wed, 05 Feb 2003 18:21:53 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:356be6a0-2b73-4bca-999b-381b8e702233</guid><dc:creator>Jon Ward</dc:creator><description>&lt;p&gt;Did you modify the startup code to clear XDATA?&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Jon&lt;/b&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>