Remapping to Processor code region Vs Without remapping

What is the differences between:

1.Remapping memories to processor code region and 2.Executing the program code built with absolute addresses without remapping

I read something about executing multiple image in a microprocessor (ARM Cortex-M3) and i'm ambiguous about differences between executing with remapping image to "code space" and without remapping?

I would be grateful if you help me to understand these two concept clearly

thanks

--------------------------------------- Posted through

formatting link

Reply to
mohsenzandie
Loading thread data ...

It sounds like you're asking about how relocatable code works. Relocatable code is code that has little to no absolute memory references. That means it can (in theory) run successfully at any start address and references memory objects loaded at user defined addresses.

I'm no expert about relocatable code technology. Google will probably give you a sufficient number of matches if you give it "how does relocatable code work". I believe many modern tool sets can build relocatable code as an option.

JJS

Reply to
John Speth

It sounds like you are asking about Harvard architecture machines. These have program memory, and data memory. Instructions are fetched from program memory, never from data memory. Data cannot be fetched from or written to program memory (except using special features).

That means to be able to load and execute a program, there must be some special way to store data into program memory before executing it.

Reply to
Clifford Heath

Not so sure this is what he is asking but in my vocabulary this is called "position independent code", that's how it was called back in my 6809 days :-). Means exactly the same thing of course.

Last 20+ years I have been writing essentially position independent code (which is also reentrant), under dps this is "normal". One can run fixed address code and is allowed to write non-reentrant code as well but I don't know it these features work, never tried them out... :).

The OP seems to ask just about pages (4k on ARM?) being mapped as executable or not, I am not familiar with the ARM MMU so this is better explained by someone else.

Dimiter

====================================================== Dimiter Popoff, TGI

formatting link
======================================================
formatting link

Reply to
Dimiter_Popoff

Some DSP's can run code from data memory, I guess it's dependant upon processor type.

Cheers

Reply to
Martin Riddle

In which case they aren't (strict) Harvard architectures, as I pointed out.

The AVR is like that; special instructions support data reads on instruction space, which is annoyingly poorly handled by compilers for accessing constant data tables.

Reply to
Clifford Heath

I think you are going to have to try again, explaining in a lot more detail what you are trying to do. Give information about the processor in question, and how you hope the code will work.

Also make sure you are online and checking regularly for replies so that you can add information as requested. This is easier if you use a proper newsreader and newsclient, rather than a web interface like EmbeddedRelated.

There are plenty of knowledgeable people here who will help you if they can, but we need to know what you are asking!

(And if this is homework for a course of some sort, say so. People will try to give you helpful hints if you are honest about it.)

Reply to
David Brown

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.