<?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>Problems to execute code</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/13994/problems-to-execute-code</link><description> Hello 
 
I&amp;#39;m trying to use my microcontroler- 
system with the Keil-Software. 
 
The sytem have got the following 
prefereces: 
- SAB 80c535 
- 32k RAM 
- 32k ROM 
-Memory-architekture: 
(external memory) 
 
 CODE XDATA
-------- --------- FFFFh
| | </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Problems to execute code</title><link>https://community.arm.com/thread/37191?ContentTypeID=1</link><pubDate>Wed, 13 Dec 2000 10:09:46 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3c9d1785-708e-44de-aac1-187ce410aa3f</guid><dc:creator>Keil Support</dc:creator><description>&lt;p&gt;Nice memory layout illustration!  I&amp;#39;ve made a modification&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;  CODE          XDATA
----------------------  FFFFh
|                    |
| RAM                |  Access using PSEN or RD to read
| 32kb               |  Access using WR to write
|                    |
----------------------  8000h
|      |     |       |  7FFFh
| ROM  |     |       |
| 32kb |     ---------
|      |     | LCD   |  0001h
|      |     |       |
--------     ---------  0000h&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Configuring the Monitor&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
With this memory map, you should configure the monitor as follows:&lt;br /&gt;
&lt;br /&gt;
Near the top of INSTALL.A51, you will find the following code: &lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;INT_ADR_OFF EQU 8000H   ; INTERRUPT VECTOR OFFSET IF MONITOR
                        ; IS INSTALLED AT ADDRESS 0000H
DEF_PC_VAL  EQU 8000H   ; DEFAULT PC VALUE AFTER START UP&lt;/pre&gt;
These values should be changed to 8000h as shown above.&lt;br /&gt;
&lt;br /&gt;
When you run the install program:&lt;br /&gt;
&lt;br /&gt;
* XDATASTART should be at FF&lt;br /&gt;
* CODESTART should be at 00&lt;br /&gt;
&lt;br /&gt;
The install command line will be:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;INSTALL ?? FF 00&lt;/pre&gt;
Refer to the following knowledgebase entry for more details:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.keil.com/support/docs/1221.htm"&gt;http://www.keil.com/support/docs/1221.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Creating Programs to Debug with MON51&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
When you create a program to download to the monitor in this configuration, you MUST relocate the program to start at 8000h.  If you use XDATA (RAM) you must also configure the start of XDATA so that when you write to it, you don&amp;#39;t overwrite your program.&lt;br /&gt;
&lt;br /&gt;
Refer to the following knowledgebase entry to set the program start address:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.keil.com/support/docs/189.htm"&gt;http://www.keil.com/support/docs/189.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Downloading Programs with the Debugger&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If everything was configured properly (the monitor and your program), the debugger downloads your program with NO errors.  If you receive error 22, that USUALLY means that the monitor is not properly configured.  Refer to the following knowledgebase entry for more details about how to check and solve that problem:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.keil.com/support/docs/863.htm"&gt;http://www.keil.com/support/docs/863.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Once you program is downloaded, you MAY need to type the following in the command window:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$=0x8000&lt;/pre&gt;
This sets the program counter to 8000h.&lt;br /&gt;
&lt;br /&gt;
Once that&amp;#39;s done, you are ready to begin testing your program.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Keil Support&lt;/b&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems to execute code</title><link>https://community.arm.com/thread/37042?ContentTypeID=1</link><pubDate>Wed, 13 Dec 2000 07:09:50 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2964076d-b295-416b-a9f6-2e339e4a3d58</guid><dc:creator>Mark Odell</dc:creator><description>&lt;p&gt;The 8051 is a Harvard arch. chip. You get 64K of code space and 64K of xdata space. Both spaces run from 0x0000 to 0xFFFF (they overlap in address but not physically). This gives you 128KB of code + xdata. Whether you use RAM for some of your code or ROM for some of your xdata does not make it von Neumann.&lt;br /&gt;
&lt;br /&gt;
- Mark&lt;br /&gt;
&lt;br /&gt;
P.S. Don&amp;#39;t forget, you also have DATA which runs from 0x00 - 0x7F and IDATA that overlaps in address and physically from 0x00 - 0x7F. IDATA does not overlap DATA from 0x80 - 0xFF if it exists as on the 8052 core machines.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>