I am trying to link code into a ROM image which can be splitted into two regions later. Each region must starts at a predefined location respectively. How do I specify in my C code, and how to instruct linker to perform the link so each object goes to the right region in the image? Ming-I Sun
I'm trying to do pretty much the same thing, as I understand it. I want to locate code in the code space (beginning at 0x0000) with code data to transfer at 0x4000. Run the program to process this, and then vector to another code space beginning at 0x10000 and keep running with a new set of transfer code at 0x15000H. Since the code I'm running is identical, I found that I can switch back and forth between 0x0000 and 0x10000 using a pin from port 3. But I don't know how to locate the code. I have tried the "pragma" directive in C and making an assembly module. Neither has worked so far. But I'll try to let you know. John Stirton, Godigital, Fremont, CA, USA
The Compiler creates the object modules; the Linker assigns their addresses [1] Therefore you need to use Linker options - see the Linker manual. [1] some toolchains have a separate "Locator" which does this