??? 11/05/07 07:55 Read: times |
#146589 - You really need to study some basics first! Responding to: ???'s previous message |
Shehryar Shaukat said:
i will be executing code from the MMC... To do that, the MMC will need to be memory-mapped into the 8051's CODE space - is it? This won't work via any sort of serial or command-based interface. ...and will be executing the hex file record by record. No, that will certainly not work! An 8051 (or any other processor, for that matter) cannot execute an Intel Hex file. An Intel Hex file is merely a way of representing and transmitting binary data in a text-only format - it is not an executable format! You need to: 1. Read the Hex file from the MMC 2. Convert the Hex file back to the corresponding binary executable form 3a. Save the converted binary executable to your RAM mapped into XDATA space 3b. Re-map your RAM into CODE space 4. Start the new code. (3a and 3b may not be separate steps, depending on your hardware) This has been mentioned already: http://www.8052.com/forum/read.phtml?id=146452 Although Erik's words may seem harsh, they do appear to be true: http://www.8052.com/forum/read.phtml?id=146453 Well the questions which arise then are... You need to sort out the fundamental issues above first! 1. does each record represent one instruction, or multiple instructions Have you actually looked at the definition of the Intel Hex File Format yet? The original is here: ftp://download.intel.com/support/processors/i960/devtools/intelhex.pdf See also: http://www.keil.com/support/docs/1584.htm will i have to follow the the addressing scheme followed by the original hex file Yes, of course you will! Think about it: IF you change the addresses where the code is loaded, how will all your jump instructions know the new location to jump to...?! so when my hex file refers them will these functions be out of scope ? A hex file has no concept of "scope"; neither do 8051 instructions - they will simply use whatever address you give them... |