This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARM Linker, Placing variables in memory, special cases

Note: This was originally posted on 20th April 2011 at http://forums.arm.com

[font="Courier"][size="2"]I am using RVDS for developing security application over SC100 core.
I have a special requirement, that No variables should be placed at the last two bytes of every 256 Bytes block of RAM or Data area of Flash. Please help me how to achieve this with ARM linker\Compiler options.

[/size][/font]
Parents
  • Note: This was originally posted on 7th May 2011 at http://forums.arm.com

    I am not very fimiliar with RVDS. But i keil uvison, a lot of "short var_nouse __at__ (RAM_DATA_BASE + 256 -2)" and "short c_var_nouse __at__(ROM_RODATA_BASE + 256 -2)" can be used to reserverd the RAM or Flash space(last two byte of every 256 bytes).  In the link script, .data section should map to  RAM_DATA_BASE and .rodata section should map to RAM_DATA_BASE.  This method is not the best way but I think it works. If you find the smarter way, pls update. BTW, why do you want to reserver that two bytes.?
Reply
  • Note: This was originally posted on 7th May 2011 at http://forums.arm.com

    I am not very fimiliar with RVDS. But i keil uvison, a lot of "short var_nouse __at__ (RAM_DATA_BASE + 256 -2)" and "short c_var_nouse __at__(ROM_RODATA_BASE + 256 -2)" can be used to reserverd the RAM or Flash space(last two byte of every 256 bytes).  In the link script, .data section should map to  RAM_DATA_BASE and .rodata section should map to RAM_DATA_BASE.  This method is not the best way but I think it works. If you find the smarter way, pls update. BTW, why do you want to reserver that two bytes.?
Children
No data