(The RAM is physically alwayas the
same in CODE and XDATA)
In my opinion this is a von Neumann
architekture.
Facts:
The monitor (mon51) runs properly. I
can communicate with the system.
The debbugger also communicates with the
system. But something with the code
download doesn't work. dScope (DK51)
reports Error 22.
When I try it with the uV2 debugger, the
code seems to be downloaded (statusbar of
downloading counts up to 100%), but I can't
Execute them (but no errors are reported).0
In the target-options I configured that
"Off-chip-code memory" starts at 0000h and
"Off-chip XDATA memory" starts at 8000h.
This Values I used also to generate the
monitor file for de EPPROM.
Ok.. I hope that somebody have got a solution
for my problem...
Yours cincerly
Michael Bigler
Read-Only
Author Mark Odell
Posted 13-Dec-2000 13:09 GMT
Toolset C51
RE: Problems to execute code
Mark Odell
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.
- Mark
P.S. Don'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.
Read-Only
Author Keil Support
Posted 13-Dec-2000 16:09 GMT
Toolset C51
RE: Problems to execute code
Keil Support
Nice memory layout illustration! I've made a modification
CODE XDATA
---------------------- FFFFh
| |
| RAM | Access using PSEN or RD to read
| 32kb | Access using WR to write
| |
---------------------- 8000h
| | | | 7FFFh
| ROM | | |
| 32kb | ---------
| | | LCD | 0001h
| | | |
-------- --------- 0000h
Configuring the Monitor
With this memory map, you should configure the monitor as follows:
Near the top of INSTALL.A51, you will find the following code:
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
These values should be changed to 8000h as shown above.
When you run the install program:
* XDATASTART should be at FF
* CODESTART should be at 00
The install command line will be:
INSTALL ?? FF 00
Refer to the following knowledgebase entry for more details:
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't overwrite your program.
Refer to the following knowledgebase entry to set the program start address:
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:
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.