Hi All, I plan to load custom application or bug correction code in any EEPROM address for my project. This code will be load using serial port. Is it possible to do it? Thank you. Best regards, Akram
Do you mean you want run-time relocatable code? Or you just want to do In-System Programming (ISP)? And possibly In-Application Programming (IAP)? By "EEPROM" do you mean Code memory - usually Flash?
Hi Andy, I mean run-time relocatable code. We can load this code in EEPROM or Flash memory. Is it possible to do it? Best regards, Akram
run-time relocatable code once again: The '51 ain't no PC Erik
The 8051 instruction set isn't particularly well suited to writing position-independent code. The processor would need a lot of PC-relative addressing modes for all the branch and jump instructions, as well as data access, and they're just not there. You could conceivably store relocation information along with the code, and locate it to the desired address when you programmed the program store (or when you loaded the code, if you don't execute out of the ROM). That will be a fair amount of trouble both for development and for the loader, so you have to decide how much the feature is really worth to you. Maybe you'd rather use an ARM7. That ISA is good for writing position-independent code, and the ARM compilers I've used even have options to generate such.