can we execute the code in ram memory in lpc915...if yes,how?
no no..i need to know if we can shift the control of the processor from one address location to another within the same source code..
is it ok to use
#pragma asm ORG 0x700h #pragma endasm
???is there anything else i need to specify for the compiler to generate assembler code??
no no.
No ... to what?
shift the control of the processor from one address location to another within the same source code..
Of course you can. That's exactly what happens every time you call another function.
Look, man, it's becoming painfully evident that you're desperately trying to achieve something. But nobody can help you if you just keep throwing random crumbs of jumbled information about that goal around, without letting anyone get a glimpse of the whole picture.
The stuff you've said so far makes little to no sense at all. So you really need to step back, relax, and start telling the story from the beginning.
Hi,
according to what i understood i think u want to copy some specific code from ROM to RAM area and execute from there right ?
If that's the case I think 1st you got to copy the code from ROM to RAM, have a function pointer pointing to the RAM location (eg 0x700 ) and call the function pointer.
For doing the above things its better if you have the code to be copied from ROM inside a function.
Then make the following modifications in the linker file. 1. Assign a (ROM) address for this function in the linker file. 2. Reserve some RAM location starting from the 0x700 (based on the example, but could be any RAM address) for copying the ROM code. Note the reserved RAM memory must to enough to store the entire function.
Hope this helps Do correct me if I am wrong.
the only way to execute from RAM in a '51 is by negative ORing !PSEN and !RD. This can only be done with external memory the lpc915 can not access external memory
Erik
You are wrong!
"according to what i understood i think u want to copy some specific code from ROM to RAM"
Look again - he abandoned that idea after the very first reply (in his second post):
On 17-Jun-2011 at 13:54, erkk wan Posted: "ok forget the ram memory"
"If that's the case I think 1st you got to copy the code from ROM to RAM"
Again, please re-read my first reply carefully: This has nothing to do with RAM or ROM - it's a matter of CODE and XDATA memory spaces.
Not the only method - some variants have specific means for remapping XDATA to CODE space...
My apologies. Thanks from Correcting :)