I want to put the code written in assembly file at specific location say 0x5000. Can someone give me procedure with proper example for doing the same code? I have checked using "AREA" directive, but unable to find how to specify the address in it.
"Use the AREA directive to name the section and set its attributes. The attributes are placed after the name, separated by commas." www.keil.com/.../armasm_dom1359731143697.htm www.keil.com/.../armasm_dom1361290002714.htm
So the AREA directive is about naming sections & setting their attributes - not about placing them in memory.
The tool which allocates sections to specific addresses is the Linker...
Why, seems to be trying to do unnecessarily complex things with a skill set that doesn't support the task. Start by mastering the simpler tasks before tackling the complex ones.
Consider using a linker script (scatter file) to control code placement in regions of memory.
Thanks Andrew and Pier. I was also trying to do the code placement using scatter file , but I was unable to find the correct method. But now I found the proper scatter file for the code placement. I posted this thread only to ensure that, whether there is only a single way (scatter file) or any other simple ways.
You csn try using a SCATTER file.