Login

Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.

ARM Community: ARM Linker, Placing variables in memory, special cases - ARM Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

ARM Linker, Placing variables in memory, special cases Rate Topic: -----

#1 User is offline   junaid 

  • Member
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 05-May 08

Posted 20 April 2011 - 11:15 AM

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.


0

#2 User is offline   Jerry Fan 

  • Contributor
  • PipPip
  • Group: Members
  • Posts: 56
  • Joined: 10-January 11

Posted 07 May 2011 - 08:37 AM

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.?
1

#3 User is offline   junaid 

  • Member
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 05-May 08

Posted 12 May 2011 - 07:31 AM

Hi Jerry Fan,
<<why do you want to reserver that two bytes>>
I am writing some security applications, where i need to store the 2 Byte CRC of every RAM and Flash Data pages at the end of every Pages ( 1 Page = 256 Bytes). for that linker should not map any variable at the last two bytes of every 256 Byte block.

regards,
junaid
0

#4 User is offline   junaid 

  • Member
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 05-May 08

Posted 12 May 2011 - 07:35 AM

View PostJerry Fan, on 07 May 2011 - 08:37 AM, said:

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.?


Hi Jerry Fan,
<<why do you want to reserver that two bytes>>
I am writing some security applications, where i need to store the 2 Byte CRC of every RAM and Flash Data pages at the end of every Pages ( 1 Page = 256 Bytes). for that linker should not map any variable at the last two bytes of every 256 Byte block.

regards,
junaid
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic