We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Since using xdata, there is used for external RAM. The program file is hex. then, the part of xdata, where is located?
sir, not clear with your question. I think your program (in hex)is able to access XDATA. Pati
XDATA is used by your program to store data as it runs; The HEX file contains only your program code - it does not contain data.
Exactly, fully agreed with Mr.Neil. That's what, i want to say in my previous message.
hi, The HEX file contains only your program code - it does not contain data Hmm, in theory, HEX file may contain any data types. For example, HEX file may contain data loaded into EEPROM. Regards, Oleg
"Hmm, in theory, HEX file may contain any data types. For example, HEX file may contain data loaded into EEPROM." Yes, that's true - but I think you're jumping way ahead of the original questioner! What you describe requires specific ISP (In-System Programming) functions, or support in a device programmer. Note that the Keil tools also support placing Constants into XDATA, for systems that can map ROM into the XDATA space
"The HEX file contains only your program code - it does not contain data." But it does contain the values for initializing those static duration data objects that are defined with initializers.
Since using xdata, there is used for external RAM. The program file is hex. then, the part of xdata, where is located? I think you suffer from the misconception that the program is loaded into XDATA, it is not. the '51 is a vonNeuman architecture, not a PC. Erik
"But it [the Hex file] does contain the values for initializing those static duration data objects that are defined with initializers." Yes, but that is code that the processor has to execute to copy the values from CODE space to XDATA space each time it runs. Apart from the special cases already noted, XDATA is not loaded direct from the Hex file.
No. The 8051 family is a modified Harvard construct. Not vonNeuman. You can emulate vonNeuman by logically oring PSEN* and RD*
Brad, Thanks for correcting my late in the day royal screw up. Of course, the '51 is Harvard. Erik
Thank you for all reply. These replies are all useful. How to create the file such as *.xk(k=1..31 or 63), which is part of program used for programmer pogramming. How to produce the file used for EEPROM? whether the program used xdata, there should create two files? one is 8051 hex file, another file is used for EEPROM?
That means how to set the envirnoment for code banking, such as how to create the code banking file? Whether should have a L51_bank.obj and L51_bank.a51 ? such as I have a file 'extRAM.c' the program is over 4k for 8051. then how to creat the code bank file?
the program is over 4k for 8051. then how to creat the code bank file? I think you have totally misunderstood the purpose of banking. The purpose is NOT to cram more code into the same size memory (that would be impossible), the purpose is to allow more memory than the 64k the '51 can address. If you code size is less than 64k, do not consider banking. Erik
My progam 'DATA' segment is too large, how to solve it ?