ARM Technical Support Knowledge Articles

RESERVING SPACE IN CODE MEMORY

Applies to: C51 C Compiler

Answer

QUESTION

My target hardware has ROM from 0000h to 7FFFh and from C000h to FFFFh. I need to reserve the memory from 8000h to BFFFh. How do I tell the linker not to place any program code in that area?

ANSWER

The easiest way to do this is to declare a 16K character array in code space as shown below:

code char dummy_block [0x4000] _at_ 0x8000;

This will declare a 16K array at address 0x8000 in the code space. The linker won't place code there. You program code will "flow" around this dummy array.

MORE INFORMATION

Article last edited on: 2004-06-07 13:05:23

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential